Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/SPIRV-Cross.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Kristian Arntzen <post@arntzen-software.no>2020-07-06 10:18:30 +0300
committerHans-Kristian Arntzen <post@arntzen-software.no>2020-07-06 10:18:30 +0300
commit2ac8f51b0678c44c346b18702a5e94d421d2ad37 (patch)
treebd590a8d361ce0bcfa859c7bb67c575938fd1cde /shaders
parent2d43103a55233bd8e205075e47008bf5a731ab68 (diff)
GLSL: Support I/O flattening with arrays as final type.
Diffstat (limited to 'shaders')
-rw-r--r--shaders/legacy/vert/struct-flatten-inner-array.legacy.vert15
1 files changed, 15 insertions, 0 deletions
diff --git a/shaders/legacy/vert/struct-flatten-inner-array.legacy.vert b/shaders/legacy/vert/struct-flatten-inner-array.legacy.vert
new file mode 100644
index 00000000..f6ad932e
--- /dev/null
+++ b/shaders/legacy/vert/struct-flatten-inner-array.legacy.vert
@@ -0,0 +1,15 @@
+#version 450
+
+struct Foo
+{
+ float a[4];
+};
+
+layout(location = 0) out Foo foo;
+
+void main()
+{
+ gl_Position = vec4(1.0);
+ for (int i = 0; i < 4; i++)
+ foo.a[i] = float(i + 2);
+}