crocus: fix off-by-one error when clearing stale syncobjs

This is the same fix as commit 1311eddd52 ("iris: fix off-by-one error
when clearing stale syncobjs"), but for crocus.

Signed-off-by: Nicholas Bishop <nicholasbishop@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19282>
This commit is contained in:
Nicholas Bishop
2022-10-24 15:29:04 -04:00
committed by Marge Bot
parent 977dbfc9de
commit 7cca889ecd
+1 -1
View File
@@ -127,7 +127,7 @@ clear_stale_syncobjs(struct crocus_batch *batch)
struct drm_i915_gem_exec_fence));
/* Skip the first syncobj, as it's the signalling one. */
for (int i = n - 1; i > 1; i--) {
for (int i = n - 1; i > 0; i--) {
struct crocus_syncobj **syncobj =
util_dynarray_element(&batch->syncobjs, struct crocus_syncobj *, i);
struct drm_i915_gem_exec_fence *fence =