Re: [Mesa-dev] [PATCH 3/3] anv: Claim to support depthBounds for ID games

2018-08-29 Thread Jason Ekstrand
On Wed, Aug 29, 2018 at 10:52 AM Eric Engestrom 
wrote:

> On Tuesday, 2018-08-28 13:02:17 -0500, Jason Ekstrand wrote:
> > On Tue, Aug 28, 2018 at 12:40 PM Lionel Landwerlin <
> > lionel.g.landwer...@intel.com> wrote:
> > > I remember talks about doing this kind of tricks for particular titles
> in
> > > a layer.
> > >
> > > It doesn't necessarily makes things easier for us, but are you still
> > > thinking about that layer mechanism?
> > >
> > If someone wants to write that layer, great.  If not, it's easier for us
> to
> > just do it in the driver.
>
> Fair, but that means now radv need to copy this hack in their driver
> too, right?
>

I'm pretty sure radv actually supports the feature in question.

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


Re: [Mesa-dev] [PATCH 3/3] anv: Claim to support depthBounds for ID games

2018-08-29 Thread Eric Engestrom
On Tuesday, 2018-08-28 13:02:17 -0500, Jason Ekstrand wrote:
> On Tue, Aug 28, 2018 at 12:40 PM Lionel Landwerlin <
> lionel.g.landwer...@intel.com> wrote:
> > I remember talks about doing this kind of tricks for particular titles in
> > a layer.
> >
> > It doesn't necessarily makes things easier for us, but are you still
> > thinking about that layer mechanism?
> >
> If someone wants to write that layer, great.  If not, it's easier for us to
> just do it in the driver.

Fair, but that means now radv need to copy this hack in their driver
too, right?
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 3/3] anv: Claim to support depthBounds for ID games

2018-08-28 Thread Jason Ekstrand
On Tue, Aug 28, 2018 at 12:40 PM Lionel Landwerlin <
lionel.g.landwer...@intel.com> wrote:

> On 27/08/2018 23:48, Jason Ekstrand wrote:
>
> On Mon, Aug 27, 2018 at 12:50 PM Lionel Landwerlin <
> lionel.g.landwer...@intel.com> wrote:
>
>> On 23/08/2018 16:13, Jason Ekstrand wrote:
>> > ---
>> >   src/intel/vulkan/anv_device.c | 9 +
>> >   1 file changed, 9 insertions(+)
>> >
>> > diff --git a/src/intel/vulkan/anv_device.c
>> b/src/intel/vulkan/anv_device.c
>> > index 0357fc7c0ea..5a63592f7ca 100644
>> > --- a/src/intel/vulkan/anv_device.c
>> > +++ b/src/intel/vulkan/anv_device.c
>> > @@ -854,6 +854,15 @@ void anv_GetPhysicalDeviceFeatures(
>> >  pFeatures->vertexPipelineStoresAndAtomics =
>> > pdevice->compiler->scalar_stage[MESA_SHADER_VERTEX] &&
>> > pdevice->compiler->scalar_stage[MESA_SHADER_GEOMETRY];
>> > +
>> > +   struct anv_app_info *app_info = >instance->app_info;
>> > +
>> > +   /* The new DOOM and Wolfenstein games require depthBounds without
>> > +* checking for it.  They seem to run fine without it so just claim
>> it's
>> > +* there and accept the consequences.
>> > +*/
>> > +   if (app_info->engine_name && strcmp(app_info->engine_name,
>> "idTech") == 0)
>> > +  pFeatures->depthBounds = true;
>> >   }
>> >
>> >   void anv_GetPhysicalDeviceFeatures2(
>>
>> I'm struggling to understand "require depthBounds with checking for it".
>> I thought one would check for the feature by reading the boolean you
>> just set. So if it's not checked why would it make a difference?
>>
>
> The Vulkan spec requires that we throw VK_ERROR_INITIALIZATION_FAILED if
> the client enables any features we have not advertised.  This gives us two
> options: 1) advertise support for depthBounds for idTech games or 2) Skip
> the check for depthBounds in CreateDevice and let it succeed even if it's
> enabled for idTech games.  This patch takes the former approach since it's
> easier.
>
> --Jason
>
>
> Oh thanks for the explanation.
> With the strdup() fix this series is :
>
> Reviewed-by: Lionel Landwerlin 
> 
>

