From: Gert Wollny Date: Thu, 27 Feb 2020 07:14:15 +0000 (+0100) Subject: r600/sfn: Don't try to catch exceptions, the driver doesn't throw any X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=adcb365c1dae5e97f6863d320a774753bf76780b;p=mesa.git r600/sfn: Don't try to catch exceptions, the driver doesn't throw any Signed-off-by: Gert Wollny Tested-by: Marge Bot Part-of: --- diff --git a/src/gallium/drivers/r600/sfn/sfn_nir.cpp b/src/gallium/drivers/r600/sfn/sfn_nir.cpp index ff7bee26b4f..bdecf75ae1f 100644 --- a/src/gallium/drivers/r600/sfn/sfn_nir.cpp +++ b/src/gallium/drivers/r600/sfn/sfn_nir.cpp @@ -659,18 +659,12 @@ int r600_shader_from_nir(struct r600_context *rctx, sel->nir->info.clip_distance_array_size)) - 1; } - // For learning we print out the complete failed shader - // and instead of asserts we use exceptions - bool r; - try { - struct r600_shader* gs_shader = nullptr; - if (rctx->gs_shader) - gs_shader = &rctx->gs_shader->current->shader; - r = convert.lower(sel->nir, pipeshader, sel, *key, gs_shader); - - } catch (std::logic_error& x) { - r = false; - } + struct r600_shader* gs_shader = nullptr; + if (rctx->gs_shader) + gs_shader = &rctx->gs_shader->current->shader; + + bool r = convert.lower(sel->nir, pipeshader, sel, *key, gs_shader); + if (!r || rctx->screen->b.debug_flags & DBG_ALL_SHADERS) { static int shnr = 0;