-
-
Notifications
You must be signed in to change notification settings - Fork 477
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
Fix logic in egl Device::query_device #1686
Conversation
cc @i509VCB I think the test was similar to the one in smithay? |
Huh, looks like smithay is requiring all three are present: https://github.com/Smithay/smithay/blob/41712470abede74dab8a039ce048c70d56115ce6/src/backend/egl/device.rs#L31 Based on the existing comment in the glutin source, the check was intended to do the correct thing, but just got the operators mixed up in the code. The minimal diff would have been just substituting |
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.
Should add a CHANGELOG entry.
The changes look correct the specification for EGL_EXT_device_base states the following:
|
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.
Nice catch, the original logic doesn't match what's described in the comment :)
Co-authored-by: Marijn Suijten <[email protected]>
Co-authored-by: Kirill Chibisov <[email protected]>
The previous test would mistakenly return an error if the extensions contain "EGL_EXT_device_base" but not the two others. As stated by the comment, and in https://registry.khronos.org/EGL/extensions/EXT/EGL_EXT_device_base.txt , it is supposed to contain the other two.
The cases that should not return an error are:
B
)E
) and EGL_EXT_device_query (Q
)The overall effects of this patch in terms of those three extensions are:
!B & E & !Q
leads to a different error message than beforeB & !E & !Q
no longer errors!B & E & Q
no longer errors