b157a5d0d6
We have to a bit careful here when disabling draw states. This also necessitates moving the actual recording of the stores to the end so that we set the dirty flag correctly. Closes: #4462 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12102>