diff options
| author | Yong He <yonghe@outlook.com> | 2022-05-05 10:48:14 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-05 10:48:14 -0700 |
| commit | 3088d901fee6447b6d80fa67f258626ece4408dc (patch) | |
| tree | 95b7d6bcc4b549e58d705fcf0056dde71a52ae8e /tests | |
| parent | aa03cea0da38b2950e6f8694dc8b1405352eda66 (diff) | |
Various vulkan/glsl fixes. (#2222)
* Various vulkan/glsl fixes.
* Fix.
* Fix.
* Canonicalize type constraints for name mangling.
Co-authored-by: Yong He <yhe@nvidia.com>
Co-authored-by: Theresa Foley <10618364+tangent-vector@users.noreply.github.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/hlsl-intrinsic/vector-dot-int.slang | 23 | ||||
| -rw-r--r-- | tests/hlsl-intrinsic/vector-dot-int.slang.expected.txt | 4 |
2 files changed, 27 insertions, 0 deletions
diff --git a/tests/hlsl-intrinsic/vector-dot-int.slang b/tests/hlsl-intrinsic/vector-dot-int.slang new file mode 100644 index 000000000..922bd001d --- /dev/null +++ b/tests/hlsl-intrinsic/vector-dot-int.slang @@ -0,0 +1,23 @@ +//TEST(compute):COMPARE_COMPUTE_EX:-cpu -compute -shaderobj +//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj +//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -dx12 -use-dxil -shaderobj +//TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -shaderobj +//TEST(compute, vulkan):COMPARE_COMPUTE_EX:-cuda -compute -shaderobj + +//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name outputBuffer +RWStructuredBuffer<int> outputBuffer; + +[numthreads(1, 1, 1)] +void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) +{ + int idx = int(dispatchThreadID.x); + + float tmp = dot(float3(idx), float3(1)); + + int3 a = { idx + 1, idx + 2, idx + 3}; + int3 b = { 1, 2, 3}; + + int result = dot(a, b); + + outputBuffer[idx] = result; +}
\ No newline at end of file diff --git a/tests/hlsl-intrinsic/vector-dot-int.slang.expected.txt b/tests/hlsl-intrinsic/vector-dot-int.slang.expected.txt new file mode 100644 index 000000000..18ff54819 --- /dev/null +++ b/tests/hlsl-intrinsic/vector-dot-int.slang.expected.txt @@ -0,0 +1,4 @@ +E +0 +0 +0
\ No newline at end of file |
