[Fix] (Diligent/PSO): Miscellaneous fix.

This commit is contained in:
BZLZHH
2025-06-15 11:52:34 +08:00
parent df95930481
commit 6a1b1a5ed9
2 changed files with 6 additions and 10 deletions
@@ -371,7 +371,7 @@ namespace MG_Diligent {
shaderSource = MG_Util::Program::BindInputLayoutLocationsForGLSL(spirv,
programObj.attribLocations);
MG_Util::Program::RenameGLSLBuiltinsForVulkan(shaderSource);
// MG_Util::Program::RenameGLSLBuiltinsForVulkan(shaderSource);
} else {
shaderSource = it->second.source;
}
@@ -381,17 +381,13 @@ namespace MG_Diligent {
MG_Util::Program::GenerateDefaultUBOForGLSL_Multi(shaderSourcesMap, programInfo.uniformBufferNames);
for (auto shader : programInfo.AttachedShaders) {
GLuint shaderId = 0;
for (auto const& [key, val] : MG_Diligent::g_ShaderMap) {
if (val == shader) {
shaderId = key;
break;
}
}
for (auto shaderId : programInfo.AttachedShadersID) {
auto shader = MG_Diligent::g_ShaderMap[shaderId];
MG_Util::Debug::LogD("Processing shader ID: %u", shaderId);
auto& shaderObj = MG_State_T::programState->shaders_[shaderId];
MG_Util::Debug::LogD("Shader source for %u before SPIR-V compilation:\n%s", shaderId,
shaderSourcesMap[shaderId].c_str());
std::string compilationLog;
auto spirv =
+1 -1
View File
@@ -465,7 +465,7 @@ void ProgramState::CleanupShaders_() {
}
if (!inUse) {
MG_Util::Debug::LogD("MG_State: Program: CleanupShaders_ deleting shader %u", it->first);
freeShaderIds_.insert(it->first);
// freeShaderIds_.insert(it->first);
it = shaders_.erase(it);
continue;
}