wined3d: Pass a wined3d_context_gl structure to context_unload_tex_coords().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2019-06-11 00:45:29 +04:30 committed by Alexandre Julliard
parent fd29561e97
commit 45c3b125c7
3 changed files with 6 additions and 5 deletions

View File

@ -5015,9 +5015,9 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s
context_release(context); context_release(context);
} }
void context_unload_tex_coords(const struct wined3d_context *context) void wined3d_context_gl_unload_tex_coords(const struct wined3d_context_gl *context_gl)
{ {
const struct wined3d_gl_info *gl_info = context->gl_info; const struct wined3d_gl_info *gl_info = context_gl->c.gl_info;
unsigned int texture_idx; unsigned int texture_idx;
for (texture_idx = 0; texture_idx < gl_info->limits.texture_coords; ++texture_idx) for (texture_idx = 0; texture_idx < gl_info->limits.texture_coords; ++texture_idx)
@ -5091,6 +5091,7 @@ void wined3d_context_gl_load_tex_coords(const struct wined3d_context_gl *context
/* This should match any arrays loaded in context_load_vertex_data(). */ /* This should match any arrays loaded in context_load_vertex_data(). */
static void context_unload_vertex_data(struct wined3d_context *context) static void context_unload_vertex_data(struct wined3d_context *context)
{ {
struct wined3d_context_gl *context_gl = wined3d_context_gl(context);
const struct wined3d_gl_info *gl_info = context->gl_info; const struct wined3d_gl_info *gl_info = context->gl_info;
if (!context->namedArraysLoaded) if (!context->namedArraysLoaded)
@ -5100,7 +5101,7 @@ static void context_unload_vertex_data(struct wined3d_context *context)
gl_info->gl_ops.gl.p_glDisableClientState(GL_COLOR_ARRAY); gl_info->gl_ops.gl.p_glDisableClientState(GL_COLOR_ARRAY);
if (gl_info->supported[EXT_SECONDARY_COLOR]) if (gl_info->supported[EXT_SECONDARY_COLOR])
gl_info->gl_ops.gl.p_glDisableClientState(GL_SECONDARY_COLOR_ARRAY_EXT); gl_info->gl_ops.gl.p_glDisableClientState(GL_SECONDARY_COLOR_ARRAY_EXT);
context_unload_tex_coords(context); wined3d_context_gl_unload_tex_coords(context_gl);
context->namedArraysLoaded = FALSE; context->namedArraysLoaded = FALSE;
} }

View File

@ -3474,7 +3474,7 @@ static void tex_coordindex(struct wined3d_context *context, const struct wined3d
*/ */
GLuint curVBO = gl_info->supported[ARB_VERTEX_BUFFER_OBJECT] ? ~0U : 0; GLuint curVBO = gl_info->supported[ARB_VERTEX_BUFFER_OBJECT] ? ~0U : 0;
context_unload_tex_coords(context); wined3d_context_gl_unload_tex_coords(context_gl);
wined3d_context_gl_load_tex_coords(context_gl, &context->stream_info, &curVBO, state); wined3d_context_gl_load_tex_coords(context_gl, &context->stream_info, &curVBO, state);
} }
} }

View File

@ -2111,6 +2111,7 @@ void wined3d_context_gl_release(struct wined3d_context_gl *context_gl) DECLSPEC_
void wined3d_context_gl_set_draw_buffer(struct wined3d_context_gl *context_gl, GLenum buffer) DECLSPEC_HIDDEN; void wined3d_context_gl_set_draw_buffer(struct wined3d_context_gl *context_gl, GLenum buffer) DECLSPEC_HIDDEN;
void wined3d_context_gl_texture_update(struct wined3d_context_gl *context_gl, void wined3d_context_gl_texture_update(struct wined3d_context_gl *context_gl,
const struct wined3d_texture_gl *texture_gl) DECLSPEC_HIDDEN; const struct wined3d_texture_gl *texture_gl) DECLSPEC_HIDDEN;
void wined3d_context_gl_unload_tex_coords(const struct wined3d_context_gl *context_gl) DECLSPEC_HIDDEN;
void wined3d_context_gl_update_stream_sources(struct wined3d_context_gl *context_gl, void wined3d_context_gl_update_stream_sources(struct wined3d_context_gl *context_gl,
const struct wined3d_state *state) DECLSPEC_HIDDEN; const struct wined3d_state *state) DECLSPEC_HIDDEN;
@ -2268,7 +2269,6 @@ void context_state_drawbuf(struct wined3d_context *context,
const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN;
void context_state_fb(struct wined3d_context *context, void context_state_fb(struct wined3d_context *context,
const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN;
void context_unload_tex_coords(const struct wined3d_context *context) DECLSPEC_HIDDEN;
void context_unmap_bo_address(struct wined3d_context *context, void context_unmap_bo_address(struct wined3d_context *context,
const struct wined3d_bo_address *data, GLenum binding) DECLSPEC_HIDDEN; const struct wined3d_bo_address *data, GLenum binding) DECLSPEC_HIDDEN;