summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-12-16 22:10:10 -0800
committerGitHub <noreply@github.com>2024-12-16 22:10:10 -0800
commit9c9e1f701242b59dead94426a25f2ad5d3bcf66d (patch)
treea5ebe51754ab40ea300177b2cc56a979337d2e80 /tests
parent0a6ffee0c633e28a42a676fb7ddeb5f7d151a6db (diff)
Support matrix negation in metal backend. (#5891)
Diffstat (limited to 'tests')
-rw-r--r--tests/metal/matrix-negate.slang11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/metal/matrix-negate.slang b/tests/metal/matrix-negate.slang
new file mode 100644
index 000000000..f6ae6816f
--- /dev/null
+++ b/tests/metal/matrix-negate.slang
@@ -0,0 +1,11 @@
+//TEST:SIMPLE(filecheck=CHECK): -target metal
+
+// CHECK: (matrix<float,int(4),int(4)>{{.*}}(0) -
+
+RWStructuredBuffer<float4> output;
+
+[numthreads(1,1,1)]
+void computeMain(uniform float4x4 m)
+{
+ output[0] = (-m)[0];
+} \ No newline at end of file