From e7f891bf2b455927b98e70301c707428c7adf62a Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Wed, 25 Sep 2024 14:10:27 -0700 Subject: [PATCH] [naga] Remove redundant handle ordering check from validator. (#6321) `Validator::validate_module_handles` already ensures that types refer only to other types appearing earlier in the arena than themselves, so this check in `Validator::validate_type` is redundant. --- naga/src/valid/type.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/naga/src/valid/type.rs b/naga/src/valid/type.rs index 32d5d58f1c..0c44660772 100644 --- a/naga/src/valid/type.rs +++ b/naga/src/valid/type.rs @@ -664,9 +664,6 @@ impl super::Validator { ) } Ti::BindingArray { base, size } => { - if base >= handle { - return Err(TypeError::InvalidArrayBaseType(base)); - } let type_info_mask = match size { crate::ArraySize::Constant(_) => TypeFlags::SIZED | TypeFlags::HOST_SHAREABLE, crate::ArraySize::Dynamic => {