Add support for primitive culling layout qualifier. (#2220)

* Add support for primitive culling layout qualifier.

* Add error checks for primitive flags and negative test.
This commit is contained in:
alelenv 2020-05-21 04:38:41 -07:00 committed by GitHub
parent eba1389a01
commit 59216d5cd8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 50 additions and 2 deletions

View file

@ -276,7 +276,8 @@ public:
needToLegalize(false),
binaryDoubleOutput(false),
usePhysicalStorageBuffer(false),
uniformLocationBase(0)
uniformLocationBase(0),
layoutPrimitiveCulling(false)
#endif
{
localSize[0] = 1;
@ -742,6 +743,8 @@ public:
void setLayoutDerivativeMode(ComputeDerivativeMode mode) { computeDerivativeMode = mode; }
bool hasLayoutDerivativeModeNone() const { return computeDerivativeMode != LayoutDerivativeNone; }
ComputeDerivativeMode getLayoutDerivativeModeNone() const { return computeDerivativeMode; }
void setLayoutPrimitiveCulling() { layoutPrimitiveCulling = true; }
bool getLayoutPrimitiveCulling() const { return layoutPrimitiveCulling; }
bool setPrimitives(int m)
{
if (primitives != TQualifier::layoutNotSet)
@ -974,6 +977,7 @@ protected:
ComputeDerivativeMode computeDerivativeMode;
int primitives;
int numTaskNVBlocks;
bool layoutPrimitiveCulling;
// Base shift values
std::array<unsigned int, EResCount> shiftBinding;