v3d: Don't enable Early-z with discards when stencil updates are enabled
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

This fixes font rendering artifacts when Chromium/Firefox use Office365
PowerPoint set into fullscreen presentation mode.

Fixes: 5b951bcdd7 ("v3d: Enable Early-Z with discards when depth updates are disabled")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37349>
This commit is contained in:
Jose Maria Casanova Crespo 2025-09-13 00:03:42 +02:00 committed by Marge Bot
parent d1ff7cf445
commit 72d7864c6b

View file

@ -628,8 +628,12 @@ v3d_update_compiled_fs(struct v3d_context *v3d, uint8_t prim_mode)
key->can_earlyz_with_discard = s->info.fs.uses_discard && key->can_earlyz_with_discard = s->info.fs.uses_discard &&
!s->info.fs.uses_fbfetch_output && !s->info.fs.uses_fbfetch_output &&
(!v3d->zsa || !job->zsbuf.texture || (!v3d->zsa || !job->zsbuf.texture ||
!v3d->zsa->base.depth_enabled || ((!v3d->zsa->base.depth_enabled ||
!v3d->zsa->base.depth_writemask) && !v3d->zsa->base.depth_writemask) &&
(!v3d->zsa->base.stencil[0].enabled ||
!v3d->zsa->base.stencil[0].writemask) &&
(!v3d->zsa->base.stencil[1].enabled ||
!v3d->zsa->base.stencil[1].writemask))) &&
!(v3d->active_queries && v3d->current_oq); !(v3d->active_queries && v3d->current_oq);
key->software_blend = v3d->blend->use_software; key->software_blend = v3d->blend->use_software;