diff --git a/glslang/Include/Types.h b/glslang/Include/Types.h index 6b0ce5b7e9f0114530c0fea86cbeac12ef828b96..621a3e8485b9a74dd90d1768696e9120a4de6ab4 100644 --- a/glslang/Include/Types.h +++ b/glslang/Include/Types.h @@ -232,19 +232,60 @@ public: bool readonly : 1; bool writeonly : 1; - bool isMemory() + bool isMemory() const { return coherent || volatil || restrict || readonly || writeonly; } - bool isInterpolation() + bool isInterpolation() const { return flat || smooth || nopersp; } - bool isAuxillary() + bool isAuxillary() const { return centroid || patch || sample; } + bool isPipeInput() const + { + switch (storage) { + case EvqVaryingIn: + case EvqFragCoord: + case EvqPointCoord: + case EvqFace: + case EvqVertexId: + case EvqInstanceId: + return true; + default: + return false; + } + } + + bool isPipeOutput() const + { + switch (storage) { + case EvqPosition: + case EvqPointSize: + case EvqClipVertex: + case EvqVaryingOut: + case EvqFragColor: + case EvqFragDepth: + return true; + default: + return false; + } + } + + bool isUniform() const + { + switch (storage) { + case EvqUniform: + case EVqBuffer: + return true; + default: + return false; + } + } + // Implementing an embedded layout-qualifier class here, since C++ can't have a real class bitfield void clearLayout() {