don't call abort()
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 30 Oct 2002 20:16:43 +0000 (20:16 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 30 Oct 2002 20:16:43 +0000 (20:16 +0000)
src/mesa/swrast/s_copypix.c
src/mesa/swrast/s_triangle.c

index fcab45fe186f43b9608ded6b0f5d4c6cc411420a..31fffff6270923b6cd9ed4a5f56a3a9fbb075f6f 100644 (file)
@@ -1,8 +1,8 @@
-/* $Id: s_copypix.c,v 1.41 2002/10/24 23:57:24 brianp Exp $ */
+/* $Id: s_copypix.c,v 1.42 2002/10/30 20:16:43 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
- * Version:  4.1
+ * Version:  5.0
  *
  * Copyright (C) 1999-2002  Brian Paul   All Rights Reserved.
  *
@@ -414,7 +414,8 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
          }
          /* convolution */
          if (transferOps & IMAGE_CONVOLUTION_BIT) {
-            abort();  /* should never get here; caught at top of function */
+            _mesa_problem(ctx, "Convolution should not be enabled in copy_rgba_pixels()");
+            return;
          }
          /* GL_POST_CONVOLUTION_RED/GREEN/BLUE/ALPHA_SCALE/BIAS */
          if (transferOps & IMAGE_POST_CONVOLUTION_SCALE_BIAS) {
index 8c340c0b0dd3d9dde4d20280fcebe4cb0b1371a2..f96fbe1f2ca4e18a899b03c3a0b475f0608c8b54 100644 (file)
@@ -1,8 +1,8 @@
-/* $Id: s_triangle.c,v 1.63 2002/10/24 23:57:24 brianp Exp $ */
+/* $Id: s_triangle.c,v 1.64 2002/10/30 20:16:44 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
- * Version:  4.1
+ * Version:  5.0
  *
  * Copyright (C) 1999-2002  Brian Paul   All Rights Reserved.
  *
@@ -477,7 +477,8 @@ affine_span(GLcontext *ctx, struct sw_span *span,
             SPAN_NEAREST(NEAREST_RGB;ADD,3);
             break;
          default:
-            abort();
+            _mesa_problem(ctx, "bad tex env mode in SPAN_LINEAR");
+            return;
          }
          break;
       case GL_RGBA:
@@ -498,7 +499,8 @@ affine_span(GLcontext *ctx, struct sw_span *span,
             SPAN_NEAREST(NEAREST_RGBA_REPLACE,4);
             break;
          default:
-            abort();
+            _mesa_problem(ctx, "bad tex env mode (2) in SPAN_LINEAR");
+            return;
          }
          break;
       }
@@ -524,7 +526,8 @@ affine_span(GLcontext *ctx, struct sw_span *span,
             SPAN_LINEAR(LINEAR_RGB;ADD,3);
             break;
          default:
-            abort();
+            _mesa_problem(ctx, "bad tex env mode (3) in SPAN_LINEAR");
+            return;
          }
          break;
       case GL_RGBA:
@@ -545,8 +548,10 @@ affine_span(GLcontext *ctx, struct sw_span *span,
             SPAN_LINEAR(LINEAR_RGBA;REPLACE,4);
             break;
          default:
-            abort();
-         }                 break;
+            _mesa_problem(ctx, "bad tex env mode (4) in SPAN_LINEAR");
+            return;
+         }
+         break;
       }
       break;
    }
@@ -750,7 +755,8 @@ fast_persp_span(GLcontext *ctx, struct sw_span *span,
             SPAN_NEAREST(NEAREST_RGB;ADD,3);
             break;
          default:
-            abort();
+            _mesa_problem(ctx, "bad tex env mode (5) in SPAN_LINEAR");
+            return;
          }
          break;
       case GL_RGBA:
@@ -771,7 +777,8 @@ fast_persp_span(GLcontext *ctx, struct sw_span *span,
             SPAN_NEAREST(NEAREST_RGBA_REPLACE,4);
             break;
          default:
-            abort();
+            _mesa_problem(ctx, "bad tex env mode (6) in SPAN_LINEAR");
+            return;
          }
          break;
       }
@@ -795,7 +802,8 @@ fast_persp_span(GLcontext *ctx, struct sw_span *span,
             SPAN_LINEAR(LINEAR_RGB;ADD,3);
             break;
          default:
-            abort();
+            _mesa_problem(ctx, "bad tex env mode (7) in SPAN_LINEAR");
+            return;
          }
          break;
       case GL_RGBA:
@@ -816,7 +824,8 @@ fast_persp_span(GLcontext *ctx, struct sw_span *span,
             SPAN_LINEAR(LINEAR_RGBA;REPLACE,4);
             break;
          default:
-            abort();
+            _mesa_problem(ctx, "bad tex env mode (8) in SPAN_LINEAR");
+            return;
          }
          break;
       }