mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-25 07:10:05 +01:00
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 <mdaenzer@redhat.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
b56e501092
commit
1e29f3ea3e
1 changed files with 9 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue