summaryrefslogtreecommitdiff
path: root/tests/metal/texture-multisample.slang
diff options
context:
space:
mode:
authorGangzheng Tong <tonggangzheng@gmail.com>2025-07-03 09:38:23 -0700
committerGitHub <noreply@github.com>2025-07-03 16:38:23 +0000
commit20afbfea3134050fa93e48b5bb4edd59552384ec (patch)
treef4a1de961d5f6b76c4ca37e65e02bf2284b2a1cb /tests/metal/texture-multisample.slang
parent141eac9eb4400cf94c0a076f339e1d43ed652306 (diff)
Don't use access::sample for multisample texture in metal (#7601)
* don't use access::sample for multisample texture * Add test case * format code (#7603) Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> --------- Co-authored-by: slangbot <ellieh+slangbot@nvidia.com> Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Diffstat (limited to 'tests/metal/texture-multisample.slang')
-rw-r--r--tests/metal/texture-multisample.slang16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/metal/texture-multisample.slang b/tests/metal/texture-multisample.slang
new file mode 100644
index 000000000..4bd6e3be0
--- /dev/null
+++ b/tests/metal/texture-multisample.slang
@@ -0,0 +1,16 @@
+//TEST:SIMPLE(filecheck=METAL): -stage compute -entry computeMain -target metal -DEMIT_SOURCE
+
+// TEST_INPUT: RWTexture2D(size=4, content = zero, sampleCount=2):name texMS
+Texture2DMS<float4> texMS;
+// TEST_INPUT: RWTexture2D(size=4, content = zero):name output
+RWTexture2D<float4> output;
+
+[numthreads(1, 1, 1)]
+void computeMain()
+{
+ int2 location = int2(0, 0);
+ uint sampleIndex = 0;
+ // METAL: {{.*}}access::read{{.*}}
+ float4 v = texMS.Load(location, sampleIndex);
+ output[location] = v;
+} \ No newline at end of file