[Mesa-dev] [PATCH 01/32] i965: Fix SURFACE_STATE to handle non-zero aux offsets

Ben Widawsky ben at bwidawsk.net
Tue Jan 3 02:36:52 UTC 2017


Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Acked-by: Daniel Stone <daniels at collabora.com>
---
 src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 3 +--
 1 file changed, 1 insertion(+), 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 6c44381be1..69be3ebc29 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -143,7 +143,6 @@ brw_emit_surface_state(struct brw_context *brw,
       aux_surf = &aux_surf_s;
 
       if (mt->mcs_buf) {
-         assert(mt->mcs_buf->offset == 0);
          aux_bo = mt->mcs_buf->bo;
          aux_offset = mt->mcs_buf->bo->offset64 + mt->mcs_buf->offset;
       } else {
@@ -185,7 +184,7 @@ brw_emit_surface_state(struct brw_context *brw,
       uint32_t *aux_addr = state + brw->isl_dev.ss.aux_addr_offset;
       drm_intel_bo_emit_reloc(brw->batch.bo,
                               *surf_offset + brw->isl_dev.ss.aux_addr_offset,
-                              aux_bo, *aux_addr & 0xfff,
+                              aux_bo, *aux_addr - aux_bo->offset64,
                               read_domains, write_domains);
    }
 }
-- 
2.11.0



More information about the mesa-dev mailing list