public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
* [1.7] Call for Testing - Accelerated GL (AIGLX) for the Cygwin/X  X server
@ 2009-06-30 17:38 Jon TURNEY
  2009-08-10 14:52 ` Jon TURNEY
  0 siblings, 1 reply; 2+ messages in thread
From: Jon TURNEY @ 2009-06-30 17:38 UTC (permalink / raw)
  To: cygwin-xfree


I've made a git repo available on freedesktop.org which contains the work I've
been doing to add hardware-accelerated indirect GLX to the Cygwin/X server,
which is basically a complete rewrite as the code has rusted severely due to
server changes since the last time it was touched.

This can be built using the instructions from my previous mail [1], 
substituting the following git commands to checkout from the cygwin-aiglx branch

$ git clone git://anongit.freedesktop.org/~jturney/xserver
$ cd xserver
$ git checkout -b cygwin-aiglx origin/cygwin-aiglx

As this work is based on the server-1.6-branch (with all the cygwin patches
applied), in order to build this, you will need the various updated
dependencies for that, which have recently been released for Cygwin 1.7

Some mesa demos seem to work for me, I'm really interested in this stage in
discovering if it works at all for other people (especially since I probably 
get to deal with some graphics-card vendor specific issues at some stage). I 
don't think we're at the stage of trying real applications yet :-)



Notes:
* At the moment, testing with remote Linux clients is easier (see below), but
it seems that mesa's libGL prefers to use client-side swrast and transfer the
image to the server using xlib. To force the use of GLX so rendering is
indirect (takes place on the server), and thus can be accelerated, set the 
environment variable LIBGL_ALWAYS_INDIRECT.

* For local clients, Cygwin's current libGL is built --with-driver=x11, but
the code to use GLX in that driver looks like it's been disabled since 2005,
so it *always* uses client-side swrast and transfers the image using xlib, and
there is no option to make it use indirect (server-side) rendering. I have a
separate patch-set to make it possible to build a Cygwin libGL
--with-driver=dri --with-dri-driver=swrast, so that LIBGL_ALWAYS_INDIRECT can
be used, as above.

As the mesa patch-set is really ugly at the moment, and as a convenience,
pointing 1.7's setup.exe at http://www.dronecode.org.uk/cygwin/ should enable
you to install an updated libGL1 package built with those patches (the source 
is also available if you wish to see the gruesome details).  There's also an 
additional mesademos package which contains a large number of GL test programs 
included with the mesa source which are not normally shipped.

* You need to provide the command line option '-wgl' to the X server to turn
on the code which uses native Windows OpenGL to implement GLX.  If you don't 
use this option to turn the code on, you will carry on using software rendering.

* If you have followed the above instructions successfully, 'glxinfo | grep 
OpenGL' should return something mentioning your graphics card vendor.  If it 
mentions Mesa, you still have software rendering

* As before, only multiwindow/mwextwm modes are supported. Software rendering
is always used on screens which do not have 1 native window per X window.
There's no way I know of to tell the native OpenGL to transform/clip to the
portion of the native window occupied by the X window in the single root
native window modes.

* Known issues: pixmap drawables don't have the right contents when read by 
XGetImage.  Don't even think of using this on a multi-monitor system :-)

* Not working: overlays, pixmap textures, multisample do not work, and those 
features should not be offered by the server.  It looks like it should be 
possible to implement some of these using various WGL extensions, but I'd like 
to test the core a bit first...

http://www.dronecode.org.uk/glxgears_is_not_a_benchmark_3.png


[1] http://cygwin.com/ml/cygwin-xfree/2009-06/msg00076.html

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [1.7] Call for Testing - Accelerated GL (AIGLX) for the Cygwin/X   X server
  2009-06-30 17:38 [1.7] Call for Testing - Accelerated GL (AIGLX) for the Cygwin/X X server Jon TURNEY
@ 2009-08-10 14:52 ` Jon TURNEY
  0 siblings, 0 replies; 2+ messages in thread
From: Jon TURNEY @ 2009-08-10 14:52 UTC (permalink / raw)
  To: cygwin-xfree

On 30/06/2009 18:38, Jon TURNEY wrote:
> I've made a git repo available on freedesktop.org which contains the
> work I've been doing to add hardware-accelerated indirect GLX to the Cygwin/X server,

I've updated this git repo with my current work.

For testing purposes, I've also made available an updated XWin.exe and 
cygGl-1.dll binary at ftp://cygwin.com/pub/cygwinx/XWin-aiglx-20090801.tar.bz2

Mesa patches previously alluded to are at [1]

* You need to provide the command line option '-wgl' to the X server to turn 
on the code which uses native Windows OpenGL to implement GLX. If you don't 
use this option to turn the code on, you will carry on using software rendering.

* libGL prefers to use client-side rendering and transfer the image to the 
server using xlib. To force the use of GLX, so rendering is indirect (takes 
place on the server), and thus can be accelerated, you must export the 
environment variable LIBGL_ALWAYS_INDIRECT before starting the client application.

* As before, only multiwindow/mwextwm modes are supported. Software rendering 
is always used on screens which do not have 1 native window per X window. 
There's no way I know of to tell the native OpenGL to transform/clip to the 
portion of the native window occupied by the X window in the single root 
native window modes.

* Applications I've tried
- all mesa demos (glxgears, etc.) seem to run successfully
- glquake works
- blender works
- savi/geomview seems to work
- extremetuxracer just gives a blank window, I don't know why :-(

* Known issues
- some pixmap drawables don't have the right contents when read by XGetImage
- running the glean test 'fpexceptions' on slow visuals (using the Microsoft 
GDI generic renderer) causes the server to segfault.  This doesn't happen with 
a native build of glean so it's probably my fault, but I've no idea why.
- sometimes something bad happens in the server after loading swrast_dri.so 
(i.e. if -wgl is not provided) which causes it to hang whilst forking to start 
xkbcomp)

* Untested
- working with multiple monitors

[1] http://sourceware.org/bugzilla/show_bug.cgi?id=10472

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-08-10 14:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-30 17:38 [1.7] Call for Testing - Accelerated GL (AIGLX) for the Cygwin/X X server Jon TURNEY
2009-08-10 14:52 ` Jon TURNEY

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).