summaryrefslogtreecommitdiffstats
path: root/tests/diagnostics
diff options
context:
space:
mode:
Diffstat (limited to 'tests/diagnostics')
-rw-r--r--tests/diagnostics/get-vertex-attribute.slang13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/diagnostics/get-vertex-attribute.slang b/tests/diagnostics/get-vertex-attribute.slang
new file mode 100644
index 000000000..613a5a7c8
--- /dev/null
+++ b/tests/diagnostics/get-vertex-attribute.slang
@@ -0,0 +1,13 @@
+//TEST:SIMPLE(filecheck=CHECK): -target spirv
+
+struct VertexOutput
+{
+ float color;
+}
+
+[shader("fragment")]
+float4 fsmain(VertexOutput vout) : SV_Target
+{
+ // CHECK: ([[# @LINE+1]]): error 39027
+ return GetAttributeAtVertex(vout.color, 0); // error: color must be decorated with `nointerpolation`.
+}