fix the spelling in whole piglit
[piglit.git] / tests / fast_color_clear / non-redundant-clear.shader_test
blob3e056ae838650f332750e573cec8f9a862770403
1 # Test the "fast clear" functionality of i965/gen7+ when two clears
2 # are done to the same buffer, but with drawing in between (so the
3 # second clear is not redundant).
5 # Fast clear functionality on i965/gen7+ operates by deferring the
6 # memory writes that would normally be done during a buffer clear so
7 # that they happen either during rendering or at the time buffer data
8 # is read (e.g. by glReadPixels).  If two fast clears appear in a row,
9 # the second clear can be elided.  But if rendering occurs between
10 # the two fast clears, the second clear is necessary, since some of
11 # the first clear's writes may already have been performed.
13 # This test verifies that in the case where two fast clears are
14 # separated by rendering, the second clear is actually performed.
16 [require]
17 GLSL >= 1.10
19 [vertex shader]
20 attribute vec4 pos;
22 void main()
24   gl_Position = pos;
27 [fragment shader]
28 uniform vec4 color;
30 void main()
32   gl_FragColor = color;
35 [vertex data]
36 pos/float/4
37 0.0 0.0 0.0 1.0
38 1.0 1.0 0.0 1.0
40 [test]
41 clear color 0.0 1.0 0.0 1.0
42 clear
43 uniform vec4 color 1.0 0.0 0.0 1.0
44 draw arrays GL_LINES 0 2
45 clear
46 probe all rgba 0.0 1.0 0.0 1.0