summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/cross-compile/barycentrics.slang6
-rw-r--r--tests/cross-compile/barycentrics.slang.glsl12
2 files changed, 18 insertions, 0 deletions
diff --git a/tests/cross-compile/barycentrics.slang b/tests/cross-compile/barycentrics.slang
new file mode 100644
index 000000000..1f2c27572
--- /dev/null
+++ b/tests/cross-compile/barycentrics.slang
@@ -0,0 +1,6 @@
+//TEST:CROSS_COMPILE:-target spirv-assembly -entry main -stage fragment
+
+float4 main(float3 bary : SV_Barycentrics) : SV_Target
+{
+ return float4(bary, 0);
+}
diff --git a/tests/cross-compile/barycentrics.slang.glsl b/tests/cross-compile/barycentrics.slang.glsl
new file mode 100644
index 000000000..ca37a14e8
--- /dev/null
+++ b/tests/cross-compile/barycentrics.slang.glsl
@@ -0,0 +1,12 @@
+#version 450
+
+#extension GL_NV_fragment_shader_barycentric : enable
+
+layout(location = 0)
+out vec4 _S1;
+
+void main()
+{
+ _S1 = vec4(gl_BaryCoordNV, float(0));
+ return;
+}