mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-09 04:38:30 +09:00
[Fix] (Diligent/PSO): Miscellaneous fix.
This commit is contained in:
@@ -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 =
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user