[Mesa-stable] [PATCH 1/3] i965: Call brw_cache_flush_for_render in predraw_resolve_framebuffer

Jason Ekstrand jason at jlekstrand.net
Tue Jan 16 23:15:40 UTC 2018


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.

On Wed, Dec 13, 2017 at 5:52 PM, Jason Ekstrand <jason at jlekstrand.net>
wrote:

> This makes sure we flush things out such as depth writes prior to using
> a surface through the render cache.  Besides the overhead of a hash
> table look-up, this function is harmless to call repeatedly with the
> same arguments.
>
> 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 7e29dcf..1f86378 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);
>     }
>  }
>
> --
> 2.5.0.400.gff86faf
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-stable/attachments/20180116/2d3e0dc2/attachment.html>


More information about the mesa-stable mailing list