mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-08 20:28:32 +09:00
[Fix]: (MG_Util/ShaderTranspiler): add explicitFragmentOutLocations to program link attribs
This commit is contained in:
@@ -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<TMglGlslIoResolver>(*program, (EShLanguage)stage, attrib.explicitAttribLocations);
|
||||
resolver = MakeUnique<TMglGlslIoResolver>(*program, (EShLanguage)stage,
|
||||
attrib.explicitVertexInLocations,
|
||||
attrib.explicitFragmentOutLocations);
|
||||
break;
|
||||
}
|
||||
auto ioMapper = UniquePtr<glslang::TIoMapper>(glslang::GetGlslIoMapper());
|
||||
|
||||
@@ -21,7 +21,8 @@ namespace MobileGL {
|
||||
|
||||
struct ProgramAttrib {
|
||||
Vector<SharedPtr<glslang::TShader>> shaders;
|
||||
UnorderedMap<String, Uint> explicitAttribLocations;
|
||||
UnorderedMap<String, Uint> explicitVertexInLocations;
|
||||
UnorderedMap<String, Uint> explicitFragmentOutLocations;
|
||||
};
|
||||
|
||||
struct ProgramBinaryAttrib {
|
||||
|
||||
Reference in New Issue
Block a user