[Mesa-dev] [PATCH v2 2/2] anv/blorp: Disable resolves for transparent black clears

Jason Ekstrand jason at jlekstrand.net
Fri Feb 3 01:15:59 UTC 2017


On Thu, Feb 2, 2017 at 3:28 PM, Nanley Chery <nanleychery at gmail.com> wrote:

> On Thu, Feb 02, 2017 at 08:15:30AM -0800, Nanley Chery wrote:
>
> Polite ping.


Pong

Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

This is a bit on the hackish side but I think I'm ok with it given how
common of a clear color black is.  Hopefully, we'll come up with something
better one day but this is fine for now.


> > Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
> > ---
> >  src/intel/vulkan/anv_blorp.c | 10 ++++++++--
> >  1 file changed, 8 insertions(+), 2 deletions(-)
> >
> > diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c
> > index 2cf972bb61..759d2ae944 100644
> > --- a/src/intel/vulkan/anv_blorp.c
> > +++ b/src/intel/vulkan/anv_blorp.c
> > @@ -1451,9 +1451,15 @@ ccs_resolve_attachment(struct anv_cmd_buffer
> *cmd_buffer,
> >           resolve_op = BLORP_FAST_CLEAR_OP_RESOLVE_FULL;
> >        } else if (att_state->fast_clear) {
> >           /* We don't know what to do with clear colors outside the
> render
> > -          * pass.  We need a partial resolve.
> > +          * pass.  We need a partial resolve. Only transparent black is
> > +          * built into the surface state object and thus no resolve is
> > +          * required for this case.
> >            */
> > -         resolve_op = BLORP_FAST_CLEAR_OP_RESOLVE_PARTIAL;
> > +         if (att_state->clear_value.color.uint32[0] ||
> > +             att_state->clear_value.color.uint32[1] ||
> > +             att_state->clear_value.color.uint32[2] ||
> > +             att_state->clear_value.color.uint32[3])
> > +            resolve_op = BLORP_FAST_CLEAR_OP_RESOLVE_PARTIAL;
> >        } else {
> >           /* The image "natively" supports all the compression we care
> about
> >            * and we don't need to resolve at all.  If this is the case,
> we also
> > --
> > 2.11.0
> >
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170202/38bd674c/attachment.html>


More information about the mesa-dev mailing list