diff options
| -rw-r--r-- | source/slang/slang-check-impl.h | 12 | ||||
| -rw-r--r-- | tests/metal/atomic-texture-buffer.slang | 2 | ||||
| -rw-r--r-- | tests/metal/atomic-texture-texture1d.slang | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/source/slang/slang-check-impl.h b/source/slang/slang-check-impl.h index d08cae66f..523041697 100644 --- a/source/slang/slang-check-impl.h +++ b/source/slang/slang-check-impl.h @@ -70,13 +70,13 @@ int getTypeBitSize(Type* t); // that can be used as lookup key in caches struct BasicTypeKey { - uint32_t baseType : 8; - uint32_t dim1 : 4; - uint32_t dim2 : 4; - uint32_t knownConstantBitCount : 8; + uint32_t baseType : 5; + uint32_t dim1 : 8; + uint32_t dim2 : 8; + uint32_t knownConstantBitCount : 6; uint32_t knownNegative : 1; uint32_t isLValue : 1; - uint32_t reserved : 6; + uint32_t reserved : 3; uint32_t getRaw() const { uint32_t val; @@ -84,7 +84,7 @@ struct BasicTypeKey return val; } bool operator==(BasicTypeKey other) const { return getRaw() == other.getRaw(); } - static BasicTypeKey invalid() { return BasicTypeKey{0xff, 0, 0, 0, 0, 0, 0}; } + static BasicTypeKey invalid() { return BasicTypeKey{0x1f, 0, 0, 0, 0, 0, 0}; } }; SLANG_FORCE_INLINE BasicTypeKey makeBasicTypeKey( diff --git a/tests/metal/atomic-texture-buffer.slang b/tests/metal/atomic-texture-buffer.slang index 1db156364..9f24018c7 100644 --- a/tests/metal/atomic-texture-buffer.slang +++ b/tests/metal/atomic-texture-buffer.slang @@ -75,7 +75,7 @@ void test() InterlockedXor(intBuffer[0], valInt, originalValueInt); InterlockedExchange(intBuffer[0], valInt, originalValueInt); InterlockedCompareExchange(intBuffer[0], valInt, compareValueInt, originalValueInt); - InterlockedCompareStore(intBuffer[0], valUInt, compareValueUInt); + InterlockedCompareStore(intBuffer[0], valInt, compareValueUInt); InterlockedAdd(uintBuffer[0], valUInt); InterlockedAnd(uintBuffer[0], valUInt); diff --git a/tests/metal/atomic-texture-texture1d.slang b/tests/metal/atomic-texture-texture1d.slang index 8a47af8ee..746021fd6 100644 --- a/tests/metal/atomic-texture-texture1d.slang +++ b/tests/metal/atomic-texture-texture1d.slang @@ -65,7 +65,7 @@ void test() InterlockedXor(intTexture1D[0], valInt, originalValueInt); InterlockedExchange(intTexture1D[0], valInt, originalValueInt); InterlockedCompareExchange(intTexture1D[0], valInt, compareValueInt, originalValueInt); - InterlockedCompareStore(intTexture1D[0], valUInt, compareValueUInt); + InterlockedCompareStore(intTexture1D[0], valInt, compareValueUInt); InterlockedAdd(uintTexture1D[0], valUInt); InterlockedAnd(uintTexture1D[0], valUInt); |
