Mesa (master): freedreno/ir3: Skip tess epilogue if the program is missing stores.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri May 1 16:46:33 UTC 2020
Module: Mesa
Branch: master
Commit: f91e49ee29b6c513f7b6837c8c169f0438dd1b50
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f91e49ee29b6c513f7b6837c8c169f0438dd1b50
Author: Eric Anholt <eric at anholt.net>
Date: Tue Apr 21 15:30:49 2020 -0700
freedreno/ir3: Skip tess epilogue if the program is missing stores.
Some of the negative API tests make shaders for tess stages that don't do
all the stores they need to. Once we start precompiling (or doing
shader-db of tess), we need to at least not segfault when generating them.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4562>
---
src/freedreno/ir3/ir3_nir_lower_tess.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/freedreno/ir3/ir3_nir_lower_tess.c b/src/freedreno/ir3/ir3_nir_lower_tess.c
index 7a30ef09d97..4d8798c285f 100644
--- a/src/freedreno/ir3/ir3_nir_lower_tess.c
+++ b/src/freedreno/ir3/ir3_nir_lower_tess.c
@@ -524,6 +524,9 @@ emit_tess_epilouge(nir_builder *b, struct state *state)
nir_ssa_def *tessfactor_address = nir_load_tess_factor_base_ir3(b);
nir_ssa_def *levels[2];
+ if (!state->outer_levels[0])
+ return;
+
/* Then emit the epilogue that actually writes out the tessellation levels
* to the BOs.
*/
More information about the mesa-commit
mailing list