Merge branch 'master' into 98-damage
diff --git a/api/EGL/egl.h b/api/EGL/egl.h
index f8cade1..959f175 100644
--- a/api/EGL/egl.h
+++ b/api/EGL/egl.h
@@ -33,7 +33,7 @@
** used to make the header, and the header can be found at
** http://www.khronos.org/registry/egl
**
-** Khronos $Git commit SHA1: 0f3a3945bf $ on $Git commit date: 2019-11-13 13:25:18 +0000 $
+** Khronos $Git commit SHA1: b5409265f3 $ on $Git commit date: 2020-02-20 08:24:34 -0800 $
*/
#include <EGL/eglplatform.h>
@@ -42,7 +42,7 @@
#define EGL_EGL_PROTOTYPES 1
#endif
-/* Generated on date 20191212 */
+/* Generated on date 20200220 */
/* Generated C header for:
* API: egl
diff --git a/api/EGL/eglext.h b/api/EGL/eglext.h
index b9407de..a1e5e94 100644
--- a/api/EGL/eglext.h
+++ b/api/EGL/eglext.h
@@ -33,7 +33,7 @@
** used to make the header, and the header can be found at
** http://www.khronos.org/registry/egl
**
-** Khronos $Git commit SHA1: aa9b63f3ab $ on $Git commit date: 2020-01-06 19:36:27 +0000 $
+** Khronos $Git commit SHA1: b5409265f3 $ on $Git commit date: 2020-02-20 08:24:34 -0800 $
*/
#include <EGL/eglplatform.h>
@@ -598,6 +598,12 @@
#define EGL_FIXED_SIZE_ANGLE 0x3201
#endif /* EGL_ANGLE_window_fixed_size */
+#ifndef EGL_ARM_image_format
+#define EGL_ARM_image_format 1
+#define EGL_COLOR_COMPONENT_TYPE_UNSIGNED_INTEGER_ARM 0x3287
+#define EGL_COLOR_COMPONENT_TYPE_INTEGER_ARM 0x3288
+#endif /* EGL_ARM_image_format */
+
#ifndef EGL_ARM_implicit_external_sync
#define EGL_ARM_implicit_external_sync 1
#define EGL_SYNC_PRIOR_COMMANDS_IMPLICIT_EXTERNAL_ARM 0x328A
diff --git a/api/egl.xml b/api/egl.xml
index f4740d6..30030d4 100644
--- a/api/egl.xml
+++ b/api/egl.xml
@@ -744,7 +744,9 @@
<enum value="0x3284" name="EGL_YUV_CHROMA_SITING_0_EXT"/>
<enum value="0x3285" name="EGL_YUV_CHROMA_SITING_0_5_EXT"/>
<enum value="0x3286" name="EGL_DISCARD_SAMPLES_ARM"/>
- <unused start="0x3287" end="0x3289"/>
+ <enum value="0x3287" name="EGL_COLOR_COMPONENT_TYPE_UNSIGNED_INTEGER_ARM"/>
+ <enum value="0x3288" name="EGL_COLOR_COMPONENT_TYPE_INTEGER_ARM"/>
+ <unused start="0x3289" end="0x3289"/>
<enum value="0x328A" name="EGL_SYNC_PRIOR_COMMANDS_IMPLICIT_EXTERNAL_ARM"/>
<unused start="0x328B" end="0x328F"/>
</enums>
@@ -3352,5 +3354,11 @@
<type name="PFNEGLCREATEWAYLANDBUFFERFROMIMAGEWL"/>
</require>
</extension>
+ <extension name="EGL_ARM_image_format" supported="egl">
+ <require>
+ <enum name="EGL_COLOR_COMPONENT_TYPE_UNSIGNED_INTEGER_ARM"/>
+ <enum name="EGL_COLOR_COMPONENT_TYPE_INTEGER_ARM"/>
+ </require>
+ </extension>
</extensions>
</registry>
diff --git a/extensions/ARM/EGL_ARM_image_format.txt b/extensions/ARM/EGL_ARM_image_format.txt
new file mode 100644
index 0000000..c1a40ec
--- /dev/null
+++ b/extensions/ARM/EGL_ARM_image_format.txt
@@ -0,0 +1,126 @@
+Name
+
+ ARM_image_format
+
+Name Strings
+
+ EGL_ARM_image_format
+
+Contributors
+
+ Jan-Harald Fredriksen
+
+Contact
+
+ Jan-Harald Fredriksen (jan-harald.fredriksen 'at' arm.com)
+
+IP Status
+
+ No known IP claims.
+
+Status
+
+ Complete
+
+Version
+
+ Version 1 - February 18, 2020
+
+Number
+
+ 138
+
+Dependencies
+
+ This extension is written against the wording of the EGL 1.4
+ specification.
+
+ This extension reuses tokens from EGL_EXT_pixel_format_float.
+
+Overview
+
+ When an EGLImage is created from an existing image resource the
+ implementation will deduce the format of the image data from that
+ resource. In some cases, however, the implementation may not know how to
+ map the existing image resource to a known format. This extension extends
+ the list of attributes accepted by eglCreateImageKHR such that applications
+ can tell the implementation how to interpret the data.
+
+New Procedures and Functions
+
+ None.
+
+New Tokens
+
+ Accepted as an attribute name in the <attrib_list> argument of
+ eglCreateImageKHR:
+ EGL_COLOR_COMPONENT_TYPE_EXT 0x3339
+
+ Accepted as attribute values for the EGL_COLOR_COMPONENT_TYPE_EXT attribute
+ of eglCreateImageKHR:
+
+ EGL_COLOR_COMPONENT_TYPE_FIXED_EXT 0x333A
+ EGL_COLOR_COMPONENT_TYPE_FLOAT_EXT 0x333B
+ EGL_COLOR_COMPONENT_TYPE_UNSIGNED_INTEGER_ARM 0x3287
+ EGL_COLOR_COMPONENT_TYPE_INTEGER_ARM 0x3288
+ EGL_RED_SIZE 0x3024
+ EGL_GREEN_SIZE 0x3023
+ EGL_BLUE_SIZE 0x3022
+ EGL_ALPHA_SIZE 0x3021
+
+Modifications to the EGL 1.4 Specification
+
+ Add the following rows to Table 3.xx: Legal attributes for
+ eglCreateImageKHR <attrib_list> parameter:
+
+ +------------------------------+------------------------------+-----------+---------------+
+ | Attribute | Description | Valid | Default Value |
+ | | | <target>s | |
+ +------------------------------+------------------------------+-----------+---------------+
+ | EGL_COLOR_COMPONENT_TYPE_EXT | Specifies the component | All | NA |
+ | | type the EGLImage source | | |
+ | | is interpreted as | | |
+ | EGL_RED_SIZE | Specifies the red component | All | NA |
+ | | size the EGLImage source | | |
+ | | is interpreted as | | |
+ | EGL_GREEN_SIZE | Specifies the green component| All | NA |
+ | | size the EGLImage source | | |
+ | | is interpreted as | | |
+ | EGL_BLUE_SIZE | Specifies the blue component | All | NA |
+ | | size the EGLImage source | | |
+ | | is interpreted as | | |
+ | EGL_ALPHA_SIZE | Specifies the alpha component| All | NA |
+ | | size the EGLImage source | | |
+ | | is interpreted as | | |
+ +------------------------------+------------------------------+-----------+---------------+
+
+ If <attrib_list> specifies values for EGL_COLOR_COMPONENT_TYPE_EXT,
+ EGL_RED_SIZE, EGL_GREEN_SIZE, EGL_BLUE_SIZE, or EGL_ALPHA_SIZE, the
+ implementation will treat these as hints for how to interpret the contents
+ of <buffer>.
+
+ EGL_COLOR_COMPONENT_TYPE_EXT indicates the component type of <buffer> and
+ must be either EGL_COLOR_COMPONENT_TYPE_FIXED_EXT for fixed-point,
+ EGL_COLOR_COMPONENT_TYPE_FLOAT_EXT for floating-point,
+ EGL_COLOR_COMPONENT_TYPE_UNSIGNED_INTEGER_ARM for unsigned integer, or
+ EGL_COLOR_COMPONENT_TYPE_INTEGER_ARM for integer components.
+
+Add to the list of error conditions for eglCreateImageKHR:
+
+ * If the implementation is unable to interpret the contents <buffer>
+ according to the component types and sizes in <attrib_list>, then a
+ EGL_BAD_MATCH error is generated.
+
+Issues
+
+ 1. Should there be a way to specify the component order?
+
+ Resolved. No, the component order is interpreted to be R, G, B, A,
+ with R mapping to component 0. If the application needs a different
+ component order it can use swizzle in the client API side or in the
+ shader.
+
+Revision History
+
+ Version 1, 2020/02/18
+ - Internal revisions
diff --git a/registry.tcl b/registry.tcl
index bf7c17f..29c1bbc 100644
--- a/registry.tcl
+++ b/registry.tcl
@@ -709,4 +709,9 @@
flags public
filename extensions/WL/EGL_WL_create_wayland_buffer_from_image.txt
}
-# Next free extension number: 138
+extension EGL_ARM_image_format {
+ number 138
+ flags public
+ filename extensions/ARM/EGL_ARM_image_format.txt
+}
+# Next free extension number: 139