summaryrefslogtreecommitdiff
path: root/src/glx
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2021-07-23 18:14:33 -0400
committerMarge Bot <emma+marge@anholt.net>2023-04-06 21:29:54 +0000
commit5dba6726f7583a7cfb972296d0d52fb528f2be02 (patch)
treeb7b18b37c4aa4ab3cd8927a6efe258d5fdf80ab7 /src/glx
parentdd67c079a0180aadba58c55dd6d3cd97c4e1115d (diff)
downloadmesa-5dba6726f7583a7cfb972296d0d52fb528f2be02.tar.gz
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>
Diffstat (limited to 'src/glx')
-rw-r--r--src/glx/dri2_glx.c6
-rw-r--r--src/glx/dri3_glx.c6
-rw-r--r--src/glx/drisw_glx.c3
3 files changed, 10 insertions, 5 deletions
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 5ca15be07d3..633b0ba6e7b 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -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 */
diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c
index bab21854e35..bd871e81193 100644
--- a/src/glx/dri3_glx.c
+++ b/src/glx/dri3_glx.c
@@ -219,8 +219,10 @@ dri3_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 */
diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c
index cd004741f03..9b67a1a871f 100644
--- a/src/glx/drisw_glx.c
+++ b/src/glx/drisw_glx.c
@@ -576,7 +576,8 @@ drisw_create_context_attribs(struct glx_screen *base,
/* Check the renderType value */
if (!validate_renderType_against_config(config_base, dca.render_type)) {
- return NULL;
+ *error = BadValue;
+ return NULL;
}
if (shareList) {