From: Marek Olšák Date: Sat, 18 Jan 2020 00:55:13 +0000 (-0500) Subject: radeonsi: turn an assertion into return in si_nir_store_output_tcs X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=679b6244e15622381e8e25dfa61e4be83e741410;p=mesa.git radeonsi: turn an assertion into return in si_nir_store_output_tcs Reviewed-by: Pierre-Eric Pelloux-Prayer --- diff --git a/src/gallium/drivers/radeonsi/si_shader_llvm_tess.c b/src/gallium/drivers/radeonsi/si_shader_llvm_tess.c index e809f287ff5..cd0f136e952 100644 --- a/src/gallium/drivers/radeonsi/si_shader_llvm_tess.c +++ b/src/gallium/drivers/radeonsi/si_shader_llvm_tess.c @@ -593,9 +593,11 @@ static void si_nir_store_output_tcs(struct ac_shader_abi *abi, var->data.location == VARYING_SLOT_TESS_LEVEL_INNER || var->data.location == VARYING_SLOT_TESS_LEVEL_OUTER; - assert((name == TGSI_SEMANTIC_PATCH || - name == TGSI_SEMANTIC_TESSINNER || - name == TGSI_SEMANTIC_TESSOUTER) == is_patch); + /* Invalid SPIR-V can cause this. */ + if ((name == TGSI_SEMANTIC_PATCH || + name == TGSI_SEMANTIC_TESSINNER || + name == TGSI_SEMANTIC_TESSOUTER) != is_patch) + return; if (!is_patch) { stride = get_tcs_out_vertex_dw_stride(ctx);