Kaynağa Gözat

i965: Use batch->bo->size in brw_emit_reloc assertion.

This makes the assertion safe against batchbuffers growing.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
tags/17.3-branchpoint
Kenneth Graunke 8 yıl önce
ebeveyn
işleme
343aa09a22
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1
    1
      src/mesa/drivers/dri/i965/intel_batchbuffer.c

+ 1
- 1
src/mesa/drivers/dri/i965/intel_batchbuffer.c Dosyayı Görüntüle

@@ -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];

Loading…
İptal
Kaydet