Commit 308dd8bd authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

wined3d: Pass a wined3d_device_context to wined3d_device_set_render_state().

parent 1d578e36
...@@ -1767,16 +1767,17 @@ static void wined3d_cs_exec_set_render_state(struct wined3d_cs *cs, const void * ...@@ -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)); 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; 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->opcode = WINED3D_CS_OP_SET_RENDER_STATE;
op->state = state; op->state = state;
op->value = value; 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) static void wined3d_cs_exec_set_texture_state(struct wined3d_cs *cs, const void *data)
......
...@@ -1675,7 +1675,7 @@ static void wined3d_device_set_render_state(struct wined3d_device *device, ...@@ -1675,7 +1675,7 @@ static void wined3d_device_set_render_state(struct wined3d_device *device,
else else
{ {
device->cs->c.state->render_states[state] = value; 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) 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 ...@@ -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) 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); wined3d_device_context_emit_set_blend_state(context, state->blend_state, &state->blend_factor, state->sample_mask);
......
...@@ -4808,6 +4808,8 @@ void wined3d_device_context_emit_set_predication(struct wined3d_device_context * ...@@ -4808,6 +4808,8 @@ void wined3d_device_context_emit_set_predication(struct wined3d_device_context *
struct wined3d_query *predicate, BOOL value) DECLSPEC_HIDDEN; struct wined3d_query *predicate, BOOL value) 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_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, void wined3d_device_context_emit_set_rendertarget_view(struct wined3d_device_context *context, unsigned int view_idx,
struct wined3d_rendertarget_view *view) DECLSPEC_HIDDEN; struct wined3d_rendertarget_view *view) DECLSPEC_HIDDEN;
void wined3d_device_context_emit_set_sampler(struct wined3d_device_context *context, enum wined3d_shader_type type, void wined3d_device_context_emit_set_sampler(struct wined3d_device_context *context, enum wined3d_shader_type type,
......
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