From ba9c917149e883b3e2b117de41e5a54dd6f9d0cc Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Thu, 28 Apr 2022 11:47:37 +0200 Subject: [PATCH] mesa: add missing error-path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ARB_shader_objects spec says the following: > The error INVALID_VALUE is generated by any command that takes one or > more handles as input, and one or more of these handles are not an > object handle generated by OpenGL. And a long, long time ago, we used do to just that for glDeleteObjectARB... Until 9ac9605de15, all the way back in February 2006, where the error condition was removed without explanation. Let's restore it, because it should really be there. This was noticed by running the tests that are in the mesa-demos repository, that actually tested this condition. Reviewed-by: Marek Olšák Cc: mesa-stable Part-of: --- src/mesa/main/shaderapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index abf2c458887..7172e41ab75 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -1705,7 +1705,7 @@ _mesa_DeleteObjectARB(GLhandleARB obj) delete_shader(ctx, obj); } else { - /* error? */ + _mesa_error(ctx, GL_INVALID_VALUE, "glDeleteObjectARB"); } } }