d3d12: Fix range calculation for suballocated buffers in d3d12_bo_unmap

Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14933>
This commit is contained in:
Jesse Natalie 2022-02-07 15:49:00 -08:00 committed by Marge Bot
parent 2659098d6d
commit b48aea0ec8
1 changed files with 1 additions and 1 deletions

View File

@ -202,7 +202,7 @@ d3d12_bo_unmap(struct d3d12_bo *bo, D3D12_RANGE *range)
/* Nothing to do */
} else if (range->Begin >= range->End) {
offset_range.Begin = offset;
offset_range.End = offset + base_bo->res->GetDesc().Width;
offset_range.End = offset + d3d12_bo_get_size(bo);
range = &offset_range;
} else {
offset_range.Begin = range->Begin + offset;