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

wined3d: Pass a wined3d_device_context to wined3d_cs_emit_set_rendertarget_view().

parent f4eb08e8
...@@ -1203,17 +1203,17 @@ static void wined3d_cs_exec_set_rendertarget_view(struct wined3d_cs *cs, const v ...@@ -1203,17 +1203,17 @@ static void wined3d_cs_exec_set_rendertarget_view(struct wined3d_cs *cs, const v
device_invalidate_state(cs->c.device, STATE_SHADER(WINED3D_SHADER_TYPE_PIXEL)); device_invalidate_state(cs->c.device, STATE_SHADER(WINED3D_SHADER_TYPE_PIXEL));
} }
void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, 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) struct wined3d_rendertarget_view *view)
{ {
struct wined3d_cs_set_rendertarget_view *op; struct wined3d_cs_set_rendertarget_view *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_RENDERTARGET_VIEW; op->opcode = WINED3D_CS_OP_SET_RENDERTARGET_VIEW;
op->view_idx = view_idx; op->view_idx = view_idx;
op->view = view; op->view = view;
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_depth_stencil_view(struct wined3d_cs *cs, const void *data) static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const void *data)
......
...@@ -1874,7 +1874,7 @@ void CDECL wined3d_device_set_state(struct wined3d_device *device, struct wined3 ...@@ -1874,7 +1874,7 @@ void CDECL wined3d_device_set_state(struct wined3d_device *device, struct wined3
for (i = 0; i < WINED3D_MAX_RENDER_TARGETS; ++i) for (i = 0; i < WINED3D_MAX_RENDER_TARGETS; ++i)
{ {
wined3d_cs_emit_set_rendertarget_view(device->cs, i, state->fb.render_targets[i]); wined3d_device_context_emit_set_rendertarget_view(context, i, state->fb.render_targets[i]);
} }
wined3d_cs_emit_set_depth_stencil_view(device->cs, state->fb.depth_stencil); wined3d_cs_emit_set_depth_stencil_view(device->cs, state->fb.depth_stencil);
...@@ -5246,7 +5246,7 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device ...@@ -5246,7 +5246,7 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
wined3d_rtv_bind_count_inc(view); wined3d_rtv_bind_count_inc(view);
} }
state->fb.render_targets[view_idx] = view; state->fb.render_targets[view_idx] = view;
wined3d_cs_emit_set_rendertarget_view(device->cs, view_idx, view); wined3d_device_context_emit_set_rendertarget_view(&device->cs->c, view_idx, view);
/* Release after the assignment, to prevent device_resource_released() /* Release after the assignment, to prevent device_resource_released()
* from seeing the surface as still in use. */ * from seeing the surface as still in use. */
if (prev) if (prev)
......
...@@ -4761,8 +4761,6 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, ...@@ -4761,8 +4761,6 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs,
struct wined3d_query *predicate, BOOL value) DECLSPEC_HIDDEN; struct wined3d_query *predicate, BOOL value) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs,
enum wined3d_render_state state, DWORD value) DECLSPEC_HIDDEN; enum wined3d_render_state state, DWORD value) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int view_idx,
struct wined3d_rendertarget_view *view) 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_stream_output(struct wined3d_cs *cs, UINT stream_idx, void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
...@@ -4809,6 +4807,8 @@ void wined3d_device_context_emit_set_depth_stencil_state(struct wined3d_device_c ...@@ -4809,6 +4807,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_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, void wined3d_device_context_emit_set_sampler(struct wined3d_device_context *context, enum wined3d_shader_type type,
unsigned int sampler_idx, struct wined3d_sampler *sampler) DECLSPEC_HIDDEN; unsigned int sampler_idx, struct wined3d_sampler *sampler) DECLSPEC_HIDDEN;
void wined3d_device_context_emit_set_scissor_rects(struct wined3d_device_context *context, void wined3d_device_context_emit_set_scissor_rects(struct wined3d_device_context *context,
......
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