rendervulkan: Fix validation errors for linear swapchain view.
VK_FORMAT_B8G8R8A8_SRGB doesn't support STORAGE usage. Otherwise we hit asserts in mesa.
This commit is contained in:
parent
a7f8b26833
commit
c1fd2d7f7a
1 changed files with 6 additions and 0 deletions
|
@ -2352,6 +2352,12 @@ bool CVulkanTexture::BInitFromSwapchain( VkImage image, uint32_t width, uint32_t
|
|||
return false;
|
||||
}
|
||||
|
||||
VkImageViewUsageCreateInfo viewUsageInfo = {
|
||||
.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO,
|
||||
.usage = VK_IMAGE_USAGE_SAMPLED_BIT,
|
||||
};
|
||||
|
||||
createInfo.pNext = &viewUsageInfo;
|
||||
createInfo.format = ToSrgbVulkanFormat( format );
|
||||
|
||||
res = g_device.vk.CreateImageView(g_device.device(), &createInfo, nullptr, &m_linearView);
|
||||
|
|
Loading…
Reference in a new issue