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:
@@ -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) {
|
||||
|
@@ -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);
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user