Thanks!


> I remember talks about doing this kind of tricks for particular titles in
> a layer.
>
> It doesn't necessarily makes things easier for us, but are you still
> thinking about that layer mechanism?
>
If someone wants to write that layer, great.  If not, it's easier for us to
just do it in the driver.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 3/3] anv: Claim to support depthBounds for ID games

2018-08-28 Thread Lionel Landwerlin

On 27/08/2018 23:48, Jason Ekstrand wrote:
On Mon, Aug 27, 2018 at 12:50 PM Lionel Landwerlin 
mailto:lionel.g.landwer...@intel.com>> 
wrote:


On 23/08/2018 16:13, Jason Ekstrand wrote:
> ---
>   src/intel/vulkan/anv_device.c | 9 +
>   1 file changed, 9 insertions(+)
>
> diff --git a/src/intel/vulkan/anv_device.c
b/src/intel/vulkan/anv_device.c
> index 0357fc7c0ea..5a63592f7ca 100644
> --- a/src/intel/vulkan/anv_device.c
> +++ b/src/intel/vulkan/anv_device.c
> @@ -854,6 +854,15 @@ void anv_GetPhysicalDeviceFeatures(
>      pFeatures->vertexPipelineStoresAndAtomics =
>  pdevice->compiler->scalar_stage[MESA_SHADER_VERTEX] &&
>  pdevice->compiler->scalar_stage[MESA_SHADER_GEOMETRY];
> +
> +   struct anv_app_info *app_info = >instance->app_info;
> +
> +   /* The new DOOM and Wolfenstein games require depthBounds
without
> +    * checking for it.  They seem to run fine without it so
just claim it's
> +    * there and accept the consequences.
> +    */
> +   if (app_info->engine_name && strcmp(app_info->engine_name,
"idTech") == 0)
> +      pFeatures->depthBounds = true;
>   }
>
>   void anv_GetPhysicalDeviceFeatures2(

I'm struggling to understand "require depthBounds with checking
for it".
I thought one would check for the feature by reading the boolean you
just set. So if it's not checked why would it make a difference?


The Vulkan spec requires that we throw VK_ERROR_INITIALIZATION_FAILED 
if the client enables any features we have not advertised.  This gives 
us two options: 1) advertise support for depthBounds for idTech games 
or 2) Skip the check for depthBounds in CreateDevice and let it 
succeed even if it's enabled for idTech games.  This patch takes the 
former approach since it's easier.


--Jason


Oh thanks for the explanation.
With the strdup() fix this series is :

Reviewed-by: Lionel Landwerlin 

I remember talks about doing this kind of tricks for particular titles 
in a layer.


It doesn't necessarily makes things easier for us, but are you still 
thinking about that layer mechanism?



-

Lionel

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


Re: [Mesa-dev] [PATCH 3/3] anv: Claim to support depthBounds for ID games

2018-08-27 Thread Jason Ekstrand
On Mon, Aug 27, 2018 at 12:50 PM Lionel Landwerlin <
lionel.g.landwer...@intel.com> wrote:

