crocus: Tidy the ifdefs for emitting STATE_BASE_ADDRESS
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 22 Oct 2021 09:31:25 +0000 (02:31 -0700)
committerMarge Bot <emma+marge@anholt.net>
Thu, 28 Oct 2021 19:45:55 +0000 (19:45 +0000)
commitbe0d22a9ce05a56f134f48b47874cbcaaa416b35
tree8fce70188b4ad6ded203392a21563e40cb0f363e
parent51f843ad6034f84aafc3fe2a08f8a67112e1005a
crocus: Tidy the ifdefs for emitting STATE_BASE_ADDRESS

This reorganizes the code so that we set fields in a tidy order:

   1. Set the base addresses

   2. Set either buffer sizes (Gfx8) or upper bound values (Gfx4-7)
      (These are logically the same thing, but expressed differently.)

   3. Set MOCS (Gfx6+)

I find this easier to follow.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13480>
src/gallium/drivers/crocus/crocus_state.c