d3d12: Don't allocate mappable textures
authorJesse Natalie <jenatali@microsoft.com>
Mon, 14 Dec 2020 19:59:53 +0000 (11:59 -0800)
committerJesse Natalie <jenatali@microsoft.com>
Tue, 5 Jan 2021 22:51:00 +0000 (14:51 -0800)
commit0034f7b2093529090452af0073f26d66aed5138c
tree6a33294f6b6656934aca08e1f1f664b843d44c6b
parent34bae108df0c707a638b4305af9a1d08d15832b4
d3d12: Don't allocate mappable textures

There's not really a reason to directly map textures. Doing so
requires the texture to be allocated in system RAM instead of
video RAM, which means all GPU access to it would be needlessly slow.

Notably, the one texture type that was allocated this way is the
display target texture for the software driver path. Instead, use
pipe_transfer_map to be able to copy the texture to system RAM.

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
src/gallium/drivers/d3d12/d3d12_screen.cpp