wined3d: Implement global resource memory barriers.

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:
Zebediah Figura 2021-01-25 14:58:18 -06:00 committed by Alexandre Julliard
parent fbad62fdca
commit 387a63237d
3 changed files with 12 additions and 0 deletions

View File

@ -5729,6 +5729,12 @@ static void shader_glsl_sync(const struct wined3d_shader_instruction *ins)
sync_flags &= ~WINED3DSSF_GROUP_SHARED_MEMORY;
}
if (sync_flags & WINED3DSSF_GLOBAL_UAV)
{
shader_addline(buffer, "memoryBarrier();\n");
sync_flags &= ~WINED3DSSF_GLOBAL_UAV;
}
if (sync_flags)
FIXME("Unhandled sync flags %#x.\n", sync_flags);
}

View File

@ -1910,6 +1910,11 @@ static void shader_dump_global_flags(struct wined3d_string_buffer *buffer, DWORD
static void shader_dump_sync_flags(struct wined3d_string_buffer *buffer, DWORD sync_flags)
{
if (sync_flags & WINED3DSSF_GLOBAL_UAV)
{
shader_addline(buffer, "_uglobal");
sync_flags &= ~WINED3DSSF_GLOBAL_UAV;
}
if (sync_flags & WINED3DSSF_GROUP_SHARED_MEMORY)
{
shader_addline(buffer, "_g");

View File

@ -656,6 +656,7 @@ enum wined3d_shader_sync_flags
{
WINED3DSSF_THREAD_GROUP = 0x1,
WINED3DSSF_GROUP_SHARED_MEMORY = 0x2,
WINED3DSSF_GLOBAL_UAV = 0x8,
};
enum wined3d_shader_uav_flags