summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBen Widawsky <[email protected]>2016-11-15 17:35:37 -0800
committerBen Widawsky <[email protected]>2016-11-16 11:24:33 -0800
commit0d241085f723402120b4b47e939fe77020a16d80 (patch)
treee1dd91ecfe81ec8f4d0342ba2578d91494fadda5 /src/mesa
parente50bf059b01499a54d2ff7bd4624e39e0fee9098 (diff)
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 <[email protected]> Signed-off-by: Ben Widawsky <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_surface_state.c5
1 files 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 02ccc1a82ee..77198ae1644 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