mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 15:00:10 +01:00
ac/surface: fix broken pitch override on gfx8
Fixes: 441eaef6a9 - amd: unify code for overriding offset and stride for imported buffers
Closes: #2920
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4968>
This commit is contained in:
parent
c9e8df61dc
commit
1a59590e5d
1 changed files with 5 additions and 3 deletions
|
|
@ -2207,9 +2207,11 @@ void ac_surface_override_offset_stride(const struct radeon_info *info,
|
|||
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 =
|
||||
((uint64_t)pitch * surf->u.legacy.level[0].nblk_y * surf->bpe) / 4;
|
||||
if (pitch) {
|
||||
surf->u.legacy.level[0].nblk_x = pitch;
|
||||
surf->u.legacy.level[0].slice_size_dw =
|
||||
((uint64_t)pitch * surf->u.legacy.level[0].nblk_y * surf->bpe) / 4;
|
||||
}
|
||||
|
||||
if (offset) {
|
||||
for (unsigned i = 0; i < ARRAY_SIZE(surf->u.legacy.level); ++i)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue