Mesa (master): panfrost: Add more info to some assertions

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jan 31 06:24:31 UTC 2020


Module: Mesa
Branch: master
Commit: 226c1efe9a8b7a4f1802ab13f249dc06b2bd7d3d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=226c1efe9a8b7a4f1802ab13f249dc06b2bd7d3d

Author: Tomeu Vizoso <tomeu.vizoso at collabora.com>
Date:   Thu Dec 19 15:07:39 2019 +0100

panfrost: Add more info to some assertions

Signed-off-by: Tomeu Vizoso <tomeu.vizoso at collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3625>

---

 src/gallium/drivers/panfrost/pan_format.c |  6 ++++--
 src/panfrost/midgard/midgard_compile.c    | 14 +++++++++-----
 2 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/src/gallium/drivers/panfrost/pan_format.c b/src/gallium/drivers/panfrost/pan_format.c
index c52756301b9..48b937dfdb8 100644
--- a/src/gallium/drivers/panfrost/pan_format.c
+++ b/src/gallium/drivers/panfrost/pan_format.c
@@ -98,8 +98,10 @@ panfrost_translate_channel_width(unsigned size)
                 return MALI_CHANNEL_16;
         case 32:
                 return MALI_CHANNEL_32;
-        default:
-                unreachable("Invalid width");
+        default: {
+                printf ("Invalid width: %d\n", size);
+                assert(0);
+        }
         }
 }
 
diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c
index 0ec1b5c19c9..d66045b3551 100644
--- a/src/panfrost/midgard/midgard_compile.c
+++ b/src/panfrost/midgard/midgard_compile.c
@@ -1672,7 +1672,7 @@ emit_intrinsic(compiler_context *ctx, nir_intrinsic_instr *instr)
                 break;
 
         default:
-                printf ("Unhandled intrinsic\n");
+                printf ("Unhandled intrinsic: %d\n", instr->intrinsic);
                 assert(0);
                 break;
         }
@@ -1925,8 +1925,10 @@ emit_texop_native(compiler_context *ctx, nir_tex_instr *instr,
                         break;
                 }
 
-                default:
-                        unreachable("Unknown texture source type\n");
+                default: {
+                        printf ("Unknown texture source type: %d\n", instr->src[i].src_type);
+                        assert(0);
+                }
                 }
         }
 
@@ -1953,8 +1955,10 @@ emit_tex(compiler_context *ctx, nir_tex_instr *instr)
         case nir_texop_txs:
                 emit_sysval_read(ctx, &instr->instr, ~0, 4);
                 break;
-        default:
-                unreachable("Unhanlded texture op");
+        default: {
+                printf ("Unhandled texture op: %d\n", instr->op);
+                assert(0);
+        }
         }
 }
 



More information about the mesa-commit mailing list