d3d12: Move descriptor pools to screen, and add lock
authorJesse Natalie <jenatali@microsoft.com>
Mon, 1 Mar 2021 21:31:26 +0000 (13:31 -0800)
committerMarge Bot <eric+marge@anholt.net>
Tue, 16 Mar 2021 15:22:35 +0000 (15:22 +0000)
commit6db28f520121196c7ec19afa2abf91b6fe5fb2da
tree9ea0e5a12cea636e6d17442ec4da6df850d9ba42
parent7c68a2518f12920ccfa7b42636aed35b2f7d1a17
d3d12: Move descriptor pools to screen, and add lock

Surfaces can be shared across contexts, and can even outlive the
original context that created them, so move the pools to the screen.
Since they no longer belong to a single context, they need a lock now.

v2: Samplers moved back to the context
v3: Fix Linux build

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3812
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9349>
src/gallium/drivers/d3d12/d3d12_context.cpp
src/gallium/drivers/d3d12/d3d12_context.h
src/gallium/drivers/d3d12/d3d12_descriptor_pool.cpp
src/gallium/drivers/d3d12/d3d12_descriptor_pool.h
src/gallium/drivers/d3d12/d3d12_draw.cpp
src/gallium/drivers/d3d12/d3d12_screen.cpp
src/gallium/drivers/d3d12/d3d12_screen.h
src/gallium/drivers/d3d12/d3d12_surface.cpp