Reviewed-by: Lionel Landwerlin <lionel.g.landwer...@intel.com>

On 16/11/16 01:35, Ben Widawsky wrote:
From: Ben Widawsky <b...@bwidawsk.net>

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 <ja...@jlekstrand.net>
Signed-off-by: Ben Widawsky <b...@bwidawsk.net>
---
  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 4c2d11d..0cf9181 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -152,10 +152,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


_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to