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@jlekstrand.net>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
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