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:
-rw-r--r--reference/opt/shaders/tese/input-array.tese11
-rw-r--r--reference/shaders/tese/input-array.tese11
-rw-r--r--shaders/tese/input-array.tese10
-rw-r--r--spirv_glsl.cpp5
4 files changed, 35 insertions, 2 deletions
diff --git a/reference/opt/shaders/tese/input-array.tese b/reference/opt/shaders/tese/input-array.tese
new file mode 100644
index 00000000..8a1aaf9f
--- /dev/null
+++ b/reference/opt/shaders/tese/input-array.tese
@@ -0,0 +1,11 @@
+#version 450
+layout(quads, ccw, fractional_odd_spacing) in;
+
+layout(location = 0) in vec4 Floats[];
+layout(location = 2) in vec4 Floats2[];
+
+void main()
+{
+ gl_Position = (Floats[0] * gl_TessCoord.x) + (Floats2[1] * gl_TessCoord.y);
+}
+
diff --git a/reference/shaders/tese/input-array.tese b/reference/shaders/tese/input-array.tese
new file mode 100644
index 00000000..8a1aaf9f
--- /dev/null
+++ b/reference/shaders/tese/input-array.tese
@@ -0,0 +1,11 @@
+#version 450
+layout(quads, ccw, fractional_odd_spacing) in;
+
+layout(location = 0) in vec4 Floats[];
+layout(location = 2) in vec4 Floats2[];
+
+void main()
+{
+ gl_Position = (Floats[0] * gl_TessCoord.x) + (Floats2[1] * gl_TessCoord.y);
+}
+
diff --git a/shaders/tese/input-array.tese b/shaders/tese/input-array.tese
new file mode 100644
index 00000000..f1014ca5
--- /dev/null
+++ b/shaders/tese/input-array.tese
@@ -0,0 +1,10 @@
+#version 450
+
+layout(ccw, quads, fractional_odd_spacing) in;
+layout(location = 0) in vec4 Floats[];
+layout(location = 2) in vec4 Floats2[gl_MaxPatchVertices];
+
+void main()
+{
+ gl_Position = Floats[0] * gl_TessCoord.x + Floats2[1] * gl_TessCoord.y;
+}
diff --git a/spirv_glsl.cpp b/spirv_glsl.cpp
index b3bfe3da..e3b7f408 100644
--- a/spirv_glsl.cpp
+++ b/spirv_glsl.cpp
@@ -9093,9 +9093,10 @@ string CompilerGLSL::to_array_size(const SPIRType &type, uint32_t index)
{
assert(type.array.size() == type.array_size_literal.size());
- // Tessellation control shaders must have either gl_MaxPatchVertices or unsized arrays for input arrays.
+ // Tessellation control and evaluation shaders must have either gl_MaxPatchVertices or unsized arrays for input arrays.
// Opt for unsized as it's the more "correct" variant to use.
- if (type.storage == StorageClassInput && get_entry_point().model == ExecutionModelTessellationControl)
+ if (type.storage == StorageClassInput && (get_entry_point().model == ExecutionModelTessellationControl ||
+ get_entry_point().model == ExecutionModelTessellationEvaluation))
return "";
auto &size = type.array[index];