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 other rendering (in this
10 # case a slow clear) occurs between the two fast clears, the second
11 # fast clear is necessary, since some of the first fast clear's writes
12 # may already have been performed.
14 # In this test, we accomplish the slow clear by clearing to a color
15 # which is not supported by fast clear (0.5, 0.0, 0.0, 1.0).
23 gl_Position = gl_Vertex;
29 gl_FragColor = vec4(0.0);
33 clear color 0.0 1.0 0.0 1.0
35 clear color 0.5 0.0 0.0 1.0
37 clear color 0.0 1.0 0.0 1.0
39 probe all rgba 0.0 1.0 0.0 1.0