d3d12: Add a list of contexts alive for the current screen
authorJesse Natalie <jenatali@microsoft.com>
Tue, 19 Jul 2022 22:07:42 +0000 (15:07 -0700)
committerMarge Bot <emma+marge@anholt.net>
Fri, 22 Jul 2022 14:42:56 +0000 (14:42 +0000)
commitb72ec453bd6fc451db5c8583a3245ae1fc36ee40
tree39176e3f101cee50fa171954907077373967beb7
parent17c3f4f3e1b6cab1c61c42ebc23a572581188f01
d3d12: Add a list of contexts alive for the current screen

When a resource is destroyed, we'll need to let the contexts know.
This is guarded by the submit mutex, because we'll already be holding
that for at least one place where we want to iterate this list, and
it's low-frequency enough that re-using it is simpler than adding more
locks and creating confusing lock ordering.

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17688>
src/gallium/drivers/d3d12/d3d12_context.cpp
src/gallium/drivers/d3d12/d3d12_context.h
src/gallium/drivers/d3d12/d3d12_screen.cpp
src/gallium/drivers/d3d12/d3d12_screen.h