diff --git a/MobileGL/MG_Util/ShaderTranspiler/ShaderCompiler.cpp b/MobileGL/MG_Util/ShaderTranspiler/ShaderCompiler.cpp index a8e5e722..13834e7b 100644 --- a/MobileGL/MG_Util/ShaderTranspiler/ShaderCompiler.cpp +++ b/MobileGL/MG_Util/ShaderTranspiler/ShaderCompiler.cpp @@ -174,7 +174,7 @@ namespace MobileGL { return std::unexpected(r); } - for (auto [name, loc]: attrib.explicitAttribLocations) { + for (auto [name, loc]: attrib.explicitVertexInLocations) { MGLOG_D("%s: got explicitly set - layout(location = %d) %s;", __func__, loc, name.c_str()); } @@ -183,7 +183,9 @@ namespace MobileGL { for (unsigned stage = 0; stage < EShLangCount; stage++) { if (program->getIntermediate((EShLanguage)stage) == nullptr) continue; - resolver = MakeUnique(*program, (EShLanguage)stage, attrib.explicitAttribLocations); + resolver = MakeUnique(*program, (EShLanguage)stage, + attrib.explicitVertexInLocations, + attrib.explicitFragmentOutLocations); break; } auto ioMapper = UniquePtr(glslang::GetGlslIoMapper()); diff --git a/MobileGL/MG_Util/ShaderTranspiler/Types.h b/MobileGL/MG_Util/ShaderTranspiler/Types.h index 30ad27bd..409e93fc 100644 --- a/MobileGL/MG_Util/ShaderTranspiler/Types.h +++ b/MobileGL/MG_Util/ShaderTranspiler/Types.h @@ -21,7 +21,8 @@ namespace MobileGL { struct ProgramAttrib { Vector> shaders; - UnorderedMap explicitAttribLocations; + UnorderedMap explicitVertexInLocations; + UnorderedMap explicitFragmentOutLocations; }; struct ProgramBinaryAttrib {