summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2011-10-13 09:56:34 -0700
committerEric Anholt <[email protected]>2011-11-03 23:29:53 -0700
commit91b2ce85d1e1914b7199b45f4f21a3e36e2e21e1 (patch)
tree7f5a7bf37f4f359cbcab227c882c5d510d4a1397
parent345fc4161967f15fb80848cd7dc6a63100f8c12d (diff)
swrast: Remove dead _swrast_read_depth_span_uint().
All the code using it is converted to MapRenderbuffer and the core unpack functions. Reviewed-by: Brian Paul <[email protected]>
-rw-r--r--src/mesa/swrast/s_depth.c83
-rw-r--r--src/mesa/swrast/s_depth.h5
2 files changed, 0 insertions, 88 deletions
diff --git a/src/mesa/swrast/s_depth.c b/src/mesa/swrast/s_depth.c
index 58440cb97bd..6ffa0a31052 100644
--- a/src/mesa/swrast/s_depth.c
+++ b/src/mesa/swrast/s_depth.c
@@ -1313,89 +1313,6 @@ _swrast_read_depth_span_float( struct gl_context *ctx, struct gl_renderbuffer *r
}
}
-
-/**
- * As above, but return 32-bit GLuint values.
- */
-void
-_swrast_read_depth_span_uint( struct gl_context *ctx, struct gl_renderbuffer *rb,
- GLint n, GLint x, GLint y, GLuint depth[] )
-{
- GLuint depthBits;
-
- if (!rb) {
- /* really only doing this to prevent FP exceptions later */
- memset(depth, 0, n * sizeof(GLuint));
- return;
- }
-
- depthBits = _mesa_get_format_bits(rb->Format, GL_DEPTH_BITS);
-
- ASSERT(rb->_BaseFormat == GL_DEPTH_COMPONENT);
-
- if (y < 0 || y >= (GLint) rb->Height ||
- x + n <= 0 || x >= (GLint) rb->Width) {
- /* span is completely outside framebuffer */
- memset(depth, 0, n * sizeof(GLfloat));
- return;
- }
-
- if (x < 0) {
- GLint dx = -x;
- GLint i;
- for (i = 0; i < dx; i++)
- depth[i] = 0;
- x = 0;
- n -= dx;
- depth += dx;
- }
- if (x + n > (GLint) rb->Width) {
- GLint dx = x + n - (GLint) rb->Width;
- GLint i;
- for (i = 0; i < dx; i++)
- depth[n - i - 1] = 0;
- n -= dx;
- }
- if (n <= 0) {
- return;
- }
-
- if (rb->DataType == GL_UNSIGNED_INT) {
- rb->GetRow(ctx, rb, n, x, y, depth);
- if (depthBits < 32) {
- GLuint shift = 32 - depthBits;
- GLint i;
- for (i = 0; i < n; i++) {
- GLuint z = depth[i];
- depth[i] = z << shift; /* XXX lsb bits? */
- }
- }
- }
- else if (rb->DataType == GL_UNSIGNED_SHORT) {
- GLushort temp[MAX_WIDTH];
- GLint i;
- rb->GetRow(ctx, rb, n, x, y, temp);
- if (depthBits == 16) {
- for (i = 0; i < n; i++) {
- GLuint z = temp[i];
- depth[i] = (z << 16) | z;
- }
- }
- else {
- GLuint shift = 16 - depthBits;
- for (i = 0; i < n; i++) {
- GLuint z = temp[i];
- depth[i] = (z << (shift + 16)) | (z << shift); /* XXX lsb bits? */
- }
- }
- }
- else {
- _mesa_problem(ctx, "Invalid depth renderbuffer data type");
- }
-}
-
-
-
/**
* Clear the given z/depth renderbuffer.
*/
diff --git a/src/mesa/swrast/s_depth.h b/src/mesa/swrast/s_depth.h
index 8d5cdfaa006..2caea82e081 100644
--- a/src/mesa/swrast/s_depth.h
+++ b/src/mesa/swrast/s_depth.h
@@ -48,11 +48,6 @@ extern void
_swrast_read_depth_span_float( struct gl_context *ctx, struct gl_renderbuffer *rb,
GLint n, GLint x, GLint y, GLfloat depth[] );
-
-extern void
-_swrast_read_depth_span_uint( struct gl_context *ctx, struct gl_renderbuffer *rb,
- GLint n, GLint x, GLint y, GLuint depth[] );
-
extern void
_swrast_clear_depth_buffer( struct gl_context *ctx, struct gl_renderbuffer *rb );