Re: [Mesa-dev] [PATCH] dri_util: when overriding, always reset the core version

2018-03-07 Thread Tapani Pälli



On 03/07/2018 04:29 PM, Emil Velikov wrote:

On 7 March 2018 at 06:02, Tapani Pälli  wrote:



On 03/07/2018 12:36 AM, Marek Olšák wrote:


On Mon, Mar 5, 2018 at 7:33 AM, Tapani Pälli 
wrote:


Hi;

On 03/02/2018 03:25 PM, Andres Gomez wrote:



This way we won't fail when validating just because we may have a non
overriden core version that is lower than the requested one, even when
the compat version is high enough.




Do I understand correctly that this happens because when version asked is



3.2 then we always do core context, even when overriding to compat
profile?



No. 3.2COMPAT will set both core and compat version limits to 3.2.



I see, I was trying to understand why core version matters when using compat
profile but I'm not sure I get it, it probably should not matter.


In some cases you'd get a program using third party middle-ware.
For many instances of those one component is using a core while the
other a compat profile.


Right, that makes sense. Thanks Emil!


Admittedly the whole extension overriding is a bit of a band-aid
(hack) and it's not worth spending much too time on it ;-)

-Emil



// Tapani
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] dri_util: when overriding, always reset the core version

2018-03-07 Thread Emil Velikov
On 7 March 2018 at 06:02, Tapani Pälli  wrote:
>
>
> On 03/07/2018 12:36 AM, Marek Olšák wrote:
>>
>> On Mon, Mar 5, 2018 at 7:33 AM, Tapani Pälli 
>> wrote:
>>>
>>> Hi;
>>>
>>> On 03/02/2018 03:25 PM, Andres Gomez wrote:


 This way we won't fail when validating just because we may have a non
 overriden core version that is lower than the requested one, even when
 the compat version is high enough.
>>>
>>>
>>>
>>> Do I understand correctly that this happens because when version asked is
>>> >
>>> 3.2 then we always do core context, even when overriding to compat
>>> profile?
>>
>>
>> No. 3.2COMPAT will set both core and compat version limits to 3.2.
>>
>
> I see, I was trying to understand why core version matters when using compat
> profile but I'm not sure I get it, it probably should not matter.
>
In some cases you'd get a program using third party middle-ware.
For many instances of those one component is using a core while the
other a compat profile.

Admittedly the whole extension overriding is a bit of a band-aid
(hack) and it's not worth spending much too time on it ;-)

-Emil
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] dri_util: when overriding, always reset the core version

2018-03-06 Thread Tapani Pälli



On 03/07/2018 12:36 AM, Marek Olšák wrote:

On Mon, Mar 5, 2018 at 7:33 AM, Tapani Pälli  wrote:

Hi;

On 03/02/2018 03:25 PM, Andres Gomez wrote:


This way we won't fail when validating just because we may have a non
overriden core version that is lower than the requested one, even when
the compat version is high enough.



Do I understand correctly that this happens because when version asked is >
3.2 then we always do core context, even when overriding to compat profile?


No. 3.2COMPAT will set both core and compat version limits to 3.2.



I see, I was trying to understand why core version matters when using 
compat profile but I'm not sure I get it, it probably should not matter.


// Tapani
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] dri_util: when overriding, always reset the core version

2018-03-06 Thread Marek Olšák
On Mon, Mar 5, 2018 at 7:33 AM, Tapani Pälli  wrote:
> Hi;
>
> On 03/02/2018 03:25 PM, Andres Gomez wrote:
>>
>> This way we won't fail when validating just because we may have a non
>> overriden core version that is lower than the requested one, even when
>> the compat version is high enough.
>
>
> Do I understand correctly that this happens because when version asked is >
> 3.2 then we always do core context, even when overriding to compat profile?

No. 3.2COMPAT will set both core and compat version limits to 3.2.

Marek
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] dri_util: when overriding, always reset the core version

2018-03-05 Thread Tapani Pälli

Hi;

