panfrost/midgard: Drop unnecessary assert
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 10 Jul 2019 16:37:08 +0000 (09:37 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 10 Jul 2019 16:37:08 +0000 (09:37 -0700)
Just use the #define instead.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Suggested-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
src/gallium/drivers/panfrost/midgard/nir_undef_to_zero.c

index aacecc17e9d8a16f543e1d4ce203c21cf4897706..447aaebae5cabe280d257d0f743f068e8995e809 100644 (file)
@@ -64,9 +64,7 @@ nir_undef_to_zero(nir_shader *shader)
                                 unsigned c = und->def.num_components;
                                 unsigned s = und->def.bit_size;
 
-                                nir_const_value v[16];
-                                assert(c <= 16);
-
+                                nir_const_value v[NIR_MAX_VEC_COMPONENTS];
                                 memset(v, 0, sizeof(v));
 
                                 b.cursor = nir_before_instr(instr);