[Mesa-stable] [PATCH 1/2] anv: use correct .specVersion for extensions

Jason Ekstrand jason at jlekstrand.net
Wed Nov 9 18:32:48 UTC 2016


On Wed, Nov 9, 2016 at 10:10 AM, Emil Velikov <emil.l.velikov at gmail.com>
wrote:

> From: Emil Velikov <emil.velikov at collabora.com>
>
> Vulkan has introduced the consept of .specVersion which can be used to
> attribute changes of the said extension.
>
> The current loader does not check the value, thus it have gone unnoticed
> that the driver exposes an old version of the following extensions:
>
> VK_KHR_xcb_surface        (Rev 6)
> VK_KHR_xlib_surface       (Rev 6)
> VK_KHR_wayland_surface    (Rev 5)
> - Updated the surface create function to take a pCreateInfo structure
>
> VK_KHR_swapchain          (Rev 68)
> - Moved the "validity" include for vkAcquireNextImage to be in its proper
>   place, after the prototype and list of parameters.
> ...
>
> According to the documentation:
>
>   * pname:specVersion is the version of this extension.
>     It is an integer, incremented with backward compatible changes.
>
> Based on the history of vk.xml the above (latest) revision has been
> available since Vulkan 1.0 so even if they were any backwards
> incompatible change(s) [as hinted by the revision log] those should be
> safe.
>

Thanks for bumping the versions.

Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>


> Cc: "13.0" <mesa-stable at lists.freedesktop.org>
> Cc: Jason Ekstrand <jason at jlekstrand.net>
> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
> ---
> Not 100% sure on the "can one break ABI with .specVersion updates" part,
> yet considering the loader does not check the number it seems to be the
> case.
>

You can't.  However, as you said, the latest revision has been available
since 1.0 and there was lots of API/ABI breakage pre-1.0.


> Otherwise ... we'll be getting stack corruption all over the place ;-)
> ---
>  src/intel/vulkan/anv_device.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
> index fcbe587..d2ab992 100644
> --- a/src/intel/vulkan/anv_device.c
> +++ b/src/intel/vulkan/anv_device.c
> @@ -203,19 +203,19 @@ static const VkExtensionProperties
> global_extensions[] = {
>  #ifdef VK_USE_PLATFORM_XCB_KHR
>     {
>        .extensionName = VK_KHR_XCB_SURFACE_EXTENSION_NAME,
> -      .specVersion = 5,
> +      .specVersion = 6,
>     },
>  #endif
>  #ifdef VK_USE_PLATFORM_XLIB_KHR
>     {
>        .extensionName = VK_KHR_XLIB_SURFACE_EXTENSION_NAME,
> -      .specVersion = 5,
> +      .specVersion = 6,
>     },
>  #endif
>  #ifdef VK_USE_PLATFORM_WAYLAND_KHR
>     {
>        .extensionName = VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME,
> -      .specVersion = 4,
> +      .specVersion = 5,
>     },
>  #endif
>  };
> @@ -223,7 +223,7 @@ static const VkExtensionProperties global_extensions[]
> = {
>  static const VkExtensionProperties device_extensions[] = {
>     {
>        .extensionName = VK_KHR_SWAPCHAIN_EXTENSION_NAME,
> -      .specVersion = 67,
> +      .specVersion = 68,
>     },
>  };
>
> --
> 2.10.2
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-stable/attachments/20161109/e8b16e78/attachment-0001.html>


More information about the mesa-stable mailing list