[Mesa-dev] [PATCH 14/14] i965: Don't add fast cleared buffers to render cache
Topi Pohjolainen
topi.pohjolainen at intel.com
Thu Feb 25 09:46:19 UTC 2016
Color buffers are not really written and therefore there is
no reason to flush the caches. (Render cache is a set of buffer
object pointers controlling brw_render_cache_set_check_flush()).
Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
src/mesa/drivers/dri/i965/brw_meta_fast_clear.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c b/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c
index 6a7cf4e..4345f59 100644
--- a/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c
+++ b/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c
@@ -218,8 +218,6 @@ retry:
if (brw->ctx.NewDriverState)
brw_render_state_finished(brw);
-
- set_render_buffers_state(brw);
}
static void
@@ -776,6 +774,7 @@ brw_meta_fast_clear(struct brw_context *brw, struct gl_framebuffer *fb,
_mesa_meta_drawbuffers_from_bitfield(rep_clear_buffers);
brw_bind_rep_write_shader(brw, ctx->Color.ClearColor.f);
brw_draw_rectlist(brw, &clear_rect, layers);
+ set_render_buffers_state(brw);
}
bail_to_meta:
@@ -893,6 +892,8 @@ brw_meta_resolve_color(struct brw_context *brw,
_mesa_meta_end(ctx);
+ brw_render_cache_set_add_bo(brw, mt->bo);
+
/* We're typically called from intel_update_state() and we're supposed to
* return with the state all updated to what it was before
* brw_meta_resolve_color() was called. The meta rendering will have
--
2.5.0
More information about the mesa-dev
mailing list