panfrost: Disable early-z when alpha test is used
Fixes rendering artefacts in Minetest on Midgard.
Fixes: 275277a2b4 ("panfrost: Implement alpha testing natively")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9676>
This commit is contained in:
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user