wined3d: Pass a wined3d_device_context to wined3d_device_set_render_state().

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2021-05-16 16:36:36 -05:00 committed by Alexandre Julliard
parent 1d578e367d
commit 308dd8bd32
3 changed files with 8 additions and 5 deletions

View File

@ -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)

View File

@ -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);

View File

@ -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,