Ian Romanick wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I'm trying to add XSHM support for the xlib winsys driver in Gallium,
> and I'm having some difficulties.  I primarily want to check some of my
> assumptions, but any pointers would be welcome.
> 
> DISCLAIMER: I'm not really that familiar with XSHM.
> 
> I'm trying to allocate the XSHM image in xm_buffer_create (xm_winsys.c).
> ~ I added a shm flag, a XShmSegmentInfo structure, and a XImage pointer
> to xm_bufffer.  I copied most of the USE_XSHM code from Mesa's
> xm_buffer.c over to xm_winsys.c.
> 
> If xm_buf->shm is non-zero, xmesa_display_surface_tiles uses the
> xm_buffer's tempImage instead of the XMesaBuffer's tempImage.
> XShmPutImage is also used instead of XPutImage.
> 
> Here are the two immediate problems:
> 
> 1. Does each xm_buffer need an XImage?

That's the way it's done in the original Xlib driver.  If different 
buffers use different X visuals, you'll need different XImages.


> 2. I can't create the XImage in xm_buffer_create because most of the
> information XShmCreateImage requires (e.g., the display) isn't available.

The Display * could be made available via the winsys object.  I don't 
think the Xlib driver currently subclasses pipe_winsys.  So you'll 
probably have to make a subclass that has a Display *.

The winsys code in the xlib driver is still kind of rough and the winsys 
stuff is a little hard to follow in general.

-Brian

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to