-
Notifications
You must be signed in to change notification settings - Fork 14
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
mantle/wsi: fix minImageCount #58
base: master
Are you sure you want to change the base?
mantle/wsi: fix minImageCount #58
Conversation
// Recreate swapchain | ||
const VkSwapchainCreateInfoKHR swapchainCreateInfo = { | ||
.sType = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR, | ||
.pNext = NULL, | ||
.flags = 0, | ||
.surface = mSurface, | ||
.minImageCount = 3, | ||
.minImageCount = MAX(3, surfaceCapabilities.minImageCount), |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
according to the spec maxImageCount may be 0, and then we would need additional logic to account for that, I think minImage is better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Thanks for the heads-up!
Perhaps your original patch was right, then?
.minImageCount = MAX(3, surfaceCapabilities.minImageCount), | |
.minImageCount = MAX(2, surfaceCapabilities.minImageCount), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think 2 vs 3 images is gonna make a big difference, but I might be wrong on that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can just do: .minImageCount = surfaceCapabilities.minImageCount
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sometimes the minImageCount can be 1 and idk if apps will like that
This should fix grvk on winewayland