diff options
Diffstat (limited to 'source/slang/type-system-shared.h')
| -rw-r--r-- | source/slang/type-system-shared.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/slang/type-system-shared.h b/source/slang/type-system-shared.h index 183cacb4b..95840e701 100644 --- a/source/slang/type-system-shared.h +++ b/source/slang/type-system-shared.h @@ -32,6 +32,7 @@ FOREACH_BASE_TYPE(DEFINE_BASE_TYPE) struct TextureFlavor { + typedef TextureFlavor ThisType; enum { // Mask for the overall "shape" of the texture @@ -78,6 +79,9 @@ FOREACH_BASE_TYPE(DEFINE_BASE_TYPE) bool isMultisample() const { return (flavor & MultisampleFlag) != 0; } // bool isShadow() const { return (flavor & ShadowFlag) != 0; } + SLANG_FORCE_INLINE bool operator==(const ThisType& rhs) const { return flavor == rhs.flavor; } + SLANG_FORCE_INLINE bool operator!=(const ThisType& rhs) const { return !(*this == rhs); } + SlangResourceShape getShape() const { return flavor & 0xFF; } SlangResourceAccess getAccess() const { return (flavor >> 8) & 0xFF; } |
