On Wed, 2009-07-15 at 10:29 -0700, Brian Paul wrote:
> José Fonseca wrote:
> > The python gallium state tracker is an excellent debugging tool, but one
> > drawback I noticed on people around me is that it is quite hard to setup
> > and use. The only thing that the python state tracker needs to be told
> > is how to create a pipe_screen/pipe_context for the hardware being
> > debugged, but that implies quite a lot: code changes, rebuilding the
> > python module, messing up with PYTHONPATHs, etc.
> > 
> > Attached is a quick hack that enourmously simplifies using the python
> > state tracker by:
> > 
> > - exporting two functions from the GL driver
> > 
> >     struct pipe_screen * glGetGalliumScreen(void);
> 
> Is this getting a pointer to an existing screen or creating a new one? 
>   If the later, how about glCreateGalliumScreenMESA()?

It is getting an existing one, for two reasons: screens typically imply
a great deal of resources (buffer memory pools, etc); and so that we can
have interoperability between the user of these functions and GL itself.

> 
> >     struct pipe_context *glCreateGalliumContext(void);
> 
> Rename to glCreateGalliumContextMESA() to follow GL extension naming 
> conventions.

Will do.

> > - resolving and using these functions in runtime from the python module
> > 
> > In pratice, what it does is replace the static linking with dynamic
> > linking. The patch is for windows, but the same thing can easily be done
> > for Linux.
> > 
> > I think it is too soon for promising a stable binary interface so I only
> > enable this on DEBUG builds, as it is meant for development only. But
> > this extension might be useful for more things in the future.
> > 
> > A good addition would be a function to present a surface to a drawable:
> > 
> >   void wglGalliumPresent(struct pipe_surface *surface, HWND hwnd);
> > 
> >   void glXGalliumPresent(struct pipe_surface *surface, Window win);
> 
> I have to admit that I haven't used the Python state tracker yet.  How 
> about some docs in mesa/docs/python_state_tracker.html?

There are plain text instructions to use it in
src/gallium/state_trackers/python/README since the beginning, but the
problem was its limited use (just uses softpipe, and integrating with
other pipe drivers required per-case instructions), but now that this
will change I can write up some HTML doc once it is done.

Jose



------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to