glsl/linker: Check the invariance of built-in special variables
[mesa.git] / src / compiler / nir / nir_opt_constant_folding.c
index d011e4f6562a2767a498e840dbab6db9b23338f7..e2920e6b3fddd90a56011d09a79c4eb72df73867 100644 (file)
@@ -41,7 +41,7 @@ struct constant_fold_state {
 static bool
 constant_fold_alu_instr(nir_alu_instr *instr, void *mem_ctx)
 {
-   nir_const_value src[4];
+   nir_const_value src[NIR_MAX_VEC_COMPONENTS];
 
    if (!instr->dest.dest.is_ssa)
       return false;