Skip to content

Commit 02c034e

Browse files
committed
egl: fix robustness detection on EGL 1.5
Even if the extension is not present, the robustness can be supported. It was unintentionally disabled due to typo in cmp. Though, it haven't affected anything, due to most systems with robustness having the extension in the first place.
1 parent e4848ac commit 02c034e

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
- Updated `objc2` frameworks dependency to `v0.3.2`.
55
- Use `objc2-open-gl` instead of `cgl` dependency.
66
- Bump MSRV from `1.71` to `1.85`.
7+
- Fixed EGL's robustness detection without extension, but on EGL 1.5.
78

89
# Version 0.32.3
910

glutin/src/api/egl/display.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ impl Display {
482482

483483
supported_features.set(
484484
DisplayFeatures::CONTEXT_ROBUSTNESS,
485-
version > Version::new(1, 5)
485+
version >= Version::new(1, 5)
486486
|| extensions.contains("EGL_EXT_create_context_robustness"),
487487
);
488488

glutin/src/display.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,10 @@ bitflags! {
531531
pub struct DisplayFeatures: u32 {
532532
/// The display supports creating [`robust`] context.
533533
///
534+
/// The robust context creation may still fail, so it's
535+
/// recommended to try and fallback to non-robust
536+
/// context.
537+
///
534538
/// [`robust`]: crate::context::Robustness
535539
const CONTEXT_ROBUSTNESS = 0b0000_0001;
536540

0 commit comments

Comments
 (0)