Mesa (master): mesa: add switch case for GL 2.0 in _mesa_compute_version()

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Aug 2 19:23:19 UTC 2018


Module: Mesa
Branch: master
Commit: 977638006b8ed280969964e5d53728912c690e32
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=977638006b8ed280969964e5d53728912c690e32

Author: Brian Paul <brianp at vmware.com>
Date:   Thu Aug  2 09:32:58 2018 -0600

mesa: add switch case for GL 2.0 in _mesa_compute_version()

Previously, I added a switch case for GL 2.1 (ed7a0770b881791dd697f3).
I don't know of any driver which only supports GL 2.0, but adding
this switch case avoids a failure if the app queries
GL_SHADING_LANGUAGE_VERSION.

Reviewed-by: Eric Anholt <eric at anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

---

 src/mesa/main/version.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/mesa/main/version.c b/src/mesa/main/version.c
index 2c5bd77787..9df8c11c74 100644
--- a/src/mesa/main/version.c
+++ b/src/mesa/main/version.c
@@ -617,6 +617,8 @@ _mesa_compute_version(struct gl_context *ctx)
     */
    if (_mesa_is_desktop_gl(ctx)) {
       switch (ctx->Version) {
+      case 20:
+         /* fall-through, GLSL 1.20 is the minimum we support */
       case 21:
          ctx->Const.GLSLVersion = 120;
          break;




More information about the mesa-commit mailing list