d3d12: Add a path for mapping of not-directly-mappable buffers
authorJesse Natalie <jenatali@microsoft.com>
Mon, 14 Dec 2020 19:42:49 +0000 (11:42 -0800)
committerMarge Bot <eric+marge@anholt.net>
Tue, 5 Jan 2021 22:25:41 +0000 (22:25 +0000)
commit47125bce8ba5a978fdc1dab6f78341d9933f6232
treed0a94de43986dbfa4369b07efabbd4aee85bfa43
parent4d83306a9aabb5f9ea7e6a54d0e25c0f82805965
d3d12: Add a path for mapping of not-directly-mappable buffers

Currently all buffers are allocated as mappable, but a future
commit will change that so that some buffers can be allocated
directly in non-CPU-accessible memory for improved performance.

Note that the returned pointer must be appropriately offset from
a 64-byte-aligned base pointer, so if offsets are used, the data
will be read/written to an offset region in the staging buffer.

Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8095>
src/gallium/drivers/d3d12/d3d12_resource.cpp