mesa: Allow overriding the version of ES2+ contexts

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
This commit is contained in:
Ian Romanick
2015-04-29 16:12:40 -07:00
parent 03fd6704db
commit 9b5e92f4cc
3 changed files with 6 additions and 5 deletions

View File

@@ -166,6 +166,10 @@ driCreateNewScreen2(int scrn, int fd,
gl_api api;
int version;
api = API_OPENGLES2;
if (_mesa_override_gl_version_contextless(&consts, &api, &version))
psp->max_gl_es2_version = version;
api = API_OPENGL_COMPAT;
if (_mesa_override_gl_version_contextless(&consts, &api, &version)) {
if (api == API_OPENGL_CORE) {

View File

@@ -1169,9 +1169,7 @@ _mesa_initialize_context(struct gl_context *ctx,
ctx->HasConfig = GL_FALSE;
}
if (_mesa_is_desktop_gl(ctx)) {
_mesa_override_gl_version(ctx);
}
_mesa_override_gl_version(ctx);
/* misc one-time initializations */
one_time_init(ctx);

View File

@@ -924,8 +924,7 @@ static unsigned get_version(struct pipe_screen *screen,
struct gl_extensions extensions = {0};
GLuint version;
if ((api == API_OPENGL_COMPAT || api == API_OPENGL_CORE) &&
_mesa_override_gl_version_contextless(&consts, &api, &version)) {
if (_mesa_override_gl_version_contextless(&consts, &api, &version)) {
return version;
}