aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2020-05-04 07:53:38 -0400
committerMarge Bot <[email protected]>2020-05-07 20:13:41 +0000
commitc9e73624022a482ffe0a41d0cae007e04cc61dc4 (patch)
treeae2eeade0dbe0ba50a356a608db78bdab79c5824 /src
parent441eaef6a9e5bb6d55bb3f875d60b35a5e70042b (diff)
ac/surface: override all offsets including metadata offsets
Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4863>
Diffstat (limited to 'src')
-rw-r--r--src/amd/common/ac_surface.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/amd/common/ac_surface.c b/src/amd/common/ac_surface.c
index 577b2d487eb..86519f216e1 100644
--- a/src/amd/common/ac_surface.c
+++ b/src/amd/common/ac_surface.c
@@ -2204,6 +2204,8 @@ void ac_surface_override_offset_stride(const struct radeon_info *info,
(uint64_t)pitch * surf->u.gfx9.surf_height * surf->bpe;
}
surf->u.gfx9.surf_offset = offset;
+ if (surf->u.gfx9.stencil_offset)
+ surf->u.gfx9.stencil_offset += offset;
} else {
surf->u.legacy.level[0].nblk_x = pitch;
surf->u.legacy.level[0].slice_size_dw =
@@ -2214,4 +2216,17 @@ void ac_surface_override_offset_stride(const struct radeon_info *info,
surf->u.legacy.level[i].offset += offset;
}
}
+
+ if (surf->htile_offset)
+ surf->htile_offset += offset;
+ if (surf->fmask_offset)
+ surf->fmask_offset += offset;
+ if (surf->cmask_offset)
+ surf->cmask_offset += offset;
+ if (surf->dcc_offset)
+ surf->dcc_offset += offset;
+ if (surf->display_dcc_offset)
+ surf->display_dcc_offset += offset;
+ if (surf->dcc_retile_map_offset)
+ surf->dcc_retile_map_offset += offset;
}