r300: disable HiZ for PIPE_FUNC_ALWAYS

AMD docs support this:
R5xx Acceleration v1.5 says safest handling for ZFUNC changes is to disable
HiZ except specific LESS/LEQUAL and GREATER/GEQUAL transitions.
ATI OpenGL Programming and Optimization Guide advises avoiding ALWAYS when
trying to benefit from HiZ so that would imply fglrx also disables HiZ
there.

On RV530 this fixes the following dEQPs:
dEQP-GLES2.functional.fragment_ops.interaction.basic_shader.43
dEQP-GLES2.functional.fragment_ops.interaction.basic_shader.74

Fixes: 12dcbd5954 ("r300g: enable Hyper-Z by default on r500")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8093
(cherry picked from commit b0f019f8cf)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
This commit is contained in:
Pavel Ondračka 2026-02-16 13:33:05 +01:00 committed by Eric Engestrom
parent c001485f3b
commit 02f422a145
2 changed files with 5 additions and 1 deletions

View file

@ -3874,7 +3874,7 @@
"description": "r300: disable HiZ for PIPE_FUNC_ALWAYS",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "12dcbd5954676ee32604d82cacbf9a4259967e13",
"notes": null

View file

@ -106,6 +106,10 @@ static bool r300_hiz_allowed(struct r300_context *r300)
/* if depth func is NOTEQUAL */
if (dsa->dsa.depth_func == PIPE_FUNC_NOTEQUAL)
return false;
/* R5xx docs advise avoiding HiZ with ALWAYS comparisons. */
if (dsa->dsa.depth_func == PIPE_FUNC_ALWAYS)
return false;
}
return true;
}