wined3d: Set VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT for unordered access images.

Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jan Sikorski 2021-10-06 10:50:10 +02:00 committed by Alexandre Julliard
parent 89d61c28e4
commit bacd0301ef
1 changed files with 6 additions and 1 deletions

View File

@ -5092,8 +5092,13 @@ BOOL wined3d_texture_vk_prepare_texture(struct wined3d_texture_vk *texture_vk,
resource = &texture_vk->t.resource;
format_vk = wined3d_format_vk(resource->format);
if (wined3d_format_is_typeless(&format_vk->f) || texture_vk->t.swapchain)
if (wined3d_format_is_typeless(&format_vk->f) || texture_vk->t.swapchain
|| (texture_vk->t.resource.bind_flags & WINED3D_BIND_UNORDERED_ACCESS))
{
/* For UAVs, we need this in case a clear necessitates creation of a new view
* with a different format. */
flags |= VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT;
}
switch (resource->type)
{