From: Axel Davy Date: Thu, 29 Sep 2016 22:17:45 +0000 (+0200) Subject: st/nine: Fix the calculation of the number of vs inputs X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d2fd2966483dda23911dc89fdf9dbff02a87df6a;p=mesa.git st/nine: Fix the calculation of the number of vs inputs Fixes hangs on radeonsi, and assert on llvmpipe. Signed-off-by: Axel Davy Cc: "12.0" --- diff --git a/src/gallium/state_trackers/nine/nine_shader.c b/src/gallium/state_trackers/nine/nine_shader.c index 20b6ed7044c..0f8bcdd7d7f 100644 --- a/src/gallium/state_trackers/nine/nine_shader.c +++ b/src/gallium/state_trackers/nine/nine_shader.c @@ -2141,7 +2141,7 @@ DECL_SPECIAL(DCL) ureg_DECL_vs_input(ureg, sem.reg.idx); assert(sem.reg.idx < ARRAY_SIZE(tx->info->input_map)); tx->info->input_map[sem.reg.idx] = sm1_to_nine_declusage(&sem); - tx->info->num_inputs = sem.reg.idx + 1; + tx->info->num_inputs = MAX2(tx->info->num_inputs, sem.reg.idx + 1); /* NOTE: preserving order in case of indirect access */ } else if (tx->version.major >= 3) {