From c921a29b3a696f6fa99b648d6cd975dbcf106429 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Tue, 24 Jun 2008 10:56:36 +0900 Subject: [PATCH] mesa: Replace abort by asserts. --- src/mesa/glapi/glthread.h | 10 +++++----- src/mesa/math/m_debug_xform.c | 3 ++- src/mesa/state_tracker/st_atom_sampler.c | 2 +- src/mesa/state_tracker/st_mesa_to_tgsi.c | 3 ++- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/mesa/glapi/glthread.h b/src/mesa/glapi/glthread.h index b8e9d5f..ad2a635 100644 --- a/src/mesa/glapi/glthread.h +++ b/src/mesa/glapi/glthread.h @@ -144,19 +144,19 @@ typedef unsigned int _glthread_Cond; // #warning Condition variables not implemented. #define _glthread_INIT_COND(cond) \ - abort(); + ASSERT(0); #define _glthread_DESTROY_COND(name) \ - abort(); + ASSERT(0); #define _glthread_COND_WAIT(cond, mutex) \ - abort(); + ASSERT(0); #define _glthread_COND_SIGNAL(cond) \ - abort(); + ASSERT(0); #define _glthread_COND_BROADCAST(cond) \ - abort(); + ASSERT(0); #endif diff --git a/src/mesa/math/m_debug_xform.c b/src/mesa/math/m_debug_xform.c index 2af837c..0b07b4f 100644 --- a/src/mesa/math/m_debug_xform.c +++ b/src/mesa/math/m_debug_xform.c @@ -206,7 +206,8 @@ static int test_transform_function( transform_func func, int psize, case VAR: break; default: - abort(); + ASSERT(0); + return 0; } } } diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c index 9abd0b3..1e182ee 100644 --- a/src/mesa/state_tracker/st_atom_sampler.c +++ b/src/mesa/state_tracker/st_atom_sampler.c @@ -67,7 +67,7 @@ gl_wrap_to_sp(GLenum wrap) case GL_MIRROR_CLAMP_TO_BORDER_EXT: return PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER; default: - abort(); + assert(0); return 0; } } diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c index a8b6faa..150545d 100644 --- a/src/mesa/state_tracker/st_mesa_to_tgsi.c +++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c @@ -772,7 +772,8 @@ tgsi_translate_mesa_program( TGSI_WRITEMASK_XYZW ); break; default: - abort(); + assert(0); + return 0; } ti += tgsi_build_full_declaration(&fulldecl, &tokens[ti], -- 2.7.4