u_blitter: don't fail mipmap generation for depth formats containing stencil
authorMarek Olšák <marek.olsak@amd.com>
Mon, 27 May 2019 22:47:31 +0000 (18:47 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 3 Jun 2019 18:32:47 +0000 (14:32 -0400)
Bugzilla: https://bugzilla.freedesktop.org/show_bug.cgi?id=109754

Cc: 19.0 19.1 <mesa-stable@lists.freedesktop.org>
Tested-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
src/gallium/auxiliary/util/u_blitter.c

index e19fde9..3dc49cd 100644 (file)
@@ -2059,7 +2059,8 @@ void util_blitter_generate_mipmap(struct blitter_context *blitter,
       target = PIPE_TEXTURE_2D_ARRAY;
 
    assert(tex->nr_samples <= 1);
-   assert(!util_format_has_stencil(desc));
+   /* Disallow stencil formats without depth. */
+   assert(!util_format_has_stencil(desc) || util_format_has_depth(desc));
 
    is_depth = desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS;