Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
ash-window: Add
get_present_support()
helper #774base: master
Are you sure you want to change the base?
ash-window: Add
get_present_support()
helper #774Changes from 1 commit
92594f6
c19e5be
2e71e15
512e8a3
d1df8c8
c4921a7
f84911a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
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.
This is supposed to be a visual, not a screen.
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.
As above.
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.
You're right, I think a visualID can be somehow derived from the screen, but I think this would require linking to some X library. As an alternative, the get_present_support function could require a window handle, but this would defeat the main use case.
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.
Yeah. We could pull in
x11-dl
and use it to make the necessary call (XDefaultVisualOfScreen
I guess?). Bonus points for adding a cargo feature to usex11
instead, as dynamic linking is a bit tidier than runtime loading on Linux, but it can be nice to avoid a buildtime dep on a foreign lib.Alternatively, maybe a more convenient approach would be adding a visual_id member to to
raw_window_handle::XlibDisplayHandle
upstream (and making sure winit populates it). This is the same motivation behind its inclusion in the window handle struct, though I'm not enough of an X11 expert to judge how weird that might be.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.
Quickly scrolling through the changes, it seems that this feature is now forcibly requiring either
x11
orx11-dl
, or a compiler error will occur on all ofunix
. Same forxcb
now being forced on all consumers ofash-window
.The
cfg
guards on thoseRawDisplayHandle
s should be refactored to contain the optional libraries as features, otherwiseget_present_support()
won't provide support for x11/xcb but the other functions are not affected.Then, the module documentation and function documentation should be extended to explain these features.
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.
Because
ash
maps the entire Vulkan API (== supports everything), even though we might not have written a slightly-higher-levelFn
wrapper for it yet the lower-level API is still available.Though I would reword that to
... don't currently have an implementation in ash-window
, as we can always expand.