Jonathan Marek <jonat...@marek.ca> writes: > Enable earlyZ when alpha test is disabled. > > Signed-off-by: Jonathan Marek <jonat...@marek.ca> > --- > src/gallium/drivers/freedreno/a2xx/fd2_zsa.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_zsa.c > b/src/gallium/drivers/freedreno/a2xx/fd2_zsa.c > index 64b31b677b..d3c19b4450 100644 > --- a/src/gallium/drivers/freedreno/a2xx/fd2_zsa.c > +++ b/src/gallium/drivers/freedreno/a2xx/fd2_zsa.c > @@ -49,7 +49,8 @@ fd2_zsa_state_create(struct pipe_context *pctx, > A2XX_RB_DEPTHCONTROL_ZFUNC(cso->depth.func); /* maps 1:1 */ > > if (cso->depth.enabled) > - so->rb_depthcontrol |= A2XX_RB_DEPTHCONTROL_Z_ENABLE; > + so->rb_depthcontrol |= A2XX_RB_DEPTHCONTROL_Z_ENABLE | > + COND(!cso->alpha.enabled, > A2XX_RB_DEPTHCONTROL_EARLY_Z_ENABLE);
Why when alpha test is disabled? Should you also be checking if the shader does discards? How about if the shader writes Z, is anything preventing early Z then?
signature.asc
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev