On Fri, Jan 29, 2010 at 1:44 AM, Cooper Yuan <coopery...@gmail.com> wrote: > Hi Corbin, > I noticed that functions related to buffer management, for instance, > pipe_create, surface_buffer_create, buffer+map, buffer_unmap, have been > defined in both pipe_winsys and pipe_screen. > Actually, we set this function pointer as our implementation, for example, > radeon_surface_buffer_create, only in pipe_winsys. > Would you tell me why there are two function pointer sets in both > pipe_winsys and pipe_screen and what's the intention. > Cooper
(CCing people who can probably answer better than me.) Hi Cooper, All of the buffer management and fence handling used to be only in pipe_winsys back in Gallium 0.1, and the winsys was accessed directly from its pointer in pipe_screen. That's just the way it was. At some point during Gallium 0.2, these got copied to pipe_screen, and a simple helper called u_simple_screen got introduced. u_simple_screen wraps a pipe_winsys and handles the accesses through pipe_screen. So, if you call e.g. buffer_map on the pipe_screen, it calls u_pass_buffer_map which calls buffer_map on the pipe_winsys. I don't know *why* this is. It's made our lives easier though, so I'm not really arguing against it. Take it easy, ~ C. -- Only fools are easily impressed by what is only barely beyond their reach. ~ Unknown Corbin Simpson <mostawesomed...@gmail.com> ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev