mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02:00
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>
This commit is contained in:
parent
405dead1b7
commit
8d04efcc67
1 changed files with 1 additions and 6 deletions
|
|
@ -153,12 +153,7 @@ resource_state_if_promoted(D3D12_RESOURCE_STATES desired_state,
|
||||||
bool simultaneous_access,
|
bool simultaneous_access,
|
||||||
const d3d12_subresource_state *current_state)
|
const d3d12_subresource_state *current_state)
|
||||||
{
|
{
|
||||||
const D3D12_RESOURCE_STATES promotable_states = D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE |
|
if (simultaneous_access) {
|
||||||
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 the current state is COMMON...
|
// If the current state is COMMON...
|
||||||
if (current_state->state == D3D12_RESOURCE_STATE_COMMON)
|
if (current_state->state == D3D12_RESOURCE_STATE_COMMON)
|
||||||
// ...then promotion is allowed
|
// ...then promotion is allowed
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue