mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
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:
parent
03fd6704db
commit
9b5e92f4cc
3 changed files with 6 additions and 5 deletions
|
|
@ -166,6 +166,10 @@ driCreateNewScreen2(int scrn, int fd,
|
||||||
gl_api api;
|
gl_api api;
|
||||||
int version;
|
int version;
|
||||||
|
|
||||||
|
api = API_OPENGLES2;
|
||||||
|
if (_mesa_override_gl_version_contextless(&consts, &api, &version))
|
||||||
|
psp->max_gl_es2_version = version;
|
||||||
|
|
||||||
api = API_OPENGL_COMPAT;
|
api = API_OPENGL_COMPAT;
|
||||||
if (_mesa_override_gl_version_contextless(&consts, &api, &version)) {
|
if (_mesa_override_gl_version_contextless(&consts, &api, &version)) {
|
||||||
if (api == API_OPENGL_CORE) {
|
if (api == API_OPENGL_CORE) {
|
||||||
|
|
|
||||||
|
|
@ -1169,9 +1169,7 @@ _mesa_initialize_context(struct gl_context *ctx,
|
||||||
ctx->HasConfig = GL_FALSE;
|
ctx->HasConfig = GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_mesa_is_desktop_gl(ctx)) {
|
_mesa_override_gl_version(ctx);
|
||||||
_mesa_override_gl_version(ctx);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* misc one-time initializations */
|
/* misc one-time initializations */
|
||||||
one_time_init(ctx);
|
one_time_init(ctx);
|
||||||
|
|
|
||||||
|
|
@ -924,8 +924,7 @@ static unsigned get_version(struct pipe_screen *screen,
|
||||||
struct gl_extensions extensions = {0};
|
struct gl_extensions extensions = {0};
|
||||||
GLuint version;
|
GLuint version;
|
||||||
|
|
||||||
if ((api == API_OPENGL_COMPAT || api == API_OPENGL_CORE) &&
|
if (_mesa_override_gl_version_contextless(&consts, &api, &version)) {
|
||||||
_mesa_override_gl_version_contextless(&consts, &api, &version)) {
|
|
||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue