anv: Implement VK_KHX_external_memory_fd
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 28 Feb 2017 18:58:40 +0000 (10:58 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 28 Apr 2017 03:08:46 +0000 (20:08 -0700)
commit9bd1f0348734e5dbbdc84e96ac1f11836427ed7c
treeec7203946ba99bc2d5823042b7eaf846998c15ac
parent818b8579145196c7a8d4095bd5e65367e02a8fef
anv: Implement VK_KHX_external_memory_fd

This commit just exposes the memory handle type.  There's interesting we
need to do here for images.  So long as the user doesn't set any crazy
environment variables such as INTEL_DEBUG=nohiz, all of the compression
formats etc. should "just work" at least for opaque handle types.

v2 (chadv):
  - Rebase.
  - Fix vkGetPhysicalDeviceImageFormatProperties2KHR when
    handleType == 0.
  - Move handleType-independency comments out of handleType-switch, in
    vkGetPhysicalDeviceExternalBufferPropertiesKHX.  Reduces diff in
    future dma_buf patches.

Co-authored-with: Chad Versace <chadversary@chromium.org>
Reviewed-by: Chad Versace <chadversary@chromium.org>
src/intel/vulkan/anv_device.c
src/intel/vulkan/anv_entrypoints_gen.py
src/intel/vulkan/anv_formats.c