From 944c19b408f20e6c5495678028f62e4e7040aa3b Mon Sep 17 00:00:00 2001 From: cheneym2 Date: Thu, 13 Feb 2025 19:07:55 -0500 Subject: Add support for GLSL interface blocks (#6351) Adds support for input GLSL interface blocks. closes #5535 Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> --- tests/glsl/interface-block.glsl | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 tests/glsl/interface-block.glsl (limited to 'tests') diff --git a/tests/glsl/interface-block.glsl b/tests/glsl/interface-block.glsl new file mode 100644 index 000000000..3d18db6c7 --- /dev/null +++ b/tests/glsl/interface-block.glsl @@ -0,0 +1,37 @@ +//TEST:SIMPLE(filecheck=CHECK_GLSL): -target glsl -stage fragment -entry fragmentMain -allow-glsl + +//CHECK_GLSL: layout(location = 0) +//CHECK_GLSL: out vec4 entryPointParam_fragmentMain_out1_0; + +//CHECK_GLSL: layout(location = 0) +//CHECK_GLSL: in vec2 vd_texcoord_0_0; + +//CHECK_GLSL: layout(location = 1) +//CHECK_GLSL: in vec2 vd_texcoord_1_0; + +//CHECK_GLSL: layout(location = 2) +//CHECK_GLSL: in vec4 vd_inner_texcoord_2_0; + +import glsl; + +#version 400 + +struct innerData +{ + vec4 texcoord_2; +}; + +in VertexData +{ + vec2 texcoord_0; + vec2 texcoord_1; + innerData inner; +} vd; + +out vec4 out1; + +void fragmentMain() +{ + out1 = vec4(vd.texcoord_0, vd.texcoord_1.x, vd.inner.texcoord_2.y); +} + -- cgit v1.2.3