Commit 324aa0a9 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

wined3d: Introduce wined3d_device_context_dispatch().

parent f2d4714c
......@@ -891,22 +891,21 @@ static void acquire_compute_pipeline_resources(const struct wined3d_state *state
state->unordered_access_view[WINED3D_PIPELINE_COMPUTE]);
}
void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
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)
{
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 = FALSE;
op->parameters.u.direct.group_count_x = group_count_x;
op->parameters.u.direct.group_count_y = group_count_y;
op->parameters.u.direct.group_count_z = group_count_z;
acquire_compute_pipeline_resources(state);
acquire_compute_pipeline_resources(context->state);
wined3d_device_context_submit(&cs->c, WINED3D_CS_QUEUE_DEFAULT);
wined3d_device_context_submit(context, WINED3D_CS_QUEUE_DEFAULT);
}
void wined3d_cs_emit_dispatch_indirect(struct wined3d_cs *cs,
......
......@@ -4401,7 +4401,7 @@ void CDECL wined3d_device_dispatch_compute(struct wined3d_device *device,
TRACE("device %p, group_count_x %u, group_count_y %u, group_count_z %u.\n",
device, group_count_x, group_count_y, group_count_z);
wined3d_cs_emit_dispatch(device->cs, group_count_x, group_count_y, group_count_z);
wined3d_device_context_dispatch(&device->cs->c, group_count_x, group_count_y, group_count_z);
}
void CDECL wined3d_device_dispatch_compute_indirect(struct wined3d_device *device,
......
......@@ -166,6 +166,7 @@
@ cdecl wined3d_device_update_texture(ptr ptr ptr)
@ cdecl wined3d_device_validate_device(ptr ptr)
@ cdecl wined3d_device_context_dispatch(ptr long long 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(struct wined3d_cs *cs,
unsigned int group_count_x, unsigned int group_count_y, unsigned int group_count_z) 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,
......
......@@ -2555,6 +2555,8 @@ HRESULT __cdecl wined3d_device_update_texture(struct wined3d_device *device,
struct wined3d_texture *src_texture, struct wined3d_texture *dst_texture);
HRESULT __cdecl wined3d_device_validate_device(const struct wined3d_device *device, DWORD *num_passes);
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_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