summaryrefslogtreecommitdiff
path: root/tests/bugs
diff options
context:
space:
mode:
authorArielG-NV <159081215+ArielG-NV@users.noreply.github.com>2024-05-24 18:42:48 -0400
committerGitHub <noreply@github.com>2024-05-24 15:42:48 -0700
commit45cc7a18a55a25114932a8e531a25c5d3780414c (patch)
tree9f07f6ce9bff503a894e2f9be0196c0e08790c19 /tests/bugs
parent9553a7ce7b01ce0400bedbd38646e21e0f2fa4b7 (diff)
If no sample is set with a `Texture(.*)MS[]` operation, set sample to 0. (#4225)
* push fix: if no sample, set to 0 for textureMS * push fixes to hlsl [] operator + test so it will error
Diffstat (limited to 'tests/bugs')
-rw-r--r--tests/bugs/gh-4200.slang17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/bugs/gh-4200.slang b/tests/bugs/gh-4200.slang
new file mode 100644
index 000000000..e9ea1d34d
--- /dev/null
+++ b/tests/bugs/gh-4200.slang
@@ -0,0 +1,17 @@
+//TEST:SIMPLE(filecheck=CHECK_SPV): -target spirv -emit-spirv-directly -entry computeMain -stage compute
+//TEST:SIMPLE(filecheck=CHECK_HLSL): -target hlsl -entry computeMain -stage compute
+
+//CHECK_SPV: OpEntryPoint
+//CHECK_HLSL: computeMain
+
+Texture2DMS<uint4> Src : register(t1);
+RWBuffer<uint4> Dst : register(u2);
+
+[shader("compute")]
+[numthreads(1, 1, 1)]
+void computeMain()
+{
+// CHECK_SPV: Sample %int_0
+// CHECK_HLSL: [{{.*}}1{{.*}}]
+ Dst[0] = Src[int2(1)];
+} \ No newline at end of file