[Mesa-dev] [PATCH 2/2] anv: Implement VK_KHR_driver_properties

Jason Ekstrand jason at jlekstrand.net
Mon Oct 1 16:43:52 UTC 2018


On Sun, Sep 30, 2018 at 12:29 PM Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
wrote:

> On Sat, Sep 29, 2018 at 4:40 PM Jason Ekstrand <jason at jlekstrand.net>
> wrote:
> >
> > ---
> >  src/intel/vulkan/anv_device.c      | 27 +++++++++++++++++++++++++++
> >  src/intel/vulkan/anv_extensions.py |  1 +
> >  2 files changed, 28 insertions(+)
> >
> > diff --git a/src/intel/vulkan/anv_device.c
> b/src/intel/vulkan/anv_device.c
> > index aa75de4e1ac..ad690b58e23 100644
> > --- a/src/intel/vulkan/anv_device.c
> > +++ b/src/intel/vulkan/anv_device.c
> > @@ -37,6 +37,7 @@
> >  #include "util/build_id.h"
> >  #include "util/disk_cache.h"
> >  #include "util/mesa-sha1.h"
> > +#include "git_sha1.h"
> >  #include "vk_util.h"
> >  #include "common/gen_defines.h"
> >
> > @@ -1114,6 +1115,32 @@ void anv_GetPhysicalDeviceProperties2(
> >           break;
> >        }
> >
> > +      case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR: {
> > +         VkPhysicalDeviceDriverPropertiesKHR *driver_props =
> > +            (VkPhysicalDeviceDriverPropertiesKHR *) ext;
> > +
> > +         driver_props->driverID = 6; /* Intel Mesa driver */
> As far as I can tell the enum for this got included in the header, why
> not just use VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA_KHR?


Yup.  I'll fix that.  I went looking for it before I sent these patches
but, for some reason, I didn't find it at the time.  I've found it now
though.


> With that
> changed, and assuming you really passed CTS 1.1.1.0, this is
>

I'm doing a full CTS run on 1.1.2.0 right now.  I'll update to that before
pushing assuming it passes.  It should, we're running the CTS in CI.


> Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
>

Thanks!

--Jason


> > +         memset(driver_props->driverName, 0,
> VK_MAX_DRIVER_NAME_SIZE_KHR);
> > +         strcpy(driver_props->driverName,
> > +                "Intel open-source Mesa driver");
> > +
> > +         memset(driver_props->driverInfo, 0,
> VK_MAX_DRIVER_INFO_SIZE_KHR);
> > +         strcpy(driver_props->driverInfo,
> > +                  "Mesa " PACKAGE_VERSION
> > +#ifdef MESA_GIT_SHA1
> > +                  " ("MESA_GIT_SHA1")"
> > +#endif
> > +                );
> > +
> > +         driver_props->conformanceVersion = (VkConformanceVersionKHR) {
> > +            .major = 1,
> > +            .minor = 1,
> > +            .subminor = 1,
> > +            .patch = 0,
> > +         };
> > +         break;
> > +      }
> > +
> >        case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES: {
> >           VkPhysicalDeviceIDProperties *id_props =
> >              (VkPhysicalDeviceIDProperties *)ext;
> > diff --git a/src/intel/vulkan/anv_extensions.py
> b/src/intel/vulkan/anv_extensions.py
> > index 951505a854e..d4915c95013 100644
> > --- a/src/intel/vulkan/anv_extensions.py
> > +++ b/src/intel/vulkan/anv_extensions.py
> > @@ -78,6 +78,7 @@ EXTENSIONS = [
> >      Extension('VK_KHR_descriptor_update_template',        1, True),
> >      Extension('VK_KHR_device_group',                      1, True),
> >      Extension('VK_KHR_device_group_creation',             1, True),
> > +    Extension('VK_KHR_driver_properties',                 1, True),
> >      Extension('VK_KHR_external_fence',                    1,
> >                'device->has_syncobj_wait'),
> >      Extension('VK_KHR_external_fence_capabilities',       1, True),
> > --
> > 2.17.1
> >
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20181001/01dfc78b/attachment-0001.html>


More information about the mesa-dev mailing list