From 228546a8af51758caa9ee3c5c018780d33d6a757 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 8 Jun 2016 17:10:37 -0700 Subject: [PATCH] Types: Add an isOpaque() helper --- glslang/Include/Types.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/glslang/Include/Types.h b/glslang/Include/Types.h index c4933e07..aa368340 100644 --- a/glslang/Include/Types.h +++ b/glslang/Include/Types.h @@ -1255,6 +1255,8 @@ public: virtual bool isStruct() const { return structure != nullptr; } virtual bool isFloatingDomain() const { return basicType == EbtFloat || basicType == EbtDouble; } + virtual bool isOpaque() const { return basicType == EbtSampler || basicType == EbtAtomicUint; } + // "Image" is a superset of "Subpass" virtual bool isImage() const { return basicType == EbtSampler && getSampler().isImage(); } virtual bool isSubpass() const { return basicType == EbtSampler && getSampler().isSubpass(); } @@ -1315,7 +1317,7 @@ public: virtual bool containsOpaque() const { - if (basicType == EbtSampler || basicType == EbtAtomicUint) + if (isOpaque()) return true; if (! structure) return false;