Jose Fonseca wrote:
>
> gallium-screen-context adds a new callback to create a context with a screen. 
> This is very useful when one stacks pipe drivers on top of another (like the 
> trace pipe driver, or perhaps one day the draw module). The problem is the 
> pipe_context::priv and the context_private argument of 
> pipe_screen::flush_frontbuffer. Putting private in pipe_context doesn't work 
> if there are many pipe contexts. Basically, pipe_context::priv must 
> disappear, and context_private argument must be replaced by something 
> sensible (perhaps an abstract drawable pointer). However these are used by 
> GLX/DRI code which I don't understand enough to fix on my own.
>
>   
José,

the drm_api <gallium/include/state-tracker/drm_api.h> has an equivalent 
callback usually exported by a particular winsys wanting to implement 
the drm_api, and that winsys typically call into the pipe driver to 
implement this, so having it exported by the pipe_screen is probably a 
good idea.

The problem with pipe_context::priv is that the state-tracker may export 
a set off callbacks to be used by the winsys, and these callbacks 
typically take an opaque pointer to a per-context structure used by the 
state tracker. For DRI these are flush_frontbuffer and the DRI locking 
functions.

One possible solution to this would be to have a

pipe_screen::context_create(struct pipe_screen *screen, struct 
context_private *priv);

@priv could either be a void * or perhaps a pointer to a structure that 
can be derived from:

A pipe driver wrapping this function would just pass the priv parameter 
on to the next level.

/Thomas


------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to