[Mesa-dev] [PATCH 08/64] i965/blorp: Only set src_z for gen8+ 3D textures

Kenneth Graunke kenneth at whitecape.org
Tue Jun 21 03:52:50 UTC 2016


On Friday, June 17, 2016 4:55:41 PM PDT Jason Ekstrand wrote:
> On Thu, Jun 16, 2016 at 10:08 AM, Chad Versace <chad.versace at intel.com>
> wrote:
> 
> > On Sat 11 Jun 2016, Jason Ekstrand wrote:
> > > Otherwise, we end up with a bogus value in the third component.  On
> > gen6-7
> > > where we always use 2D textures, this can cause problems if the
> > > SurfaceArray bit is set in the SURFACE_STATE.
> >
> > Enlighten me. Why does blorp use 3D surfaces on gen >= 8 but not
> > earlier?
> >
> 
> History?  TBH, I'm not really sure.  Probably because SKL 3-D is different
> but you'd have to ask topi to be sure.

Historically, we did everything via tile x/y offsets, and so BLORP
worked that way too.  However, we never applied any offsets to the
auxiliary surfaces (i.e. CMS).  This seems fairly sketchy, and got
us into trouble when we ported it to Gen8.  As a hack, falling back
from CMS to UMS made things work out.

Rather than try and figure out proper offset calculations for CCS_D,
CCS_E, and HiZ, Topi decided to just access everything using level/layer
like we do for normal GL.  It seemed a lot safer, and worked out well.

Gen6 never uses CMS, so it works out.  Topi seemed to think that Gen7
can't do CMS for array textures (though I can't seem to find that code
to confirm), so it might work out.  I'm still not sure why Gen7 works.

Honestly, I think it'd be better to convert Gen6-7 to be like Gen8+.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160620/fd0cc034/attachment.sig>


More information about the mesa-dev mailing list