From a3d10c2c304c65e37a940edbbc84f37e5cf88f33 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Sun, 29 Jun 2014 19:12:04 -0700 Subject: mesa: Make unreachable macro take a string argument. To aid in debugging. Reviewed-by: Ian Romanick --- src/mesa/drivers/common/meta.c | 3 +-- src/mesa/drivers/dri/i965/brw_blorp_clear.cpp | 4 +--- src/mesa/drivers/dri/i965/brw_reg.h | 3 +-- src/mesa/drivers/dri/i965/test_vec4_copy_propagation.cpp | 3 +-- src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp | 3 +-- 5 files changed, 5 insertions(+), 11 deletions(-) (limited to 'src/mesa/drivers') diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index f313f5645b4..f1f57297c02 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -2592,8 +2592,7 @@ _mesa_meta_setup_texture_coords(GLenum faceTarget, coord = coords3; break; default: - assert(0); - unreachable(); + unreachable("not reached"); } coord[3] = (float) (slice / 6); diff --git a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp index 5efdf7163cb..df34c724073 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp +++ b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp @@ -337,9 +337,7 @@ brw_blorp_clear_params::brw_blorp_clear_params(struct brw_context *brw, x_scaledown = 2; break; default: - assert(!"Unexpected sample count for fast clear"); - unreachable(); - break; + unreachable("Unexpected sample count for fast clear"); } y_scaledown = 2; x_align = x_scaledown * 2; diff --git a/src/mesa/drivers/dri/i965/brw_reg.h b/src/mesa/drivers/dri/i965/brw_reg.h index fc2e0b0ba22..24346bed671 100644 --- a/src/mesa/drivers/dri/i965/brw_reg.h +++ b/src/mesa/drivers/dri/i965/brw_reg.h @@ -358,9 +358,8 @@ brw_vecn_reg(unsigned width, unsigned file, unsigned nr, unsigned subnr) case 16: return brw_vec16_reg(file, nr, subnr); default: - assert(!"Invalid register width"); + unreachable("Invalid register width"); } - unreachable(); } static inline struct brw_reg diff --git a/src/mesa/drivers/dri/i965/test_vec4_copy_propagation.cpp b/src/mesa/drivers/dri/i965/test_vec4_copy_propagation.cpp index fd517f87c09..066746556e8 100644 --- a/src/mesa/drivers/dri/i965/test_vec4_copy_propagation.cpp +++ b/src/mesa/drivers/dri/i965/test_vec4_copy_propagation.cpp @@ -86,8 +86,7 @@ protected: virtual vec4_instruction *emit_urb_write_opcode(bool complete) { - assert(!"Not reached"); - unreachable(); + unreachable("Not reached"); } }; diff --git a/src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp b/src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp index 7563aef8bf2..78c758c3679 100644 --- a/src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp +++ b/src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp @@ -89,8 +89,7 @@ protected: virtual vec4_instruction *emit_urb_write_opcode(bool complete) { - assert(!"Not reached"); - unreachable(); + unreachable("Not reached"); } }; -- cgit v1.2.3