mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
[glsl-in] Use crate::BOOL_WIDTH for booleans width
This commit is contained in:
committed by
Dzmitry Malyshau
parent
e7d712e608
commit
01036e8f42
@@ -6,7 +6,7 @@ pub fn parse_type(type_name: &str) -> Option<Type> {
|
||||
name: None,
|
||||
inner: TypeInner::Scalar {
|
||||
kind: ScalarKind::Bool,
|
||||
width: 4, // https://stackoverflow.com/questions/9419781/what-is-the-size-of-glsl-boolean
|
||||
width: crate::BOOL_WIDTH,
|
||||
},
|
||||
}),
|
||||
"float" => Some(Type {
|
||||
@@ -56,7 +56,7 @@ pub fn parse_type(type_name: &str) -> Option<Type> {
|
||||
fn kind_width_parse(ty: &str) -> Option<(ScalarKind, u8)> {
|
||||
Some(match ty {
|
||||
"" => (ScalarKind::Float, 4),
|
||||
"b" => (ScalarKind::Bool, 4),
|
||||
"b" => (ScalarKind::Bool, crate::BOOL_WIDTH),
|
||||
"i" => (ScalarKind::Sint, 4),
|
||||
"u" => (ScalarKind::Uint, 4),
|
||||
"d" => (ScalarKind::Float, 8),
|
||||
|
||||
Reference in New Issue
Block a user