1Name 2 3 ANGLE_vulkan_image 4 5Name Strings 6 7 EGL_ANGLE_vulkan_image 8 9Contributors 10 11 Peng Huang 12 13Contacts 14 15 Peng Huang, Google Inc. (penghuang 'at' chromium.org) 16 17Status 18 19 Draft 20 21Version 22 23 Version 3, Feb 4, 2022 24 25Number 26 27 EGL Extension #?? 28 29Dependencies 30 31 This extension is written against the wording of the EGL 1.4 32 Specification. 33 34 References the EGL_ANGLE_device_vulkan and EGL_KHR_image_base extensions. 35 36Overview 37 38 This extension allows exporting VkImage from EGL images. 39 40New Types 41 42 None 43 44New Procedures and Functions 45 46 EGLBoolean eglExportVkImageANGLE( 47 EGLDisplay dpy, 48 EGLImageKHR image, 49 void* vk_image, 50 void* vk_image_create_info); 51 52New Tokens 53 54 EGL_VULKAN_IMAGE_ANGLE 0x34D3 55 EGL_VULKAN_IMAGE_CREATE_INFO_HI_ANGLE 0x34D4 56 EGL_VULKAN_IMAGE_CREATE_INFO_LO_ANGLE 0x34D5 57 58Additions to Chapter 2 of the EGL 1.4 Specification (EGL Operation) 59 60 Add to section 2.5.1 "EGLImage Specification" (as defined by the 61 EGL_KHR_image_base specification), in the description of 62 eglCreateImageKHR: 63 64 "Values accepted for <target> are listed in Table aaa, below. 65 66 +----------------------------+-----------------------------------------+ 67 | <target> | Notes | 68 +----------------------------+-----------------------------------------+ 69 | EGL_VULKAN_IMAGE_ANGLE | Used for VkImage objects | 70 +----------------------------+-----------------------------------------+ 71 Table aaa. Legal values for eglCreateImageKHR <target> parameter 72 73 ... 74 75 If <target> is EGL_VULKAN_IMAGE_ANGLE, <dpy> must be a valid display, <ctx> 76 must be EGL_NO_CONTEXT, <buffer> must be a pointer to a valid VkImage 77 (cast into the type EGLClientBuffer), the VkImage must be created with the 78 same VkDevice used by GL implementation and attributes other than 79 EGL_TEXTURE_INTERNAL_FORMAT_ANGLE, EGL_VULKAN_IMAGE_CREATE_INFO_HI_ANGLE or 80 EGL_VULKAN_IMAGE_CREATE_INFO_LO_ANGLE are ignored. 81 82 EGL_VULKAN_IMAGE_CREATE_INFO_HI_ANGLE and 83 EGL_VULKAN_IMAGE_CREATE_INFO_LO_ANGLE must be specified. They contain 84 hi 32bits and lo 32bits of a pointer to the memory stores a valid 85 VkImageCreateInfo structure. The GL implementation will get all necessary 86 info of the VkImage from it. All supported structures in the pNext structure 87 chain will be parsed, not supported structures will be ignored. 88 89 If EGL_TEXTURE_INTERNAL_FORMAT_ANGLE is specified, it is used to interpret 90 <buffer> according to the provided internal format. If it is specified, it 91 must be GL_RGBA (supported for all RGBA and BGRA formats), 92 GL_RGB (supported for all RGBA and BGRA formats except 93 VK_FORMAT_R10G10B10A2_UNORM), GL_BGRA_EXT (supported only for 94 VK_FORMAT_B8G8R8A8_UNORM and VK_FORMAT_B8G8R8A8_SRGB), 95 GL_RGB10_A2_EXT (supported for VK_FORMAT_A2R10G10B10_UNORM_PACK32), 96 GL_RED_EXT (supported for VK_FORMAT_R8_UNORM and VK_FORMAT_R16_UNORM), 97 GL_RG_EXT (supported for VK_FORMAT_R8G8_UNORM and VK_FORMAT_R16G16_UNORM), 98 GL_R16_EXT (supported for VK_FORMAT_R16_UNORM), 99 GL_RG16_EXT (supported for VK_FORMAT_R16G16_UNORM), or GL_NONE. 100 101Additions to the EGL 1.4 Specification: 102 103 To export VkImage from an EGLImage, a new API is required. 104 105 The new entrypoint 106 EGLBoolean eglExportVkImageANGLE( 107 EGLDisplay dpy, 108 EGLImageKHR image, 109 void* vk_image, 110 void* vk_image_create_info); 111 112 is used to retrieve the VkImage and VkImageCreateInfo of the EGLImage. 113 The VkImage is stored into <vk_image> pointed memory, and VkImageCreateInfo 114 is filled into <vk_image_create_info> pointed memory. 115 116Issues 117 118 None 119 120Revision History 121 122 Version 1, 2021/11/17 - first draft. 123 124 Version 2, 2021/12/10 - add support for creating EGLImageKHR from VkImage. 125 126 Version 3, 2022/02/04 - add support for EGL_TEXTURE_INTERNAL_FORMAT_ANGLE.