mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-12 06:08:30 +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);
|
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());
|
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++) {
|
for (unsigned stage = 0; stage < EShLangCount; stage++) {
|
||||||
if (program->getIntermediate((EShLanguage)stage) == nullptr)
|
if (program->getIntermediate((EShLanguage)stage) == nullptr)
|
||||||
continue;
|
continue;
|
||||||
resolver = MakeUnique<TMglGlslIoResolver>(*program, (EShLanguage)stage, attrib.explicitAttribLocations);
|
resolver = MakeUnique<TMglGlslIoResolver>(*program, (EShLanguage)stage,
|
||||||
|
attrib.explicitVertexInLocations,
|
||||||
|
attrib.explicitFragmentOutLocations);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
auto ioMapper = UniquePtr<glslang::TIoMapper>(glslang::GetGlslIoMapper());
|
auto ioMapper = UniquePtr<glslang::TIoMapper>(glslang::GetGlslIoMapper());
|
||||||
|
|||||||
@@ -21,7 +21,8 @@ namespace MobileGL {
|
|||||||
|
|
||||||
struct ProgramAttrib {
|
struct ProgramAttrib {
|
||||||
Vector<SharedPtr<glslang::TShader>> shaders;
|
Vector<SharedPtr<glslang::TShader>> shaders;
|
||||||
UnorderedMap<String, Uint> explicitAttribLocations;
|
UnorderedMap<String, Uint> explicitVertexInLocations;
|
||||||
|
UnorderedMap<String, Uint> explicitFragmentOutLocations;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ProgramBinaryAttrib {
|
struct ProgramBinaryAttrib {
|
||||||
|
|||||||
Reference in New Issue
Block a user