Commit 31da060a authored by Ian Romanick's avatar Ian Romanick

Add shader tests involving implicitly sized arrays

These reproduce several bugs related to Mesa bugzilla #33219.
parent 61c43041
......@@ -385,6 +385,8 @@ add_shader_generic(shaders, 'glsl-fs-if-nested-loop')
add_shader_generic(shaders, 'glsl-fs-if-greater')
add_shader_generic(shaders, 'glsl-fs-if-greater-equal')
add_shader_generic(shaders, 'glsl-fs-if-texture2d-discard')
add_shader_generic(shaders, 'glsl-fs-implicit-array-size-01')
add_shader_generic(shaders, 'glsl-fs-implicit-array-size-02')
add_shader_generic(shaders, 'glsl-fs-log')
add_shader_generic(shaders, 'glsl-fs-log2')
add_plain_test(shaders, 'glsl-fs-loop')
......
[require]
# This test reproduces Mesa bugzilla #33219.
GLSL >= 1.10
[fragment shader]
float a[];
void myfunc()
{
a[5] = 0.0;
gl_FragColor = vec4(a[5], 0, 0, 1.0);
}
[fragment shader]
float a[];
void myfunc();
void main()
{
myfunc();
}
[test]
draw rect -1 -1 2 2
probe all rgba 0 0 0 1.0
[require]
# This test reproduces Mesa bugzilla #33219.
GLSL >= 1.10
[fragment shader]
void myfunc()
{
float a[];
a[5] = 0.0;
gl_FragColor = vec4(a[5], 0, 0, 1.0);
}
void main()
{
myfunc();
}
[test]
draw rect -1 -1 2 2
probe all rgba 0 0 0 1.0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment