glx: Fix mishandling of shared contexts

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
This commit is contained in:
Ian Romanick 2011-12-05 10:55:20 -08:00
parent 9bc53d8cb0
commit 724176a87a

View File

@ -251,20 +251,20 @@ DoCreateContext(__GLXclientState * cl, GLXContextID gcId,
&shareglxc, &err)) &shareglxc, &err))
return err; return err;
if (shareglxc->isDirect) { /* Page 26 (page 32 of the PDF) of the GLX 1.4 spec says:
/* *
** NOTE: no support for sharing display lists between direct * "The server context state for all sharing contexts must exist
** contexts, even if they are in the same address space. * in a single address space or a BadMatch error is generated."
*/ *
#if 0 * If the share context is indirect, force the new context to also be
/* Disabling this code seems to allow shared display lists * indirect. If the shard context is direct but the new context
* and texture objects to work. We'll leave it disabled for now. * cannot be direct, generate BadMatch.
*/ */
if (shareglxc->isDirect && !isDirect) {
client->errorValue = shareList; client->errorValue = shareList;
return BadMatch; return BadMatch;
#endif
} }
else { else if (!shareglxc->isDirect) {
/* /*
** Create an indirect context regardless of what the client asked ** Create an indirect context regardless of what the client asked
** for; this way we can share display list space with shareList. ** for; this way we can share display list space with shareList.