nir: Fix 16-component nir_replicate.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Thu, 20 Jul 2023 21:01:01 +0000 (23:01 +0200)
committerMarge Bot <emma+marge@anholt.net>
Sat, 22 Jul 2023 22:11:15 +0000 (22:11 +0000)
Fixes: f534c2c539f ("nir/builder: Add nir_replicate helper")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24286>

src/compiler/nir/nir_builder.h

index 5e17ed7..898dbb2 100644 (file)
@@ -727,7 +727,7 @@ static inline nir_ssa_def *
 nir_replicate(nir_builder *b, nir_ssa_def *scalar, unsigned num_components)
 {
    assert(scalar->num_components == 1);
-   assert(num_components < NIR_MAX_VEC_COMPONENTS);
+   assert(num_components <= NIR_MAX_VEC_COMPONENTS);
 
    nir_ssa_def *copies[NIR_MAX_VEC_COMPONENTS] = {NULL};
    for (unsigned i = 0; i < num_components; ++i)