diff options
| author | Yong He <yonghe@outlook.com> | 2023-08-09 10:54:41 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-09 10:54:41 -0700 |
| commit | 03a5bb4bc0391e2de3c2dfb9ff3213bc0ccd9664 (patch) | |
| tree | 8bdc7fbf12777c2efe68e677f6802afdb70ba8fc /tests/bugs/buffer-swizzle-store.slang | |
| parent | c4615fe0ae7e1849b23e9a96d1453794b0b40e90 (diff) | |
Various fixes in GLSL emit. (#3074)
* Fix name mangling of modified types.
* Add `InterlockedAdd(__ref uint, int)` overload.
* Fix.
* Fix type error in ImageStore legalization.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tests/bugs/buffer-swizzle-store.slang')
| -rw-r--r-- | tests/bugs/buffer-swizzle-store.slang | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/bugs/buffer-swizzle-store.slang b/tests/bugs/buffer-swizzle-store.slang new file mode 100644 index 000000000..ca09cded9 --- /dev/null +++ b/tests/bugs/buffer-swizzle-store.slang @@ -0,0 +1,16 @@ +//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj -output-using-type +//TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -shaderobj -output-using-type + +//TEST_INPUT: RWTexture2D(format=R16G16_FLOAT, size=4, content = one, mipMaps = 1):name g_test +[format("rg16f")] +RWTexture2D<float2> g_test; + +//TEST_INPUT:ubuffer(data=[0], stride=4):out,name outputBuffer +RWStructuredBuffer<float> outputBuffer; + +[numthreads(1,1,1)] +void computeMain( uint2 dispatchThreadID : SV_DispatchThreadID ) +{ + g_test[dispatchThreadID].xy = float2(0.0, 1.0); + outputBuffer[dispatchThreadID.x] = g_test[dispatchThreadID].y; +}
\ No newline at end of file |
