wined3d: Pass a wined3d_device_context to wined3d_cs_emit_set_scissor_rects().

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-03-16 00:42:21 -05:00 committed by Alexandre Julliard
parent 06d2430679
commit e00ce29a5e
3 changed files with 9 additions and 7 deletions

View File

@ -1173,17 +1173,18 @@ static void wined3d_cs_exec_set_scissor_rects(struct wined3d_cs *cs, const void
device_invalidate_state(cs->c.device, STATE_SCISSORRECT);
}
void wined3d_cs_emit_set_scissor_rects(struct wined3d_cs *cs, unsigned int rect_count, const RECT *rects)
void wined3d_device_context_emit_set_scissor_rects(struct wined3d_device_context *context,
unsigned int rect_count, const RECT *rects)
{
struct wined3d_cs_set_scissor_rects *op;
op = wined3d_device_context_require_space(&cs->c, FIELD_OFFSET(struct wined3d_cs_set_scissor_rects, rects[rect_count]),
op = wined3d_device_context_require_space(context, FIELD_OFFSET(struct wined3d_cs_set_scissor_rects, rects[rect_count]),
WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_SET_SCISSOR_RECTS;
memcpy(op->rects, rects, rect_count * sizeof(*rects));
op->rect_count = rect_count;
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_rendertarget_view(struct wined3d_cs *cs, const void *data)

View File

@ -1858,7 +1858,7 @@ void CDECL wined3d_device_set_scissor_rects(struct wined3d_device *device, unsig
memset(state->scissor_rects, 0, sizeof(state->scissor_rects));
state->scissor_rect_count = rect_count;
wined3d_cs_emit_set_scissor_rects(device->cs, rect_count, rects);
wined3d_device_context_emit_set_scissor_rects(&device->cs->c, rect_count, rects);
}
void CDECL wined3d_device_get_scissor_rects(const struct wined3d_device *device, unsigned int *rect_count, RECT *rects)
@ -1977,7 +1977,7 @@ void CDECL wined3d_device_set_state(struct wined3d_device *device, struct wined3
wined3d_cs_emit_set_material(device->cs, &state->material);
wined3d_device_context_emit_set_viewports(context, state->viewport_count, state->viewports);
wined3d_cs_emit_set_scissor_rects(device->cs, state->scissor_rect_count, state->scissor_rects);
wined3d_device_context_emit_set_scissor_rects(context, state->scissor_rect_count, state->scissor_rects);
for (i = 0; i < LIGHTMAP_SIZE; ++i)
{
@ -5211,7 +5211,7 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
SetRect(&state->scissor_rects[0], 0, 0, view->width, view->height);
state->scissor_rect_count = 1;
wined3d_cs_emit_set_scissor_rects(device->cs, 1, state->scissor_rects);
wined3d_device_context_emit_set_scissor_rects(&device->cs->c, 1, state->scissor_rects);
}
prev = state->fb.render_targets[view_idx];

View File

@ -4776,7 +4776,6 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
UINT sampler_idx, struct wined3d_sampler *sampler) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
enum wined3d_sampler_state state, DWORD value) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_scissor_rects(struct wined3d_cs *cs, unsigned int rect_count, const RECT *rects) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
struct wined3d_buffer *buffer, UINT offset) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
@ -4824,6 +4823,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_rasterizer_state(struct wined3d_device_context *context,
struct wined3d_rasterizer_state *rasterizer_state) DECLSPEC_HIDDEN;
void wined3d_device_context_emit_set_scissor_rects(struct wined3d_device_context *context,
unsigned int rect_count, const RECT *rects) DECLSPEC_HIDDEN;
void wined3d_device_context_emit_set_shader(struct wined3d_device_context *context, enum wined3d_shader_type type,
struct wined3d_shader *shader) DECLSPEC_HIDDEN;
void wined3d_device_context_emit_set_viewports(struct wined3d_device_context *context, unsigned int viewport_count,