From: Józef Kucia jkucia@codeweavers.com
Signed-off-by: Józef Kucia jkucia@codeweavers.com --- libs/vkd3d/command.c | 2 +- libs/vkd3d/resource.c | 1 + libs/vkd3d/vkd3d_private.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index decff143d0a3..a7cac8f72653 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -3921,7 +3921,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_ClearUnorderedAccessViewUint(ID color.uint32[2] = values[2]; color.uint32[3] = values[3];
- range.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; + range.aspectMask = cpu_descriptor->uav.texture.vk_aspect_mask; range.baseMipLevel = cpu_descriptor->uav.texture.miplevel_idx; range.levelCount = 1; range.baseArrayLayer = cpu_descriptor->uav.texture.layer_idx; diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c index 4490ae23dab9..10f1d835e792 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -1692,6 +1692,7 @@ static void vkd3d_create_texture_uav(struct d3d12_desc *descriptor, descriptor->vk_descriptor_type = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE; descriptor->u.view = view;
+ descriptor->uav.texture.vk_aspect_mask = vkd3d_desc.format->vk_aspect_mask; descriptor->uav.texture.miplevel_idx = vkd3d_desc.miplevel_idx; descriptor->uav.texture.layer_idx = vkd3d_desc.layer_idx; descriptor->uav.texture.layer_count = vkd3d_desc.layer_count; diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 6ba12f9ca1d2..5aaa56505db0 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -281,6 +281,7 @@ struct d3d12_desc } buffer; struct { + VkImageAspectFlags vk_aspect_mask; unsigned int miplevel_idx; unsigned int layer_idx; unsigned int layer_count;