Summary: | PATCH: glXChooseVisual behavior change causes SDL app using a stencil buffer to fail | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | xorg | Reporter: | Hans de Goede <jwrdegoede> | ||||||
Component: | Server/Ext/DRI | Assignee: | Xorg Project Team <xorg-team> | ||||||
Status: | RESOLVED FIXED | QA Contact: | Xorg Project Team <xorg-team> | ||||||
Severity: | normal | ||||||||
Priority: | medium | CC: | krh | ||||||
Version: | git | ||||||||
Hardware: | Other | ||||||||
OS: | All | ||||||||
Whiteboard: | |||||||||
i915 platform: | i915 features: | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 10101 | ||||||||
Attachments: |
|
Description
Hans de Goede
2008-04-15 01:43:28 UTC
It just needs to be fixed to include stencil bits in the visuals when appropriate. (In reply to comment #1) > It just needs to be fixed to include stencil bits in the visuals when > appropriate. > I'm happy with any fix for this, if fixing it by adding stencil bits to the real visuals is the proper fix I'm all for it. I'm even willing to try and write a patch for this, how does one know / should the code know, when its appropriate to add stencil bits? Okay, upstream has made the following comment with regards to this bug: "It just needs to be fixed to include stencil bits in the visuals when appropriate." Some more investigation from my side has learned that on my intel graphics machine not only the fbconfigs but also the normal visuals report stencil bits (and this makes stencil using SDL apps work), here is the relevant output of glxinfo: 3 GLX Visuals visual x bf lv rg d st colorbuffer ax dp st accumbuffer ms cav id dep cl sp sz l ci b ro r g b a bf th cl r g b a ns b eat ---------------------------------------------------------------------- 0x21 24 tc 0 32 0 r y . 8 8 8 8 0 24 8 0 0 0 0 0 0 None 0x22 24 dc 0 32 0 r y . 8 8 8 8 0 24 8 0 0 0 0 0 0 None 0x60 32 tc 0 32 0 r . . 8 8 8 8 0 0 0 0 0 0 0 0 0 None Where on my ati r300, x86_64 system, the stcl column always reports 0 for the visuals, and only reports stcl bits in the fbconfigs. I've investigated the mesa code, and the reported stencil bits are gotten from the X-server, and I assume through the X-server from the X-server driver, so I'm changing the components and assignee to match. Fixing component and making a blocker for 7.4, as this is a server regression from 1.4. Created attachment 16029 [details] [review] PATCH: prefer glxvisuals with stencil buffer for default visuals The problem sits in GL/glx/glxscreens.c of the server. There the first fbconfig which has a depthbuffer > 0 and doublebuf is choosen when attaching fbconfigs to the standard Xvisuals, indepenent of stencil bits, this happens to work ok on intel as there all fbconfigs with a depthbuffer > 0 also have stencil bits. This patch fixes this by first trying to get a fbconfig for default X visuals with both stencilbuf, depthbuf and doublebuffering, and if that fails fallback to trying to get one with only a depthbuf and doublebuffering. Thanks, that a great patch, committed. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.