radeonsi: fix an assertion failure with register shadowing

The problem is that dirty_states must be 0 for any state that is NULL
in "queued". This code was flagging dirty_states for such states because
it was only looking at "emitted". It should have been looking at "queued".

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15209>
This commit is contained in:
Marek Olšák 2022-02-28 15:37:48 -05:00 committed by Marge Bot
parent 0f96948dfa
commit a02dd17cb3

View File

@ -159,7 +159,7 @@ void si_pm4_reset_emitted(struct si_context *sctx, bool first_cs)
* added to the buffer list on the next draw call.
*/
for (unsigned i = 0; i < SI_NUM_STATES; i++) {
struct si_pm4_state *state = sctx->emitted.array[i];
struct si_pm4_state *state = sctx->queued.array[i];
if (state && state->is_shader) {
sctx->emitted.array[i] = NULL;