Mesa (master): i965/blorp: Use the return value of brw_emit_reloc.
Kenneth Graunke
kwg at kemper.freedesktop.org
Tue Jul 18 23:44:36 UTC 2017
Module: Mesa
Branch: master
Commit: d9015b1eab66afd8c53cbd35e6e946e041848727
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d9015b1eab66afd8c53cbd35e6e946e041848727
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Sat Apr 22 20:00:14 2017 -0700
i965/blorp: Use the return value of brw_emit_reloc.
This guarantees that the value written in the batch matches the
value recorded in the relocation entry.
(Chris Wilson wrote an identical patch as well.)
---
src/mesa/drivers/dri/i965/genX_blorp_exec.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/genX_blorp_exec.c b/src/mesa/drivers/dri/i965/genX_blorp_exec.c
index af3d60919d..c6eee4c5ae 100644
--- a/src/mesa/drivers/dri/i965/genX_blorp_exec.c
+++ b/src/mesa/drivers/dri/i965/genX_blorp_exec.c
@@ -73,10 +73,10 @@ blorp_surface_reloc(struct blorp_batch *batch, uint32_t ss_offset,
struct brw_context *brw = batch->driver_batch;
struct brw_bo *bo = address.buffer;
- brw_emit_reloc(&brw->batch, ss_offset, bo, address.offset + delta,
- address.read_domains, address.write_domain);
+ uint64_t reloc_val =
+ brw_emit_reloc(&brw->batch, ss_offset, bo, address.offset + delta,
+ address.read_domains, address.write_domain);
- uint64_t reloc_val = bo->offset64 + address.offset + delta;
void *reloc_ptr = (void *)brw->batch.map + ss_offset;
#if GEN_GEN >= 8
*(uint64_t *)reloc_ptr = reloc_val;
More information about the mesa-commit
mailing list