Conor McCarthy : vkd3d-shader/spirv: Emit a compiler warning if an atomic op is flagged volatile.
Module: vkd3d Branch: master Commit: a7870e17935f0bd8e77c0ecef1a83db56262b3ec URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/a7870e17935f0bd8e77c0ecef1a83d... Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Thu Apr 4 19:10:55 2024 +1000 vkd3d-shader/spirv: Emit a compiler warning if an atomic op is flagged volatile. --- libs/vkd3d-shader/spirv.c | 4 ++++ libs/vkd3d-shader/vkd3d_shader_private.h | 1 + 2 files changed, 5 insertions(+) diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 20f1b8b8..b73c2a72 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -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 diff --git a/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d-shader/vkd3d_shader_private.h index 468de3cb..a20a3c5f 100644 --- a/libs/vkd3d-shader/vkd3d_shader_private.h +++ b/libs/vkd3d-shader/vkd3d_shader_private.h @@ -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,
participants (1)
-
Alexandre Julliard