1Name 2 3 ARM_image_format 4 5Name Strings 6 7 EGL_ARM_image_format 8 9Contributors 10 11 Jan-Harald Fredriksen 12 13Contact 14 15 Jan-Harald Fredriksen (jan-harald.fredriksen 'at' arm.com) 16 17IP Status 18 19 No known IP claims. 20 21Status 22 23 Complete 24 25Version 26 27 Version 1 - February 18, 2020 28 29Number 30 31 138 32 33Dependencies 34 35 This extension is written against the wording of the EGL 1.4 36 specification. 37 38 This extension reuses tokens from EGL_EXT_pixel_format_float. 39 40Overview 41 42 When an EGLImage is created from an existing image resource the 43 implementation will deduce the format of the image data from that 44 resource. In some cases, however, the implementation may not know how to 45 map the existing image resource to a known format. This extension extends 46 the list of attributes accepted by eglCreateImageKHR such that applications 47 can tell the implementation how to interpret the data. 48 49New Procedures and Functions 50 51 None. 52 53New Tokens 54 55 Accepted as an attribute name in the <attrib_list> argument of 56 eglCreateImageKHR: 57 EGL_COLOR_COMPONENT_TYPE_EXT 0x3339 58 59 Accepted as attribute values for the EGL_COLOR_COMPONENT_TYPE_EXT attribute 60 of eglCreateImageKHR: 61 62 EGL_COLOR_COMPONENT_TYPE_FIXED_EXT 0x333A 63 EGL_COLOR_COMPONENT_TYPE_FLOAT_EXT 0x333B 64 EGL_COLOR_COMPONENT_TYPE_UNSIGNED_INTEGER_ARM 0x3287 65 EGL_COLOR_COMPONENT_TYPE_INTEGER_ARM 0x3288 66 EGL_RED_SIZE 0x3024 67 EGL_GREEN_SIZE 0x3023 68 EGL_BLUE_SIZE 0x3022 69 EGL_ALPHA_SIZE 0x3021 70 71Modifications to the EGL 1.4 Specification 72 73 Add the following rows to Table 3.xx: Legal attributes for 74 eglCreateImageKHR <attrib_list> parameter: 75 76 +------------------------------+------------------------------+-----------+---------------+ 77 | Attribute | Description | Valid | Default Value | 78 | | | <target>s | | 79 +------------------------------+------------------------------+-----------+---------------+ 80 | EGL_COLOR_COMPONENT_TYPE_EXT | Specifies the component | All | NA | 81 | | type the EGLImage source | | | 82 | | is interpreted as | | | 83 | EGL_RED_SIZE | Specifies the red component | All | NA | 84 | | size the EGLImage source | | | 85 | | is interpreted as | | | 86 | EGL_GREEN_SIZE | Specifies the green component| All | NA | 87 | | size the EGLImage source | | | 88 | | is interpreted as | | | 89 | EGL_BLUE_SIZE | Specifies the blue component | All | NA | 90 | | size the EGLImage source | | | 91 | | is interpreted as | | | 92 | EGL_ALPHA_SIZE | Specifies the alpha component| All | NA | 93 | | size the EGLImage source | | | 94 | | is interpreted as | | | 95 +------------------------------+------------------------------+-----------+---------------+ 96 97 If <attrib_list> specifies values for EGL_COLOR_COMPONENT_TYPE_EXT, 98 EGL_RED_SIZE, EGL_GREEN_SIZE, EGL_BLUE_SIZE, or EGL_ALPHA_SIZE, the 99 implementation will treat these as hints for how to interpret the contents 100 of <buffer>. 101 102 EGL_COLOR_COMPONENT_TYPE_EXT indicates the component type of <buffer> and 103 must be either EGL_COLOR_COMPONENT_TYPE_FIXED_EXT for fixed-point, 104 EGL_COLOR_COMPONENT_TYPE_FLOAT_EXT for floating-point, 105 EGL_COLOR_COMPONENT_TYPE_UNSIGNED_INTEGER_ARM for unsigned integer, or 106 EGL_COLOR_COMPONENT_TYPE_INTEGER_ARM for integer components. 107 108Add to the list of error conditions for eglCreateImageKHR: 109 110 * If the implementation is unable to interpret the contents <buffer> 111 according to the component types and sizes in <attrib_list>, then a 112 EGL_BAD_MATCH error is generated. 113 114Issues 115 116 1. Should there be a way to specify the component order? 117 118 Resolved. No, the component order is interpreted to be R, G, B, A, 119 with R mapping to component 0. If the application needs a different 120 component order it can use swizzle in the client API side or in the 121 shader. 122 123Revision History 124 125 Version 1, 2020/02/18 126 - Internal revisions 127