GLSL: Fix #1359: don't allow unsized arrays as initializers.

This commit is contained in:
John Kessenich
2018-04-23 15:18:42 -06:00
parent d8462c6f49
commit b4cb70fcd9
6 changed files with 45 additions and 17 deletions

View File

@@ -102,11 +102,12 @@ void foo3()
}
int[] i = int[](); // ERROR, need constructor arguments
float emptyA[];
float b = vec4(emptyA); // ERROR, array can't be a constructor argument
uniform sampler2D s2d[];
void foo4()
{
s2d[a]; // ERROR, can't variably index unsized array
}
float emptyA[];
float b = vec4(emptyA); // ERROR, array can't be a constructor argument
uniform sampler2D s2d[];
void foo4()
{
s2d[a]; // ERROR, can't variably index unsized array
float local[] = gUnusedUnsized; // ERROR, can initialize with runtime-sized array
}