[PATCH 6/6] wined3d: Explicitly pass a wined3d_state structure to context_apply_draw_state().
Henri Verbeet
hverbeet at codeweavers.com
Thu Apr 14 12:32:50 CDT 2016
From: Stefan Dösinger <stefan at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
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,
--
2.1.4
More information about the wine-patches
mailing list