Zebediah Figura : wined3d: Pass a wined3d_device_context to wined3d_device_set_render_state().
Alexandre Julliard
julliard at winehq.org
Mon May 17 15:45:32 CDT 2021
Module: wine
Branch: master
Commit: 308dd8bd32f7a575d790d012e7e6bd429b9e1ba3
URL: https://source.winehq.org/git/wine.git/?a=commit;h=308dd8bd32f7a575d790d012e7e6bd429b9e1ba3
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Sun May 16 16:36:36 2021 -0500
wined3d: Pass a wined3d_device_context to wined3d_device_set_render_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 | 7 ++++---
dlls/wined3d/device.c | 4 ++--
dlls/wined3d/wined3d_private.h | 2 ++
3 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 21aaa2e54b6..14076defaa9 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -1767,16 +1767,17 @@ static void wined3d_cs_exec_set_render_state(struct wined3d_cs *cs, const void *
device_invalidate_state(cs->c.device, STATE_RENDER(op->state));
}
-void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render_state state, DWORD value)
+void wined3d_device_context_emit_set_render_state(struct wined3d_device_context *context,
+ enum wined3d_render_state state, unsigned int value)
{
struct wined3d_cs_set_render_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_RENDER_STATE;
op->state = state;
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_texture_state(struct wined3d_cs *cs, const void *data)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 2cd0ac6bb38..7e1297f8896 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1675,7 +1675,7 @@ static void wined3d_device_set_render_state(struct wined3d_device *device,
else
{
device->cs->c.state->render_states[state] = value;
- wined3d_cs_emit_set_render_state(device->cs, state, value);
+ wined3d_device_context_emit_set_render_state(&device->cs->c, state, value);
}
if (state == WINED3D_RS_POINTSIZE && value == WINED3D_RESZ_CODE)
@@ -1854,7 +1854,7 @@ void CDECL wined3d_device_set_state(struct wined3d_device *device, struct wined3
for (i = 0; i < WINEHIGHEST_RENDER_STATE + 1; ++i)
{
- wined3d_cs_emit_set_render_state(device->cs, i, state->render_states[i]);
+ wined3d_device_context_emit_set_render_state(context, i, state->render_states[i]);
}
wined3d_device_context_emit_set_blend_state(context, state->blend_state, &state->blend_factor, state->sample_mask);
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 079b60e4a7a..4c308d2ac05 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -4808,6 +4808,8 @@ void wined3d_device_context_emit_set_predication(struct wined3d_device_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_render_state(struct wined3d_device_context *context,
+ enum wined3d_render_state state, unsigned int value) DECLSPEC_HIDDEN;
void wined3d_device_context_emit_set_rendertarget_view(struct wined3d_device_context *context, unsigned int view_idx,
struct wined3d_rendertarget_view *view) DECLSPEC_HIDDEN;
void wined3d_device_context_emit_set_sampler(struct wined3d_device_context *context, enum wined3d_shader_type type,
More information about the wine-cvs
mailing list