mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-12 06:08: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,
|
shaderSource = MG_Util::Program::BindInputLayoutLocationsForGLSL(spirv,
|
||||||
programObj.attribLocations);
|
programObj.attribLocations);
|
||||||
MG_Util::Program::RenameGLSLBuiltinsForVulkan(shaderSource);
|
// MG_Util::Program::RenameGLSLBuiltinsForVulkan(shaderSource);
|
||||||
} else {
|
} else {
|
||||||
shaderSource = it->second.source;
|
shaderSource = it->second.source;
|
||||||
}
|
}
|
||||||
@@ -381,17 +381,13 @@ namespace MG_Diligent {
|
|||||||
|
|
||||||
MG_Util::Program::GenerateDefaultUBOForGLSL_Multi(shaderSourcesMap, programInfo.uniformBufferNames);
|
MG_Util::Program::GenerateDefaultUBOForGLSL_Multi(shaderSourcesMap, programInfo.uniformBufferNames);
|
||||||
|
|
||||||
for (auto shader : programInfo.AttachedShaders) {
|
for (auto shaderId : programInfo.AttachedShadersID) {
|
||||||
GLuint shaderId = 0;
|
auto shader = MG_Diligent::g_ShaderMap[shaderId];
|
||||||
for (auto const& [key, val] : MG_Diligent::g_ShaderMap) {
|
|
||||||
if (val == shader) {
|
|
||||||
shaderId = key;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
MG_Util::Debug::LogD("Processing shader ID: %u", shaderId);
|
MG_Util::Debug::LogD("Processing shader ID: %u", shaderId);
|
||||||
|
|
||||||
auto& shaderObj = MG_State_T::programState->shaders_[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;
|
std::string compilationLog;
|
||||||
auto spirv =
|
auto spirv =
|
||||||
|
|||||||
@@ -465,7 +465,7 @@ void ProgramState::CleanupShaders_() {
|
|||||||
}
|
}
|
||||||
if (!inUse) {
|
if (!inUse) {
|
||||||
MG_Util::Debug::LogD("MG_State: Program: CleanupShaders_ deleting shader %u", it->first);
|
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);
|
it = shaders_.erase(it);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user