From ba461f897bb534e8f2d251f2896adb32dd924e68 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Fri, 15 Jul 2022 14:21:38 -0700 Subject: [PATCH] ir3: fix tess param allocation primitive_param takes up 2 vec4's. Remove an align that I don't understand. The align upset Test case 'dEQP-VK.subgroups.ballot_broadcast.graphics.subgroupbroadcast_vec4'.. deqp-vk: ../src/freedreno/ir3/ir3_nir.c:1039: void ir3_setup_const_state(nir_shader *, struct ir3_shader_variant *, struct ir3_const_state *): Assertion `constoff <= ir3_max_const(v)' failed. with an older version (android11-tests-dev branch) of deqp-vk. This is because ir3_nir_opt_preamble uses the function for the worst case but the function fails to replace the align by the worst case. No regression with dEQP-VK.*tess*. Part-of: --- src/freedreno/ir3/ir3_nir.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/freedreno/ir3/ir3_nir.c b/src/freedreno/ir3/ir3_nir.c index 9a08dc17f3c..c7f5b489713 100644 --- a/src/freedreno/ir3/ir3_nir.c +++ b/src/freedreno/ir3/ir3_nir.c @@ -1006,9 +1006,8 @@ ir3_setup_const_state(nir_shader *nir, struct ir3_shader_variant *v, break; case MESA_SHADER_TESS_CTRL: case MESA_SHADER_TESS_EVAL: - constoff = align(constoff - 1, 4) + 3; const_state->offsets.primitive_param = constoff; - constoff += 5; + constoff += 2; const_state->offsets.primitive_map = constoff; constoff += DIV_ROUND_UP(v->input_size, 4);