On 03/02/2018 03:25 PM, Andres Gomez wrote:

This way we won't fail when validating just because we may have a non
overriden core version that is lower than the requested one, even when
the compat version is high enough.


Do I understand correctly that this happens because when version asked 
is > 3.2 then we always do core context, even when overriding to compat 
profile?


Assuming it's OK to have both __DRI_API_OPENGL and __DRI_API_OPENGL_CORE 
in api_mask;


Reviewed-by: Tapani Pälli 


For example, running glcts from VK-GL-CTS with i965, this will
succeed:

$ MESA_GL_VERSION_OVERRIDE=4.6 ./glcts --deqp-case=KHR-GL46.info.vendor

While, this will fail:

$ MESA_GL_VERSION_OVERRIDE=4.6COMPAT ./glcts --deqp-case=KHR-GL46.info.vendor

Fixes: 464c56d3d5c ("dri_util: Use
_mesa_override_gl_version_contextless")

Cc: Ian Romanick 
Cc: Tapani Pälli 
Cc: Marek Olšák 
Signed-off-by: Andres Gomez 
---
  src/mesa/drivers/dri/common/dri_util.c | 6 ++
  1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/mesa/drivers/dri/common/dri_util.c 
b/src/mesa/drivers/dri/common/dri_util.c
index a34f38d6114..3f780d155b8 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -164,11 +164,9 @@ driCreateNewScreen2(int scrn, int fd,
  
  api = API_OPENGL_COMPAT;

  if (_mesa_override_gl_version_contextless(&consts, &api, &version)) {
-   if (api == API_OPENGL_CORE) {
-  psp->max_gl_core_version = version;
-   } else {
+   psp->max_gl_core_version = version;
+   if (api == API_OPENGL_COMPAT)
psp->max_gl_compat_version = version;
-   }
  }
  
  psp->api_mask = 0;



___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] dri_util: when overriding, always reset the core version

2018-03-02 Thread Emil Velikov
On 2 March 2018 at 13:25, Andres Gomez  wrote:
> This way we won't fail when validating just because we may have a non
> overriden core version that is lower than the requested one, even when
> the compat version is high enough.
>
> For example, running glcts from VK-GL-CTS with i965, this will
> succeed:
>
> $ MESA_GL_VERSION_OVERRIDE=4.6 ./glcts --deqp-case=KHR-GL46.info.vendor
>
> While, this will fail:
>
> $ MESA_GL_VERSION_OVERRIDE=4.6COMPAT ./glcts --deqp-case=KHR-GL46.info.vendor
>
> Fixes: 464c56d3d5c ("dri_util: Use
> _mesa_override_gl_version_contextless")
>
> Cc: Ian Romanick 
> Cc: Tapani Pälli 
> Cc: Marek Olšák 
> Signed-off-by: Andres Gomez 
> ---
>  src/mesa/drivers/dri/common/dri_util.c | 6 ++
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/common/dri_util.c 
> b/src/mesa/drivers/dri/common/dri_util.c
> index a34f38d6114..3f780d155b8 100644
> --- a/src/mesa/drivers/dri/common/dri_util.c
> +++ b/src/mesa/drivers/dri/common/dri_util.c
> @@ -164,11 +164,9 @@ driCreateNewScreen2(int scrn, int fd,
>
>  api = API_OPENGL_COMPAT;
>  if (_mesa_override_gl_version_contextless(&consts, &api, &version)) {
> -   if (api == API_OPENGL_CORE) {
> -  psp->max_gl_core_version = version;
> -   } else {
> +   psp->max_gl_core_version = version;
> +   if (api == API_OPENGL_COMPAT)
>psp->max_gl_compat_version = version;
> -   }
>  }
>
This patch restores the original pre-464c56d3d5c behaviour + the
464c56d3d5c commit message does not mention the change.
It'll be great if Ian can confirm if it was intentional, but patch
makes perfect sense IMHO.

Reviewed-by: Emil Velikov 

-Emil
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev