wined3d: Pass a wined3d_device_context to wined3d_cs_emit_draw().
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
a9bab3601e
commit
ebf9ca12c1
|
@ -1046,15 +1046,16 @@ static void acquire_graphics_pipeline_resources(const struct wined3d_state *stat
|
|||
state->unordered_access_view[WINED3D_PIPELINE_GRAPHICS]);
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_draw(struct wined3d_cs *cs, enum wined3d_primitive_type primitive_type,
|
||||
unsigned int patch_vertex_count, int base_vertex_idx, unsigned int start_idx,
|
||||
unsigned int index_count, unsigned int start_instance, unsigned int instance_count, bool indexed)
|
||||
void wined3d_device_context_emit_draw(struct wined3d_device_context *context,
|
||||
enum wined3d_primitive_type primitive_type, unsigned int patch_vertex_count, int base_vertex_idx,
|
||||
unsigned int start_idx, unsigned int index_count, unsigned int start_instance, unsigned int instance_count,
|
||||
bool indexed)
|
||||
{
|
||||
const struct wined3d_d3d_info *d3d_info = &cs->c.device->adapter->d3d_info;
|
||||
const struct wined3d_state *state = cs->c.state;
|
||||
const struct wined3d_d3d_info *d3d_info = &context->device->adapter->d3d_info;
|
||||
const struct wined3d_state *state = context->state;
|
||||
struct wined3d_cs_draw *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_DRAW;
|
||||
op->primitive_type = primitive_type;
|
||||
op->patch_vertex_count = patch_vertex_count;
|
||||
|
@ -1068,7 +1069,7 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, enum wined3d_primitive_type pri
|
|||
|
||||
acquire_graphics_pipeline_resources(state, indexed, d3d_info);
|
||||
|
||||
wined3d_device_context_submit(&cs->c, WINED3D_CS_QUEUE_DEFAULT);
|
||||
wined3d_device_context_submit(context, WINED3D_CS_QUEUE_DEFAULT);
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_draw_indirect(struct wined3d_cs *cs, enum wined3d_primitive_type primitive_type,
|
||||
|
|
|
@ -4445,7 +4445,7 @@ HRESULT CDECL wined3d_device_draw_primitive(struct wined3d_device *device, UINT
|
|||
|
||||
TRACE("device %p, start_vertex %u, vertex_count %u.\n", device, start_vertex, vertex_count);
|
||||
|
||||
wined3d_cs_emit_draw(device->cs, state->primitive_type,
|
||||
wined3d_device_context_emit_draw(&device->cs->c, state->primitive_type,
|
||||
state->patch_vertex_count, 0, start_vertex, vertex_count, 0, 0, false);
|
||||
|
||||
return WINED3D_OK;
|
||||
|
@ -4459,7 +4459,7 @@ void CDECL wined3d_device_draw_primitive_instanced(struct wined3d_device *device
|
|||
TRACE("device %p, start_vertex %u, vertex_count %u, start_instance %u, instance_count %u.\n",
|
||||
device, start_vertex, vertex_count, start_instance, instance_count);
|
||||
|
||||
wined3d_cs_emit_draw(device->cs, state->primitive_type, state->patch_vertex_count,
|
||||
wined3d_device_context_emit_draw(&device->cs->c, state->primitive_type, state->patch_vertex_count,
|
||||
0, start_vertex, vertex_count, start_instance, instance_count, false);
|
||||
}
|
||||
|
||||
|
@ -4490,7 +4490,7 @@ HRESULT CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *devic
|
|||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
wined3d_cs_emit_draw(device->cs, state->primitive_type, state->patch_vertex_count,
|
||||
wined3d_device_context_emit_draw(&device->cs->c, state->primitive_type, state->patch_vertex_count,
|
||||
state->base_vertex_index, start_idx, index_count, 0, 0, true);
|
||||
|
||||
return WINED3D_OK;
|
||||
|
@ -4504,7 +4504,7 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
|
|||
TRACE("device %p, start_idx %u, index_count %u, start_instance %u, instance_count %u.\n",
|
||||
device, start_idx, index_count, start_instance, instance_count);
|
||||
|
||||
wined3d_cs_emit_draw(device->cs, state->primitive_type, state->patch_vertex_count,
|
||||
wined3d_device_context_emit_draw(&device->cs->c, state->primitive_type, state->patch_vertex_count,
|
||||
state->base_vertex_index, start_idx, index_count, start_instance, instance_count, true);
|
||||
}
|
||||
|
||||
|
|
|
@ -4735,9 +4735,6 @@ void wined3d_cs_emit_clear_unordered_access_view_uint(struct wined3d_cs *cs,
|
|||
struct wined3d_unordered_access_view *view, const struct wined3d_uvec4 *clear_value) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_copy_uav_counter(struct wined3d_cs *cs, struct wined3d_buffer *dst_buffer,
|
||||
unsigned int offset, struct wined3d_unordered_access_view *uav) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_draw(struct wined3d_cs *cs, enum wined3d_primitive_type primitive_type,
|
||||
unsigned int patch_vertex_count, int base_vertex_idx, unsigned int start_idx, unsigned int index_count,
|
||||
unsigned int start_instance, unsigned int instance_count, bool indexed) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_draw_indirect(struct wined3d_cs *cs, enum wined3d_primitive_type primitive_type,
|
||||
unsigned int patch_vertex_count, struct wined3d_buffer *buffer,
|
||||
unsigned int offset, bool indexed) DECLSPEC_HIDDEN;
|
||||
|
@ -4789,6 +4786,10 @@ 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_draw(struct wined3d_device_context *context,
|
||||
enum wined3d_primitive_type primitive_type, unsigned int patch_vertex_count, int base_vertex_idx,
|
||||
unsigned int start_idx, unsigned int index_count, unsigned int start_instance, unsigned int instance_count,
|
||||
bool indexed) DECLSPEC_HIDDEN;
|
||||
void wined3d_device_context_emit_set_blend_state(struct wined3d_device_context *context,
|
||||
struct wined3d_blend_state *state, const struct wined3d_color *blend_factor,
|
||||
unsigned int sample_mask) DECLSPEC_HIDDEN;
|
||||
|
|
Loading…
Reference in New Issue