diff options
author | Jason Ekstrand <[email protected]> | 2017-06-21 21:35:07 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-07-22 20:59:22 -0700 |
commit | 3e57e9494c2279580ad6a83ab8c065d01e7e634e (patch) | |
tree | 900b7f29e9ce674e4d9f36333f39056c8081c3e2 /src/mesa/drivers/dri/i965/brw_draw.c | |
parent | d4de403f9191ed995e1684dbe50011e55cd62501 (diff) |
i965: Enable regular fast-clears (CCS_D) on gen9+
The set of formats which supports CCS_E is actually fairly small on
gen9. However, everything that supports fast-clears on gen8 also
supports fast-clears on gen9+. The one very annoying exception is
that blending is broken for non-0/1 clear colors with sRGB formats.
In order to solve that problem, we do a resolve to get rid of the
clear color. Another option would be to just not fast-clear with
non-0/1 clear colors however non-0/1 + blending + sRGB is uncommon
enough that this shouldn't be a significant performance problem.
This appears to help gl_manhattan31_off by about 2%.
Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_draw.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_draw.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c index 20ff99fff9d..d73a3dc827a 100644 --- a/src/mesa/drivers/dri/i965/brw_draw.c +++ b/src/mesa/drivers/dri/i965/brw_draw.c @@ -473,7 +473,8 @@ brw_predraw_resolve_framebuffer(struct brw_context *brw) intel_miptree_prepare_render(brw, irb->mt, irb->mt_level, irb->mt_layer, irb->layer_count, - ctx->Color.sRGBEnabled); + ctx->Color.sRGBEnabled, + ctx->Color.BlendEnabled & (1 << i)); } } @@ -541,7 +542,8 @@ brw_postdraw_set_buffers_need_resolve(struct brw_context *brw) brw_render_cache_set_add_bo(brw, irb->mt->bo); intel_miptree_finish_render(brw, irb->mt, irb->mt_level, irb->mt_layer, irb->layer_count, - ctx->Color.sRGBEnabled); + ctx->Color.sRGBEnabled, + ctx->Color.BlendEnabled & (1 << i)); } } |