Commit e00ce29a authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

wined3d: Pass a wined3d_device_context to wined3d_cs_emit_set_scissor_rects().

parent 06d24306
...@@ -1173,17 +1173,18 @@ static void wined3d_cs_exec_set_scissor_rects(struct wined3d_cs *cs, const void ...@@ -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); 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; 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); WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_SET_SCISSOR_RECTS; op->opcode = WINED3D_CS_OP_SET_SCISSOR_RECTS;
memcpy(op->rects, rects, rect_count * sizeof(*rects)); memcpy(op->rects, rects, rect_count * sizeof(*rects));
op->rect_count = rect_count; 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) static void wined3d_cs_exec_set_rendertarget_view(struct wined3d_cs *cs, const void *data)
......
...@@ -1858,7 +1858,7 @@ void CDECL wined3d_device_set_scissor_rects(struct wined3d_device *device, unsig ...@@ -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)); memset(state->scissor_rects, 0, sizeof(state->scissor_rects));
state->scissor_rect_count = rect_count; 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) 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 ...@@ -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_cs_emit_set_material(device->cs, &state->material);
wined3d_device_context_emit_set_viewports(context, state->viewport_count, state->viewports); 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) for (i = 0; i < LIGHTMAP_SIZE; ++i)
{ {
...@@ -5211,7 +5211,7 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device ...@@ -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); SetRect(&state->scissor_rects[0], 0, 0, view->width, view->height);
state->scissor_rect_count = 1; 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]; prev = state->fb.render_targets[view_idx];
......
...@@ -4776,7 +4776,6 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type ...@@ -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; UINT sampler_idx, struct wined3d_sampler *sampler) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx, void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
enum wined3d_sampler_state state, DWORD value) DECLSPEC_HIDDEN; 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, void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
struct wined3d_buffer *buffer, UINT offset) DECLSPEC_HIDDEN; struct wined3d_buffer *buffer, UINT offset) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx, 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 ...@@ -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; 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, void wined3d_device_context_emit_set_rasterizer_state(struct wined3d_device_context *context,
struct wined3d_rasterizer_state *rasterizer_state) DECLSPEC_HIDDEN; 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, void wined3d_device_context_emit_set_shader(struct wined3d_device_context *context, enum wined3d_shader_type type,
struct wined3d_shader *shader) DECLSPEC_HIDDEN; struct wined3d_shader *shader) DECLSPEC_HIDDEN;
void wined3d_device_context_emit_set_viewports(struct wined3d_device_context *context, unsigned int viewport_count, void wined3d_device_context_emit_set_viewports(struct wined3d_device_context *context, unsigned int viewport_count,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment