vkd3d-shader: Implement global resource memory barriers.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.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-02-03 21:09:17 -06:00 committed by Alexandre Julliard
parent c2c092b143
commit 16aceacc0c
3 changed files with 13 additions and 0 deletions

View File

@ -8866,6 +8866,13 @@ static void vkd3d_dxbc_compiler_emit_sync(struct vkd3d_dxbc_compiler *compiler,
flags &= ~VKD3DSSF_THREAD_GROUP;
}
if (flags & VKD3DSSF_GLOBAL_UAV)
{
memory_scope = SpvScopeDevice;
memory_semantics |= SpvMemorySemanticsImageMemoryMask;
flags &= ~VKD3DSSF_GLOBAL_UAV;
}
if (flags)
{
FIXME("Unhandled sync flags %#x.\n", flags);

View File

@ -368,6 +368,11 @@ static void shader_dump_global_flags(struct vkd3d_string_buffer *buffer, DWORD g
static void shader_dump_sync_flags(struct vkd3d_string_buffer *buffer, DWORD sync_flags)
{
if (sync_flags & VKD3DSSF_GLOBAL_UAV)
{
shader_addline(buffer, "_uglobal");
sync_flags &= ~VKD3DSSF_GLOBAL_UAV;
}
if (sync_flags & VKD3DSSF_GROUP_SHARED_MEMORY)
{
shader_addline(buffer, "_g");

View File

@ -475,6 +475,7 @@ enum vkd3d_shader_sync_flags
{
VKD3DSSF_THREAD_GROUP = 0x1,
VKD3DSSF_GROUP_SHARED_MEMORY = 0x2,
VKD3DSSF_GLOBAL_UAV = 0x8,
};
enum vkd3d_shader_uav_flags