[Mesa-dev] [PATCH] i965: Release aux buffer when disabling ccs

Jason Ekstrand jason at jlekstrand.net
Mon Dec 5 07:26:41 UTC 2016


On Dec 4, 2016 11:18 PM, "Pohjolainen, Topi" <topi.pohjolainen at gmail.com>
wrote:

On Sun, Dec 04, 2016 at 08:36:03PM -0800, Jason Ekstrand wrote:
>    On Sun, Dec 4, 2016 at 2:08 PM, Topi Pohjolainen
>    <[1]topi.pohjolainen at gmail.com> wrote:
>
>      Otherwise subsequent render cycles keep on using compression
>      and/or fast clear.
>
>    I believe that's because most things look at mt->mcs_buf rather than
>    no_ccs.  Given that we're allocating the CCS up-front, is no_ccs really
>    doing anything for us or can we just use mt->mcs_buf?  Maybe it's
>    mostly used during miptree setup?

You are correct that only setup looks no_ccs and the rest mt->mcs_buf. Then
about the allocation. For compression the allocation is up-front, but for
plain-old-fast-clear we still allocate on-demand.


Ah. I didn't realize that


>
>      Signed-off-by: Topi Pohjolainen <[2]topi.pohjolainen at intel.com>
>      CC: Kalyan Kondapally <[3]kalyan.kondapally at intel.com>
>      CC: Kenneth Graunke <[4]kenneth at whitecape.org>
>      ---
>       src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 3 +++
>       1 file changed, 3 insertions(+)
>      diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
>      b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
>      index a9b350e..7cda019 100644
>      --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
>      +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
>      @@ -2326,6 +2326,9 @@ intel_miptree_make_shareable(struct
>      brw_context *brw,
>          if (mt->mcs_buf) {
>             intel_miptree_all_slices_resolve_color(brw, mt, 0);
>             mt->no_ccs = true;
>      +      drm_intel_bo_unreference(mt->mcs_buf->bo);
>      +      free(mt->mcs_buf);
>      +      mt->mcs_buf = NULL;
>          }
>       }
>      --
>      2.5.5
>      _______________________________________________
>      mesa-dev mailing list
>      [5]mesa-dev at lists.freedesktop.org
>      [6]https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
> References
>
>    1. mailto:topi.pohjolainen at gmail.com
>    2. mailto:topi.pohjolainen at intel.com
>    3. mailto:kalyan.kondapally at intel.com
>    4. mailto:kenneth at whitecape.org
>    5. mailto:mesa-dev at lists.freedesktop.org
>    6. https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20161204/05c43c85/attachment.html>


More information about the mesa-dev mailing list