From cd28357bbeb56427032fd1e56c8b3749bcfeb854 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Wed, 2 Jul 2025 17:44:43 +0000 Subject: Fix spurious vk::binding warnings when attribute is present (#7581) * Initial plan * Fix spurious vk::binding warnings when attribute is present - Modified _maybeDiagnoseMissingVulkanLayoutModifier to check for GLSLBindingAttribute before warning - Changed function to return bool indicating if warning was actually issued - Updated call sites to properly track warning state to reduce duplicates - Tested fix resolves the issue while preserving correct warnings when needed Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com> * Add test case for vk::binding spurious warning fix Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com> * Update test to use filecheck format as requested Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com> * Remove full file path from CHECK directives as requested Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com> * Fix code formatting with clang-format Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com> * Fix behavioral regression in vk-bindings test caused by warning flag logic Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com> Co-authored-by: Yong He --- source/slang-glslang/slang-glslang.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/slang-glslang') diff --git a/source/slang-glslang/slang-glslang.cpp b/source/slang-glslang/slang-glslang.cpp index e830fb15a..56be8b042 100644 --- a/source/slang-glslang/slang-glslang.cpp +++ b/source/slang-glslang/slang-glslang.cpp @@ -189,7 +189,7 @@ extern "C" #ifdef _MSC_VER _declspec(dllexport) #else -__attribute__((__visibility__("default"))) + __attribute__((__visibility__("default"))) #endif bool glslang_disassembleSPIRVWithResult( const uint32_t* contents, @@ -237,7 +237,7 @@ extern "C" #ifdef _MSC_VER _declspec(dllexport) #else -__attribute__((__visibility__("default"))) + __attribute__((__visibility__("default"))) #endif bool glslang_disassembleSPIRV(const uint32_t* contents, int contentsSize) { -- cgit v1.2.3