Bug 47478 - [wine] GLX_DONT_CARE does not work for GLX_DRAWABLE_TYPE or GLX_RENDER_TYPE
Summary: [wine] GLX_DONT_CARE does not work for GLX_DRAWABLE_TYPE or GLX_RENDER_TYPE
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Ian Romanick
QA Contact:
URL:
Whiteboard:
Keywords:
: 62999 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-03-18 10:55 UTC by Sven Arvidsson
Modified: 2013-04-05 21:36 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Sven Arvidsson 2012-03-18 10:55:54 UTC
Some OpenGL games running in Wine (such as the multiplayer part of Wolfenstein) does not work with Mesa drivers. 

The problem is apparently that Mesa doesn't like Wine passing 0xffffffff as GLX_DRAWABLE_TYPE. There's a longer explanation of the issue here:
http://bugs.winehq.org/show_bug.cgi?id=26763

I tried using apitrace to trace the game with fglrx but the resulting trace runs with Mesa drivers so it can't be used to reproduce the bug.
Comment 1 Ian Romanick 2012-03-20 11:25:38 UTC
You are correct.  GLX_DONT_CARE (0xffffffff) should be handled for these cases.  Page 17 (page 23 of the PDF) of the GLX 1.4 spec says:

    "If GLX DONT CARE is specified as an attribute value, then the
    attribute will not be checked. GLX DONT CARE may be specified
    for all attributes except GLX LEVEL."
Comment 2 Ian Romanick 2012-03-22 12:30:01 UTC
I just posted a piglit test that reproduces this issue.

http://lists.freedesktop.org/archives/piglit/2012-March/002132.html

Once that test gets into piglit, I'll post a proposed fix.
Comment 3 gurketsky 2013-04-01 18:34:07 UTC
*** Bug 62999 has been marked as a duplicate of this bug. ***
Comment 4 Alexander Monakov 2013-04-01 19:18:32 UTC
*** Bug 62999 has been marked as a duplicate of this bug. ***
Comment 5 Alexander Monakov 2013-04-01 19:20:05 UTC
Patch: http://lists.freedesktop.org/archives/mesa-dev/2013-April/036991.html
Comment 6 Jose Fonseca 2013-04-05 08:12:24 UTC
(In reply to comment #0)
> I tried using apitrace to trace the game with fglrx but the resulting trace
> runs with Mesa drivers so it can't be used to reproduce the bug.

apitrace doesn't replay GLX/WGL/CGL/EGL calls faithfully -- it does a very rough emulation using whatever is available so one can replay traces from different OSes -- so in general it can't be used to reproduce bugs in these APIs, only on proper GL, GL ES.
Comment 7 Ian Romanick 2013-04-05 21:36:17 UTC
This should be fixed by the following commit on Mesa master.  It should get picked over to the 9.1 branch next week.

commit 9cda3560048e8595d3ffa315b76487f4479bff2c
Author: Alexander Monakov <amonakov@ispras.ru>
Date:   Tue Apr 2 01:38:27 2013 +0400

    Honor GLX_DONT_CARE in MATCH_MASK
    
    NOTE: This is a candidate for stable branches.
    
    Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47478
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=62999
    Bugzilla: http://bugs.winehq.org/show_bug.cgi?id=26763


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.