summaryrefslogtreecommitdiffstats
path: root/tests/bugs/implicit-cast.slang
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-08-09 20:11:09 -0700
committerGitHub <noreply@github.com>2023-08-09 20:11:09 -0700
commitf875d3f5ba9c1ddc6aa9a0960efd5ab27ae4e4c9 (patch)
tree42dae9fd6c260dfdafe7ce4a1ffc392e799c855d /tests/bugs/implicit-cast.slang
parent03a5bb4bc0391e2de3c2dfb9ff3213bc0ccd9664 (diff)
Support implciit casted swizzled lvalue. (#3077)
* Support implciit casted swizzled lvalue. * Fix warnings. * Fix. * fix comment. * Prefer mangled linkage name for global params. * Update tests. --------- Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tests/bugs/implicit-cast.slang')
-rw-r--r--tests/bugs/implicit-cast.slang18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/bugs/implicit-cast.slang b/tests/bugs/implicit-cast.slang
new file mode 100644
index 000000000..2ee62cc87
--- /dev/null
+++ b/tests/bugs/implicit-cast.slang
@@ -0,0 +1,18 @@
+//TEST(compute):COMPARE_COMPUTE:-vk -shaderobj
+
+//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name gBuffer
+RWStructuredBuffer<int> gBuffer;
+
+int getX(int4 v) { return v.x; }
+
+[numthreads(1, 1, 1)]
+void computeMain(uint3 tid: SV_DispatchThreadID, uint GI: SV_GroupIndex)
+{
+ if (GI< 1)
+ {
+ uint LdsCoord = GI;
+ uint a = gBuffer[LdsCoord];
+ LdsCoord += 1;
+ gBuffer[LdsCoord] = 1;
+ }
+}