mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-23 09:40:29 +01:00
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 <bhenden@vmware.com>
This commit is contained in:
parent
4f51e8880d
commit
ce0f42dfe4
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue