diff options
author | Chad Versace <[email protected]> | 2017-11-06 19:28:55 -0800 |
---|---|---|
committer | Chad Versace <[email protected]> | 2017-11-07 06:14:17 -0800 |
commit | d545897f1a59555843a7b22c4cb4ac5e3a7a0b25 (patch) | |
tree | ca21fd30bf90763b91d70c3fee5a06b42e15d8ca | |
parent | bd1790f1d96e5df15f20efde9f594b7c6fa2536d (diff) |
RFC: anv: Enable VK_EXT_image_drm_format_modifier
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.
-rw-r--r-- | src/intel/vulkan/anv_extensions.py | 1 | ||||
-rw-r--r-- | src/intel/vulkan/anv_image.c | 10 |
2 files changed, 11 insertions, 0 deletions
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; +} |