From e9882b879b9c2da74b3b6cc6ed7fa2fd4e9c8e92 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 14 Feb 2019 12:04:59 +0000 Subject: [PATCH] i965: Assert the execobject handles match for this device Object handles are local to the device fd, so double check we are not mixing together objects from multiple screens on execbuf submission. Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/intel_batchbuffer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.c b/src/mesa/drivers/dri/i965/intel_batchbuffer.c index 0377c67..8097392 100644 --- a/src/mesa/drivers/dri/i965/intel_batchbuffer.c +++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.c @@ -188,6 +188,8 @@ intel_batchbuffer_init(struct brw_context *brw) static unsigned add_exec_bo(struct intel_batchbuffer *batch, struct brw_bo *bo) { + assert(bo->bufmgr == batch->batch.bo->bufmgr); + unsigned index = READ_ONCE(bo->index); if (index < batch->exec_count && batch->exec_bos[index] == bo) -- 2.7.4