Bug 46956 - Selecting 2xAntiAliasing causes Nexuiz to crash "X Error: BadMatch, failed request (X_CreateWindow)"
Summary: Selecting 2xAntiAliasing causes Nexuiz to crash "X Error: BadMatch, failed re...
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/nouveau (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Nouveau Project
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-04 06:01 UTC by Emil Velikov
Modified: 2012-05-29 12:47 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Nexuiz console output (2.91 KB, text/plain)
2012-03-04 06:01 UTC, Emil Velikov
Details
nv50_screen_is_format_supported - debug info (1.61 KB, text/plain)
2012-03-04 06:19 UTC, Emil Velikov
Details
nv50_screen_is_format_supported - debug info, disallow sample_count=2 (39.77 KB, application/octet-stream)
2012-03-04 06:21 UTC, Emil Velikov
Details
Patch to disable MS visuals. (2.17 KB, application/octet-stream)
2012-03-04 08:53 UTC, Christoph Bumiller
Details

Description Emil Velikov 2012-03-04 06:01:43 UTC
Created attachment 58004 [details]
Nexuiz console output

How to:
1. Startup Nexuiz
2. Select Settings>Effects
3. Set Antialiasing to 2x
4. Click Apply immediately
5. Observe the crash

Issue is not present when
* 0xAA, 4xAA mode is selected in Nexuiz
* Software rendering is used - LIBGL_ALWAYS_SOFTWARE=1

Issue is independent on
* kernel version
* direct/indirect rendering - LIBGL_ALWAYS_INDIRECT=1 makes no difference
* Desktop enviroment - Gnome3, fluxbox


Distribution - Arch x86-64
Nexuiz - 2.5.2 Nexuiz Linux 02:51:06 Oct  1 2009 9271 release
kernel - 3.0.22 / 3.2.8 / nouveau-git
libdrm - 2.4.31
Mesa - 95594bae47d8b3302be188e6f0be2d69c5507bb3
xf86-video-nouveau - b0d7f4ddd94154491d04dcb9698d63d61e9240d
Xorg - 1.11.4



The issue was bisected to

commit b2dcf880e8bcd61be59602f5a2d18c77a5fc60c1
Author: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Date:   Mon Jul 11 18:02:27 2011 +0200

    nv50,nvc0: add support for multi-sample resources
Comment 1 Emil Velikov 2012-03-04 06:19:15 UTC
Created attachment 58005 [details]
nv50_screen_is_format_supported - debug info
Comment 2 Emil Velikov 2012-03-04 06:21:40 UTC
Created attachment 58006 [details]
nv50_screen_is_format_supported - debug info, disallow sample_count=2

Nexuiz works great if we return False when sample_count is 2
Comment 3 Emil Velikov 2012-03-04 06:24:32 UTC
IMHO this is a mesa and/or X fault, although I'm out of ideas

I'm happy to test any patches/provide any additional information

Thanks
Emil
Comment 4 Christoph Bumiller 2012-03-04 08:53:54 UTC
Created attachment 58007 [details]
Patch to disable MS visuals.

Does that help ?
Comment 5 Emil Velikov 2012-03-04 12:05:50 UTC
Works like a charm

Note: Nexuiz complains about
"Couldn't get an RGB, Double-buffered, Depth visual"

Although everything works as expected


Thanks
Emil
Comment 6 Emil Velikov 2012-03-14 12:59:19 UTC
The issue exists in xonotic 0.6 (nexuiz fork)

I would not mind filing the bug in xonotic if it is an application issue

Regards
Emil
Comment 7 Emil Velikov 2012-05-29 12:47:09 UTC
Thank you, the issue was resolved by

commit f80c2874eca86a12517fbe2f4c15287edfb4dc89
Author: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Date:   Mon May 21 23:46:11 2012 +0200

    gallium: add st_api feature mask to prevent advertising MS visuals
    
    v2: use a define for the maximum sample count
    v3: also test odd sample counts (r300 supports MS3)
    
    While multisample renderbuffers are supported by mesa, MS visuals
    are not, so we need a way to tell dri/st not to advertise them even
    if the gallium driver does support multisampled surfaces.
    
    Otherwise applications selecting these non-functional visuals would
    run into trouble ...
    
    Reviewed-by: Brian Paul <brianp@vmware.com>


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.