[Mesa-dev] [PATCH V2 1/8] i965: Add a helper function intel_get_tile_dims()

Chad Versace chad.versace at intel.com
Wed Sep 16 15:47:42 PDT 2015


On Fri 11 Sep 2015, Ville Syrjälä wrote:

> As it turns out I was just looking at Yf and whatnot from display POV,
> and I came to the conclusion that I'll change the kernel to just have a
> function to return the tile width in bytes based on the cpp passed in,
> and then I can simply compute tile height as 'tile_size / tile_width',
> or tile size in pixels (if needed) as 'tile_width / cpp'
> 
> And what I understood about Yf (the docs are no good IME, at least the
> part I was looking at) is the following:
> 
> cpp w_bytes w_pixels h  aspect
> 1   64      64       64 1
> 2   128     64       32 2
> 4   128     32       32 1
> 8   256     32       16 2
> 16  256     16       16 1
> 
> So all you really need to know is cpp and w_bytes and the rest can all
> be computed as needed.

That table matches my understanding too.

I found the hw doc's discussion of the tiling algorithm (Memory Views
» Address Tiling Function Introduction » Tiling Algorithm) to be
terribly confusing. The bit swizzle table in 2D surface section, though,
is golden (Memory Views » Common Surface Formats » Surface Layout and
Tiling » 2D Surfaces).


More information about the mesa-dev mailing list