diff options
author | Kenneth Graunke <[email protected]> | 2017-08-30 01:04:48 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2017-09-14 16:17:36 -0700 |
commit | 343aa09a22ea61c4d2177eb5b19bce1b5c24292c (patch) | |
tree | 7e0ff706abcf2dbec4f0e5a4001b3effbe3ee379 /src | |
parent | d1245211417c092bd1c12339559caced98d7560f (diff) |
i965: Use batch->bo->size in brw_emit_reloc assertion.
This makes the assertion safe against batchbuffers growing.
Reviewed-by: Matt Turner <[email protected]>
Reviewed-by: Chris Wilson <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_batchbuffer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.c b/src/mesa/drivers/dri/i965/intel_batchbuffer.c index cd118f6c6fc..276fe458a13 100644 --- a/src/mesa/drivers/dri/i965/intel_batchbuffer.c +++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.c @@ -806,7 +806,7 @@ brw_emit_reloc(struct intel_batchbuffer *batch, uint32_t batch_offset, } /* Check args */ - assert(batch_offset <= BATCH_SZ - sizeof(uint32_t)); + assert(batch_offset <= batch->bo->size - sizeof(uint32_t)); unsigned int index = add_exec_bo(batch, target); struct drm_i915_gem_exec_object2 *entry = &batch->validation_list[index]; |