swrast: remove dead code in s_stencil.c
authorBrian Paul <brianp@vmware.com>
Sat, 24 Dec 2011 15:54:26 +0000 (08:54 -0700)
committerBrian Paul <brianp@vmware.com>
Sat, 24 Dec 2011 15:54:26 +0000 (08:54 -0700)
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/swrast/s_stencil.c

index 5ed9228a3a5ce06271a2441660b104dcca1a241d..dff8f46ca9c6c1f06400ad22077d6c22bb6c9573 100644 (file)
@@ -1045,39 +1045,6 @@ _swrast_stencil_and_ztest_span(struct gl_context *ctx, SWspan *span)
 }
 
 
-#if 0
-GLuint
-clip_span(GLuint bufferWidth, GLuint bufferHeight,
-          GLint x, GLint y, GLuint *count)
-{
-   GLuint n = *count;
-   GLuint skipPixels = 0;
-
-   if (y < 0 || y >= bufferHeight || x + n <= 0 || x >= bufferWidth) {
-      /* totally out of bounds */
-      n = 0;
-   }
-   else {
-      /* left clip */
-      if (x < 0) {
-         skipPixels = -x;
-         x = 0;
-         n -= skipPixels;
-      }
-      /* right clip */
-      if (x + n > bufferWidth) {
-         GLint dx = x + n - bufferWidth;
-         n -= dx;
-      }
-   }
-
-   *count = n;
-
-   return skipPixels;
-}
-#endif
-
-
 /**
  * Return a span of stencil values from the stencil buffer.
  * Used for glRead/CopyPixels