Commit 1e29f3ea authored by Adam Jackson's avatar Adam Jackson 🥃

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: Michel Dänzer's avatarMichel Dänzer <mdaenzer@redhat.com>
Signed-off-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
parent b56e5010
......@@ -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;
}
}
/*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment