From: Topi Pohjolainen Date: Fri, 1 Apr 2016 13:18:27 +0000 (+0300) Subject: i965/blorp: Enable for normal color clears X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c7cf17ae758eff27dee8e06cc315841b34d3fe0a;p=mesa.git i965/blorp: Enable for normal color clears Signed-off-by: Topi Pohjolainen Reviewed-by: Kenneth Graunke --- diff --git a/src/mesa/drivers/dri/i965/brw_clear.c b/src/mesa/drivers/dri/i965/brw_clear.c index 841ba5d5a3f..d57b67737a3 100644 --- a/src/mesa/drivers/dri/i965/brw_clear.c +++ b/src/mesa/drivers/dri/i965/brw_clear.c @@ -239,6 +239,15 @@ brw_clear(struct gl_context *ctx, GLbitfield mask) } } + /* BLORP is currently only supported on Gen6+. */ + if (brw->gen >= 6 && (mask & BUFFER_BITS_COLOR)) { + const bool encode_srgb = ctx->Color.sRGBEnabled; + if (brw_blorp_clear_color(brw, fb, mask, partial_clear, encode_srgb)) { + debug_mask("blorp color", mask & BUFFER_BITS_COLOR); + mask &= ~BUFFER_BITS_COLOR; + } + } + /* Clear color buffers with fast clear or at least rep16 writes. */ if (brw->gen >= 6 && (mask & BUFFER_BITS_COLOR)) { if (brw_meta_fast_clear(brw, fb, mask, partial_clear)) {