mesa: Replace MESA_FORMAT_L8A8/A8L8 UNORM/SNORM/SRGB with an array format.
[mesa.git] / src / mesa / swrast / s_depth.c
index 4b9640d319025f4aff8ee24db9e825e06d5863e0..6bc737c79568e16e3852caac7b39f0d22c16f18d 100644 (file)
@@ -262,7 +262,7 @@ put_z32_values(struct gl_context *ctx, struct gl_renderbuffer *rb,
       }
    }
    else {
-      gl_pack_uint_z_func packZ = _mesa_get_pack_uint_z_func(rb->Format);
+      mesa_pack_uint_z_func packZ = _mesa_get_pack_uint_z_func(rb->Format);
       const GLint bpp = _mesa_get_format_bytes(rb->Format);
       const GLint rowStride = srb->RowStride;
       for (i = 0; i < count; i++) {
@@ -310,12 +310,6 @@ _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)
@@ -385,7 +379,7 @@ _swrast_depth_test_span(struct gl_context *ctx, SWspan *span)
       }
       else {
          /* horizontal row */
-         gl_pack_uint_z_func packZ = _mesa_get_pack_uint_z_func(rb->Format);
+         mesa_pack_uint_z_func packZ = _mesa_get_pack_uint_z_func(rb->Format);
          GLubyte *dst = zStart;
          GLuint i;
          for (i = 0; i < count; i++) {