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

This shouldn't fix any real world bugs, except it will now clear more
stale syncobjs than it was previously doing, and actually do what the
comment says it does.

I could not find a real workload where this change would be relevant,
although I didn't try too much. I wrote my own little egl program to
test this.

I spotted this while reading the code when investigating a Piglit
failure [0]. It turns out this part the code was not relvant for the
failure.

[0]: ext_external_objects-vk-image-display-overwrite

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13536>
This commit is contained in:
Paulo Zanoni
2021-10-22 17:17:02 -07:00
committed by Marge Bot
parent db7ad0c170
commit 1311eddd52

View File

@@ -147,7 +147,7 @@ clear_stale_syncobjs(struct iris_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 iris_syncobj **syncobj =
util_dynarray_element(&batch->syncobjs, struct iris_syncobj *, i);
struct drm_i915_gem_exec_fence *fence =