On Tuesday, January 15, 2013 02:05:00 PM Eric Anholt wrote: > > +static void > > +intel_image_set_level_info(__DRIimage *image, struct intel_mipmap_tree > > *mt, + int level, int slice, > > + uint32_t mask_x, uint32_t mask_y) > > +{ > > + image->width = mt->level[level].width; > > + image->height = mt->level[level].height; > > + image->level_x = mt->level[level].level_x; > > + image->level_y = mt->level[level].level_y; > > + image->slice_x_offset = mt->level[level].slice[slice].x_offset; > > + image->slice_y_offset = mt->level[level].slice[slice].y_offset; > > + > > + image->offset = intel_region_get_aligned_offset(mt->region, > > + image->slice_x_offset > > & ~mask_x, + > > image->slice_y_offset & ~mask_y, + > > false); > > +} > > I think you end up double-counting the slice_x/y_offset offset here -- > you have a tile-aligned byte offset from the base of the region (which I > don't think you want at all), and then you reference from > slice_x/y_offset from that offset when texturing. >
Aren't you supposed to reference the x/y offsets (used in SURFACE_STATE[5] in gen6 and gen7) in addition to the surface base address in tiled surfaces when resolving to higher miplevels? Or I am probably missing something? I agree though that the level /slice differentation definitely needs to be dropped as you mentioned earlier. I got an update that only accounts for the x/y offsets to the image. It works correctly as well and I'll post it soon. Abdiel _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev