[Mesa-dev] [RFC PATCH v1 28/30] RFC: anv: Enable VK_EXT_image_drm_format_modifier

Eero Tamminen eero.t.tamminen at intel.com
Mon Nov 13 11:16:01 UTC 2017


Hi,

On 07.11.2017 16:48, Chad Versace wrote:
> The draft spec lives at
> http://kiwitree.net/~chadv/vulkan/#1.0-VK_EXT_image_drm_format_modifier.
> 
> This extension spec has a complete, working API. I'm happy with the API,
> and believe it's good enough. But the spec language has some outstanding
> issues that prevent it from being submitted as-is to Khronos: the spec
> language needs more polish, and the appendix chaper has a list of
> incomplete TODOs.

s/chaper/chapter/

	- Eero
> ---
>   src/intel/vulkan/anv_extensions.py |  1 +
>   src/intel/vulkan/anv_image.c       | 10 ++++++++++
>   2 files changed, 11 insertions(+)
> 
> diff --git a/src/intel/vulkan/anv_extensions.py b/src/intel/vulkan/anv_extensions.py
> index 83a93bdbf86..89957cce32e 100644
> --- a/src/intel/vulkan/anv_extensions.py
> +++ b/src/intel/vulkan/anv_extensions.py
> @@ -87,6 +87,7 @@ EXTENSIONS = [
>       Extension('VK_KHX_multiview',                         1, True),
>       Extension('VK_EXT_debug_report',                      8, True),
>       Extension('VK_EXT_external_memory_dma_buf',           1, True),
> +    Extension('VK_EXT_image_drm_format_modifier',         1, True),
>       Extension('VK_EXT_queue_family_foreign',              1, True),
>   ]
>   
> diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
> index bf636ce4b65..a289ac8f944 100644
> --- a/src/intel/vulkan/anv_image.c
> +++ b/src/intel/vulkan/anv_image.c
> @@ -1552,3 +1552,13 @@ anv_image_get_surface_for_aspect_mask(const struct anv_image *image,
>      uint32_t plane = anv_image_aspect_to_plane(image->aspects, sanitized_mask);
>      return &image->planes[plane].surface;
>   }
> +
> +VkResult
> +anv_GetImageDrmFormatModifierEXT(VkDevice device_h,
> +                                 VkImage image_h,
> +                                 uint64_t *pDrmFormatModifier)
> +{
> +   ANV_FROM_HANDLE(anv_image, image, image_h);
> +   *pDrmFormatModifier = image->drm_format_mod;
> +   return VK_SUCCESS;
> +}
> 



More information about the mesa-dev mailing list