1 # Test the "fast clear" functionality of i965/gen7+ when a redundant
2 # clear is done, but to a different clear color.
4 # Fast clear functionality on i965/gen7+ operates by deferring the
5 # memory writes that would normally be done during a buffer clear so
6 # that they happen either during rendering or at the time buffer data
7 # is read (e.g. by glReadPixels). If two fast clears appear in a row,
8 # the second clear can be elided (even if it clears to a different
9 # color, since none of the color writes have occurred yet).
11 # This test verifies that if two fast clears are performed in a row,
12 # the color that takes effect is the color from the second clear. As
13 # with fast-clear-all-colors.shader_test, we also make a draw call
14 # that touches a small number of pixels and outputs the same color.
15 # This is to ensure that some writes are deferred to rendering time
16 # and others are deferred until glReadPixels time, so that we verify
17 # that correct data is written in both circumstances.
44 clear color 1.0 0.0 0.0 1.0
46 clear color 0.0 1.0 0.0 1.0
48 uniform vec4 color 0.0 1.0 0.0 1.0
49 draw arrays GL_LINES 0 2
50 probe all rgba 0.0 1.0 0.0 1.0