[Mesa-dev] [PATCH] mesa: avoid _mesa_problem invocation when running on drivers without glsl
Ilia Mirkin
imirkin at alum.mit.edu
Thu Jul 4 23:21:08 UTC 2019
For example wine might query GL_SHADING_LANGUAGE_VERSION on a driver
that doesn't support GLSL. This is not a problem in itself, we can just
return a INVALID_ENUM error.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109524
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
src/mesa/main/getstring.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/mesa/main/getstring.c b/src/mesa/main/getstring.c
index 3d5ae0b694b..6c0dd9048da 100644
--- a/src/mesa/main/getstring.c
+++ b/src/mesa/main/getstring.c
@@ -150,6 +150,8 @@ _mesa_GetString( GLenum name )
case GL_SHADING_LANGUAGE_VERSION:
if (ctx->API == API_OPENGLES)
break;
+ if (_mesa_is_desktop_gl(ctx) && ctx->Const.GLSLVersion == 0)
+ break;
return shading_language_version(ctx);
case GL_PROGRAM_ERROR_STRING_ARB:
if (ctx->API == API_OPENGL_COMPAT &&
--
2.21.0
More information about the mesa-dev
mailing list