wined3d: Pass a wined3d_device_context to wined3d_cs_emit_set_shader().
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:
parent
94607a1598
commit
f1842d5ba4
|
@ -1622,16 +1622,17 @@ static void wined3d_cs_exec_set_shader(struct wined3d_cs *cs, const void *data)
|
||||||
device_invalidate_state(cs->c.device, STATE_COMPUTE_SHADER_RESOURCE_BINDING);
|
device_invalidate_state(cs->c.device, STATE_COMPUTE_SHADER_RESOURCE_BINDING);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type type, struct wined3d_shader *shader)
|
void wined3d_device_context_emit_set_shader(struct wined3d_device_context *context,
|
||||||
|
enum wined3d_shader_type type, struct wined3d_shader *shader)
|
||||||
{
|
{
|
||||||
struct wined3d_cs_set_shader *op;
|
struct wined3d_cs_set_shader *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_SHADER;
|
op->opcode = WINED3D_CS_OP_SET_SHADER;
|
||||||
op->type = type;
|
op->type = type;
|
||||||
op->shader = shader;
|
op->shader = shader;
|
||||||
|
|
||||||
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_blend_state(struct wined3d_cs *cs, const void *data)
|
static void wined3d_cs_exec_set_blend_state(struct wined3d_cs *cs, const void *data)
|
||||||
|
|
|
@ -1959,7 +1959,7 @@ void CDECL wined3d_device_set_state(struct wined3d_device *device, struct wined3
|
||||||
|
|
||||||
for (i = 0; i < WINED3D_SHADER_TYPE_COUNT; ++i)
|
for (i = 0; i < WINED3D_SHADER_TYPE_COUNT; ++i)
|
||||||
{
|
{
|
||||||
wined3d_cs_emit_set_shader(device->cs, i, state->shader[i]);
|
wined3d_device_context_emit_set_shader(&device->cs->c, i, state->shader[i]);
|
||||||
for (j = 0; j < MAX_CONSTANT_BUFFERS; ++j)
|
for (j = 0; j < MAX_CONSTANT_BUFFERS; ++j)
|
||||||
{
|
{
|
||||||
wined3d_cs_emit_set_constant_buffer(device->cs, i, j, state->cb[i][j]);
|
wined3d_cs_emit_set_constant_buffer(device->cs, i, j, state->cb[i][j]);
|
||||||
|
@ -2095,7 +2095,7 @@ void CDECL wined3d_device_set_vertex_shader(struct wined3d_device *device, struc
|
||||||
if (shader)
|
if (shader)
|
||||||
wined3d_shader_incref(shader);
|
wined3d_shader_incref(shader);
|
||||||
state->shader[WINED3D_SHADER_TYPE_VERTEX] = shader;
|
state->shader[WINED3D_SHADER_TYPE_VERTEX] = shader;
|
||||||
wined3d_cs_emit_set_shader(device->cs, WINED3D_SHADER_TYPE_VERTEX, shader);
|
wined3d_device_context_emit_set_shader(&device->cs->c, WINED3D_SHADER_TYPE_VERTEX, shader);
|
||||||
if (prev)
|
if (prev)
|
||||||
wined3d_shader_decref(prev);
|
wined3d_shader_decref(prev);
|
||||||
}
|
}
|
||||||
|
@ -2333,7 +2333,7 @@ void CDECL wined3d_device_set_pixel_shader(struct wined3d_device *device, struct
|
||||||
if (shader)
|
if (shader)
|
||||||
wined3d_shader_incref(shader);
|
wined3d_shader_incref(shader);
|
||||||
state->shader[WINED3D_SHADER_TYPE_PIXEL] = shader;
|
state->shader[WINED3D_SHADER_TYPE_PIXEL] = shader;
|
||||||
wined3d_cs_emit_set_shader(device->cs, WINED3D_SHADER_TYPE_PIXEL, shader);
|
wined3d_device_context_emit_set_shader(&device->cs->c, WINED3D_SHADER_TYPE_PIXEL, shader);
|
||||||
if (prev)
|
if (prev)
|
||||||
wined3d_shader_decref(prev);
|
wined3d_shader_decref(prev);
|
||||||
}
|
}
|
||||||
|
@ -2442,7 +2442,7 @@ void CDECL wined3d_device_set_hull_shader(struct wined3d_device *device, struct
|
||||||
if (shader)
|
if (shader)
|
||||||
wined3d_shader_incref(shader);
|
wined3d_shader_incref(shader);
|
||||||
state->shader[WINED3D_SHADER_TYPE_HULL] = shader;
|
state->shader[WINED3D_SHADER_TYPE_HULL] = shader;
|
||||||
wined3d_cs_emit_set_shader(device->cs, WINED3D_SHADER_TYPE_HULL, shader);
|
wined3d_device_context_emit_set_shader(&device->cs->c, WINED3D_SHADER_TYPE_HULL, shader);
|
||||||
if (prev)
|
if (prev)
|
||||||
wined3d_shader_decref(prev);
|
wined3d_shader_decref(prev);
|
||||||
}
|
}
|
||||||
|
@ -2498,7 +2498,7 @@ void CDECL wined3d_device_set_domain_shader(struct wined3d_device *device, struc
|
||||||
if (shader)
|
if (shader)
|
||||||
wined3d_shader_incref(shader);
|
wined3d_shader_incref(shader);
|
||||||
state->shader[WINED3D_SHADER_TYPE_DOMAIN] = shader;
|
state->shader[WINED3D_SHADER_TYPE_DOMAIN] = shader;
|
||||||
wined3d_cs_emit_set_shader(device->cs, WINED3D_SHADER_TYPE_DOMAIN, shader);
|
wined3d_device_context_emit_set_shader(&device->cs->c, WINED3D_SHADER_TYPE_DOMAIN, shader);
|
||||||
if (prev)
|
if (prev)
|
||||||
wined3d_shader_decref(prev);
|
wined3d_shader_decref(prev);
|
||||||
}
|
}
|
||||||
|
@ -2554,7 +2554,7 @@ void CDECL wined3d_device_set_geometry_shader(struct wined3d_device *device, str
|
||||||
if (shader)
|
if (shader)
|
||||||
wined3d_shader_incref(shader);
|
wined3d_shader_incref(shader);
|
||||||
state->shader[WINED3D_SHADER_TYPE_GEOMETRY] = shader;
|
state->shader[WINED3D_SHADER_TYPE_GEOMETRY] = shader;
|
||||||
wined3d_cs_emit_set_shader(device->cs, WINED3D_SHADER_TYPE_GEOMETRY, shader);
|
wined3d_device_context_emit_set_shader(&device->cs->c, WINED3D_SHADER_TYPE_GEOMETRY, shader);
|
||||||
if (prev)
|
if (prev)
|
||||||
wined3d_shader_decref(prev);
|
wined3d_shader_decref(prev);
|
||||||
}
|
}
|
||||||
|
@ -2609,7 +2609,7 @@ void CDECL wined3d_device_set_compute_shader(struct wined3d_device *device, stru
|
||||||
if (shader)
|
if (shader)
|
||||||
wined3d_shader_incref(shader);
|
wined3d_shader_incref(shader);
|
||||||
state->shader[WINED3D_SHADER_TYPE_COMPUTE] = shader;
|
state->shader[WINED3D_SHADER_TYPE_COMPUTE] = shader;
|
||||||
wined3d_cs_emit_set_shader(device->cs, WINED3D_SHADER_TYPE_COMPUTE, shader);
|
wined3d_device_context_emit_set_shader(&device->cs->c, WINED3D_SHADER_TYPE_COMPUTE, shader);
|
||||||
if (prev)
|
if (prev)
|
||||||
wined3d_shader_decref(prev);
|
wined3d_shader_decref(prev);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4774,8 +4774,6 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||||
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_scissor_rects(struct wined3d_cs *cs, unsigned int rect_count, const RECT *rects) DECLSPEC_HIDDEN;
|
void wined3d_cs_emit_set_scissor_rects(struct wined3d_cs *cs, unsigned int rect_count, const RECT *rects) DECLSPEC_HIDDEN;
|
||||||
void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
|
||||||
struct wined3d_shader *shader) 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,
|
||||||
struct wined3d_buffer *buffer, UINT offset) DECLSPEC_HIDDEN;
|
struct wined3d_buffer *buffer, UINT offset) DECLSPEC_HIDDEN;
|
||||||
void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||||
|
@ -4815,6 +4813,9 @@ static inline void wined3d_cs_push_constants(struct wined3d_cs *cs, enum wined3d
|
||||||
cs->c.ops->push_constants(&cs->c, p, start_idx, count, constants);
|
cs->c.ops->push_constants(&cs->c, p, start_idx, count, constants);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wined3d_device_context_emit_set_shader(struct wined3d_device_context *context, enum wined3d_shader_type type,
|
||||||
|
struct wined3d_shader *shader) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
static inline void wined3d_resource_wait_idle(struct wined3d_resource *resource)
|
static inline void wined3d_resource_wait_idle(struct wined3d_resource *resource)
|
||||||
{
|
{
|
||||||
const struct wined3d_cs *cs = resource->device->cs;
|
const struct wined3d_cs *cs = resource->device->cs;
|
||||||
|
|
Loading…
Reference in New Issue