vrend: Get the glsl version return by OpenGL ES

Signed-off-by: Elie Tournier <elie.tournier@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob.bornecrantz@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
macos/master
Elie Tournier 7 years ago committed by Dave Airlie
parent d252df0469
commit 329e2cf917
  1. 13
      src/vrend_renderer.c

@ -6265,9 +6265,16 @@ static void vrender_get_glsl_version(int *glsl_version)
int version;
version_str = glGetString(GL_SHADING_LANGUAGE_VERSION);
c = sscanf((const char *)version_str, "%i.%i",
&major_local, &minor_local);
assert(c == 2);
if (vrend_state.use_gles) {
char tmp[20];
c = sscanf((const char *)version_str, "%s %s %s %s %i.%i",
tmp, tmp, tmp, tmp, &major_local, &minor_local);
assert(c == 6);
} else {
c = sscanf((const char *)version_str, "%i.%i",
&major_local, &minor_local);
assert(c == 2);
}
version = (major_local * 100) + minor_local;
if (glsl_version)

Loading…
Cancel
Save