vk: Fix GLSL_VK_SHADER macro
authorKristian Høgsberg <kristian.h.kristensen@intel.com>
Fri, 15 May 2015 23:15:04 +0000 (16:15 -0700)
committerKristian Høgsberg <kristian.h.kristensen@intel.com>
Fri, 15 May 2015 23:15:04 +0000 (16:15 -0700)
Stringify doesn't work with __ARGV__. The last macro argument swallows
up excess arguments and as such we can just stringify that.

src/vulkan/glsl_helpers.h

index 5288be56a209fae58697f46c426d3c7483d62b7b..76b0cbebcf457aa0513ca2ab378869d74008c1e8 100644 (file)
@@ -23,9 +23,9 @@
 
 #pragma once
 
-#define GLSL_VK_SHADER(device, stage, ...) ({                           \
+#define GLSL_VK_SHADER(device, stage, source) ({                        \
    VkShader __shader;                                                   \
-   const char __src[] = "#version 330\n" STRINGIFY((__ARGV__));         \
+   const char __src[] = "#version 330\n" #source;                       \
    VkShaderCreateInfo __shader_create_info = {                          \
       .sType = VK_STRUCTURE_TYPE_SHADER_CREATE_INFO,                    \
       .codeSize = sizeof(__src),                                        \