From 01036e8f4213b9dbd6cf7db5e9256e7400957474 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Capucho?= Date: Sun, 20 Jun 2021 11:01:33 +0100 Subject: [PATCH] [glsl-in] Use crate::BOOL_WIDTH for booleans width --- src/front/glsl/types.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/front/glsl/types.rs b/src/front/glsl/types.rs index 715c0c7430..ed3ec36494 100644 --- a/src/front/glsl/types.rs +++ b/src/front/glsl/types.rs @@ -6,7 +6,7 @@ pub fn parse_type(type_name: &str) -> Option { 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 { 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),