summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorcheneym2 <acheney@nvidia.com>2025-02-13 19:07:55 -0500
committerGitHub <noreply@github.com>2025-02-13 16:07:55 -0800
commit944c19b408f20e6c5495678028f62e4e7040aa3b (patch)
tree9e062c40fc0412c0eee0e4818a9703c5d5e21065 /tests
parent4c8edd7fbe63100294301a2e210dad21e5263b8a (diff)
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>
Diffstat (limited to 'tests')
-rw-r--r--tests/glsl/interface-block.glsl37
1 files changed, 37 insertions, 0 deletions
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);
+}
+