Mesa (staging/19.1): u_blitter: don't fail mipmap generation for depth formats containing stencil

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 4 15:08:42 UTC 2019


Module: Mesa
Branch: staging/19.1
Commit: 4524f09cc098bb8b3ca22b2c9960a8c3e92e04af
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4524f09cc098bb8b3ca22b2c9960a8c3e92e04af

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Mon May 27 18:47:31 2019 -0400

u_blitter: don't fail mipmap generation for depth formats containing stencil

Bugzilla: https://bugzilla.freedesktop.org/show_bug.cgi?id=109754

Cc: 19.0 19.1 <mesa-stable at lists.freedesktop.org>
Tested-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
(cherry picked from commit 4b11ed443b85e4fcddc5d0ef60dec096ecdb951e)

---

 src/gallium/auxiliary/util/u_blitter.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c
index e19fde9873d..3dc49cd0958 100644
--- a/src/gallium/auxiliary/util/u_blitter.c
+++ b/src/gallium/auxiliary/util/u_blitter.c
@@ -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;
 




More information about the mesa-commit mailing list