Commit 2915da30 by LoopDawg

Nonfunctional: minor: use std::array for per-set shifts, fix warning.

Two unrelated, minor tweaks: (1) Use std::array for shiftBindingForSet. Now matches shiftBinding. (2) Add parens in shouldFlatten() to make compiler warning happy.
parent 573cc9e9
......@@ -677,8 +677,7 @@ protected:
std::array<unsigned int, EResCount> shiftBinding;
// Per-descriptor-set shift values
typedef std::map<int, int> TDescriptorSetShift;
TDescriptorSetShift shiftBindingForSet[EResCount];
std::array<std::map<int, int>, EResCount> shiftBindingForSet;
std::vector<std::string> resourceSetBinding;
bool autoMapBindings;
......
......@@ -1157,8 +1157,8 @@ bool HlslParseContext::shouldFlatten(const TType& type, TStorageQualifier qualif
case EvqVaryingOut:
return type.isStruct() || type.isArray();
case EvqUniform:
return type.isArray() && intermediate.getFlattenUniformArrays() && topLevel ||
type.isStruct() && type.containsOpaque();
return (type.isArray() && intermediate.getFlattenUniformArrays() && topLevel) ||
(type.isStruct() && type.containsOpaque());
default:
return type.isStruct() && type.containsOpaque();
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment