mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 12:08:06 +02:00
More array declaration tests
This commit is contained in:
parent
299ed08a68
commit
615adcda8a
5 changed files with 51 additions and 0 deletions
9
tests/array-09.glsl
Normal file
9
tests/array-09.glsl
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#version 120
|
||||
/* PASS */
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 a[2] = vec4 [2] (vec4(1.0), vec4(2.0));
|
||||
|
||||
gl_Position = gl_Vertex;
|
||||
}
|
||||
11
tests/array-10.glsl
Normal file
11
tests/array-10.glsl
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/* FAIL - array constructors forbidden in GLSL 1.10
|
||||
*
|
||||
* This can also generate an error because the 'vec4[]' style syntax is
|
||||
* illegal in GLSL 1.10.
|
||||
*/
|
||||
void main()
|
||||
{
|
||||
vec4 a[2] = vec4 [2] (vec4(1.0), vec4(2.0));
|
||||
|
||||
gl_Position = gl_Vertex;
|
||||
}
|
||||
9
tests/array-11.glsl
Normal file
9
tests/array-11.glsl
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#version 120
|
||||
/* PASS */
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 a[] = vec4 [] (vec4(1.0), vec4(2.0));
|
||||
|
||||
gl_Position = gl_Vertex;
|
||||
}
|
||||
11
tests/array-12.glsl
Normal file
11
tests/array-12.glsl
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#version 120
|
||||
/* FAIL - array must have an implicit or explicit size */
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 a[];
|
||||
|
||||
a = vec4 [2] (vec4(1.0), vec4(2.0));
|
||||
|
||||
gl_Position = gl_Vertex;
|
||||
}
|
||||
11
tests/array-13.glsl
Normal file
11
tests/array-13.glsl
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#version 120
|
||||
/* PASS */
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 a[2];
|
||||
|
||||
a = vec4 [] (vec4(1.0), vec4(2.0));
|
||||
|
||||
gl_Position = gl_Vertex;
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue