Zebediah Figura : wined3d: Pass a wined3d_device_context to wined3d_cs_emit_set_blend_state().

Alexandre Julliard julliard at winehq.org
Wed Mar 10 14:58:46 CST 2021


Module: wine
Branch: master
Commit: 906568e093e3e1d2214033010ccc924505883376
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=906568e093e3e1d2214033010ccc924505883376

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Tue Mar  9 20:08:59 2021 -0600

wined3d: Pass a wined3d_device_context to wined3d_cs_emit_set_blend_state().

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wined3d/cs.c              | 8 ++++----
 dlls/wined3d/device.c          | 4 ++--
 dlls/wined3d/wined3d_private.h | 5 +++--
 3 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 43f1d04dd0f..4d50ecba23b 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -1651,18 +1651,18 @@ static void wined3d_cs_exec_set_blend_state(struct wined3d_cs *cs, const void *d
     device_invalidate_state(cs->c.device, STATE_SAMPLE_MASK);
 }
 
-void wined3d_cs_emit_set_blend_state(struct wined3d_cs *cs, struct wined3d_blend_state *state,
-        const struct wined3d_color *blend_factor, unsigned int sample_mask)
+void wined3d_device_context_emit_set_blend_state(struct wined3d_device_context *context,
+        struct wined3d_blend_state *state, const struct wined3d_color *blend_factor, unsigned int sample_mask)
 {
     struct wined3d_cs_set_blend_state *op;
 
-    op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
+    op = wined3d_device_context_require_space(context, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
     op->opcode = WINED3D_CS_OP_SET_BLEND_STATE;
     op->state = state;
     op->factor = *blend_factor;
     op->sample_mask = sample_mask;
 
-    wined3d_device_context_submit(&cs->c, WINED3D_CS_QUEUE_DEFAULT);
+    wined3d_device_context_submit(context, WINED3D_CS_QUEUE_DEFAULT);
 }
 
 static void wined3d_cs_exec_set_depth_stencil_state(struct wined3d_cs *cs, const void *data)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 338b489c9b9..8ea7351f5fc 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1756,7 +1756,7 @@ void CDECL wined3d_device_set_blend_state(struct wined3d_device *device,
     state->blend_state = blend_state;
     state->blend_factor = *blend_factor;
     state->sample_mask = sample_mask;
-    wined3d_cs_emit_set_blend_state(device->cs, blend_state, blend_factor, sample_mask);
+    wined3d_device_context_emit_set_blend_state(&device->cs->c, blend_state, blend_factor, sample_mask);
     if (prev)
         wined3d_blend_state_decref(prev);
 }
@@ -2041,7 +2041,7 @@ void CDECL wined3d_device_set_state(struct wined3d_device *device, struct wined3
         wined3d_cs_emit_set_render_state(device->cs, i, state->render_states[i]);
     }
 
-    wined3d_cs_emit_set_blend_state(device->cs, state->blend_state, &state->blend_factor, state->sample_mask);
+    wined3d_device_context_emit_set_blend_state(context, state->blend_state, &state->blend_factor, state->sample_mask);
     wined3d_cs_emit_set_depth_stencil_state(device->cs, state->depth_stencil_state, state->stencil_ref);
     wined3d_cs_emit_set_rasterizer_state(device->cs, state->rasterizer_state);
 }
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 6fc743e74db..7dfa7d2211b 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -4741,8 +4741,6 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
         const RECT *dst_rect, HWND dst_window_override, unsigned int swap_interval, DWORD flags) DECLSPEC_HIDDEN;
 void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags) DECLSPEC_HIDDEN;
 void wined3d_cs_emit_reset_state(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
-void wined3d_cs_emit_set_blend_state(struct wined3d_cs *cs, struct wined3d_blend_state *state,
-        const struct wined3d_color *blend_factor, unsigned int sample_mask) DECLSPEC_HIDDEN;
 void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx,
         const struct wined3d_vec4 *plane) DECLSPEC_HIDDEN;
 void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture *texture,
@@ -4810,6 +4808,9 @@ static inline void wined3d_cs_push_constants(struct wined3d_cs *cs, enum wined3d
     cs->c.ops->push_constants(&cs->c, p, start_idx, count, constants);
 }
 
+void wined3d_device_context_emit_set_blend_state(struct wined3d_device_context *context,
+        struct wined3d_blend_state *state, const struct wined3d_color *blend_factor,
+        unsigned int sample_mask) DECLSPEC_HIDDEN;
 void wined3d_device_context_emit_set_constant_buffer(struct wined3d_device_context *context,
         enum wined3d_shader_type type, UINT cb_idx, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
 void wined3d_device_context_emit_set_shader(struct wined3d_device_context *context, enum wined3d_shader_type type,




More information about the wine-cvs mailing list