[Mesa-dev] [PATCH 03/14] isl: Rework the way we handle surface padding
chad.versace at intel.com
Tue Jul 12 19:32:56 UTC 2016
On Tue 12 Jul 2016, Jason Ekstrand wrote:
> On Tue, Jul 12, 2016 at 11:50 AM, Chad Versace <chad.versace at intel.com>
> > Here...
> > > + uint32_t pad_bytes;
> > > + isl_apply_surface_padding(dev, info, &tile_info, &total_h_el,
> > &pad_bytes);
> > > +
> > > + /* Be sloppy. Align any leftover padding to a row boundary. */
> > > + total_h_el += isl_align_div_npot(pad_bytes, row_pitch);
> > ...to here feels weird. isl_apply_surface_padding() applies some
> > padding, but not all of it. It expects the caller to apply additional
> > padding itself using pad_bytes. But isl_apply_surface_padding() has
> > already calculated pad_bytes, so why doesn't the function apply the
> > pad_bytes padding for the caller?
> Keep reading. I think the correct thing would probably be to have it
> simply compute padding and make the caller do all the adding.
Ah, I see it in patch 4. I'd eventually like to see some of the
calculations in patch 4 shoved into a helper function, but meh.
Patch 3 is
Reviewed-by: Chad Versace <chad.versace at intel.com>
More information about the mesa-dev