r600/sfn: Don't try to catch exceptions, the driver doesn't throw any
authorGert Wollny <gert.wollny@collabora.com>
Thu, 27 Feb 2020 07:14:15 +0000 (08:14 +0100)
committerGert Wollny <gert.wollny@collabora.com>
Mon, 2 Mar 2020 19:00:26 +0000 (20:00 +0100)
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3974>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3974>

src/gallium/drivers/r600/sfn/sfn_nir.cpp

index ff7bee26b4f68fd48a86769185cdc434fc27f311..bdecf75ae1f604a9e01917d9d31fe6b75119f442 100644 (file)
@@ -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;