From: Matteo Bruni mbruni@codeweavers.com
Signed-off-by: Matteo Bruni mbruni@codeweavers.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- Trivial rebase on top of my series. --- dlls/wined3d/context.c | 18 +++++++++--------- dlls/wined3d/state.c | 4 ++-- dlls/wined3d/wined3d_private.h | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 51832652ed7..cda1ea0ac60 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -5531,24 +5531,24 @@ static void wined3d_context_gl_load_numbered_arrays(struct wined3d_context_gl *c checkGLcall("Loading numbered arrays"); }
-void context_update_stream_sources(struct wined3d_context *context, const struct wined3d_state *state) +void wined3d_context_gl_update_stream_sources(struct wined3d_context_gl *context_gl, + const struct wined3d_state *state) { - - if (context->use_immediate_mode_draw) + if (context_gl->c.use_immediate_mode_draw) return;
- context_unload_vertex_data(context); - if (context->d3d_info->ffp_generic_attributes || use_vs(state)) + context_unload_vertex_data(&context_gl->c); + if (context_gl->c.d3d_info->ffp_generic_attributes || use_vs(state)) { TRACE("Loading numbered arrays.\n"); - wined3d_context_gl_load_numbered_arrays(wined3d_context_gl(context), &context->stream_info, state); + wined3d_context_gl_load_numbered_arrays(context_gl, &context_gl->c.stream_info, state); return; }
TRACE("Loading named arrays.\n"); - context_unload_numbered_arrays(context); - context_load_vertex_data(context, &context->stream_info, state); - context->namedArraysLoaded = TRUE; + context_unload_numbered_arrays(&context_gl->c); + context_load_vertex_data(&context_gl->c, &context_gl->c.stream_info, state); + context_gl->c.namedArraysLoaded = TRUE; }
static void apply_texture_blit_state(const struct wined3d_gl_info *gl_info, struct gl_texture *texture, diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 729100adb21..08423e831fd 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -3863,14 +3863,14 @@ static void streamsrc(struct wined3d_context *context, const struct wined3d_stat { if (isStateDirty(context, STATE_VDECL)) return; - context_update_stream_sources(context, state); + wined3d_context_gl_update_stream_sources(wined3d_context_gl(context), state); }
static void vdecl_miscpart(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { if (isStateDirty(context, STATE_STREAMSRC)) return; - context_update_stream_sources(context, state); + wined3d_context_gl_update_stream_sources(wined3d_context_gl(context), state); }
static void vertexdeclaration(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 0aa379562d9..0a8c8ca920f 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2080,6 +2080,8 @@ HRESULT wined3d_context_gl_init(struct wined3d_context_gl *context_gl, struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; void wined3d_context_gl_load_tex_coords(const struct wined3d_context_gl *context_gl, const struct wined3d_stream_info *si, GLuint *current_bo, const struct wined3d_state *state) DECLSPEC_HIDDEN; +void wined3d_context_gl_update_stream_sources(struct wined3d_context_gl *context_gl, + const struct wined3d_state *state) DECLSPEC_HIDDEN;
HRESULT wined3d_context_vk_init(struct wined3d_context *context_vk, struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; @@ -2264,8 +2266,6 @@ void context_texture_update(struct wined3d_context *context, void context_unload_tex_coords(const struct wined3d_context *context) DECLSPEC_HIDDEN; void context_unmap_bo_address(struct wined3d_context *context, const struct wined3d_bo_address *data, GLenum binding) DECLSPEC_HIDDEN; -void context_update_stream_sources(struct wined3d_context *context, - const struct wined3d_state *state) DECLSPEC_HIDDEN;
/***************************************************************************** * Internal representation of a light