SPV: Add a switch for favoring non-NaN operands in min, max, and clamp.
This commit is contained in:
parent
d579c0a7d4
commit
605afc7b1b
8 changed files with 1433 additions and 6 deletions
|
|
@ -266,7 +266,8 @@ public:
|
|||
needToLegalize(false),
|
||||
binaryDoubleOutput(false),
|
||||
usePhysicalStorageBuffer(false),
|
||||
uniformLocationBase(0)
|
||||
uniformLocationBase(0),
|
||||
nanMinMaxClamp(false)
|
||||
{
|
||||
localSize[0] = 1;
|
||||
localSize[1] = 1;
|
||||
|
|
@ -767,6 +768,9 @@ public:
|
|||
void setUniformLocationBase(int base) { uniformLocationBase = base; }
|
||||
int getUniformLocationBase() const { return uniformLocationBase; }
|
||||
|
||||
void setNanMinMaxClamp(bool setting) { nanMinMaxClamp = setting; }
|
||||
bool getNanMinMaxClamp() const { return nanMinMaxClamp; }
|
||||
|
||||
void setNeedsLegalization() { needToLegalize = true; }
|
||||
bool needsLegalization() const { return needToLegalize; }
|
||||
|
||||
|
|
@ -900,6 +904,7 @@ protected:
|
|||
|
||||
std::unordered_map<std::string, int> uniformLocationOverrides;
|
||||
int uniformLocationBase;
|
||||
bool nanMinMaxClamp; // true if desiring min/max/clamp to favor non-NaN over NaN
|
||||
|
||||
private:
|
||||
void operator=(TIntermediate&); // prevent assignments
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue