vkd3d-shader/spirv: Emit a compiler warning if an atomic op is flagged volatile.

This commit is contained in:
Conor McCarthy 2024-04-04 19:10:55 +10:00 committed by Alexandre Julliard
parent d9f42b2c51
commit a7870e1793
Notes: Alexandre Julliard 2024-04-17 23:29:25 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/759
2 changed files with 5 additions and 0 deletions

View File

@ -9258,7 +9258,11 @@ static void spirv_compiler_emit_atomic_instruction(struct spirv_compiler *compil
val_id = spirv_compiler_emit_load_src_with_type(compiler, &src[1], VKD3DSP_WRITEMASK_0, component_type);
if (instruction->flags & VKD3DARF_VOLATILE)
{
WARN("Ignoring 'volatile' attribute.\n");
spirv_compiler_warning(compiler, VKD3D_SHADER_WARNING_SPV_IGNORING_FLAG,
"Ignoring the 'volatile' attribute flag for atomic instruction %#x.", instruction->handler_idx);
}
memory_semantic = (instruction->flags & VKD3DARF_SEQ_CST)
? SpvMemorySemanticsSequentiallyConsistentMask

View File

@ -100,6 +100,7 @@ enum vkd3d_shader_error
VKD3D_SHADER_WARNING_SPV_INVALID_SWIZZLE = 2300,
VKD3D_SHADER_WARNING_SPV_INVALID_UAV_FLAGS = 2301,
VKD3D_SHADER_WARNING_SPV_IGNORING_FLAG = 2302,
VKD3D_SHADER_ERROR_RS_OUT_OF_MEMORY = 3000,
VKD3D_SHADER_ERROR_RS_INVALID_VERSION = 3001,