> On 23/08/2018 16:13, Jason Ekstrand wrote:
> > ---
> >   src/intel/vulkan/anv_device.c | 9 +
> >   1 file changed, 9 insertions(+)
> >
> > diff --git a/src/intel/vulkan/anv_device.c
> b/src/intel/vulkan/anv_device.c
> > index 0357fc7c0ea..5a63592f7ca 100644
> > --- a/src/intel/vulkan/anv_device.c
> > +++ b/src/intel/vulkan/anv_device.c
> > @@ -854,6 +854,15 @@ void anv_GetPhysicalDeviceFeatures(
> >  pFeatures->vertexPipelineStoresAndAtomics =
> > pdevice->compiler->scalar_stage[MESA_SHADER_VERTEX] &&
> > pdevice->compiler->scalar_stage[MESA_SHADER_GEOMETRY];
> > +
> > +   struct anv_app_info *app_info = >instance->app_info;
> > +
> > +   /* The new DOOM and Wolfenstein games require depthBounds without
> > +* checking for it.  They seem to run fine without it so just claim
> it's
> > +* there and accept the consequences.
> > +*/
> > +   if (app_info->engine_name && strcmp(app_info->engine_name, "idTech")
> == 0)
> > +  pFeatures->depthBounds = true;
> >   }
> >
> >   void anv_GetPhysicalDeviceFeatures2(
>
> I'm struggling to understand "require depthBounds with checking for it".
> I thought one would check for the feature by reading the boolean you
> just set. So if it's not checked why would it make a difference?
>

The Vulkan spec requires that we throw VK_ERROR_INITIALIZATION_FAILED if
the client enables any features we have not advertised.  This gives us two
options: 1) advertise support for depthBounds for idTech games or 2) Skip
the check for depthBounds in CreateDevice and let it succeed even if it's
enabled for idTech games.  This patch takes the former approach since it's
easier.

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


Re: [Mesa-dev] [PATCH 3/3] anv: Claim to support depthBounds for ID games

2018-08-27 Thread Lionel Landwerlin

On 23/08/2018 16:13, Jason Ekstrand wrote:

---
  src/intel/vulkan/anv_device.c | 9 +
  1 file changed, 9 insertions(+)

diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 0357fc7c0ea..5a63592f7ca 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -854,6 +854,15 @@ void anv_GetPhysicalDeviceFeatures(
 pFeatures->vertexPipelineStoresAndAtomics =
pdevice->compiler->scalar_stage[MESA_SHADER_VERTEX] &&
pdevice->compiler->scalar_stage[MESA_SHADER_GEOMETRY];
+
+   struct anv_app_info *app_info = >instance->app_info;
+
+   /* The new DOOM and Wolfenstein games require depthBounds without
+* checking for it.  They seem to run fine without it so just claim it's
+* there and accept the consequences.
+*/
+   if (app_info->engine_name && strcmp(app_info->engine_name, "idTech") == 0)
+  pFeatures->depthBounds = true;
  }
  
  void anv_GetPhysicalDeviceFeatures2(


I'm struggling to understand "require depthBounds with checking for it".
I thought one would check for the feature by reading the boolean you 
just set. So if it's not checked why would it make a difference?


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


[Mesa-dev] [PATCH 3/3] anv: Claim to support depthBounds for ID games

2018-08-23 Thread Jason Ekstrand
---
 src/intel/vulkan/anv_device.c | 9 +
 1 file changed, 9 insertions(+)

diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 0357fc7c0ea..5a63592f7ca 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -854,6 +854,15 @@ void anv_GetPhysicalDeviceFeatures(
pFeatures->vertexPipelineStoresAndAtomics =
   pdevice->compiler->scalar_stage[MESA_SHADER_VERTEX] &&
   pdevice->compiler->scalar_stage[MESA_SHADER_GEOMETRY];
+
+   struct anv_app_info *app_info = >instance->app_info;
+
+   /* The new DOOM and Wolfenstein games require depthBounds without
+* checking for it.  They seem to run fine without it so just claim it's
+* there and accept the consequences.
+*/
+   if (app_info->engine_name && strcmp(app_info->engine_name, "idTech") == 0)
+  pFeatures->depthBounds = true;
 }
 
 void anv_GetPhysicalDeviceFeatures2(
-- 
2.17.1

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