[Mesa-dev] [PATCH v2] mesa: Allow override of GL version with environment variable
Kenneth Graunke
kenneth at whitecape.org
Tue Sep 27 10:34:05 PDT 2011
On 09/27/2011 08:42 AM, Chad Versace wrote:
>
>
> On 09/26/2011 01:57 PM, Brian Paul wrote:
>> On 09/26/2011 02:50 PM, Chad Versace wrote:
>>> [idr and kwg, I see your point. I've removed the overrides for GLES1 and
>>> GLES2.]
>>>
>>> It is necessary to manually set the GL version to 3.0 in order to run
>>> Piglit tests using glGetUniform*().
>>>
>>> This patch allows one to override the version of the OpenGL context by
>>> setting the environment variable MESA_GL_VERSION_OVERRIDE.
>>>
>>> v2
>>> ---
>>> - [brianp] Change variable name to MESA_GL_VERSION_OVERRIDE.
>>> - [brianp] Document in envvars.html.
>>> - [idr, kwg] Remove overrides for GLES1 and GLES2.
>>>
>>> Reviewed-by: Brian Paul<brianp at vmware.com>
>>> Signed-off-by: Chad Versace<chad at chad-versace.us>
>>> ---
>>> docs/envvars.html | 2 ++
>>> src/mesa/main/version.c | 24 ++++++++++++++++++++++++
>>> 2 files changed, 26 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/docs/envvars.html b/docs/envvars.html
>>> index 986d2f8..7280f2b 100644
>>> --- a/docs/envvars.html
>>> +++ b/docs/envvars.html
>>> @@ -58,6 +58,8 @@ copied into a fixed-size buffer without truncating.
>>> If the extension string is too long, the buffer overrun can cause the
>>> game
>>> to crash.
>>> This is a work-around for that.
>>> +<li>MESA_GL_VERSION_OVERRIDE - sets the GL version. For example, the
>>> value "3.0"
>>> +will enable support for GL 3.0.
>>
>> The description is a little inaccurate. I'd say something like
>> "setting this variable changes the value returned by
>> glGetString(GL_VERSION). Mesa will not really implement all the
>> features of the given version if it's higher than what's normally
>> reported.
>>
>> -Brian
>
> Ok. I'll change the description to what you suggested.
With the description changed:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
More information about the mesa-dev
mailing list