mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-08 04:08:32 +09:00
[Fix] (MG_State/Program): fixing discrapencies between builtins of Vulkan and OpenGL GLSL (gl_VertexID/gl_VertexIndex)
This commit is contained in:
@@ -303,6 +303,10 @@ namespace MG_GL::GL {
|
||||
}
|
||||
|
||||
MG_Util::Program::GenerateDefaultUBOForGLSL_Multi(shaderSources, programInfo.uniformBufferNames);
|
||||
MG_Util::Debug::LogD("LinkProgram: uniformBufferNames for %u:", program);
|
||||
for (auto& name: programInfo.uniformBufferNames) {
|
||||
MG_Util::Debug::LogD(" %s", name.c_str());
|
||||
}
|
||||
|
||||
for (GLuint shaderId : programObj.attachedShaders) {
|
||||
auto it = MG_State_T::programState->shaders_.find(shaderId);
|
||||
@@ -374,6 +378,7 @@ namespace MG_GL::GL {
|
||||
if (MG_Diligent::g_ShaderMap.find(shaderId) == MG_Diligent::g_ShaderMap.end() || MG_Diligent::g_ShaderMap[shaderId] == nullptr) {
|
||||
GLenum shaderType = shaderObj.type;
|
||||
std::string sourceStr = finalShaderSources[shaderId];
|
||||
MG_Util::Program::RenameGLSLBuiltinsForVulkan(sourceStr);
|
||||
MG_Util::Debug::LogD("Shader ID: %u, type: %s\nConverted source:\n%s",
|
||||
shaderId, MG_Util::Debug::GLEnumToString(shaderType), sourceStr.c_str());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user