[Mesa-dev] i965 SamplerUnits rework

Eric Anholt eric at anholt.net
Fri Aug 24 10:07:33 PDT 2012


Kenneth Graunke <kenneth at whitecape.org> writes:

> Greetings!
>
> This series reworks how i965 deals with sampler indirections, changing it
> to use linker-assigned sampler variable IDs in SEND instructions rather 
> than baking in the ID of the texture unit they happen to be bound to.
>
> Instead, it now encodes that mapping in the binding, sampler state,
> and sampler default color tables, which are updated and re-emitted at least
> once per batch anyway.

Nice work!  I think there's a cleanup available by making the texture
state part of the program key sampler-indexed as well, but that's
something that can be done later.  The texunit name change in the early
patches definitely helped make for easy reviewing.

Long term, we'll have to split our sampler/texture state tables for
ARB_sso, but I'm OK with this series because nobody uses EXT_sso and it
fixes a massive performance bug.  There's also a minor bug that we now
don't recompile when the sampler for a rectangle texture changes, and
the mesa derived state we reference pre-snb is based on the texunit.

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120824/933dcb9d/attachment.pgp>


More information about the mesa-dev mailing list