From: Józef Kucia jkucia@codeweavers.com
For planar formats.
Signed-off-by: Józef Kucia jkucia@codeweavers.com --- libs/vkd3d/command.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index 65eee1bb7d80..22a568f46790 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -3207,6 +3207,13 @@ static void STDMETHODCALLTYPE d3d12_command_list_ResourceBarrier(ID3D12GraphicsC } else { + /* FIXME: Some formats in D3D12 are planar. Each plane is a separate sub-resource. */ + if (sub_resource_idx >= d3d12_resource_desc_get_sub_resource_count(&resource->desc)) + { + FIXME("Unhandled sub-resource idx %u.\n", sub_resource_idx); + continue; + } + vk_barrier.subresourceRange.baseMipLevel = sub_resource_idx % resource->desc.MipLevels; vk_barrier.subresourceRange.levelCount = 1; vk_barrier.subresourceRange.baseArrayLayer = sub_resource_idx / resource->desc.MipLevels;