From: Chris Wilson Date: Thu, 14 Feb 2019 12:04:59 +0000 (+0000) Subject: i965: Assert the execobject handles match for this device X-Git-Tag: upstream/19.3.0~9730 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e9882b879b9c2da74b3b6cc6ed7fa2fd4e9c8e92;p=platform%2Fupstream%2Fmesa.git 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 --- 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)