Mesa (master): d3d12: Unused variable warning indicated bug in bo_unmap
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun Jan 3 23:24:44 UTC 2021
Module: Mesa
Branch: master
Commit: 7319cabfb5616d0ae5198882ae1bb5a9122d92f5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7319cabfb5616d0ae5198882ae1bb5a9122d92f5
Author: Jesse Natalie <jenatali at microsoft.com>
Date: Mon Dec 28 10:46:21 2020 -0800
d3d12: Unused variable warning indicated bug in bo_unmap
Fixes: 2ea15cd6 ("d3d12: introduce d3d12 gallium driver")
Reviewed-by: Adam Jackson <ajax at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8248>
---
src/gallium/drivers/d3d12/d3d12_bufmgr.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/gallium/drivers/d3d12/d3d12_bufmgr.cpp b/src/gallium/drivers/d3d12/d3d12_bufmgr.cpp
index 825bbf1116a..f48f677aab3 100644
--- a/src/gallium/drivers/d3d12/d3d12_bufmgr.cpp
+++ b/src/gallium/drivers/d3d12/d3d12_bufmgr.cpp
@@ -197,9 +197,11 @@ d3d12_bo_unmap(struct d3d12_bo *bo, D3D12_RANGE *range)
} else if (range->Begin >= range->End) {
offset_range.Begin = offset;
offset_range.End = offset + base_bo->res->GetDesc().Width;
+ range = &offset_range;
} else {
offset_range.Begin = range->Begin + offset;
offset_range.End = range->End + offset;
+ range = &offset_range;
}
base_bo->res->Unmap(0, range);
More information about the mesa-commit
mailing list