Fix defects in uniform array flattening
Fix for two defects as follows: - The IO mapping traverser was not setting inVisit, and would skip some AST nodes. Depending on the order of nodes, this could have prevented the binding from showing up in the generated SPIR-V. - If a uniform array was flattened, each of the flattened scalars from the array is still a (now-scalar) uniform. It was being converted to a temporary.
This commit is contained in:
@@ -56,7 +56,9 @@ namespace glslang {
|
||||
|
||||
class TLiveTraverser : public TIntermTraverser {
|
||||
public:
|
||||
TLiveTraverser(const TIntermediate& i, bool traverseAll = false) :
|
||||
TLiveTraverser(const TIntermediate& i, bool traverseAll = false,
|
||||
bool preVisit = true, bool inVisit = false, bool postVisit = false) :
|
||||
TIntermTraverser(preVisit, inVisit, postVisit),
|
||||
intermediate(i), traverseAll(traverseAll)
|
||||
{ }
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ class TBindingTraverser : public TLiveTraverser {
|
||||
public:
|
||||
TBindingTraverser(const TIntermediate& i, TBindingMap& bindingMap, TUsedBindings& usedBindings,
|
||||
bool traverseDeadCode = false) :
|
||||
TLiveTraverser(i, traverseDeadCode),
|
||||
TLiveTraverser(i, traverseDeadCode, true, true, false),
|
||||
bindingMap(bindingMap),
|
||||
usedBindings(usedBindings)
|
||||
{ }
|
||||
|
||||
Reference in New Issue
Block a user