On Dec 2, 2016 4:43 PM, "Jordan Justen" <jordan.l.jus...@intel.com> wrote:
On 2016-12-01 16:19:49, Jason Ekstrand wrote: > On Wed, Nov 30, 2016 at 8:12 PM, Jordan Justen <jordan.l.jus...@intel.com> > wrote: > > > + > > + x_offset_sa = (uint32_t)*x0 * px_size_sa.w + info->tile_x_sa; > > + y_offset_sa = (uint32_t)*y0 * px_size_sa.h + info->tile_y_sa; > > + isl_tiling_get_intratile_offset_sa(dev, info->surf.tiling, > > + info->surf.format, > > info->surf.row_pitch, > > + x_offset_sa, y_offset_sa, > > + &byte_offset, > > + &info->tile_x_sa, &info->tile_y_sa); > > > > If we're going to do things this early, we should just make our own > temporary variables for tile_x/y instead of trying to re-use the ones from > info > Note that blorp_copy may have called surf_convert_to_uncompressed which calls surf_convert_to_single_slice and therefore tile_x/y may already be non-zero. This code handles tile_x/y already being non-zero by adding them into x/y_offset_sa. After discovering the new offset, I adjust the coords such that we can use 0 for the tile offsets. So, we'll eventually need to 0 the offsets. Right. I missed that the compression lowering code might mess things up. In that case, I think this is correct.
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev