[Mesa-dev] [PATCH 05/12] i965/blorp: store x and y offsets in brw_blorp_mip_info.

Paul Berry stereotype441 at gmail.com
Mon Sep 10 12:49:13 PDT 2012


On 7 September 2012 09:32, Eric Anholt <eric at anholt.net> wrote:

> Paul Berry <stereotype441 at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120910/b04b7792/attachment.html>


More information about the mesa-dev mailing list