From 897d7149101f155ece999cf7772c6c9f77f9cdc8 Mon Sep 17 00:00:00 2001 From: Jamil Halabi Date: Fri, 3 May 2024 13:46:43 +1200 Subject: [PATCH] Do not consider uniforms with names containing `.@data.` as valid uniforms --- tools/shaderc/shaderc_metal.cpp | 3 ++- tools/shaderc/shaderc_spirv.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/shaderc/shaderc_metal.cpp b/tools/shaderc/shaderc_metal.cpp index 516b2d1d6..0404704f2 100644 --- a/tools/shaderc/shaderc_metal.cpp +++ b/tools/shaderc/shaderc_metal.cpp @@ -539,7 +539,8 @@ namespace bgfx { namespace metal Uniform un; un.name = program->getUniformName(ii); - if (bx::hasSuffix(un.name.c_str(), ".@data") ) + if (bx::hasSuffix(un.name.c_str(), ".@data") + || !bx::strFind(un.name.c_str(), ".@data.").isEmpty() ) { continue; } diff --git a/tools/shaderc/shaderc_spirv.cpp b/tools/shaderc/shaderc_spirv.cpp index 7678cec39..fa2866d5f 100644 --- a/tools/shaderc/shaderc_spirv.cpp +++ b/tools/shaderc/shaderc_spirv.cpp @@ -664,7 +664,8 @@ namespace bgfx { namespace spirv Uniform un; un.name = program->getUniformName(ii); - if (bx::hasSuffix(un.name.c_str(), ".@data") ) + if (bx::hasSuffix(un.name.c_str(), ".@data") + || !bx::strFind(un.name.c_str(), ".@data.").isEmpty() ) { continue; }