If we can't clear all the buffers with pctx->clear() (say, for example,
because of ColorMask), push the buffers we *can* clear with pctx->clear()
first. Tilers want to see clears coming before draws to enable fast-
paths, and clearing one of the attachments with a quad-draw first
confuses that logic.
Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
* use pipe->clear. We want to always use pipe->clear for the other
* renderbuffers, because it's likely to be faster.
*/
- if (quad_buffers) {
- clear_with_quad(ctx, quad_buffers);
- }
if (clear_buffers) {
/* We can't translate the clear color to the colorbuffer format,
* because different colorbuffers may have different formats.
(union pipe_color_union*)&ctx->Color.ClearColor,
ctx->Depth.Clear, ctx->Stencil.Clear);
}
+ if (quad_buffers) {
+ clear_with_quad(ctx, quad_buffers);
+ }
if (mask & BUFFER_BIT_ACCUM)
_mesa_clear_accum_buffer(ctx);
}