On 7 September 2012 09:32, Eric Anholt <e...@anholt.net> wrote: > Paul Berry <stereotype...@gmail.com> writes: > > > Currently, gen{6,7}_blorp_emit_surface_state assumes that the src and > > dst surfaces are mapped to miplevel 0 and layer 0 (thus no surface > > offset is required). This is a bug, since the user might try to blit > > to and from levels/layers other than 0. > > > diff --git a/src/mesa/drivers/dri/i965/brw_blorp.cpp > b/src/mesa/drivers/dri/i965/brw_blorp.cpp > > index 7322a04..6acc591 100644 > > --- a/src/mesa/drivers/dri/i965/brw_blorp.cpp > > +++ b/src/mesa/drivers/dri/i965/brw_blorp.cpp > > > this->mt = mt; > > - this->level = level; > > - this->layer = layer; > > this->width = mt->level[level].width; > > this->height = mt->level[level].height; > > + > > + /* Construct a dummy renderbuffer just to extract tile offsets. */ > > + struct intel_renderbuffer rb; > > + rb.mt = mt; > > + rb.mt_level = level; > > + rb.mt_layer = layer; > > + intel_renderbuffer_set_draw_offset(&rb); > > + x_offset = rb.draw_x; > > + y_offset = rb.draw_y; > > I know you're just moving the code here, but as a fixup, please just use > intel_miptree_get_image_offset directly. >
Ok, I will do that before pushing.
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev