struct brw_context *brw = batch->driver_batch;
uint32_t offset = (char *)location - (char *)brw->batch.map;
- return intel_batchbuffer_reloc(&brw->batch, address.buffer, offset,
- address.read_domains,
- address.write_domain,
- address.offset + delta);
+ return brw_emit_reloc(&brw->batch, offset,
+ address.buffer, address.offset + delta,
+ address.read_domains,
+ address.write_domain);
}
static void
/* This is the only way buffers get added to the validate list.
*/
uint64_t
-intel_batchbuffer_reloc(struct intel_batchbuffer *batch,
- drm_bacon_bo *buffer, uint32_t offset,
- uint32_t read_domains, uint32_t write_domain,
- uint32_t delta)
+brw_emit_reloc(struct intel_batchbuffer *batch, uint32_t batch_offset,
+ drm_bacon_bo *target, uint32_t target_offset,
+ uint32_t read_domains, uint32_t write_domain)
{
int ret;
- ret = drm_bacon_bo_emit_reloc(batch->bo, offset,
- buffer, delta,
- read_domains, write_domain);
+ ret = drm_bacon_bo_emit_reloc(batch->bo, batch_offset,
+ target, target_offset,
+ read_domains, write_domain);
assert(ret == 0);
(void)ret;
* case the buffer doesn't move and we can short-circuit the relocation
* processing in the kernel
*/
- return buffer->offset64 + delta;
+ return target->offset64 + target_offset;
}
void
const void *data, GLuint bytes,
enum brw_gpu_ring ring);
-uint64_t intel_batchbuffer_reloc(struct intel_batchbuffer *batch,
- drm_bacon_bo *buffer,
- uint32_t offset,
- uint32_t read_domains,
- uint32_t write_domain,
- uint32_t delta);
+uint64_t brw_emit_reloc(struct intel_batchbuffer *batch, uint32_t batch_offset,
+ drm_bacon_bo *target, uint32_t target_offset,
+ uint32_t read_domains, uint32_t write_domain);
#define USED_BATCH(batch) ((uintptr_t)((batch).map_next - (batch).map))
#define OUT_RELOC(buf, read_domains, write_domain, delta) do { \
uint32_t __offset = (__map - brw->batch.map) * 4; \
uint32_t reloc = \
- intel_batchbuffer_reloc(&brw->batch, (buf), __offset, \
- (read_domains), (write_domain), (delta)); \
+ brw_emit_reloc(&brw->batch, __offset, (buf), (delta), \
+ (read_domains), (write_domain)); \
OUT_BATCH(reloc); \
} while (0)
#define OUT_RELOC64(buf, read_domains, write_domain, delta) do { \
uint32_t __offset = (__map - brw->batch.map) * 4; \
uint64_t reloc64 = \
- intel_batchbuffer_reloc(&brw->batch, (buf), __offset, \
- (read_domains), (write_domain), (delta)); \
+ brw_emit_reloc(&brw->batch, __offset, (buf), (delta), \
+ (read_domains), (write_domain)); \
OUT_BATCH(reloc64); \
OUT_BATCH(reloc64 >> 32); \
} while (0)