diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2019-05-21 14:44:09 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-05-21 14:44:09 -0400 |
| commit | c2b4c5838431e12abb6f233c459d3d6a717aad18 (patch) | |
| tree | ed11811faa1c47b71a2acb482e01990baab8f43e /source/slang/type-system-shared.h | |
| parent | 7ffe6f03976c98ba0233483d0182fc0ad600fd7a (diff) | |
Hotfix/improve glsl semantic conversion (#965)
* Specify glsl semantic format - such that conversions are possible from hlsl sematics.
* Comment improvements. Give appropriate type in glsl for sv_tessfactor. Note that sv_tessfactor is not functional though.
* Work in progress for comparison of types.
* * Fix type comparison issues around the hash.
* Fix tests whos output changed with use of isTypeEqual
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; } |
