[Mesa-dev] [PATCH] radv: Add support for VK_KHR_driver_properties.

Jason Ekstrand jason at jlekstrand.net
Mon Oct 1 18:19:26 UTC 2018


On Mon, Oct 1, 2018 at 12:41 PM Eric Engestrom <eric.engestrom at intel.com>
wrote:

> On Sunday, 2018-09-30 20:03:49 +0200, Bas Nieuwenhuizen wrote:
> > ---
> >  src/amd/vulkan/radv_device.c      | 27 +++++++++++++++++++++++++++
> >  src/amd/vulkan/radv_extensions.py |  1 +
> >  2 files changed, 28 insertions(+)
> >
> > diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
> > index f7752eac83b..fe7e7f7f6ac 100644
> > --- a/src/amd/vulkan/radv_device.c
> > +++ b/src/amd/vulkan/radv_device.c
> > @@ -1196,6 +1196,33 @@ void radv_GetPhysicalDeviceProperties2(
> >
>  properties->conservativeRasterizationPostDepthCoverage = VK_FALSE;
> >                       break;
> >               }
> > +             case
> VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR: {
> > +                     VkPhysicalDeviceDriverPropertiesKHR *driver_props =
> > +                             (VkPhysicalDeviceDriverPropertiesKHR *)
> ext;
> > +
> > +                     driver_props->driverID =
> VK_DRIVER_ID_MESA_RADV_KHR;
> > +                     memset(driver_props->driverName, 0,
> VK_MAX_DRIVER_NAME_SIZE_KHR);
> > +                     strcpy(driver_props->driverName, "radv");
> > +
> > +                     memset(driver_props->driverInfo, 0,
> VK_MAX_DRIVER_INFO_SIZE_KHR);
> > +                     snprintf(driver_props->driverInfo,
> VK_MAX_DRIVER_INFO_SIZE_KHR,
> > +                             "Mesa " PACKAGE_VERSION
> > +#ifdef MESA_GIT_SHA1
> > +                             " ("MESA_GIT_SHA1")"
> > +#endif
>
> Since bc8abc1adf0355b54e55 "bin: always define MESA_GIT_SHA1 to make it
> directly usable in code", the #ifdef dance is no longer necessary :)
>

Neat!  I'll update the anv patch accordingly.


> > +                             " (LLVM %i.%i.%i)",
> > +                              (HAVE_LLVM >> 8) & 0xff, HAVE_LLVM & 0xff,
> > +                              MESA_LLVM_VERSION_PATCH);
> > +
> > +                     driver_props->conformanceVersion =
> (VkConformanceVersionKHR) {
> > +                             .major = 1,
> > +                             .minor = 1,
> > +                             .subminor = 0,
> > +                             .patch = 2,
> > +                     };
> > +                     break;
> > +             }
> > +
> >               default:
> >                       break;
> >               }
> > diff --git a/src/amd/vulkan/radv_extensions.py
> b/src/amd/vulkan/radv_extensions.py
> > index 584926df390..8df5da76ed5 100644
> > --- a/src/amd/vulkan/radv_extensions.py
> > +++ b/src/amd/vulkan/radv_extensions.py
> > @@ -59,6 +59,7 @@ EXTENSIONS = [
> >      Extension('VK_KHR_device_group',                      1, True),
> >      Extension('VK_KHR_device_group_creation',             1, True),
> >      Extension('VK_KHR_draw_indirect_count',               1, True),
> > +    Extension('VK_KHR_driver_properties',                 1, True),
> >      Extension('VK_KHR_external_fence',                    1,
> 'device->rad_info.has_syncobj_wait_for_submit'),
> >      Extension('VK_KHR_external_fence_capabilities',       1, True),
> >      Extension('VK_KHR_external_fence_fd',                 1,
> 'device->rad_info.has_syncobj_wait_for_submit'),
> > --
> > 2.19.0
> >
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/mesa-dev
> _______________________________________________
> 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/9551ac3a/attachment-0001.html>


More information about the mesa-dev mailing list