From 7dc324f0afe4da87cd89466fdbaeaab839ea6596 Mon Sep 17 00:00:00 2001 From: Robert Konrad Date: Fri, 27 Sep 2024 21:27:14 +0200 Subject: [PATCH] Fix indexing in kope_d3d12_descriptor_set_prepare_srv_texture --- .../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 35f52b53d..a54032208 100644 --- a/Backends/Graphics5/Direct3D12/Sources/kope/direct3d12/descriptorset.cpp +++ b/Backends/Graphics5/Direct3D12/Sources/kope/direct3d12/descriptorset.cpp @@ -175,7 +175,7 @@ void kope_d3d12_descriptor_set_prepare_srv_texture(kope_g5_command_list *list, c texture_view->texture->d3d12.resource_states[kope_d3d12_texture_resource_state_index(texture_view->texture, mip_level, array_layer)]; barrier.Transition.StateAfter = D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE | D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE; barrier.Transition.Subresource = - D3D12CalcSubresource(mip_level, 0, 0, texture_view->texture->d3d12.mip_level_count, texture_view->texture->d3d12.depth_or_array_layers); + D3D12CalcSubresource(mip_level, array_layer, 0, texture_view->texture->d3d12.mip_level_count, texture_view->texture->d3d12.depth_or_array_layers); list->d3d12.list->ResourceBarrier(1, &barrier);