From 1465ec8cf35c3e62635bba31682a0e2673e40100 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Thu, 21 Oct 2021 11:02:34 +0300 Subject: [PATCH] iris: clear bos_written when resetting a batch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: e4c3d3efc7a ("iris: Defer construction of the validation (exec_object2) list") Signed-off-by: Tapani Pälli Reviewed-by: Kenneth Graunke Part-of: --- src/gallium/drivers/iris/iris_batch.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/iris/iris_batch.c b/src/gallium/drivers/iris/iris_batch.c index afd152f3eaf..f9a1eed0def 100644 --- a/src/gallium/drivers/iris/iris_batch.c +++ b/src/gallium/drivers/iris/iris_batch.c @@ -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);