glx/dri: Fix error generation for invalid GLX_RENDER_TYPE

This needs to throw BadValue.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12006>
This commit is contained in:
Adam Jackson
2021-07-23 18:14:33 -04:00
committed by Marge Bot
parent dd67c079a0
commit 5dba6726f7
3 changed files with 10 additions and 5 deletions

View File

@@ -168,8 +168,10 @@ dri2_create_context_attribs(struct glx_screen *base,
goto error_exit;
/* Check the renderType value */
if (!validate_renderType_against_config(config_base, dca.render_type))
goto error_exit;
if (!validate_renderType_against_config(config_base, dca.render_type)) {
*error = BadValue;
goto error_exit;
}
if (shareList) {
/* We can't share with an indirect context */