d3d12: Add a transition flag indicating that state accumulation is needed
authorJesse Natalie <jenatali@microsoft.com>
Thu, 21 Jul 2022 17:15:25 +0000 (10:15 -0700)
committerMarge Bot <emma+marge@anholt.net>
Fri, 22 Jul 2022 14:42:56 +0000 (14:42 +0000)
commit74a811382ff0d414673a32dd8b90b65737357386
treed507c909a655b4e7bb747aa464c94b583282d6d0
parentfa570bda087a110e2885991a165139e2aff1d557
d3d12: Add a transition flag indicating that state accumulation is needed

Most call sites for transitions will only apply transitions to one or two
resources, and don't need to use the bo set, where each call is guaranteed
to insert the bo, only to walk the set immediately afterwards. Instead, they
can just append the barriers to the dynarray directly and skip the bo set.

Draws and dispatches still use the append approach, to accumulate the full
set of state needed for each subresource for the case where a single
[sub]resource is bound to the pipeline in multiple places.

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