Module: wine Branch: master Commit: aad6fb4a424d3ae1952da1633073ff9a9b3abf82 URL: http://source.winehq.org/git/wine.git/?a=commit;h=aad6fb4a424d3ae1952da16330...
Author: Stefan Dösinger stefan@codeweavers.com Date: Thu Apr 14 19:32:50 2016 +0200
wined3d: Explicitly pass a wined3d_state structure to context_apply_draw_state().
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/wined3d/context.c | 4 ++-- dlls/wined3d/drawprim.c | 2 +- dlls/wined3d/wined3d_private.h | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index d683327..3cd7c8c 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -3318,9 +3318,9 @@ static void context_bind_shader_resources(struct wined3d_context *context, const }
/* Context activation is done by the caller. */ -BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_device *device) +BOOL context_apply_draw_state(struct wined3d_context *context, + const struct wined3d_device *device, const struct wined3d_state *state) { - const struct wined3d_state *state = &device->state; const struct StateEntry *state_table = context->state_table; const struct wined3d_fb_state *fb = state->fb; unsigned int i; diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c index 6857b0d..bd62b68 100644 --- a/dlls/wined3d/drawprim.c +++ b/dlls/wined3d/drawprim.c @@ -488,7 +488,7 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s wined3d_surface_prepare(ds, context, location); }
- if (!context_apply_draw_state(context, device)) + if (!context_apply_draw_state(context, device, state)) { context_release(context); WARN("Unable to apply draw state, skipping draw.\n"); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 7c3ea65..0f55d79 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1582,7 +1582,8 @@ void context_alloc_occlusion_query(struct wined3d_context *context, void context_apply_blit_state(struct wined3d_context *context, const struct wined3d_device *device) DECLSPEC_HIDDEN; BOOL context_apply_clear_state(struct wined3d_context *context, const struct wined3d_state *state, UINT rt_count, const struct wined3d_fb_state *fb) DECLSPEC_HIDDEN; -BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_device *device) DECLSPEC_HIDDEN; +BOOL context_apply_draw_state(struct wined3d_context *context, + const struct wined3d_device *device, const struct wined3d_state *state) DECLSPEC_HIDDEN; void context_apply_fbo_state_blit(struct wined3d_context *context, GLenum target, struct wined3d_surface *render_target, struct wined3d_surface *depth_stencil, DWORD location) DECLSPEC_HIDDEN; void context_active_texture(struct wined3d_context *context, const struct wined3d_gl_info *gl_info,