From 43ed15a61bf69d38d2ec433f596f9e422ee2f634 Mon Sep 17 00:00:00 2001 From: Jesse Natalie Date: Tue, 23 Dec 2025 14:39:49 -0800 Subject: [PATCH] d3d12: Don't promote to read-write states Part-of: --- src/gallium/drivers/d3d12/d3d12_resource_state.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/d3d12/d3d12_resource_state.cpp b/src/gallium/drivers/d3d12/d3d12_resource_state.cpp index caad8661fc2..a65e7d17672 100644 --- a/src/gallium/drivers/d3d12/d3d12_resource_state.cpp +++ b/src/gallium/drivers/d3d12/d3d12_resource_state.cpp @@ -168,7 +168,8 @@ resource_state_if_promoted(D3D12_RESOURCE_STATES desired_state, // If the current state is a read state resulting from previous promotion... if (current_state->is_promoted && - (current_state->state & D3D12_RESOURCE_STATE_GENERIC_READ) != D3D12_RESOURCE_STATE_COMMON) + (current_state->state & D3D12_RESOURCE_STATE_GENERIC_READ) != D3D12_RESOURCE_STATE_COMMON && + !d3d12_is_write_state(desired_state)) // ...then (accumulated) promotion is allowed return desired_state | current_state->state; }