mesa: Set api prefix to version string when overriding version
authorTapani Pälli <tapani.palli@intel.com>
Tue, 13 Oct 2015 05:49:57 +0000 (08:49 +0300)
committerTapani Pälli <tapani.palli@intel.com>
Fri, 16 Oct 2015 09:58:52 +0000 (12:58 +0300)
commitdc8c221e2890cc9913dfc99e1e0fcb73c89af52c
treec8767f3aaa56a46f66a9aae89cb4f1414994d84b
parentc8f5274b52682f4e1b767251b50f6191d8251079
mesa: Set api prefix to version string when overriding version

Otherwise there are problems when user overrides version and application
such as Piglit wants to detect used api with glGetString(GL_VERSION).

This makes it currently impossible to run glslparsertest tests for
OpenGL ES when using version override.

Below is example when using MESA_GLES_VERSION_OVERRIDE=3.1.

Before:
"3.1 Mesa 11.1.0-devel (git-24a1a15)"

After:
"OpenGL ES 3.1 Mesa 11.1.0-devel (git-78042ff)"

v2: only include api prefix for OpenGL ES (Boyan Ding)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Cc: "11.0" <mesa-stable@lists.freedesktop.org>
src/mesa/main/version.c