From adcb365c1dae5e97f6863d320a774753bf76780b Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Thu, 27 Feb 2020 08:14:15 +0100 Subject: [PATCH] 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: --- src/gallium/drivers/r600/sfn/sfn_nir.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) 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; -- 2.30.2