radv/winsys: Fix offset in range merging.

If we change the virtual address we also have to change the offset in the buffer
to be mapped.

Fixes: 715df30a4e "radv/amdgpu: Add winsys implementation of virtual buffers."
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7953>
This commit is contained in:
Bas Nieuwenhuizen 2021-01-09 00:39:51 +01:00 committed by Marge Bot
parent 2b12e6931e
commit d3286bdd76
1 changed files with 1 additions and 0 deletions

View File

@ -251,6 +251,7 @@ radv_amdgpu_winsys_bo_virtual_bind(struct radeon_winsys_bo *_parent,
if (!remove_last) {
new_last.size -= offset + size - new_last.offset;
new_last.bo_offset += (offset + size - new_last.offset);
new_last.offset = offset + size;
radv_amdgpu_winsys_virtual_map(parent, &new_last);
}