[Mesa-dev] [PATCH 12/12] i965: Implement fast color clears using meta operations

Kristian Høgsberg hoegsberg at gmail.com
Mon Aug 11 22:45:37 PDT 2014


On Mon, Aug 11, 2014 at 08:46:23PM -0400, Ilia Mirkin wrote:
> On Mon, Aug 11, 2014 at 8:29 PM, Kristian Høgsberg <krh at bitplanet.net> wrote:
> > diff --git a/src/mesa/drivers/dri/i965/intel_tex_copy.c b/src/mesa/drivers/dri/i965/intel_tex_copy.c
> > index 97f1569..2456080 100644
> > --- a/src/mesa/drivers/dri/i965/intel_tex_copy.c
> > +++ b/src/mesa/drivers/dri/i965/intel_tex_copy.c
> > @@ -79,6 +79,8 @@ intel_copy_texsubimage(struct brw_context *brw,
> >     int dst_slice = slice + intelImage->base.Base.Face +
> >                     intelImage->base.Base.TexObject->MinLayer;
> >
> > +   _mesa_unlock_texture(&brw->ctx, intelImage->base.Base.TexObject);
> > +
> >     /* blit from src buffer to texture */
> >     if (!intel_miptree_blit(brw,
> >                             irb->mt, irb->mt_level, irb->mt_layer,
> > @@ -89,6 +91,8 @@ intel_copy_texsubimage(struct brw_context *brw,
> >        return false;
> >     }
> >
> > +   _mesa_lock_texture(&brw->ctx, intelImage->base.Base.TexObject);
> > +
> >     return true;
> >  }
> 
> Just happened to notice in some aimless scrolling... you return above,
> so in one path you don't relock the texture, but in the other you do.
> Usually that sort of thing leads to trouble, but perhaps there's
> something going on here which makes it OK. If that's the case,
> probably deserves a comment.

Nope, my bad.  Thanks for catching that.

Kristian


More information about the mesa-dev mailing list