wined3d: Pass a wined3d_device_context to wined3d_cs_emit_set_constant_buffer().
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
3920277c22
commit
8f1092a6ee
|
@ -1414,18 +1414,18 @@ static void wined3d_cs_exec_set_constant_buffer(struct wined3d_cs *cs, const voi
|
|||
device_invalidate_state(cs->c.device, STATE_CONSTANT_BUFFER(op->type));
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
UINT cb_idx, struct wined3d_buffer *buffer)
|
||||
void wined3d_device_context_emit_set_constant_buffer(struct wined3d_device_context *context,
|
||||
enum wined3d_shader_type type, UINT cb_idx, struct wined3d_buffer *buffer)
|
||||
{
|
||||
struct wined3d_cs_set_constant_buffer *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_CONSTANT_BUFFER;
|
||||
op->type = type;
|
||||
op->cb_idx = cb_idx;
|
||||
op->buffer = buffer;
|
||||
|
||||
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_texture(struct wined3d_cs *cs, const void *data)
|
||||
|
|
|
@ -1926,6 +1926,7 @@ void CDECL wined3d_device_get_scissor_rects(const struct wined3d_device *device,
|
|||
|
||||
void CDECL wined3d_device_set_state(struct wined3d_device *device, struct wined3d_state *state)
|
||||
{
|
||||
struct wined3d_device_context *context = &device->cs->c;
|
||||
const struct wined3d_light_info *light;
|
||||
unsigned int i, j;
|
||||
|
||||
|
@ -1959,11 +1960,9 @@ void CDECL wined3d_device_set_state(struct wined3d_device *device, struct wined3
|
|||
|
||||
for (i = 0; i < WINED3D_SHADER_TYPE_COUNT; ++i)
|
||||
{
|
||||
wined3d_device_context_emit_set_shader(&device->cs->c, i, state->shader[i]);
|
||||
wined3d_device_context_emit_set_shader(context, i, state->shader[i]);
|
||||
for (j = 0; j < MAX_CONSTANT_BUFFERS; ++j)
|
||||
{
|
||||
wined3d_cs_emit_set_constant_buffer(device->cs, i, j, state->cb[i][j]);
|
||||
}
|
||||
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]);
|
||||
|
@ -2143,7 +2142,7 @@ void CDECL wined3d_device_set_constant_buffer(struct wined3d_device *device,
|
|||
if (buffer)
|
||||
wined3d_buffer_incref(buffer);
|
||||
state->cb[type][idx] = buffer;
|
||||
wined3d_cs_emit_set_constant_buffer(device->cs, type, idx, buffer);
|
||||
wined3d_device_context_emit_set_constant_buffer(&device->cs->c, type, idx, buffer);
|
||||
if (prev)
|
||||
wined3d_buffer_decref(prev);
|
||||
}
|
||||
|
|
|
@ -4747,8 +4747,6 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx,
|
|||
const struct wined3d_vec4 *plane) DECLSPEC_HIDDEN;
|
||||
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;
|
||||
void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
UINT cb_idx, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_depth_stencil_state(struct wined3d_cs *cs,
|
||||
struct wined3d_depth_stencil_state *state, unsigned int stencil_ref) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs,
|
||||
|
@ -4812,6 +4810,8 @@ 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);
|
||||
}
|
||||
|
||||
void wined3d_device_context_emit_set_constant_buffer(struct wined3d_device_context *context,
|
||||
enum wined3d_shader_type type, UINT cb_idx, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
|
||||
void wined3d_device_context_emit_set_shader(struct wined3d_device_context *context, enum wined3d_shader_type type,
|
||||
struct wined3d_shader *shader) DECLSPEC_HIDDEN;
|
||||
|
||||
|
|
Loading…
Reference in New Issue