From 59216d5cd87eee78dc979e30645c4c2240a7c351 Mon Sep 17 00:00:00 2001 From: alelenv <40001162+alelenv@users.noreply.github.com> Date: Thu, 21 May 2020 04:38:41 -0700 Subject: Add support for primitive culling layout qualifier. (#2220) * Add support for primitive culling layout qualifier. * Add error checks for primitive flags and negative test. --- glslang/MachineIndependent/localintermediate.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'glslang/MachineIndependent/localintermediate.h') diff --git a/glslang/MachineIndependent/localintermediate.h b/glslang/MachineIndependent/localintermediate.h index 996e347f..9f7b9977 100644 --- a/glslang/MachineIndependent/localintermediate.h +++ b/glslang/MachineIndependent/localintermediate.h @@ -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 shiftBinding; -- cgit v1.2.3