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

Lionel Landwerlin lionel.g.landwerlin at intel.com
Mon Aug 27 17:50:08 UTC 2018


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 = &pdevice->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


More information about the mesa-dev mailing list