Commit 4a5d3206 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

wined3d: Pass a wined3d_device_context to wined3d_device_context_emit_set_depth_stencil_view().

parent ff5bacbb
...@@ -1252,15 +1252,16 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const ...@@ -1252,15 +1252,16 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
device_invalidate_state(device, STATE_FRAMEBUFFER); device_invalidate_state(device, STATE_FRAMEBUFFER);
} }
void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view) void wined3d_device_context_emit_set_depth_stencil_view(struct wined3d_device_context *context,
struct wined3d_rendertarget_view *view)
{ {
struct wined3d_cs_set_depth_stencil_view *op; struct wined3d_cs_set_depth_stencil_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_DEPTH_STENCIL_VIEW; op->opcode = WINED3D_CS_OP_SET_DEPTH_STENCIL_VIEW;
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_vertex_declaration(struct wined3d_cs *cs, const void *data) static void wined3d_cs_exec_set_vertex_declaration(struct wined3d_cs *cs, const void *data)
......
...@@ -1877,7 +1877,7 @@ void CDECL wined3d_device_set_state(struct wined3d_device *device, struct wined3 ...@@ -1877,7 +1877,7 @@ void CDECL wined3d_device_set_state(struct wined3d_device *device, struct wined3
wined3d_device_context_emit_set_rendertarget_view(context, 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_device_context_emit_set_depth_stencil_view(context, state->fb.depth_stencil);
wined3d_cs_emit_set_vertex_declaration(device->cs, state->vertex_declaration); wined3d_cs_emit_set_vertex_declaration(device->cs, state->vertex_declaration);
for (i = 0; i < WINED3D_MAX_STREAM_OUTPUT_BUFFERS; ++i) for (i = 0; i < WINED3D_MAX_STREAM_OUTPUT_BUFFERS; ++i)
...@@ -5293,7 +5293,7 @@ HRESULT CDECL wined3d_device_set_depth_stencil_view(struct wined3d_device *devic ...@@ -5293,7 +5293,7 @@ HRESULT CDECL wined3d_device_set_depth_stencil_view(struct wined3d_device *devic
if ((fb->depth_stencil = view)) if ((fb->depth_stencil = view))
wined3d_rendertarget_view_incref(view); wined3d_rendertarget_view_incref(view);
wined3d_cs_emit_set_depth_stencil_view(device->cs, view); wined3d_device_context_emit_set_depth_stencil_view(&device->cs->c, view);
if (prev) if (prev)
wined3d_rendertarget_view_decref(prev); wined3d_rendertarget_view_decref(prev);
wined3d_device_context_unbind_srv_for_rtv(&device->cs->c, view, TRUE); wined3d_device_context_unbind_srv_for_rtv(&device->cs->c, view, TRUE);
......
...@@ -4749,8 +4749,6 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, ...@@ -4749,8 +4749,6 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx,
const struct wined3d_vec4 *plane) DECLSPEC_HIDDEN; const struct wined3d_vec4 *plane) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture *texture, void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture *texture,
WORD flags, const struct wined3d_color_key *color_key) DECLSPEC_HIDDEN; WORD flags, const struct wined3d_color_key *color_key) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs,
struct wined3d_rendertarget_view *view) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_feature_level(struct wined3d_cs *cs, enum wined3d_feature_level level) DECLSPEC_HIDDEN; void wined3d_cs_emit_set_feature_level(struct wined3d_cs *cs, enum wined3d_feature_level level) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buffer *buffer, void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buffer *buffer,
enum wined3d_format_id format_id, unsigned int offset) DECLSPEC_HIDDEN; enum wined3d_format_id format_id, unsigned int offset) DECLSPEC_HIDDEN;
...@@ -4805,6 +4803,8 @@ void wined3d_device_context_emit_set_constant_buffer(struct wined3d_device_conte ...@@ -4805,6 +4803,8 @@ void wined3d_device_context_emit_set_constant_buffer(struct wined3d_device_conte
enum wined3d_shader_type type, UINT cb_idx, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN; enum wined3d_shader_type type, UINT cb_idx, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
void wined3d_device_context_emit_set_depth_stencil_state(struct wined3d_device_context *context, void wined3d_device_context_emit_set_depth_stencil_state(struct wined3d_device_context *context,
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_depth_stencil_view(struct wined3d_device_context *context,
struct wined3d_rendertarget_view *view) 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, void wined3d_device_context_emit_set_rendertarget_view(struct wined3d_device_context *context, unsigned int view_idx,
......
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