Mesa (master): i965: Call brw_cache_flush_for_render in predraw_resolve_framebuffer

Jason Ekstrand jekstrand at kemper.freedesktop.org
Wed Jan 17 05:41:38 UTC 2018


Module: Mesa
Branch: master
Commit: 622786c20c6cd073071b00ddf6e50c447f8c5768
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=622786c20c6cd073071b00ddf6e50c447f8c5768

Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date:   Wed Dec 13 17:23:41 2017 -0800

i965: Call brw_cache_flush_for_render in predraw_resolve_framebuffer

This makes sure we flush things out of other caches prior to using a
surface through the render cache.  Currently, this is a no-op because GL
won't let you bind anything other than a color surface as color so it
should never end up in the depth cache.  However, this does complete the
flush/add_bo pair for regular drawing which will be required for the
next commit.

Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Cc: "17.3" <mesa-stable at lists.freedesktop.org>

---

 src/mesa/drivers/dri/i965/brw_draw.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c
index 7e29dcfd4e..1f86378f5e 100644
--- a/src/mesa/drivers/dri/i965/brw_draw.c
+++ b/src/mesa/drivers/dri/i965/brw_draw.c
@@ -508,6 +508,8 @@ brw_predraw_resolve_framebuffer(struct brw_context *brw)
                                    irb->mt_layer, irb->layer_count,
                                    isl_format,
                                    ctx->Color.BlendEnabled & (1 << i));
+
+      brw_cache_flush_for_render(brw, irb->mt->bo);
    }
 }
 




More information about the mesa-commit mailing list