wined3d: Pass a wined3d_device_context to wined3d_cs_emit_set_sampler().

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 19:06:08 -05:00 committed by Alexandre Julliard
parent 990acef53b
commit 57770a47d5
3 changed files with 8 additions and 8 deletions

View File

@ -1605,18 +1605,18 @@ static void wined3d_cs_exec_set_sampler(struct wined3d_cs *cs, const void *data)
device_invalidate_state(cs->c.device, STATE_COMPUTE_SHADER_RESOURCE_BINDING);
}
void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type type,
UINT sampler_idx, struct wined3d_sampler *sampler)
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)
{
struct wined3d_cs_set_sampler *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_SAMPLER;
op->type = type;
op->sampler_idx = sampler_idx;
op->sampler = sampler;
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_shader(struct wined3d_cs *cs, const void *data)

View File

@ -1903,7 +1903,7 @@ void CDECL wined3d_device_set_state(struct wined3d_device *device, struct wined3
wined3d_device_context_emit_set_constant_buffer(context, i, j, state->cb[i][j]);
for (j = 0; j < MAX_SAMPLER_OBJECTS; ++j)
{
wined3d_cs_emit_set_sampler(device->cs, i, j, state->sampler[i][j]);
wined3d_device_context_emit_set_sampler(context, i, j, state->sampler[i][j]);
}
for (j = 0; j < MAX_SHADER_RESOURCE_VIEWS; ++j)
{
@ -2313,7 +2313,7 @@ static void wined3d_device_set_sampler(struct wined3d_device *device,
if (sampler)
wined3d_sampler_incref(sampler);
state->sampler[type][idx] = sampler;
wined3d_cs_emit_set_sampler(device->cs, type, idx, sampler);
wined3d_device_context_emit_set_sampler(&device->cs->c, type, idx, sampler);
if (prev)
wined3d_sampler_decref(prev);
}

View File

@ -4770,8 +4770,6 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs,
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(struct wined3d_cs *cs, enum wined3d_shader_type 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_stream_output(struct wined3d_cs *cs, UINT stream_idx,
@ -4821,6 +4819,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_sampler(struct wined3d_device_context *context, enum wined3d_shader_type type,
unsigned int sampler_idx, struct wined3d_sampler *sampler) 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,