Jan Sikorski : wined3d: Set VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT for unordered access images.

Alexandre Julliard julliard at winehq.org
Wed Oct 6 15:51:39 CDT 2021


Module: wine
Branch: master
Commit: bacd0301ef56ba84c8a299d6a3a3291c9802ea5a
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=bacd0301ef56ba84c8a299d6a3a3291c9802ea5a

Author: Jan Sikorski <jsikorski at codeweavers.com>
Date:   Wed Oct  6 10:50:10 2021 +0200

wined3d: Set VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT for unordered access images.

Signed-off-by: Jan Sikorski <jsikorski at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 db32274960f..339bf4e205a 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -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)
     {




More information about the wine-cvs mailing list