iris: Restore flagging of dirty bindings in binder_realloc
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 10 Mar 2022 03:21:23 +0000 (19:21 -0800)
committerMarge Bot <emma+marge@anholt.net>
Fri, 11 Mar 2022 07:59:18 +0000 (07:59 +0000)
commit01442cf4d4ef3af2c55532fe56cb9872682fb30c
tree643359a333b8849dd558deb2a732238f116fcc5b
parentb366fef091d33e7d5307f292b2320267c841e350
iris: Restore flagging of dirty bindings in binder_realloc

When I switched iris over to use 3DSTATE_BINDING_TABLE_POOL_ALLOC, I
stopped flagging things dirty when allocating a new binder, because
the contents of the binding table were still valid, thanks to us not
having to subtract Surface State Base Address anymore.

This unfortunately missed the point that the old binding table is in the
old buffer, which is no longer what the binder pool base address points
to.  So we'd either need to copy it over, or just flag it dirty and
re-emit it on the next draw.

Fixes misrendering in Ryujinx.

Fixes: 8b9045e7a45 ("intel: Use 3DSTATE_BINDING_TABLE_POOL_ALLOC exclusively on Gfx11+")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15314>
src/gallium/drivers/iris/iris_binder.c