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-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e9882b879b9c2da74b3b6cc6ed7fa2fd4e9c8e92;p=mesa.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 0377c677c4c..8097392d22b 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)