<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Tue, Aug 28, 2018 at 12:40 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">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div class="m_-243357263086587894moz-cite-prefix">On 27/08/2018 23:48, Jason Ekstrand
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      <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" target="_blank">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>
    </blockquote>
    <br>
    Oh thanks for the explanation.<br>
    With the strdup() fix this series is :<br>
    <br>
    Reviewed-by: Lionel Landwerlin <a class="m_-243357263086587894moz-txt-link-rfc2396E" href="mailto:lionel.g.landwerlin@intel.com" target="_blank"><lionel.g.landwerlin@intel.com></a><br></div></blockquote><div><br></div><div>Thanks!<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF">
    I remember talks about doing this kind of tricks for particular
    titles in a layer.<br>
    <p>It doesn't necessarily makes things easier for us, but are you
      still thinking about that layer mechanism?</p></div></blockquote><div>If someone wants to write that layer, great.  If not, it's easier for us to just do it in the driver. <br></div></div></div>