From 3ae3425c5d2c8ef282003059d637a39b5a3697ad Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Wed, 9 Oct 2024 22:38:15 +0200 Subject: [PATCH] etnaviv: blt: Convert assert to real if etna_try_blt_blit(..) returns if it is possible to do the blit in hardware or not. When building mesa in debug mode this assert(..) is hit many times. Fixes the following piglits on GC7000L: - spec@!opengl 1.0@gl-1.0-scissor-copypixels - spec@nv_conditional_render@copypixels - spec@!opengl 1.1@copypixels-draw-sync - spec@!opengl 1.1@copypixels-sync - spec@!opengl 1.1@depthstencil-default_fb-blit - spec@!opengl 1.1@draw-copypixels-sync - spec@!opengl 1.1@gl-1.1-xor-copypixels Signed-off-by: Christian Gmeiner Reviewed-by: Lucas Stach Part-of: --- src/gallium/drivers/etnaviv/etnaviv_blt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_blt.c b/src/gallium/drivers/etnaviv/etnaviv_blt.c index 049785525ed..29fbe4d7ef8 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_blt.c +++ b/src/gallium/drivers/etnaviv/etnaviv_blt.c @@ -478,7 +478,9 @@ etna_try_blt_blit(struct pipe_context *pctx, * we can't use inplace resolve path with compression */ if (src == dst) { - assert(!memcmp(&blit_info->src, &blit_info->dst, sizeof(blit_info->src))); + if (memcmp(&blit_info->src, &blit_info->dst, sizeof(blit_info->src))) + return false; + if (!etna_resource_level_ts_valid(src_lev)) /* No TS, no worries */ return true; }