mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 21:58:31 +09:00
[Fix] (MG_Util/Program): fix UniformTraverser and add test for it
This commit is contained in:
@@ -8,9 +8,16 @@ namespace MobileGL {
|
||||
namespace MG_Util {
|
||||
namespace ShaderTranspiler {
|
||||
void UniformTraverser::visitSymbol(glslang::TIntermSymbol *symbol) {
|
||||
auto parent = getParentNode();
|
||||
if (!parent)
|
||||
return;
|
||||
auto parentAgg = parent->getAsAggregate();
|
||||
if (!parentAgg || parentAgg->getOp() != glslang::EOpLinkerObjects)
|
||||
return;
|
||||
|
||||
const auto &type = symbol->getType();
|
||||
if (symbol->getQualifier().isUniform()) {
|
||||
auto name = symbol->getName();
|
||||
auto& name = symbol->getName();
|
||||
auto qualifier = symbol->getQualifier();
|
||||
|
||||
auto &uniform = uniforms.emplace_back();
|
||||
|
||||
Reference in New Issue
Block a user