On Wed, Dec 16, 2009 at 02:04:30PM +0100, Michel Dänzer wrote:
> On Tue, 2009-12-15 at 19:04 -0800, Corbin Simpson wrote: 
> > Module: Mesa
> > Branch: master
> > Commit: 417ce06306962a9355cbb35cefcdea1951b0ce85
> > URL:    
> > http://cgit.freedesktop.org/mesa/mesa/commit/?id=417ce06306962a9355cbb35cefcdea1951b0ce85
> > 
> > Author: Marek Olšák <mar...@gmail.com>
> > Date:   Sat Dec 12 23:44:02 2009 +0100
> > 
> > r300g: flush CS if a buffer being deleted is referenced by it
> 
> [...]
> 
> > diff --git a/src/gallium/winsys/drm/radeon/core/radeon_buffer.c 
> > b/src/gallium/winsys/drm/radeon/core/radeon_buffer.c
> > index 2a8daed..76acc99 100644
> > --- a/src/gallium/winsys/drm/radeon/core/radeon_buffer.c
> > +++ b/src/gallium/winsys/drm/radeon/core/radeon_buffer.c
> > @@ -131,6 +132,11 @@ static void radeon_buffer_del(struct pipe_buffer 
> > *buffer)
> >  {
> >      struct radeon_pipe_buffer *radeon_buffer =
> >          (struct radeon_pipe_buffer*)buffer;
> > +    struct radeon_winsys_priv *priv = radeon_buffer->ws->priv;
> > +
> > +    if (radeon_bo_is_referenced_by_cs(radeon_buffer->bo, priv->cs)) {
> > +        priv->cs->space_flush_fn(priv->cs->space_flush_data);
> > +    }
> 
> Why would this be necessary?
> 

Agree with Michel, this should not be necessary, when
a buffer is added to a cs a reference on it is taken
(at least this what the code used to do) thus the bo will
still be around when the cs is latter flush.

Cheers,
Jerome

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to