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

mantle/wsi: fix minImageCount #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Etaash-mathamsetty
Copy link

This should fix grvk on winewayland

// 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.

Copy link
Author

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

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?

Suggested change
.minImageCount = MAX(3, surfaceCapabilities.minImageCount),
.minImageCount = MAX(2, surfaceCapabilities.minImageCount),

Copy link
Author

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

Copy link
Owner

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

Copy link
Author

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

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

Successfully merging this pull request may close these issues.

3 participants