Jerome Glisse wrote:
> Hi,
> 
> While working with radeon i stumble on unbalanced mapping of
> rendering buffer. Things is softpipe_map_surfaces get call
> several time by softpipe_draw_elements but a comment in this
> function stipulate that it wants to let surface mapped so
> there is no call to softpipe_unmap_surfaces. So in the
> end softpipe_map_surfaces get call several time and increase
> map refcount of each pipe_surface and softpipe_unmap_surfaces
> is call only once.
> 
> Attached is a proposed patch that change softpipe_map_surfaces
> to only map once the pipe_surface this way surface stay mapped
> accross several softpipe_draw_elements but the softpipe_unmap_surfaces
> become sufficient to unmap surface before swap/displaying buffer
> otherwise the renderbuffer is still maped while swap_buffer is
> called and validation of the buffer timeout.
> 
> Is this a proper fix ? Or how the map should be balanced ?

This is still a bit of a rough area.  We want to avoid 
frequent/redundant mapping/unmapping of buffers and it's sometimes 
tricky to make sure everything's balanced.

Your patch looks reasonable for now.  I'm sure we'll revisit this down 
the road.

-Brian


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to