Skip to content

Check presentation support in isDeviceSuitable - #474

Merged
gpx1000 merged 2 commits into
KhronosGroup:mainfrom
gpx1000:fix/457-isdevicesuitable-presentation
Sep 3, 2026
Merged

Check presentation support in isDeviceSuitable#474
gpx1000 merged 2 commits into
KhronosGroup:mainfrom
gpx1000:fix/457-isdevicesuitable-presentation

Conversation

@gpx1000

@gpx1000 gpx1000 commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

isDeviceSuitable() only checked for a graphics-capable queue family, but createLogicalDevice() later requires one that supports both graphics and presentation. A device could pass suitability and then throw in createLogicalDevice(). Extends the existing search to also require getSurfaceSupportKHR(qfpIndex, *surface), applied consistently across every chapter from window-surface creation onward.

Fixes #457.

Comment thread attachments/05_window_surface.cpp Outdated

@SaschaWillems SaschaWillems left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Even though I don't like that syntax style at all, it works as expected. So I'm fine with it.

@gpx1000
gpx1000 merged commit dbf26e2 into KhronosGroup:main Sep 3, 2026
8 checks passed
@gpx1000
gpx1000 deleted the fix/457-isdevicesuitable-presentation branch September 3, 2026 16:34
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.

Should isDeviceSuitable() also check presentation support in the Window Surface chapter?

3 participants