[Mesa-dev] [PATCH 02/23] i965: Use miptree non-aligned dimensions directly for x-tiled

Pohjolainen, Topi topi.pohjolainen at intel.com
Thu Feb 11 07:00:41 UTC 2016


On Tue, Feb 09, 2016 at 12:31:11PM -0800, Ben Widawsky wrote:
> On Mon, Feb 08, 2016 at 06:51:22PM +0200, Topi Pohjolainen wrote:
> > The logic in intel_miptree_create() uses the local copies
> > for 64-byte aligned equivalent but only for stencil buffers which
> > in turn are never x-tiled. This makes the logic a little more
> > explicit and helps to keep subsequent patches easier to read.
> > 
> > Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> > ---
> >  src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> > index 0edd59f..033f4c6 100644
> > --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> > +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> > @@ -698,7 +698,7 @@ intel_miptree_create(struct brw_context *brw,
> >        mt->tiling = I915_TILING_X;
> >        drm_intel_bo_unreference(mt->bo);
> >        mt->bo = drm_intel_bo_alloc_tiled(brw->bufmgr, "miptree",
> > -                                  total_width, total_height, mt->cpp,
> > +                                  mt->total_width, mt->total_height, mt->cpp,
> >                                    &mt->tiling, &pitch, alloc_flags);
> >        mt->pitch = pitch;
> >     }
> 
> Maybe you can just move the stencil alignment down into the if statement and
> make it even better isolated. Right now I think it's a little confusing to have
> the local variables defined and unused except gen < 6 + stencil. Either way:
> Reviewed-by: Ben Widawsky <benjamin.widawsky at intel.com>

Really good call, thanks. Changed also the title to:

i965: Isolate aligned dimensions for stencil only

> 
> 
> BTW, maybe you can see if this still makes sense:
> https://patchwork.freedesktop.org/patch/56792/


More information about the mesa-dev mailing list