[Mesa-dev] [PATCH] u_blitter: don't fail mipmap generation for depth formats containing stencil
Marek Olšák
maraeo at gmail.com
Mon May 27 23:41:36 UTC 2019
From: Marek Olšák <marek.olsak at amd.com>
Bugzilla: https://bugzilla.freedesktop.org/show_bug.cgi?id=109754
Cc: 19.0 19.1 <mesa-stable at lists.freedesktop.org>
---
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
@@ -2052,21 +2052,22 @@ void util_blitter_generate_mipmap(struct blitter_context *blitter,
const struct util_format_description *desc =
util_format_description(format);
unsigned src_level;
unsigned target = tex->target;
if (ctx->cube_as_2darray &&
(target == PIPE_TEXTURE_CUBE || target == PIPE_TEXTURE_CUBE_ARRAY))
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;
/* Check whether the states are properly saved. */
util_blitter_set_running_flag(blitter);
blitter_check_saved_vertex_states(ctx);
blitter_check_saved_fragment_states(ctx);
blitter_check_saved_textures(ctx);
blitter_check_saved_fb_state(ctx);
blitter_disable_render_cond(ctx);
--
2.17.1
More information about the mesa-dev
mailing list