From bcaf0e6e326e2568bdb1672ea4ebc6c69de251c7 Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Fri, 4 Jul 2025 20:11:33 +0800 Subject: [PATCH] Revert "[Fix] (MG_Util/GLSLTool): actually linking & mapping IO?" This reverts commit 92cd0f3a82e52297006640167c93db256ce9521d. --- MG/MG_UTIL/Program/GLSLTool.cpp | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/MG/MG_UTIL/Program/GLSLTool.cpp b/MG/MG_UTIL/Program/GLSLTool.cpp index 99ffab51..1643400e 100644 --- a/MG/MG_UTIL/Program/GLSLTool.cpp +++ b/MG/MG_UTIL/Program/GLSLTool.cpp @@ -658,21 +658,6 @@ namespace MG_Util::Program { return {}; } - std::unique_ptr resolver; - for (unsigned stage = 0; stage < EShLangCount; stage++) { - auto* pResolver = program.getGlslIoResolver((EShLanguage)stage); - if (pResolver) { - resolver = std::unique_ptr(pResolver); - break; - } - } - auto ioMapper = std::unique_ptr(glslang::GetGlslIoMapper()); - - if (!program.mapIO(resolver.get(), ioMapper.get())) { - infoLog = "Error: [glslang] Cannot mapIO:\n" + std::to_string(program.getInfoLog()); - return {}; - } - SpvOptions spvOptions; spvOptions.disableOptimizer = false; @@ -800,9 +785,8 @@ namespace MG_Util::Program { GLint final_location; if (spirv_location > 0) { - auto it = used_locations.find(spirv_location); - if (it != used_locations.end()) { - infoLog += "\nLocation conflict for uniform: " + std::string(name) + " at location " + std::to_string(spirv_location) + "\n"; + if (used_locations.find(spirv_location) != used_locations.end()) { + infoLog += "\nLocation conflict for uniform: " + std::string(name); continue; } final_location = spirv_location; @@ -813,7 +797,6 @@ namespace MG_Util::Program { final_location = auto_location; } - MG_Util::Debug::LogD("%s: location = %d", name, final_location); used_locations.insert(final_location); spvc_type_id type_id = res.type_id;