On Tue, 06 Dec 2011 10:43:15 -0800, Chad Versace <chad.vers...@linux.intel.com> wrote: > On 12/05/2011 11:42 AM, Eric Anholt wrote:
> > --- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c > > +++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c > > @@ -808,8 +808,9 @@ intel_miptree_map_depthstencil(struct intel_context > > *intel, > > ptrdiff_t s_offset = intel_offset_S8(s_mt->region->pitch, > > x + s_image_x + map->x, > > y + s_image_y + map->y); > > - ptrdiff_t z_offset = ((y + z_image_y) * z_mt->region->pitch + > > - (x + z_image_x)); > > + ptrdiff_t z_offset = (((y + map->y + z_image_y) * > > + z_mt->region->pitch) + > > + (x + map->x + z_image_x)); > > uint8_t s = s_map[s_offset]; > > uint32_t z = z_map[z_offset]; > > I think you intended to squash this hunk into the previous patch. But the > hunk is > unnecessary anyway, because it just adds redundant parens. The addition of map->x/y isn't redundant. How about folding this hunk into HEAD~1 instead: @@ -805,12 +805,12 @@ intel_miptree_map_depthstencil(struct intel_context *intel for (uint32_t y = 0; y < map->h; y++) { for (uint32_t x = 0; x < map->w; x++) { + int map_x = map->x + x, map_y = map->y + y; ptrdiff_t s_offset = intel_offset_S8(s_mt->region->pitch, - x + s_image_x + map->x, - y + s_image_y + map->y); - ptrdiff_t z_offset = (((y + map->y + z_image_y) * - z_mt->region->pitch) + - (x + map->x + z_image_x)); + map_x + s_image_x, + map_y + s_image_y); + ptrdiff_t z_offset = ((map_y + z_image_y) * z_mt->region->pitch + + (map_x + z_image_x)); uint8_t s = s_map[s_offset]; uint32_t z = z_map[z_offset];
pgp431WwXfwrI.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev