From: Ben Widawsky Date: Fri, 2 Dec 2016 19:10:47 +0000 (-0800) Subject: i965: Fix SURFACE_STATE to handle non-zero aux offsets X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b0cc55f29831638069407a4c1a5c809b26902ab6;p=mesa.git i965: Fix SURFACE_STATE to handle non-zero aux offsets Signed-off-by: Ben Widawsky Reviewed-by: Kenneth Graunke Reviewed-by: Jason Ekstrand Acked-by: Daniel Stone --- 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 02aea78e726..c7c73774c3b 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); } }