[PATCH v4 3/4] wined3d: Set VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT for unordered access images.

Jan Sikorski jsikorski at codeweavers.com
Thu Sep 30 05:58:02 CDT 2021


Signed-off-by: Jan Sikorski <jsikorski at codeweavers.com>
---
 dlls/wined3d/texture.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index f9babc6e28f..f3946fd4b93 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -5112,8 +5112,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)
     {
-- 
2.30.2




More information about the wine-devel mailing list