Revert "[Fix] (MG_Util/GLSLTool): actually linking & mapping IO?"

This reverts commit 92cd0f3a82.
This commit is contained in:
2025-07-04 20:11:33 +08:00
parent 92cd0f3a82
commit bcaf0e6e32
+2 -19
View File
@@ -658,21 +658,6 @@ namespace MG_Util::Program {
return {};
}
std::unique_ptr<glslang::TIoMapResolver> resolver;
for (unsigned stage = 0; stage < EShLangCount; stage++) {
auto* pResolver = program.getGlslIoResolver((EShLanguage)stage);
if (pResolver) {
resolver = std::unique_ptr<glslang::TIoMapResolver>(pResolver);
break;
}
}
auto ioMapper = std::unique_ptr<glslang::TIoMapper>(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;