freedreno/a6xx: combine sample mask into blend state
authorRob Clark <robdclark@chromium.org>
Thu, 16 Apr 2020 22:25:27 +0000 (15:25 -0700)
committerMarge Bot <eric+marge@anholt.net>
Thu, 30 Apr 2020 20:03:17 +0000 (20:03 +0000)
commit5d554987c2b856fe463afab3bd9103c2d1e41b97
treea0862c971f0763f1ae787a813afbfe3815bf0271
parent880edb9dc5761aa19d89b2a40481e8c2771ff862
freedreno/a6xx: combine sample mask into blend state

This gets rid of one lone register we used to emit directly in IB2
whenever blend state changes, at the expense of needing blend state
variants when sample-mask changes.  I think typically sample-mask
should not change frequently, so this seems like a fair trade-off.

To further limit the # of variants, we ignore sample-mask bits that
are not relavant for the current # of samples.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4813>
src/gallium/drivers/freedreno/a6xx/fd6_blend.c
src/gallium/drivers/freedreno/a6xx/fd6_blend.h
src/gallium/drivers/freedreno/a6xx/fd6_emit.c
src/gallium/drivers/freedreno/freedreno_util.h