[Mesa-dev] [PATCH v2 1/3] mesa: actually support compat profile creation with MESA_GL_VERSION_OVERRIDE
Timothy Arceri
tarceri at itsqueeze.com
Wed May 2 12:36:22 UTC 2018
On 02/05/18 21:48, Grazvydas Ignotas wrote:
> On Wed, May 2, 2018 at 1:27 PM, Timothy Arceri <tarceri at itsqueeze.com> wrote:
>> ---
>> src/mesa/drivers/dri/common/dri_util.c | 9 +++++----
>> 1 file changed, 5 insertions(+), 4 deletions(-)
>>
>> diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
>> index 7cb6248b130..d72f72d0756 100644
>> --- a/src/mesa/drivers/dri/common/dri_util.c
>> +++ b/src/mesa/drivers/dri/common/dri_util.c
>> @@ -389,10 +389,11 @@ driCreateContextAttribs(__DRIscreen *screen, int api,
>> screen->max_gl_compat_version < 31)
>> mesa_api = API_OPENGL_CORE;
>>
>> - if (mesa_api == API_OPENGL_COMPAT
>> - && ((ctx_config.major_version > 3)
>> - || (ctx_config.major_version == 3 &&
>> - ctx_config.minor_version >= 2))) {
>> + if (mesa_api == API_OPENGL_COMPAT &&
>> + ((ctx_config.major_version > 3) || (ctx_config.major_version == 3 &&
>> + ctx_config.minor_version >= 2)) &&
>> + !((ctx_config.major_version * 10 + ctx_config.minor_version) <=
>> + screen->max_gl_compat_version)) {
>
> nit: what about using (a * 10 + b > c) to make it easier to read than
> !(a * 10 + b <= c) ?
That will break 3.1 compat on radeonsi because max_gl_compat_version is
-1 unless overridden.
>
> GraÅžvydas
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
More information about the mesa-dev
mailing list