Commit 794dd70e authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

wined3d: Introduce wined3d_device_context_dispatch_indirect().

parent 3ffef8fc
......@@ -908,22 +908,21 @@ void CDECL wined3d_device_context_dispatch(struct wined3d_device_context *contex
wined3d_device_context_submit(context, WINED3D_CS_QUEUE_DEFAULT);
}
void wined3d_cs_emit_dispatch_indirect(struct wined3d_cs *cs,
void CDECL wined3d_device_context_dispatch_indirect(struct wined3d_device_context *context,
struct wined3d_buffer *buffer, unsigned int offset)
{
const struct wined3d_state *state = cs->c.state;
struct wined3d_cs_dispatch *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_DISPATCH;
op->parameters.indirect = TRUE;
op->parameters.u.indirect.buffer = buffer;
op->parameters.u.indirect.offset = offset;
acquire_compute_pipeline_resources(state);
acquire_compute_pipeline_resources(context->state);
wined3d_resource_acquire(&buffer->resource);
wined3d_device_context_submit(&cs->c, WINED3D_CS_QUEUE_DEFAULT);
wined3d_device_context_submit(context, WINED3D_CS_QUEUE_DEFAULT);
}
static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
......
......@@ -4409,7 +4409,7 @@ void CDECL wined3d_device_dispatch_compute_indirect(struct wined3d_device *devic
{
TRACE("device %p, buffer %p, offset %u.\n", device, buffer, offset);
wined3d_cs_emit_dispatch_indirect(device->cs, buffer, offset);
wined3d_device_context_dispatch_indirect(&device->cs->c, buffer, offset);
}
void CDECL wined3d_device_set_primitive_type(struct wined3d_device *device,
......
......@@ -167,6 +167,7 @@
@ cdecl wined3d_device_validate_device(ptr ptr)
@ cdecl wined3d_device_context_dispatch(ptr long long long)
@ cdecl wined3d_device_context_dispatch_indirect(ptr ptr long)
@ cdecl wined3d_device_context_set_blend_state(ptr ptr ptr long)
@ cdecl wined3d_device_context_set_constant_buffer(ptr long long ptr)
@ cdecl wined3d_device_context_set_depth_stencil_state(ptr ptr long)
......
......@@ -4735,8 +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_dispatch_indirect(struct wined3d_cs *cs,
struct wined3d_buffer *buffer, unsigned int offset) 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;
......
......@@ -2557,6 +2557,8 @@ HRESULT __cdecl wined3d_device_validate_device(const struct wined3d_device *devi
void __cdecl wined3d_device_context_dispatch(struct wined3d_device_context *context,
unsigned int group_count_x, unsigned int group_count_y, unsigned int group_count_z);
void __cdecl wined3d_device_context_dispatch_indirect(struct wined3d_device_context *context,
struct wined3d_buffer *buffer, unsigned int offset);
void __cdecl wined3d_device_context_set_blend_state(struct wined3d_device_context *context,
struct wined3d_blend_state *state, const struct wined3d_color *blend_factor, unsigned int sample_mask);
void __cdecl wined3d_device_context_set_constant_buffer(struct wined3d_device_context *context,
......
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