From 383b6a14ee726f10bfad71338167f30480fce1dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Sat, 5 Mar 2016 00:21:29 -0800 Subject: [PATCH] Fixed GCC build. --- src/shader_spirv.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/shader_spirv.cpp b/src/shader_spirv.cpp index 1db9943e..481a40c6 100644 --- a/src/shader_spirv.cpp +++ b/src/shader_spirv.cpp @@ -26,7 +26,12 @@ 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) -#define SPV_OPERAND(...) { BX_MACRO_DISPATCHER(SPV_OPERAND_, __VA_ARGS__) BX_VA_ARGS_PASS(__VA_ARGS__) } +#if BX_COMPILER_MSVC +// Workaround MSVS bug... +# define SPV_OPERAND(...) { BX_MACRO_DISPATCHER(SPV_OPERAND_, __VA_ARGS__) BX_VA_ARGS_PASS(__VA_ARGS__) } +#else +# define SPV_OPERAND(...) { BX_MACRO_DISPATCHER(SPV_OPERAND_, __VA_ARGS__)(__VA_ARGS__) } +#endif // BX_COMPILER_MSVC #define _ Count { false, false, /* Nop, // 0 */ SPV_OPERAND(_) }, { true, true, /* Undef, // 1 */ SPV_OPERAND(_) },