From 3b58a72531efaaeb2a0abfba3f3cb48471f32c89 Mon Sep 17 00:00:00 2001 From: Robert Konrad Date: Thu, 26 Sep 2024 01:22:23 +0200 Subject: [PATCH] Do not transition D3D12_RESOURCE_STATE_GENERIC_READ resources some more because D3D told me that's no good --- .../Direct3D12/Sources/kope/direct3d12/descriptorset.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Backends/Graphics5/Direct3D12/Sources/kope/direct3d12/descriptorset.cpp b/Backends/Graphics5/Direct3D12/Sources/kope/direct3d12/descriptorset.cpp index f4f38b12d..7714b6330 100644 --- a/Backends/Graphics5/Direct3D12/Sources/kope/direct3d12/descriptorset.cpp +++ b/Backends/Graphics5/Direct3D12/Sources/kope/direct3d12/descriptorset.cpp @@ -142,7 +142,7 @@ void kope_d3d12_descriptor_set_set_sampler(kope_g5_device *device, kope_d3d12_de } void kope_d3d12_descriptor_set_prepare_cbv_buffer(kope_g5_command_list *list, kope_g5_buffer *buffer) { - if (buffer->d3d12.resource_state != D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER) { + if (buffer->d3d12.resource_state != D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER && buffer->d3d12.resource_state != D3D12_RESOURCE_STATE_GENERIC_READ) { D3D12_RESOURCE_BARRIER barrier; barrier.Transition.pResource = buffer->d3d12.resource; barrier.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;