Mesa (master): i965: "Fix" aux offsets

Ben Widawsky bwidawsk at kemper.freedesktop.org
Wed Nov 16 19:24:44 UTC 2016


Module: Mesa
Branch: master
Commit: 0d241085f723402120b4b47e939fe77020a16d80
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0d241085f723402120b4b47e939fe77020a16d80

Author: Ben Widawsky <ben at bwidawsk.net>
Date:   Tue Nov 15 17:35:37 2016 -0800

i965: "Fix" aux offsets

When 1 BO is used for aux data, it needs to point to the correct offset,
which will not be the BOs offset but instead an offset from the BOs
offset. Since today there are always multiple BOs for aux, this doesn't
actually change anything.

Cc: Jason Ekstrand <jason at jlekstrand.net>
Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

---

 src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
index 02ccc1a..77198ae 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -145,10 +145,11 @@ brw_emit_surface_state(struct brw_context *brw,
       if (mt->mcs_buf) {
          assert(mt->mcs_buf->offset == 0);
          aux_bo = mt->mcs_buf->bo;
-         aux_offset = mt->mcs_buf->bo->offset64;
+         aux_offset = mt->mcs_buf->bo->offset64 + mt->mcs_buf->offset;
       } else {
          aux_bo = mt->hiz_buf->aux_base.bo;
-         aux_offset = mt->hiz_buf->aux_base.bo->offset64;
+         aux_offset = mt->hiz_buf->aux_base.bo->offset64 +
+                      mt->hiz_buf->mt->offset;
       }
 
       /* We only really need a clear color if we also have an auxiliary




More information about the mesa-commit mailing list