Re: [Mesa-dev] [PATCH 1/5] st/nine: Disable depth write when nothing gets updated
On 08/03/2019 07:26, Kenneth Graunke wrote: On Thursday, March 7, 2019 2:23:53 PM PST Axel Davy wrote: I don't think we actually need the NEVER check, but it seems fine. Patches 1 and 3 are: Reviewed-by: Kenneth Graunke I'm not really up to speed to review the others. Thanks, I got a review for the other patches from Patrick. Axel ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 1/5] st/nine: Disable depth write when nothing gets updated
On Thursday, March 7, 2019 2:23:53 PM PST Axel Davy wrote: > I do not see any perf impact on radeonsi, but it > seems iris needs this. > It seems something sensible to do. > > Signed-off-by: Axel Davy > Reviewed-by: Timur Kristóf > Tested-by: Andre Heider > --- > It may be argued this kind of stuff should be done in the driver. > I don't mind either way. The ogl state tracker already does that > optimization. > src/gallium/state_trackers/nine/nine_pipe.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/src/gallium/state_trackers/nine/nine_pipe.c > b/src/gallium/state_trackers/nine/nine_pipe.c > index a84a17f551f..b69ddb67113 100644 > --- a/src/gallium/state_trackers/nine/nine_pipe.c > +++ b/src/gallium/state_trackers/nine/nine_pipe.c > @@ -36,8 +36,11 @@ nine_convert_dsa_state(struct > pipe_depth_stencil_alpha_state *dsa_state, > > if (rs[D3DRS_ZENABLE]) { > dsa.depth.enabled = 1; > -dsa.depth.writemask = !!rs[D3DRS_ZWRITEENABLE]; > dsa.depth.func = d3dcmpfunc_to_pipe_func(rs[D3DRS_ZFUNC]); > +/* Disable depth write if no change can occur */ > +dsa.depth.writemask = !!rs[D3DRS_ZWRITEENABLE] && > +dsa.depth.func != PIPE_FUNC_EQUAL && > +dsa.depth.func != PIPE_FUNC_NEVER; > } > > if (rs[D3DRS_STENCILENABLE]) { > I don't think we actually need the NEVER check, but it seems fine. Patches 1 and 3 are: Reviewed-by: Kenneth Graunke I'm not really up to speed to review the others. signature.asc Description: This is a digitally signed message part. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 1/5] st/nine: Disable depth write when nothing gets updated
I do not see any perf impact on radeonsi, but it seems iris needs this. It seems something sensible to do. Signed-off-by: Axel Davy Reviewed-by: Timur Kristóf Tested-by: Andre Heider --- It may be argued this kind of stuff should be done in the driver. I don't mind either way. The ogl state tracker already does that optimization. src/gallium/state_trackers/nine/nine_pipe.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/nine/nine_pipe.c b/src/gallium/state_trackers/nine/nine_pipe.c index a84a17f551f..b69ddb67113 100644 --- a/src/gallium/state_trackers/nine/nine_pipe.c +++ b/src/gallium/state_trackers/nine/nine_pipe.c @@ -36,8 +36,11 @@ nine_convert_dsa_state(struct pipe_depth_stencil_alpha_state *dsa_state, if (rs[D3DRS_ZENABLE]) { dsa.depth.enabled = 1; -dsa.depth.writemask = !!rs[D3DRS_ZWRITEENABLE]; dsa.depth.func = d3dcmpfunc_to_pipe_func(rs[D3DRS_ZFUNC]); +/* Disable depth write if no change can occur */ +dsa.depth.writemask = !!rs[D3DRS_ZWRITEENABLE] && +dsa.depth.func != PIPE_FUNC_EQUAL && +dsa.depth.func != PIPE_FUNC_NEVER; } if (rs[D3DRS_STENCILENABLE]) { -- 2.21.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev