From: Guillaume Charifi Subject: [PATCH 09/10] wined3d: Introduce wined3d_device_dispatch_compute(). Message-Id: <20170129134354.28597-9-guillaume.charifi@sfr.fr> Date: Sun, 29 Jan 2017 14:43:40 +0100 In-Reply-To: <20170129134354.28597-1-guillaume.charifi@sfr.fr> References: <20170129134354.28597-1-guillaume.charifi@sfr.fr> Signed-off-by: Guillaume Charifi --- dlls/wined3d/device.c | 9 +++++++++ dlls/wined3d/wined3d.spec | 1 + include/wine/wined3d.h | 2 ++ 3 files changed, 12 insertions(+) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 0b617b6..1f2b181 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3617,6 +3617,15 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device start_idx, index_count, start_instance, instance_count, TRUE); } +HRESULT CDECL wined3d_device_dispatch_compute(struct wined3d_device *device, UINT thread_group_count_x, UINT thread_group_count_y, UINT thread_group_count_z) +{ + TRACE("device %p, thread_group_count_x %u, thread_group_count_y %u, thread_group_count_z %u.\n", device, thread_group_count_x, thread_group_count_y, thread_group_count_z); + + wined3d_cs_emit_dispatch_compute(device->cs, thread_group_count_x, thread_group_count_y, thread_group_count_z); + + return WINED3D_OK; +} + static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device, struct wined3d_texture *src_texture, unsigned int src_level, struct wined3d_texture *dst_texture, unsigned int level_count) diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index ec0fc9b..c131600 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -39,6 +39,7 @@ @ cdecl wined3d_device_copy_sub_resource_region(ptr ptr long long long long ptr long ptr) @ cdecl wined3d_device_create(ptr long long ptr long long ptr ptr) @ cdecl wined3d_device_decref(ptr) +@ cdecl wined3d_device_dispatch_compute(ptr long long long) @ cdecl wined3d_device_draw_indexed_primitive(ptr long long) @ cdecl wined3d_device_draw_indexed_primitive_instanced(ptr long long long long) @ cdecl wined3d_device_draw_primitive(ptr long long) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 3b8d030..e770d50 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2133,6 +2133,8 @@ HRESULT __cdecl wined3d_device_create(struct wined3d *wined3d, UINT adapter_idx, enum wined3d_device_type device_type, HWND focus_window, DWORD behaviour_flags, BYTE surface_alignment, struct wined3d_device_parent *device_parent, struct wined3d_device **device); ULONG __cdecl wined3d_device_decref(struct wined3d_device *device); +HRESULT __cdecl wined3d_device_dispatch_compute(struct wined3d_device *device, UINT thread_group_count_x, + UINT thread_group_count_y, UINT thread_group_count_z); HRESULT __cdecl wined3d_device_draw_indexed_primitive(struct wined3d_device *device, UINT start_idx, UINT index_count); void __cdecl wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device *device, UINT start_idx, UINT index_count, UINT start_instance, UINT instance_count); -- Guillaume Charifi