Commit e1f472d0 authored by Ian Romanick's avatar Ian Romanick

Add shader tests for post-increment operator

These are related to Mesa bugzilla #33197.
parent 2b0a25ba
......@@ -415,6 +415,7 @@ add_shader_generic(shaders, 'glsl-fs-neg')
add_shader_generic(shaders, 'glsl-fs-neg-abs')
add_shader_generic(shaders, 'glsl-fs-neg-dot')
add_plain_test(shaders, 'glsl-fs-pointcoord')
add_shader_generic(shaders, 'glsl-fs-post-increment-01.shader_test')
add_plain_test(shaders, 'glsl-fs-raytrace-bug27060')
add_shader_generic(shaders, 'glsl-fs-roundEven')
add_shader_generic(shaders, 'glsl-fs-reflect')
......@@ -568,6 +569,7 @@ add_shader_generic(shaders, 'glsl-vs-mat-mul-2')
add_shader_generic(shaders, 'glsl-vs-mat-mul-3')
add_shader_generic(shaders, 'glsl-vs-mat-sub-1')
add_shader_generic(shaders, 'glsl-vs-position-outval')
add_shader_generic(shaders, 'glsl-vs-post-increment-01.shader_test')
add_shader_generic(shaders, 'glsl-vs-sign')
add_shader_generic(shaders, 'glsl-vs-swizzle-swizzle-lhs')
add_shader_generic(shaders, 'glsl-vs-swizzle-swizzle-rhs')
......
[require]
# Once gl_Vertex is changed to piglit_vertex, this test will work with
# GLSL ES 1.00 as well.
GLSL >= 1.10
[vertex shader]
#ifdef GL_ES
precision mediump float;
#endif
void main()
{
gl_Position = gl_Vertex;
}
[fragment shader]
#ifdef GL_ES
precision mediump float;
#endif
void a()
{
gl_FragColor.y = 0.5;
}
void main()
{
gl_FragColor.xzy = vec3(0.0);
a();
gl_FragColor.x = gl_FragColor.y++;
}
[test]
clear color 0.5 0.5 0.5 0.5
clear
draw rect -1 -1 2 2
probe rgb 15 15 0.5 1.0 0.0
[require]
# Once gl_Vertex is changed to piglit_vertex, this test will work with
# GLSL ES 1.00 as well.
GLSL >= 1.10
[vertex shader]
#ifdef GL_ES
precision mediump float;
#endif
varying vec4 color;
varying float f;
void a()
{
f = 0.5;
}
void main()
{
gl_Position = gl_Vertex;
f = 0.1;
a();
color.g = f++;
color.rba = vec3(0.0);
}
[fragment shader]
#ifdef GL_ES
precision mediump float;
#endif
varying vec4 color;
varying float f;
void main()
{
gl_FragColor = color;
}
[test]
clear color 0.5 0.5 0.5 0.5
clear
draw rect -1 -1 2 2
probe rgb 15 15 0.0 0.5 0.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