[Mesa-dev] [PATCH] mesa: Add a _mesa_problem to document a piglit failure on i965.

Eric Anholt eric at anholt.net
Wed Jun 5 23:45:23 PDT 2013


Having figured out what was going on with piglit fbo-depth copypixels
GL_DEPTH_COMPONENT32F (falling all the way back to swrast on CopyPixels to
a float depth buffer), I'm not inclined to fix the problem currently but
it seems worth saving someone else the debug time.
---
 src/mesa/swrast/s_depth.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/mesa/swrast/s_depth.c b/src/mesa/swrast/s_depth.c
index 5de747f..0f4fb95 100644
--- a/src/mesa/swrast/s_depth.c
+++ b/src/mesa/swrast/s_depth.c
@@ -310,6 +310,12 @@ _swrast_depth_test_span(struct gl_context *ctx, SWspan *span)
       zBufferVals = zStart;
    }
    else {
+      if (_mesa_get_format_datatype(rb->Format) != GL_UNSIGNED_NORMALIZED) {
+         _mesa_problem(ctx, "Incorrectly writing swrast's integer depth "
+                       "values to %s depth buffer",
+                       _mesa_get_format_name(rb->Format));
+      }
+
       /* copy Z buffer values into temp buffer (32-bit Z values) */
       zBufferTemp = malloc(count * sizeof(GLuint));
       if (!zBufferTemp)
-- 
1.8.3.rc0



More information about the mesa-dev mailing list