Skip to content

Commit

Permalink
Naga: GLSL 410 does not support layout(binding = ...)
Browse files Browse the repository at this point in the history
Naga assumed that GLSL 410 supported layout(binding = ...) but it does not,
it only supports layout(location = ...). It is not possible to enable only
layout(location = ...) currently, so we need to predicate the feature on GLSL
420 instead.
  • Loading branch information
bes committed Mar 6, 2024
1 parent badb3c8 commit 4936c01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion naga/src/back/glsl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ impl Version {
/// Note: `location=` for vertex inputs and fragment outputs is supported
/// unconditionally for GLES 300.
fn supports_explicit_locations(&self) -> bool {
*self >= Version::Desktop(410) || *self >= Version::new_gles(310)
*self >= Version::Desktop(420) || *self >= Version::new_gles(310)
}

fn supports_early_depth_test(&self) -> bool {
Expand Down

0 comments on commit 4936c01

Please sign in to comment.