Skip to content
Snippets Groups Projects
Commit ae62fb37 authored by Icecream95's avatar Icecream95 Committed by Marge Bot
Browse files

panfrost: Disable early-z when alpha test is used


Fixes rendering artefacts in Minetest on Midgard.

Fixes: 275277a2 ("panfrost: Implement alpha testing natively")
Reviewed-by: default avatarAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <mesa/mesa!9676>
parent 9d947127
No related branches found
No related tags found
Loading
......@@ -490,7 +490,8 @@ panfrost_prepare_midgard_fs_state(struct panfrost_context *ctx,
/* Reasons to disable early-Z from a shader perspective */
bool late_z = fs->info.fs.can_discard || fs->info.writes_global ||
fs->info.fs.writes_depth || fs->info.fs.writes_stencil;
fs->info.fs.writes_depth || fs->info.fs.writes_stencil ||
(zsa->alpha_func != MALI_FUNC_ALWAYS);
/* If either depth or stencil is enabled, discard matters */
bool zs_enabled =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment