Fix: Vulkan: Validation error on Qualcomm GPU

Qualcomm GPU doesn't support image load/store on framebuffers. We use
load store to convert to the correct color space. This PR will only
set the VK_IMAGE_USAGE_STORAGE_BIT when HDR is available. As Qualcomm
doesn't support HDR using Vulkan this is safe.

Pull Request: https://projects.blender.org/blender/blender/pulls/145775
This commit is contained in:
Jeroen Bakker
2025-09-05 11:09:17 +02:00
parent f4cd45d71e
commit 1c360091aa

View File

@@ -1183,7 +1183,8 @@ GHOST_TSuccess GHOST_ContextVK::recreateSwapchain(bool use_hdr_swapchain)
create_info.imageColorSpace = surface_format_.colorSpace;
create_info.imageExtent = render_extent_;
create_info.imageArrayLayers = 1;
create_info.imageUsage = VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_STORAGE_BIT;
create_info.imageUsage = VK_IMAGE_USAGE_TRANSFER_DST_BIT |
(use_hdr_swapchain ? VK_IMAGE_USAGE_STORAGE_BIT : 0);
create_info.preTransform = capabilities.currentTransform;
create_info.compositeAlpha = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR;
create_info.presentMode = present_mode;