From b77576ced9609982eba2ebacee7dd751889e4bb4 Mon Sep 17 00:00:00 2001 From: Karen Lucknavalai <34335343+klucknav@users.noreply.github.com> Date: Thu, 4 Apr 2024 09:57:20 -0700 Subject: [PATCH] Add missing vertex data prefix to Vulkan ShaderGen (#1762) @clach found that the VkShaderGenerator::getVertexDataPrefix() is returning the empty string when it seems like it should be returning vertexData.GetInstance() + "." similar to the glsl and metal shader gens do. --- source/MaterialXGenGlsl/VkShaderGenerator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/MaterialXGenGlsl/VkShaderGenerator.cpp b/source/MaterialXGenGlsl/VkShaderGenerator.cpp index b57a4d2e94..5a91d96ff5 100644 --- a/source/MaterialXGenGlsl/VkShaderGenerator.cpp +++ b/source/MaterialXGenGlsl/VkShaderGenerator.cpp @@ -69,9 +69,9 @@ void VkShaderGenerator::emitInputs(GenContext& context, ShaderStage& stage) cons } } -string VkShaderGenerator::getVertexDataPrefix(const VariableBlock&) const +string VkShaderGenerator::getVertexDataPrefix(const VariableBlock& vertexData) const { - return EMPTY_STRING; + return vertexData.getInstance() + "."; } void VkShaderGenerator::emitOutputs(GenContext& context, ShaderStage& stage) const