mirror of
https://github.com/libretro/Lakka-LibreELEC.git
synced 2026-11-07 09:05:59 -10:00
Merge pull request #2251 from ShigeakiAsai/rpi-vulkan-drop-sampled
RPi: retroarch: replace the Vulkan workaround with dropping SAMPLED usage
This commit is contained in:
3 files changed
+21
-31
No files matched your search
@@ -1 +0,0 @@
|
||||
../../../RPi5/patches/retroarch/retroarch-workaround-vulkan.patch
|
||||
@@ -1,30 +0,0 @@
|
||||
diff -uNr a/gfx/common/vulkan_common.c b/gfx/common/vulkan_common.c
|
||||
--- a/gfx/common/vulkan_common.c 2026-01-17 09:26:07.000000000 +0900
|
||||
+++ b/gfx/common/vulkan_common.c 2026-06-04 19:31:06.616335870 +0900
|
||||
@@ -2281,16 +2281,21 @@
|
||||
info.pNext = NULL;
|
||||
info.flags = 0;
|
||||
info.surface = vk->vk_surface;
|
||||
- info.minImageCount = desired_swapchain_images;
|
||||
+ // info.minImageCount = desired_swapchain_images;
|
||||
+ if(desired_swapchain_images < 3)
|
||||
+ info.minImageCount = desired_swapchain_images;
|
||||
+ else
|
||||
+ info.minImageCount = 2;
|
||||
info.imageFormat = format.format;
|
||||
info.imageColorSpace = format.colorSpace;
|
||||
info.imageExtent.width = swapchain_size.width;
|
||||
info.imageExtent.height = swapchain_size.height;
|
||||
info.imageArrayLayers = 1;
|
||||
- info.imageUsage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
|
||||
- | VK_IMAGE_USAGE_TRANSFER_SRC_BIT
|
||||
- | VK_IMAGE_USAGE_TRANSFER_DST_BIT
|
||||
- | VK_IMAGE_USAGE_SAMPLED_BIT;
|
||||
+ // info.imageUsage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
|
||||
+ // | VK_IMAGE_USAGE_TRANSFER_SRC_BIT
|
||||
+ // | VK_IMAGE_USAGE_TRANSFER_DST_BIT
|
||||
+ // | VK_IMAGE_USAGE_SAMPLED_BIT;
|
||||
+ info.imageUsage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
|
||||
info.imageSharingMode = VK_SHARING_MODE_EXCLUSIVE;
|
||||
info.queueFamilyIndexCount = 0;
|
||||
info.pQueueFamilyIndices = NULL;
|
||||
@@ -0,0 +1,21 @@
|
||||
diff --git a/gfx/common/vulkan_common.c b/gfx/common/vulkan_common.c
|
||||
index c8c2620d60..8eacf0d82a 100644
|
||||
--- a/gfx/common/vulkan_common.c
|
||||
+++ b/gfx/common/vulkan_common.c
|
||||
@@ -2957,10 +2957,14 @@ bool vulkan_create_swapchain(gfx_ctx_vulkan_data_t *vk,
|
||||
info.imageExtent.width = swapchain_size.width;
|
||||
info.imageExtent.height = swapchain_size.height;
|
||||
info.imageArrayLayers = 1;
|
||||
+ /* The swapchain images are render targets and the source/target of
|
||||
+ * copies (readback, retained frames, black frame insertion); they are
|
||||
+ * never sampled. Asking for SAMPLED makes v3dv (RPi5) fail
|
||||
+ * vkCreateSwapchainKHR on KMS, since it cannot sample LINEAR, the
|
||||
+ * only modifier the scanout plane takes (mesa#15279). */
|
||||
info.imageUsage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
|
||||
| VK_IMAGE_USAGE_TRANSFER_SRC_BIT
|
||||
- | VK_IMAGE_USAGE_TRANSFER_DST_BIT
|
||||
- | VK_IMAGE_USAGE_SAMPLED_BIT;
|
||||
+ | VK_IMAGE_USAGE_TRANSFER_DST_BIT;
|
||||
info.imageSharingMode = VK_SHARING_MODE_EXCLUSIVE;
|
||||
info.queueFamilyIndexCount = 0;
|
||||
info.pQueueFamilyIndices = NULL;
|
||||
Reference in new issue
Block a user