This is the mail archive of the cygwin-xfree mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: X hardware acceleration still flaky?


Hi Jon,

the lack of flickering and lack of double-buffering you describe sounds like geomview being run without opengl, either  because it has been compiled without opengl (still the default if you just type ./configure, I believe), or because
geomview -noopengl
was issued. Did you build Geomview with --with-opengl, and have you turned on a texturemapped Earth showing coloured continents? (If geomview issues a 'Shared memory unavailable, using fallback display method' to stderr at launch, it's not using OpenGL.)

When geomview is run with opengl, I see consistent flickering at every single animation stage, not just when dragging with the mouse. -noopengl is much smoother. (I'm using a fairly high-end Core2Duo with graphic card.)

I've now realised that my crashes only occur when I use the second screen attached to my machine. (Mea culpa - I take multiple screens for granted.) When geomview's camera is on the root (laptop) screen, X doesn't crash, even when texturemapping, and I get slow but flickery animations of texturemapped Earths. Move it over to the second screen and do something that invokes texturemapping like turning on a detailed Earth - goodbye, Mr X.

It's a little odd that XWin.0.log doesn't explicitly call out the two screens as such - it knows the primary (laptop) monitor is 1280 by 800, and that DIB has a height of 1824 because there's a 1280x1024 screen positioned above it.

$ less /var/log XWin.0.log
Welcome to the XWin X Server
Vendor: The Cygwin/X Project
Release: 1.8.0.0 (10800000)
Build Date: 2010-04-02

Contact: cygwin-xfree@cygwin.com
XWin was started with the following command line:

X :0 -multiwindow 

ddxProcessArgument - Initializing default screens
winInitializeDefaultScreens - primary monitor w 1280 h 800
winInitializeDefaultScreens - native DPI x 96 y 96
winInitializeDefaultScreens - Returning
[534027.271] winValidateArgs - g_iNumScreens: 1 iMaxConsecutiveScreen: 1
[534027.286] (II) xorg.conf is not supported
[534027.286] (II) See http://x.cygwin.com/docs/faq/cygwin-x-faq.html for more information
[534027.286] LoadPreferences: /home/lw0011/.XWinrc not found
[534027.286] LoadPreferences: Loading /etc/X11/system.XWinrc
[534027.286] LoadPreferences: Done parsing the configuration file...
[534027.286] winGetDisplay: DISPLAY=:0.0
[534027.302] winDetectSupportedEngines - Windows NT/2000/XP
[534027.380] winDetectSupportedEngines - DirectDraw installed
[534027.380] winDetectSupportedEngines - DirectDraw4 installed
[534027.380] winDetectSupportedEngines - Returning, supported engines 00000007
[534027.380] winSetEngine - Multi Window or Rootless => ShadowGDI
[534027.380] winAdjustVideoModeShadowGDI - Using Windows display depth of 32 bits per pixel
[534027.458] winAllocateFBShadowGDI - Creating DIB with width: 1280 height: 1824 depth: 32
[534027.458] winFinishScreenInitFB - Masks: 00ff0000 0000ff00 000000ff
[534027.458] winInitVisualsShadowGDI - Masks 00ff0000 0000ff00 000000ff BPRGB 8 d 24 bpp 32
[534027.458] null screen fn ReparentWindow
[534027.458] null screen fn RestackWindow
[534027.458] InitQueue - Calling pthread_mutex_init
[534027.458] InitQueue - pthread_mutex_init returned
[534027.458] InitQueue - Calling pthread_cond_init
[534027.458] InitQueue - pthread_cond_init returned
[534027.458] winInitMultiWindowWM - Hello
[534027.474] winInitMultiWindowWM - Calling pthread_mutex_lock ()
 
Is it still useful to give you a bt from gdb?

thanks,

L.
-----Original Message-----
From: Jon TURNEY [mailto:jon.turney@dronecode.org.uk] 
Sent: 09 August 2010 13:43
To: cygwin-xfree@cygwin.com
Cc: Wood L Dr (Electronic Eng)
Subject: Re: X hardware acceleration still flaky?
Importance: High

On 08/08/2010 15:57, L.Wood@surrey.ac.uk wrote:
> Hi Jon,
>
> I just downloaded the current X server and its libraries in the Cygwin distro; the xwin-gl allusion came from the previous thread I mentioned.

So, the current problem is with OpenGL on X.

"OpenGL" and "hardware acceleration" are not synonyms.

Testing with the experimental AIGLX code is moot if it doesn't work with the current X server.

> Compiling geomview 1.9.4 --with-opengl is straightforward (that's one improvement on pre-7.4 X; configure doesn't get confused about X library locations and building is easier). I then tried running savi with geomview:
> - using OpenGL. 30 seconds of slow flickering (slow enough to be the software rendering that you alluded to?), then the X server consistently crashes, even before I've had a chance to turn on texturemapping...

I've built savi and geomview, and I'm afraid I can't reproduce this crash.

There's no flickering unless I use the mouse to rotate the planet, which almost looks like it's not using double-buffering for some reason, as the whole frame looks like it's being drawn into the front buffer...


I've rebuilt X server 1.8.2-1 with debugging symbols and uploaded it at [1], can you run that under gdb and reproduce your crash and post a backtrace, please.

[1] ftp://cygwin.com/pub/cygwinx/XWin.20100808-git-66f3680cb47fbd09.exe.bz2

> - forcing internal geomview software rendering using geomview -noopengl -run ../savi1.4.3/savi $* . Works, but is rather stately. No texturemapping support, obviously. Less slow than the brief opengl attempt, though, which figures given that doing OpenGL in software imposes more layers of overhead?
>
> That's the status from testing with what cygwin ships at the moment. I haven't tried your older binaries. Please let me know when you get to another test release, and I'll try it out.
>
> thanks,
>
> L.
>
> SaVi satellite constellation visualization http://savi.sf.net/
>
> On 8 Aug 2010, at 13:57, Jon TURNEY wrote:
>
>> On 08/08/2010 10:18, L.Wood@surrey.ac.uk wrote:
>>> Well, it's been eighteen months since I last asked:
>>> http://www.cygwin.com/ml/cygwin-xfree/2009-02/msg00259.html
>>
>>> so I attempted to use opengl hardware acceleration with Cygwin and XFree 7.4, using Geomview (www.geomview.org) as the test application on an uptodate Cygwin 1.7 install.
>>>
>>> Lots of flickering for about thirty seconds (of correct output), but then the X server crashes. So, no visible change over previous. It's still a regression on pre-7.4.
>>
>> I'm not sure what you were testing here, but I can't see how it could 
>> be hardware AIGLX.
>>
>> xwin-gl is obsolete, an empty package since R7.4 [1], so if you are 
>> running that somehow, it must be an old version, which I am surprised works at all.
>>
>> Alternatively, you are using xwin with software rendering, and your 
>> application exposes some bug in the Xserver which makes it crash.
>>
>>
>> I am happy to work with you to resolve these issues.
>>
>>> Has any work been attempted on improving hardware acceleration in xwin-gl?
>>
>> Yes, this is something I have been working on in my copious free time(TM):
>>
>> http://cygwin.com/ml/cygwin-xfree/2009-06/msg00088.html
>> http://sourceware.org/ml/cygwin-xfree/2009-08/msg00021.html
>> http://x.cygwin.com/devel/todo.html
>>
>> I hope you'll note that savi is one of the applications I've been testing with.
>>
>> However, given the lack of response so far, it seems that you and me 
>> are the only 2 people interested in working AIGLX for XWin :-)
>>
>> I wouldn't suggest testing with those binaries at this stage, as I've 
>> moved on a bit.  I hope to shortly make another test release 
>> containing AIGLX based on the upcoming Xserver 1.9, and I would very 
>> much appreciate some testing of the AIGLX functionality in that, when it is available.
>>
>> [1] http://cygwin.com/cgi-bin2/package-grep.cgi?grep=xwin-gl

--
Jon TURNEY
Volunteer Cygwin/X X Server maintainer

--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]