From 874ff93c0420db42fb0182f89314f0671645fee1 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Thu, 18 Mar 2021 23:16:37 -0500 Subject: [PATCH] wined3d: Pass a wined3d_device_context to wined3d_cs_emit_set_predication(). Signed-off-by: Zebediah Figura Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/cs.c | 7 ++++--- dlls/wined3d/device.c | 4 ++-- dlls/wined3d/wined3d_private.h | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 1611a9efd27..f7b682b627e 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -1123,16 +1123,17 @@ static void wined3d_cs_exec_set_predication(struct wined3d_cs *cs, const void *d cs->state.predicate_value = op->value; } -void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query *predicate, BOOL value) +void wined3d_device_context_emit_set_predication(struct wined3d_device_context *context, + struct wined3d_query *predicate, BOOL value) { struct wined3d_cs_set_predication *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_PREDICATION; op->predicate = predicate; op->value = value; - 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_viewports(struct wined3d_cs *cs, const void *data) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 267a8cae17d..4c914f6adc1 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1894,7 +1894,7 @@ void CDECL wined3d_device_set_state(struct wined3d_device *device, struct wined3 wined3d_cs_emit_set_index_buffer(device->cs, state->index_buffer, state->index_format, state->index_offset); - wined3d_cs_emit_set_predication(device->cs, state->predicate, state->predicate_value); + wined3d_device_context_emit_set_predication(context, state->predicate, state->predicate_value); for (i = 0; i < WINED3D_SHADER_TYPE_COUNT; ++i) { @@ -4399,7 +4399,7 @@ void CDECL wined3d_device_set_predication(struct wined3d_device *device, } state->predicate = predicate; state->predicate_value = value; - wined3d_cs_emit_set_predication(device->cs, predicate, value); + wined3d_device_context_emit_set_predication(&device->cs->c, predicate, value); if (prev) wined3d_query_decref(prev); } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 2541ca10c1e..0df57a91049 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -4755,8 +4755,6 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light_info *light) DECLSPEC_HIDDEN; void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, unsigned int idx, BOOL enable) DECLSPEC_HIDDEN; void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_material *material) DECLSPEC_HIDDEN; -void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, - struct wined3d_query *predicate, BOOL value) DECLSPEC_HIDDEN; void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render_state state, DWORD value) DECLSPEC_HIDDEN; void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx, @@ -4805,6 +4803,8 @@ void wined3d_device_context_emit_set_depth_stencil_state(struct wined3d_device_c struct wined3d_depth_stencil_state *state, unsigned int stencil_ref) DECLSPEC_HIDDEN; void wined3d_device_context_emit_set_depth_stencil_view(struct wined3d_device_context *context, struct wined3d_rendertarget_view *view) DECLSPEC_HIDDEN; +void wined3d_device_context_emit_set_predication(struct wined3d_device_context *context, + struct wined3d_query *predicate, BOOL value) DECLSPEC_HIDDEN; void wined3d_device_context_emit_set_rasterizer_state(struct wined3d_device_context *context, struct wined3d_rasterizer_state *rasterizer_state) DECLSPEC_HIDDEN; void wined3d_device_context_emit_set_rendertarget_view(struct wined3d_device_context *context, unsigned int view_idx,