Mesa (main): panfrost: Don't unbind recently bound streamout targets
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sat Jul 23 01:13:20 UTC 2022
Module: Mesa
Branch: main
Commit: a0851f1cc4538b36087edb9bfcd0a6d449fb1cb6
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a0851f1cc4538b36087edb9bfcd0a6d449fb1cb6
Author: Icecream95 <ixn at disroot.org>
Date: Tue Jul 12 21:55:50 2022 +1200
panfrost: Don't unbind recently bound streamout targets
When unbinding extra targets, start after the last new target.
Fixes: 5ff79735601 ("panfrost: Import streamout data structures")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17447>
---
src/gallium/drivers/panfrost/pan_context.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index 25c053f57b2..b44012ed4d9 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/drivers/panfrost/pan_context.c
@@ -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;
More information about the mesa-commit
mailing list