mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-04 23:28:05 +02:00
glx: set errorValue when returning GLXBadFBConfig
client->errorValue is already set in validGlxFBConfig. Set it in __glXDisp_CreateContextAttribsARB for consistency. Signed-off-by: Peter Harris <pharris@opentext.com>
This commit is contained in:
parent
96d19e898a
commit
1626e9fa77
1 changed files with 7 additions and 2 deletions
|
|
@ -130,12 +130,16 @@ __glXDisp_CreateContextAttribsARB(__GLXclientState * cl, GLbyte * pc)
|
|||
* On the client, the screen comes from the FBConfig, so GLXBadFBConfig
|
||||
* should be issued if the screen is nonsense.
|
||||
*/
|
||||
if (!validGlxScreen(client, req->screen, &glxScreen, &err))
|
||||
if (!validGlxScreen(client, req->screen, &glxScreen, &err)) {
|
||||
client->errorValue = req->fbconfig;
|
||||
return __glXError(GLXBadFBConfig);
|
||||
}
|
||||
|
||||
if (req->fbconfig) {
|
||||
if (!validGlxFBConfig(client, glxScreen, req->fbconfig, &config, &err))
|
||||
if (!validGlxFBConfig(client, glxScreen, req->fbconfig, &config, &err)) {
|
||||
client->errorValue = req->fbconfig;
|
||||
return __glXError(GLXBadFBConfig);
|
||||
}
|
||||
}
|
||||
|
||||
/* Validate the context with which the new context should share resources.
|
||||
|
|
@ -307,6 +311,7 @@ __glXDisp_CreateContextAttribsARB(__GLXclientState * cl, GLbyte * pc)
|
|||
*/
|
||||
if (!req->isDirect && (major_version > 1 || minor_version > 4
|
||||
|| profile == GLX_CONTEXT_ES2_PROFILE_BIT_EXT)) {
|
||||
client->errorValue = req->fbconfig;
|
||||
return __glXError(GLXBadFBConfig);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue