summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-06-13 23:57:14 -0700
committerGitHub <noreply@github.com>2024-06-13 23:57:14 -0700
commita210091c2c3eb572183b6e76ed4069347a5b6a99 (patch)
tree38f4155c2ea0a5c848549b53095ea44ae8a86673 /tests
parent2cc96907e4152291e0b6bca78a0bfbc69ddb8839 (diff)
[Metal] Support SV_TargetN. (#4390)
* [Metal] Support SV_TargetN. * Fix.
Diffstat (limited to 'tests')
-rw-r--r--tests/metal/sv_target.slang20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/metal/sv_target.slang b/tests/metal/sv_target.slang
new file mode 100644
index 000000000..4c7c6e8da
--- /dev/null
+++ b/tests/metal/sv_target.slang
@@ -0,0 +1,20 @@
+//TEST:SIMPLE(filecheck=CHECK): -target metal
+//TEST:SIMPLE(filecheck=CHECK-ASM): -target metallib
+
+struct Output
+{
+ float4 Diffuse : SV_Target0;
+ float4 Normal : SV_Target1;
+ float4 Material : SV_Target2;
+}
+
+// CHECK-ASM: define {{.*}} @fragMain
+// CHECK: color(0)
+// CHECK: color(1)
+// CHECK: color(2)
+
+[shader("fragment")]
+Output fragMain()
+{
+ return { float4(1), float4(2), float4(3) };
+} \ No newline at end of file