<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - glXGetCurrentDisplay() no longer works for FakeGLX contexts?"
href="https://bugs.freedesktop.org/show_bug.cgi?id=100988">100988</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>glXGetCurrentDisplay() no longer works for FakeGLX contexts?
</td>
</tr>
<tr>
<th>Product</th>
<td>Mesa
</td>
</tr>
<tr>
<th>Version</th>
<td>17.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>GLX
</td>
</tr>
<tr>
<th>Assignee</th>
<td>mesa-dev@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>tom.hudson.phd@gmail.com
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>mesa-dev@lists.freedesktop.org
</td>
</tr></table>
<p>
<div>
<pre>I'm trying to upgrade a Mesa 10 installation to Mesa 17. There have been plenty
of changes, but only one breakage that's left me perplexed.
<a href="https://cgit.freedesktop.org/mesa/mesa/commit/?id=c00b250c8061d042d9905e61b9077462ee91008b">https://cgit.freedesktop.org/mesa/mesa/commit/?id=c00b250c8061d042d9905e61b9077462ee91008b</a>
In this CL, Mesa stopped maintaining a __GLXcontext for FakeGLX; there's just
an XMesaContext.
Fake_glXGetCurrentContext() casts the XMesaContext to a __GLXContext and
returns it. Perhaps the reasonable assumption is that a context is an opaque
object.
However, glXGetCurrentDisplay() doesn't respect that assumption; it assumes it
is getting a valid __GLXContext and returns __GLXContext::currentDpy, the first
pointer.
The first pointer in an XMesaContext is *not* a pointer to a Display, and so
any code that relies on this code path seems doomed to disappointment.
This is hitting us in open-source projects based on Ogre, but seems like a
breakage in the public API that other users would have run into in the 3 years
since that commit?</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>