anv: Claim to support depthBounds for ID games
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 30 Jan 2018 02:41:15 +0000 (18:41 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 28 Aug 2018 18:05:54 +0000 (13:05 -0500)
Cc: "18.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/vulkan/anv_device.c

index e7138886300b2b0d25e9887aa2c19df0f5503c2e..07de5f7543e2c5ca79cb7772dd8b66b005ef7d9f 100644 (file)
@@ -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(