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:
@@ -168,8 +168,10 @@ dri2_create_context_attribs(struct glx_screen *base,
|
|||||||
goto error_exit;
|
goto error_exit;
|
||||||
|
|
||||||
/* Check the renderType value */
|
/* Check the renderType value */
|
||||||
if (!validate_renderType_against_config(config_base, dca.render_type))
|
if (!validate_renderType_against_config(config_base, dca.render_type)) {
|
||||||
goto error_exit;
|
*error = BadValue;
|
||||||
|
goto error_exit;
|
||||||
|
}
|
||||||
|
|
||||||
if (shareList) {
|
if (shareList) {
|
||||||
/* We can't share with an indirect context */
|
/* We can't share with an indirect context */
|
||||||
|
@@ -219,8 +219,10 @@ dri3_create_context_attribs(struct glx_screen *base,
|
|||||||
goto error_exit;
|
goto error_exit;
|
||||||
|
|
||||||
/* Check the renderType value */
|
/* Check the renderType value */
|
||||||
if (!validate_renderType_against_config(config_base, dca.render_type))
|
if (!validate_renderType_against_config(config_base, dca.render_type)) {
|
||||||
goto error_exit;
|
*error = BadValue;
|
||||||
|
goto error_exit;
|
||||||
|
}
|
||||||
|
|
||||||
if (shareList) {
|
if (shareList) {
|
||||||
/* We can't share with an indirect context */
|
/* We can't share with an indirect context */
|
||||||
|
@@ -576,7 +576,8 @@ drisw_create_context_attribs(struct glx_screen *base,
|
|||||||
|
|
||||||
/* Check the renderType value */
|
/* Check the renderType value */
|
||||||
if (!validate_renderType_against_config(config_base, dca.render_type)) {
|
if (!validate_renderType_against_config(config_base, dca.render_type)) {
|
||||||
return NULL;
|
*error = BadValue;
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shareList) {
|
if (shareList) {
|
||||||
|
Reference in New Issue
Block a user