Skip to content

Commit

Permalink
[glsl-in] Doc fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimblandy committed Sep 5, 2023
1 parent 6d782e9 commit 3b3efd7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/front/glsl/parser/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,11 @@ impl<'source> ParsingContext<'source> {

match ctx.module.const_expressions[const_expr] {
Expression::Literal(Literal::I32(value)) => match uint {
// This unchecked cast isn't good, but since
// we only reach this code when the selector
// is unsigned but the case label is signed,
// verification will reject the module
// anyway (which also matches GLSL's rules).
true => crate::SwitchValue::U32(value as u32),
false => crate::SwitchValue::I32(value),
},
Expand Down

0 comments on commit 3b3efd7

Please sign in to comment.