From 5c17eb6836a804ba2c9ab279d947233e1420454e Mon Sep 17 00:00:00 2001 From: mclohessy <169141009+mclohessy@users.noreply.github.com> Date: Thu, 16 May 2024 17:02:00 +0200 Subject: [PATCH] Support /Zc:preprocessor on MSVC for standard compliant preprocessor. (#3294) --- src/shader_spirv.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shader_spirv.cpp b/src/shader_spirv.cpp index dc4f12282..0f7e255ec 100644 --- a/src/shader_spirv.cpp +++ b/src/shader_spirv.cpp @@ -17,7 +17,7 @@ namespace bgfx #define SPV_OPERAND_7(_a0, _a1, _a2, _a3, _a4, _a5, _a6) SPV_OPERAND_1(_a0), SPV_OPERAND_6(_a1, _a2, _a3, _a4, _a5, _a6) #define SPV_OPERAND_8(_a0, _a1, _a2, _a3, _a4, _a5, _a6, _a7) SPV_OPERAND_1(_a0), SPV_OPERAND_7(_a1, _a2, _a3, _a4, _a5, _a6, _a7) #define SPV_OPERAND_9(_a0, _a1, _a2, _a3, _a4, _a5, _a6, _a7, _a8) SPV_OPERAND_1(_a0), SPV_OPERAND_8(_a1, _a2, _a3, _a4, _a5, _a6, _a7, _a8) -#if BX_COMPILER_MSVC +#if BX_COMPILER_MSVC && (!defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL) // Workaround MSVS bug... # define SPV_OPERAND(...) { BX_MACRO_DISPATCHER(SPV_OPERAND_, __VA_ARGS__) BX_VA_ARGS_PASS(__VA_ARGS__) } #else