i965: Make brw_emit_reloc assert that the target BO is non-NULL.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 2 Aug 2017 23:52:39 +0000 (16:52 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 4 Aug 2017 17:26:37 +0000 (10:26 -0700)
You need an actual BO to emit a relocation to it.

Suggested by me, authored by Chris, split out of a larger patch.

src/mesa/drivers/dri/i965/intel_batchbuffer.c

index e2f208a3d1fdc2f8491dbab996e8d5c93a99407e..fb5ed279c8d33bd9388a164d2f0852e77ea6887e 100644 (file)
@@ -750,6 +750,8 @@ brw_emit_reloc(struct intel_batchbuffer *batch, uint32_t batch_offset,
                struct brw_bo *target, uint32_t target_offset,
                uint32_t read_domains, uint32_t write_domain)
 {
+   assert(target != NULL);
+
    uint64_t offset64;
 
    if (batch->reloc_count == batch->reloc_array_size) {