panfrost: Don't unbind recently bound streamout targets

When unbinding extra targets, start after the last new target.

Fixes: 5ff7973560 ("panfrost: Import streamout data structures")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17447>
This commit is contained in:
Icecream95 2022-07-12 21:55:50 +12:00 committed by Marge Bot
parent a8dbf61b46
commit a0851f1cc4
1 changed files with 1 additions and 1 deletions

View File

@ -1060,7 +1060,7 @@ panfrost_set_stream_output_targets(struct pipe_context *pctx,
pipe_so_target_reference(&so->targets[i], targets[i]);
}
for (unsigned i = 0; i < so->num_targets; i++)
for (unsigned i = num_targets; i < so->num_targets; i++)
pipe_so_target_reference(&so->targets[i], NULL);
so->num_targets = num_targets;