[Mesa-dev] [PATCH] radeonsi: Since we're not using HiS, use more buffer space for HiZ.

Andreas Hartmetz ahartmetz at gmail.com
Wed Dec 18 06:29:38 PST 2013


If I don't send a new patch this week you can assume that I've dropped
the ball. I am planning to do something soon though...
Your finding from the documentation needs a little context, I
was confused at first. When I made this patch, it looked like stencil
compression was off via DB_RENDER_OVERRIDE, which turns out to do
nothing. So according to the latest information this patch would
disable stencil compression in the first place. Which is only good
if we have no stencil, because stencil compression actually seems to
work otherwise.

On Tuesday 17 December 2013 03:04:38 Marek Olšák wrote:
> After reading some docs, I think it should only be set for depth
> buffers without stencil, because it also disables stencil compression.
> Would you like to make a new patch?
> 
> Marek
> 
> On Fri, Dec 13, 2013 at 4:58 PM, Andreas Hartmetz <ahartmetz at gmail.com> 
wrote:
> > Also move a comment that was in the wrong place.
> > ---
> > 
> >  src/gallium/drivers/radeonsi/si_state.c | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> > 
> > diff --git a/src/gallium/drivers/radeonsi/si_state.c
> > b/src/gallium/drivers/radeonsi/si_state.c index d99cfe8..ee2372f 100644
> > --- a/src/gallium/drivers/radeonsi/si_state.c
> > +++ b/src/gallium/drivers/radeonsi/si_state.c
> > @@ -1751,7 +1751,7 @@ void si_update_db_draw_state(struct r600_context
> > *rctx, struct r600_surface *zsb> 
> >         /* db */
> > 
> > -       /* TODO HiS aka stencil buffer htile goes here */
> > +       /* not using HiS aka stencil buffer htile for now, the benefits
> > are unclear */> 
> >         db_render_override =
> >         S_02800C_FORCE_HIS_ENABLE0(V_02800C_FORCE_DISABLE) |
> >         
> >                              S_02800C_FORCE_HIS_ENABLE1(V_02800C_FORCE_DIS
> >                              ABLE);
> > 
> > @@ -1763,6 +1763,7 @@ void si_update_db_draw_state(struct r600_context
> > *rctx, struct r600_surface *zsb> 
> >                 hiz_enable = rtex->htile_buffer && !level;
> >         
> >         }
> >         if (hiz_enable) {
> > 
> > +               /* Force off means no force, DB_SHADER_CONTROL decides */
> > 
> >                 db_render_override |=
> >                 S_02800C_FORCE_HIZ_ENABLE(V_02800C_FORCE_OFF);
> >         
> >         } else {
> >         
> >                 db_render_override |=
> >                 S_02800C_FORCE_HIZ_ENABLE(V_02800C_FORCE_DISABLE);
> > 
> > @@ -1877,7 +1878,8 @@ static void si_db(struct r600_context *rctx, struct
> > si_pm4_state *pm4,> 
> >         /* use htile only for first level */
> >         if (rtex->htile_buffer && !level) {
> >         
> >                 z_info |= S_028040_TILE_SURFACE_ENABLE(1);
> > 
> > -               /* Force off means no force, DB_SHADER_CONTROL decides */
> > +               /* we are not using HiS for now, so use more of the buffer
> > for HiZ */ +               s_info |= S_028044_TILE_STENCIL_DISABLE(1);
> > 
> >                 uint64_t va = r600_resource_va(&rctx->screen->b.b,
> >                 &rtex->htile_buffer->b.b); db_htile_data_base = va >> 8;
> >                 db_htile_surface = S_028ABC_FULL_CACHE(1);
> > 
> > --
> > 1.8.3.2
> > 
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/mesa-dev



More information about the mesa-dev mailing list