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.
41 clear color 0.0 1.0 0.0 1.0
43 uniform vec4 color 1.0 0.0 0.0 1.0
44 draw arrays GL_LINES 0 2
46 probe all rgba 0.0 1.0 0.0 1.0