summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/swrast/s_depth.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/swrast/s_depth.c b/src/mesa/swrast/s_depth.c
index 5de747f236b..0f4fb950602 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)