Skip to content
Snippets Groups Projects
Commit 1e29f3ea authored by Adam Jackson's avatar Adam Jackson :headphones:
Browse files

glx: Require screens match for share contexts for classic CreateContext


The GLX_ARB_create_context path (with which this should all get unified,
someday, sigh) already enforces this, but the classic path does not.
It's effectively assumed by the implementation anyway, so let's enforce
it rather than do crashy things.

Reviewed-by: default avatarMichel Dänzer <mdaenzer@redhat.com>
Signed-off-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
parent b56e5010
No related branches found
No related tags found
1 merge request!403glx: Require screens match for share contexts for classic CreateContext
......@@ -284,6 +284,15 @@ DoCreateContext(__GLXclientState * cl, GLXContextID gcId,
*/
isDirect = GL_FALSE;
}
/* Core GLX doesn't explicitly require this, but GLX_ARB_create_context
* does (see glx/createcontext.c), and it's assumed by our
* implementation anyway, so let's be consistent about it.
*/
if (shareglxc->pGlxScreen != pGlxScreen) {
client->errorValue = shareglxc->pGlxScreen->pScreen->myNum;
return BadMatch;
}
}
/*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment