Mesa (main): ir3: fix tess param allocation
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jul 26 01:44:10 UTC 2022
Module: Mesa
Branch: main
Commit: ba461f897bb534e8f2d251f2896adb32dd924e68
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ba461f897bb534e8f2d251f2896adb32dd924e68
Author: Chia-I Wu <olvaffe at gmail.com>
Date: Fri Jul 15 14:21:38 2022 -0700
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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17570>
---
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);
More information about the mesa-commit
mailing list