Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added fallback to vkCreateRenderPass #67227

Merged

Conversation

BastiaanOlij
Copy link
Contributor

@BastiaanOlij BastiaanOlij commented Oct 11, 2022

Even though vkCreateRenderPass2KHR was introduced as an extension in Vulkan 1.0, support doesn't seem to be universal for it.

As we only need the updated call for Multiview and VRS, this PR adds a fallback to the old vkCreateRenderPass if the VK_KHR_create_renderpass2 extension is not available.

Fixes #66685 and fixes #67146

@BastiaanOlij BastiaanOlij added this to the 4.0 milestone Oct 11, 2022
@BastiaanOlij BastiaanOlij self-assigned this Oct 11, 2022
@BastiaanOlij BastiaanOlij requested a review from a team as a code owner October 11, 2022 00:36
@BastiaanOlij BastiaanOlij force-pushed the vkCreateRenderPass2KHR_fallback branch from f8b80b2 to 39b5a8d Compare October 11, 2022 01:09
@akien-mga
Copy link
Member

I wonder if that will help with #65409, which was also caused by adding VRS in d139131.
Though it's reported on distros like Fedora 36 which should have recent Mesa drivers so full support for Vulkan 1.2 or even 1.3.

@BastiaanOlij
Copy link
Contributor Author

@akien-mga For Vulkan 1.2 and newer this is now core functionality and should be supported as such. The only thing I wonder about is seeing this used to be an extension and we are using it through the extension for backwards compatibility, whether it now being core means they are phasing that out. We may need to specifically test for Vulkan 1.2 or newer and just check for the core function or something like that.

It's a bit hard to say without having different hardware to test.

drivers/vulkan/vulkan_context.cpp Outdated Show resolved Hide resolved
drivers/vulkan/vulkan_context.cpp Outdated Show resolved Hide resolved
drivers/vulkan/vulkan_context.cpp Outdated Show resolved Hide resolved
drivers/vulkan/vulkan_context.cpp Outdated Show resolved Hide resolved
drivers/vulkan/vulkan_context.cpp Outdated Show resolved Hide resolved
@BastiaanOlij BastiaanOlij force-pushed the vkCreateRenderPass2KHR_fallback branch from 39b5a8d to 64a78c3 Compare October 11, 2022 22:32
@BastiaanOlij
Copy link
Contributor Author

@clayjohn I think I got all your changes..

Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

I ran master on my old laptop which I thought may reproduce the reported crash but unfortunately the extension was supported and I couldn't reproduce the crash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants