aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2018-07-27 12:58:35 -0600
committerBrian Paul <[email protected]>2018-07-27 21:21:24 -0600
commitce0f42dfe46cd9a9ae63dd09dd45b2e7f660d001 (patch)
tree6d2b46e0851586bca08c7e8350e8716ce3db14fa
parent4f51e8880d1c0ba072f9f7a10f955ad79c30e991 (diff)
mesa: add switch case for GL 2.1 in _mesa_compute_version()
The xlib/swrast driver only supports GL 2.1. This patch fixes a crash if the app calls glGetString(GL_SHADING_LANGUAGE_VERSION). Reviewed-by: Neha Bhende <[email protected]>
-rw-r--r--src/mesa/main/version.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/main/version.c b/src/mesa/main/version.c
index 58e68b47721..2c5bd777877 100644
--- a/src/mesa/main/version.c
+++ b/src/mesa/main/version.c
@@ -617,6 +617,9 @@ _mesa_compute_version(struct gl_context *ctx)
*/
if (_mesa_is_desktop_gl(ctx)) {
switch (ctx->Version) {
+ case 21:
+ ctx->Const.GLSLVersion = 120;
+ break;
case 30:
ctx->Const.GLSLVersion = 130;
break;