From b92f2805855282cb717c21345dab8ffdc3f1fdd2 Mon Sep 17 00:00:00 2001 From: Samuel Kogler Date: Thu, 16 Mar 2023 19:05:33 +0100 Subject: Support GL_EXT_fragment_shader_barycentric (#2704) * Support GL_EXT_fragment_shader_barycentric * Support pervertex with GL_EXT_fragment_shader_barycentric --- tests/cross-compile/barycentrics-nv.slang | 6 ++++++ tests/cross-compile/barycentrics-nv.slang.glsl | 12 ++++++++++++ tests/cross-compile/barycentrics.slang.glsl | 4 ++-- 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 tests/cross-compile/barycentrics-nv.slang create mode 100644 tests/cross-compile/barycentrics-nv.slang.glsl (limited to 'tests/cross-compile') diff --git a/tests/cross-compile/barycentrics-nv.slang b/tests/cross-compile/barycentrics-nv.slang new file mode 100644 index 000000000..fb0272679 --- /dev/null +++ b/tests/cross-compile/barycentrics-nv.slang @@ -0,0 +1,6 @@ +//TEST:CROSS_COMPILE: -target spirv-assembly -capability GL_NV_fragment_shader_barycentric -entry main -stage fragment + +float4 main(float3 bary : SV_Barycentrics) : SV_Target +{ + return float4(bary, 0); +} diff --git a/tests/cross-compile/barycentrics-nv.slang.glsl b/tests/cross-compile/barycentrics-nv.slang.glsl new file mode 100644 index 000000000..ca37a14e8 --- /dev/null +++ b/tests/cross-compile/barycentrics-nv.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; +} diff --git a/tests/cross-compile/barycentrics.slang.glsl b/tests/cross-compile/barycentrics.slang.glsl index ca37a14e8..963316b53 100644 --- a/tests/cross-compile/barycentrics.slang.glsl +++ b/tests/cross-compile/barycentrics.slang.glsl @@ -1,12 +1,12 @@ #version 450 -#extension GL_NV_fragment_shader_barycentric : enable +#extension GL_EXT_fragment_shader_barycentric : enable layout(location = 0) out vec4 _S1; void main() { - _S1 = vec4(gl_BaryCoordNV, float(0)); + _S1 = vec4(gl_BaryCoordEXT, float(0)); return; } -- cgit v1.2.3