[Fix] (Diligent/PSO): Use GLSL For Vulkan mode somewhere.

This commit is contained in:
BZLZHH
2025-06-21 19:35:16 +08:00
parent cbf63dd2b6
commit ee29a397da
2 changed files with 8 additions and 2 deletions
@@ -249,7 +249,12 @@ namespace MG_GL::GL {
auto& programInfo = MG_Diligent::g_ProgramMap[program];
auto& programObj = MG_State_T::programState->programs_[program];
if (programObj.uniformValues.empty() || !programInfo.pDefaultUBO) {
if (!programInfo.pDefaultUBO) {
MG_Util::Debug::LogE("Program %u does not have a default UBO. Skipping uniform update.", program);
return;
}
if (programObj.uniformValues.empty()) {
MG_Util::Debug::LogE("Program %u has no uniforms. Skipping uniform update.", program);
return;
}
@@ -61,7 +61,8 @@ namespace MG_GL::GL {
auto spirv = MG_Util::Program::CompileGLSLToSPIRV(
MG_State_T::programState->shaders_[reflectionShaderId].type,
itSource->second,
infoLog
infoLog,
true
);
if (spirv.empty()) {
MG_Util::Debug::LogE("GLSL to SPIR-V compilation failed for shader %u: %s", reflectionShaderId, infoLog.c_str());