diff options
Diffstat (limited to 'tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-length-implicit-size.vert')
-rw-r--r-- | tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-length-implicit-size.vert | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-length-implicit-size.vert b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-length-implicit-size.vert new file mode 100644 index 00000000..b5bafa75 --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-length-implicit-size.vert @@ -0,0 +1,21 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.20 + * glsles_version: 1.00 + * [end config] + * + * From page 20 (page 26 of the PDF) of the GLSL 1.20 spec: + * + * "The length method cannot be called on an array that has not been + * explicitly sized." + */ + + +void main() +{ + float b[]; + + b[2] = 1.0; // Implicitly size array to have at least 3 elements + + gl_Position = vec4(b.length()); +} |