i965: Assert the execobject handles match for this device
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 14 Feb 2019 12:04:59 +0000 (12:04 +0000)
committerKenneth Graunke <kenneth@whitecape.org>
Sun, 17 Feb 2019 07:35:29 +0000 (23:35 -0800)
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 <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/intel_batchbuffer.c

index 0377c677c4c2b4edd0a16f35654d8b0b074509dc..8097392d22b890a58aae80c4ab2ebca0d03e3d91 100644 (file)
@@ -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)