Mesa (main): d3d12: Fix range calculation for suballocated buffers in d3d12_bo_unmap
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Feb 8 21:13:47 UTC 2022
Module: Mesa
Branch: main
Commit: b48aea0ec81d3fba9d686e71e4d4de0dff3c7218
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b48aea0ec81d3fba9d686e71e4d4de0dff3c7218
Author: Jesse Natalie <jenatali at microsoft.com>
Date: Mon Feb 7 15:49:00 2022 -0800
d3d12: Fix range calculation for suballocated buffers in d3d12_bo_unmap
Reviewed-by: Sil Vilerino <sivileri at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14933>
---
src/gallium/drivers/d3d12/d3d12_bufmgr.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/drivers/d3d12/d3d12_bufmgr.cpp b/src/gallium/drivers/d3d12/d3d12_bufmgr.cpp
index 82beb4c6897..e06b55dcfb4 100644
--- a/src/gallium/drivers/d3d12/d3d12_bufmgr.cpp
+++ b/src/gallium/drivers/d3d12/d3d12_bufmgr.cpp
@@ -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;
More information about the mesa-commit
mailing list