<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Mon, Aug 27, 2018 at 12:50 PM Lionel Landwerlin <<a href="mailto:lionel.g.landwerlin@intel.com">lionel.g.landwerlin@intel.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 23/08/2018 16:13, Jason Ekstrand wrote:<br>
> ---<br>
> src/intel/vulkan/anv_device.c | 9 +++++++++<br>
> 1 file changed, 9 insertions(+)<br>
><br>
> diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c<br>
> index 0357fc7c0ea..5a63592f7ca 100644<br>
> --- a/src/intel/vulkan/anv_device.c<br>
> +++ b/src/intel/vulkan/anv_device.c<br>
> @@ -854,6 +854,15 @@ void anv_GetPhysicalDeviceFeatures(<br>
> pFeatures->vertexPipelineStoresAndAtomics =<br>
> pdevice->compiler->scalar_stage[MESA_SHADER_VERTEX] &&<br>
> pdevice->compiler->scalar_stage[MESA_SHADER_GEOMETRY];<br>
> +<br>
> + struct anv_app_info *app_info = &pdevice->instance->app_info;<br>
> +<br>
> + /* The new DOOM and Wolfenstein games require depthBounds without<br>
> + * checking for it. They seem to run fine without it so just claim it's<br>
> + * there and accept the consequences.<br>
> + */<br>
> + if (app_info->engine_name && strcmp(app_info->engine_name, "idTech") == 0)<br>
> + pFeatures->depthBounds = true;<br>
> }<br>
> <br>
> void anv_GetPhysicalDeviceFeatures2(<br>
<br>
I'm struggling to understand "require depthBounds with checking for it".<br>
I thought one would check for the feature by reading the boolean you <br>
just set. So if it's not checked why would it make a difference?<br></blockquote><div><br></div><div>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.</div><div><br></div><div>--Jason<br></div></div></div>