mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d: Use the resource's stored format in d3d12_command_list_ResourceBarrier().
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
1f3ec35138
commit
16393e10d5
@ -4057,15 +4057,8 @@ static void STDMETHODCALLTYPE d3d12_command_list_ResourceBarrier(ID3D12GraphicsC
|
||||
}
|
||||
else
|
||||
{
|
||||
const struct vkd3d_format *format;
|
||||
VkImageMemoryBarrier vk_barrier;
|
||||
|
||||
if (!(format = vkd3d_format_from_d3d12_resource_desc(list->device, &resource->desc, 0)))
|
||||
{
|
||||
ERR("Resource %p has invalid format %#x.\n", resource, resource->desc.Format);
|
||||
continue;
|
||||
}
|
||||
|
||||
vk_barrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;
|
||||
vk_barrier.pNext = NULL;
|
||||
vk_barrier.srcAccessMask = src_access_mask;
|
||||
@ -4076,7 +4069,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_ResourceBarrier(ID3D12GraphicsC
|
||||
vk_barrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
|
||||
vk_barrier.image = resource->u.vk_image;
|
||||
|
||||
vk_barrier.subresourceRange.aspectMask = format->vk_aspect_mask;
|
||||
vk_barrier.subresourceRange.aspectMask = resource->format->vk_aspect_mask;
|
||||
if (sub_resource_idx == D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES)
|
||||
{
|
||||
vk_barrier.subresourceRange.baseMipLevel = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user