Module: Mesa Branch: main Commit: 8d04efcc6772e074d9f148bfedd7e426e794ccbc URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8d04efcc6772e074d9f148bfedd7e426e794ccbc
Author: Jesse Natalie <jenat...@microsoft.com> Date: Mon Nov 6 09:59:43 2023 -0800 d3d12: Disable common state promotion for non-simultaneous-access textures Work around a debug layer crash when mixing enhanced barrier layout with non-enhanced barrier states. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26104> --- src/gallium/drivers/d3d12/d3d12_resource_state.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/gallium/drivers/d3d12/d3d12_resource_state.cpp b/src/gallium/drivers/d3d12/d3d12_resource_state.cpp index 45a01a717f5..970c6ec4571 100644 --- a/src/gallium/drivers/d3d12/d3d12_resource_state.cpp +++ b/src/gallium/drivers/d3d12/d3d12_resource_state.cpp @@ -153,12 +153,7 @@ resource_state_if_promoted(D3D12_RESOURCE_STATES desired_state, bool simultaneous_access, const d3d12_subresource_state *current_state) { - const D3D12_RESOURCE_STATES promotable_states = D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE | - D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE | - D3D12_RESOURCE_STATE_COPY_SOURCE | D3D12_RESOURCE_STATE_COPY_DEST; - - if (simultaneous_access || - (desired_state & promotable_states) != D3D12_RESOURCE_STATE_COMMON) { + if (simultaneous_access) { // If the current state is COMMON... if (current_state->state == D3D12_RESOURCE_STATE_COMMON) // ...then promotion is allowed