Bug 54971

Summary: __glXInitialize can initialize same display multiple times
Product: Mesa Reporter: szunti
Component: GLXAssignee: mesa-dev
Status: RESOLVED MOVED QA Contact:
Severity: normal    
Priority: medium CC: jmuizelaar, julien.isorce
Version: 8.0   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 99831    

Description szunti 2012-09-15 17:27:10 UTC
I saw there is two more related bugs, but they are wrong with the summary and with the component.

I found the cause why manywin fail on my intel:

1) manywin calls XOpenDisplay for every window created, and gets a different pointer every time.
2) __glXInitialize gets called with the different pointers and initialize the same display every time, because it saves the pointers to know which display has been already initialized.

Changing manywin to use XOpenDisplay just once solved the problem, and it works on my intel.
Comment 1 szunti 2012-09-15 17:29:23 UTC
The related bugs are 41736 (mesa xdemo manywin aborts with intel_do_flush_locked error)
and I think 28799 (Shared textures not working in 7.7.1)
Comment 2 Emil Velikov 2017-05-30 10:08:17 UTC
Mostly food for thought if anyone wants to pursue this:
 - Call XOpenDisplay once, as mentioned already.
 - Introduce an X API to compare two Display(s) - unless there's one already.
 - Refcount the Display - implies atomics/locking which is fine since MT users should call XInitThreads, which populates the Lock/Unlock callbacks.
 - Worth checking how the Nvidia binary driver handles this?
Comment 3 Jordan Justen 2017-05-30 17:36:41 UTC
*** Bug 99831 has been marked as a duplicate of this bug. ***
Comment 4 GitLab Migration User 2019-09-18 17:44:27 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/87.

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.