Skip to content

Commit

Permalink
Work around naga issue with GLSL 460
Browse files Browse the repository at this point in the history
  • Loading branch information
cwfitzgerald committed Oct 18, 2023
1 parent 89d1b22 commit 3c5d36c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion wgpu-hal/src/gles/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,11 @@ impl super::Adapter {
log::info!("SL version: {}", &sl_version);
if full_ver.is_some() {
let (sl_major, sl_minor) = Self::parse_full_version(&sl_version).ok()?;
let value = sl_major as u16 * 100 + sl_minor as u16 * 10;
let mut value = sl_major as u16 * 100 + sl_minor as u16 * 10;
// Naga doesn't think it supports GL 460+, so we cap it at 450
if value > 450 {
value = 450;
}
naga::back::glsl::Version::Desktop(value)
} else {
let (sl_major, sl_minor) = Self::parse_version(&sl_version).ok()?;
Expand Down

0 comments on commit 3c5d36c

Please sign in to comment.