summaryrefslogtreecommitdiffstats
path: root/tests/metal
diff options
context:
space:
mode:
Diffstat (limited to 'tests/metal')
-rw-r--r--tests/metal/barycentrics.slang12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/metal/barycentrics.slang b/tests/metal/barycentrics.slang
new file mode 100644
index 000000000..105ea22ed
--- /dev/null
+++ b/tests/metal/barycentrics.slang
@@ -0,0 +1,12 @@
+//TEST:SIMPLE(filecheck=CHECK): -target metal
+//TEST:SIMPLE(filecheck=CHECK-ASM): -target metallib
+
+// CHECK: {{\[\[}}barycentric_coord{{\]\]}}
+// CHECK-ASM: !"air.barycentric_coord"
+
+[shader("fragment")]
+float4 fragment_main(float4 pos: SV_Position, float3 barycentrics: SV_Barycentrics)
+ : SV_Target
+{
+ return float4(barycentrics, 1.f);
+}