diff options
author | Kenneth Graunke <[email protected]> | 2017-08-31 13:10:19 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2017-09-14 16:17:36 -0700 |
commit | e723255901171643060430dd5f32cd1350fa8800 (patch) | |
tree | 2424a225e03a181a892173b3f618c317e21f9819 /src/mesa/drivers/dri/i965/intel_batchbuffer.h | |
parent | 1674a0bcbcbc5a7cb9b50f85a3d32d337995adf4 (diff) |
i965: Split brw_emit_reloc into brw_batch_reloc and brw_state_reloc.
brw_batch_reloc emits a relocation from the batchbuffer to elsewhere.
brw_state_reloc emits a relocation from the statebuffer to elsewhere.
For now, they do the same thing, but when we actually split the two
buffers, we'll change brw_state_reloc to use the state buffer.
Reviewed-by: Matt Turner <[email protected]>
Reviewed-by: Chris Wilson <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_batchbuffer.h')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_batchbuffer.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.h b/src/mesa/drivers/dri/i965/intel_batchbuffer.h index 99d2747f282..6eb1014c1cb 100644 --- a/src/mesa/drivers/dri/i965/intel_batchbuffer.h +++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.h @@ -71,11 +71,16 @@ bool brw_batch_references(struct intel_batchbuffer *batch, struct brw_bo *bo); #define RELOC_WRITE EXEC_OBJECT_WRITE #define RELOC_NEEDS_GGTT EXEC_OBJECT_NEEDS_GTT -uint64_t brw_emit_reloc(struct intel_batchbuffer *batch, - uint32_t batch_offset, - struct brw_bo *target, - uint32_t target_offset, - unsigned flags); +uint64_t brw_batch_reloc(struct intel_batchbuffer *batch, + uint32_t batch_offset, + struct brw_bo *target, + uint32_t target_offset, + unsigned flags); +uint64_t brw_state_reloc(struct intel_batchbuffer *batch, + uint32_t batch_offset, + struct brw_bo *target, + uint32_t target_offset, + unsigned flags); #define USED_BATCH(batch) ((uintptr_t)((batch).map_next - (batch).map)) @@ -164,7 +169,7 @@ intel_batchbuffer_advance(struct brw_context *brw) #define OUT_RELOC(buf, flags, delta) do { \ uint32_t __offset = (__map - brw->batch.map) * 4; \ uint32_t reloc = \ - brw_emit_reloc(&brw->batch, __offset, (buf), (delta), (flags)); \ + brw_batch_reloc(&brw->batch, __offset, (buf), (delta), (flags)); \ OUT_BATCH(reloc); \ } while (0) @@ -172,7 +177,7 @@ intel_batchbuffer_advance(struct brw_context *brw) #define OUT_RELOC64(buf, flags, delta) do { \ uint32_t __offset = (__map - brw->batch.map) * 4; \ uint64_t reloc64 = \ - brw_emit_reloc(&brw->batch, __offset, (buf), (delta), (flags)); \ + brw_batch_reloc(&brw->batch, __offset, (buf), (delta), (flags)); \ OUT_BATCH(reloc64); \ OUT_BATCH(reloc64 >> 32); \ } while (0) |