summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2017-08-02 16:52:39 -0700
committerKenneth Graunke <[email protected]>2017-08-04 10:26:37 -0700
commit1d0bd0d1743ec3b924148c9129f964611dca785a (patch)
tree7c6e8cd6219b7b3eba64d640f2ba7f4a9bd8e825 /src/mesa
parent5c007203b73da88b9e76ce28027c6d27661e45b1 (diff)
i965: Make brw_emit_reloc assert that the target BO is non-NULL.
You need an actual BO to emit a relocation to it. Suggested by me, authored by Chris, split out of a larger patch.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/intel_batchbuffer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.c b/src/mesa/drivers/dri/i965/intel_batchbuffer.c
index e2f208a3d1f..fb5ed279c8d 100644
--- a/src/mesa/drivers/dri/i965/intel_batchbuffer.c
+++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.c
@@ -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) {