diff options
author | Peter Harris <pharris@opentext.com> | 2020-09-30 16:01:06 -0400 |
---|---|---|
committer | Peter Harris <pharris@opentext.com> | 2020-09-30 16:07:36 -0400 |
commit | 1626e9fa77c0d3715d38ededd43656aa6d942bd9 (patch) | |
tree | 62357d31c18e5f2f77e7d2f2440b505bee667de2 /glx/createcontext.c | |
parent | 96d19e898acb56d8fc6e6febbc6498f67cdd66a0 (diff) | |
download | xserver-1626e9fa77c0d3715d38ededd43656aa6d942bd9.tar.gz |
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>
Diffstat (limited to 'glx/createcontext.c')
-rw-r--r-- | glx/createcontext.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/glx/createcontext.c b/glx/createcontext.c index 63710e145..3c1695bf0 100644 --- a/glx/createcontext.c +++ b/glx/createcontext.c @@ -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); } |