Commit 8853b100 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

wined3d: Pass a wined3d_device_context to wined3d_cs_emit_set_texture().

parent f3b11720
......@@ -1551,16 +1551,17 @@ static void wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
device_invalidate_state(cs->c.device, STATE_COLOR_KEY);
}
void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined3d_texture *texture)
void wined3d_device_context_emit_set_texture(struct wined3d_device_context *context, unsigned int stage,
struct wined3d_texture *texture)
{
struct wined3d_cs_set_texture *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_TEXTURE;
op->stage = stage;
op->texture = texture;
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_resource_view(struct wined3d_cs *cs, const void *data)
......
......@@ -1815,7 +1815,7 @@ void CDECL wined3d_device_set_state(struct wined3d_device *device, struct wined3
for (i = 0; i < WINED3D_MAX_COMBINED_SAMPLERS; ++i)
{
wined3d_cs_emit_set_texture(device->cs, i, state->textures[i]);
wined3d_device_context_emit_set_texture(context, i, state->textures[i]);
for (j = 0; j < WINED3D_HIGHEST_SAMPLER_STATE + 1; ++j)
{
wined3d_cs_emit_set_sampler_state(device->cs, i, j, state->sampler_states[i][j]);
......@@ -3960,7 +3960,7 @@ static void wined3d_device_set_texture(struct wined3d_device *device,
if (texture)
wined3d_texture_incref(texture);
wined3d_cs_emit_set_texture(device->cs, stage, texture);
wined3d_device_context_emit_set_texture(&device->cs->c, stage, texture);
if (prev)
wined3d_texture_decref(prev);
......
......@@ -4759,7 +4759,6 @@ 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_source_freq(struct wined3d_cs *cs, UINT stream_idx,
UINT frequency, UINT flags) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined3d_texture *texture) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
enum wined3d_texture_stage_state state, DWORD value) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform_state state,
......@@ -4827,6 +4826,8 @@ void wined3d_device_context_emit_set_stream_output(struct wined3d_device_context
struct wined3d_buffer *buffer, unsigned int offset) DECLSPEC_HIDDEN;
void wined3d_device_context_emit_set_stream_source(struct wined3d_device_context *context, unsigned int stream_idx,
struct wined3d_buffer *buffer, unsigned int offset, unsigned int stride) DECLSPEC_HIDDEN;
void wined3d_device_context_emit_set_texture(struct wined3d_device_context *context, unsigned int stage,
struct wined3d_texture *texture) DECLSPEC_HIDDEN;
void wined3d_device_context_emit_set_unordered_access_view(struct wined3d_device_context *context,
enum wined3d_pipeline pipeline, unsigned int view_idx, struct wined3d_unordered_access_view *view,
unsigned int initial_count) DECLSPEC_HIDDEN;
......
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