mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 17:00:09 +01:00
mesa/st: Don't set alpha if ALPHA_TEST is lowered
When PIPE_CAP_ALPHA_TEST is zero, the driver does not support alpha testing, so alpha shouldn't be set. In particular, alpha.enable should be zero, since logically alpha testing is not used in the ZSA CSO when it's lowered in the fragment shader key. Fixes failing asserts in kicad, rvgl, etc with Panfrost since6afd4ad. (We could remove the assert in panfrost instead, but logically setting alpha.enabled on top of lowering the shader seems wrong?) As Erik pointed out, this should improve CSO cache behaviour. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reported-by: Icecream95 <ixn@keemail.me> Tested-by: Urja Rannikko <urjaman@gmail.com> Tested-by: Robin Murphy <robin.murphy@arm.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Fixes:6afd4addef("panfrost: Simplify depth/stencil/alpha") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6523>
This commit is contained in:
parent
075e40ea98
commit
c601e730b2
1 changed files with 1 additions and 1 deletions
|
|
@ -149,7 +149,7 @@ st_update_depth_stencil_alpha(struct st_context *st)
|
|||
}
|
||||
}
|
||||
|
||||
if (ctx->Color.AlphaEnabled &&
|
||||
if (ctx->Color.AlphaEnabled && !st->lower_alpha_test &&
|
||||
!(ctx->DrawBuffer->_IntegerBuffers & 0x1)) {
|
||||
dsa->alpha.enabled = 1;
|
||||
dsa->alpha.func = st_compare_func_to_pipe(ctx->Color.AlphaFunc);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue