summarylogtreecommitdiffstats
path: root/0001-fshack-fix-image-corruption-on-ANV-and-HD-Graphics-6.patch
blob: 4ad3613d3f896cb1969873214670c51c938c4566 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From 5912f5762f386007c7f83edf9b02fd4f6ea0ba9c Mon Sep 17 00:00:00 2001
From: Stelios Tsampas <loathingkernel@gmail.com>
Date: Sat, 1 Jun 2024 13:02:24 +0300
Subject: [PATCH 1/2] fshack: fix image corruption on ANV and HD Graphics 630

---
 dlls/winevulkan/vulkan.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c
index fe2816f96e9..0d69c00ebfb 100644
--- a/dlls/winevulkan/vulkan.c
+++ b/dlls/winevulkan/vulkan.c
@@ -2511,6 +2511,8 @@ static VkResult init_fs_hack_images(struct wine_device *device, struct wine_swap
 
         if (createinfo->flags & VK_SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR)
             imageInfo.flags |= VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT | VK_IMAGE_CREATE_EXTENDED_USAGE_BIT;
+        else if (createinfo->imageFormat != VK_FORMAT_B8G8R8A8_SRGB)
+            imageInfo.flags |= VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT;
 
         res = device->funcs.p_vkCreateImage(device->device, &imageInfo, NULL, &hack->user_image);
         if (res != VK_SUCCESS)
@@ -4012,7 +4014,7 @@ static VkResult record_compute_cmd(struct wine_device *device, struct wine_swapc
     /* vec2: blit dst extents in real coords */
     constants[2] = swapchain->blit_dst.extent.width;
     constants[3] = swapchain->blit_dst.extent.height;
-    
+
     bind_pipeline(device, hack->cmd, &swapchain->blit_pipeline, hack->descriptor_set, constants);
 
     /* local sizes in shader are 8 */
-- 
2.45.2