iris: clear bos_written when resetting a batch

This fixes dEQP-EGL.functional.sharing.gles2.multithread.* tests that
are hitting: "iris: Failed to submit batchbuffer: Invalid argument"
error.

v2: clear on reset rather than clear 'on-the-fly' (Kenneth Graunke)

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5537
Fixes: e4c3d3efc7 ("iris: Defer construction of the validation (exec_object2) list")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13464>
This commit is contained in:
Tapani Pälli 2021-10-21 11:02:34 +03:00 committed by Marge Bot
parent b6a69dbb40
commit 1465ec8cf3
1 changed files with 3 additions and 0 deletions

View File

@ -412,6 +412,9 @@ iris_batch_reset(struct iris_batch *batch)
create_batch(batch);
assert(batch->bo->index == 0);
memset(batch->bos_written, 0,
sizeof(BITSET_WORD) * BITSET_WORDS(batch->exec_array_size));
struct iris_syncobj *syncobj = iris_create_syncobj(bufmgr);
iris_batch_add_syncobj(batch, syncobj, I915_EXEC_FENCE_SIGNAL);
iris_syncobj_reference(bufmgr, &syncobj, NULL);