mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 04:20:08 +01: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;
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue