On Tue 12 Jul 2016, Jason Ekstrand wrote: > On Tue, Jul 12, 2016 at 11:50 AM, Chad Versace <chad.vers...@intel.com> > wrote:
> > 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.vers...@intel.com> _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev