Skip to content

Commit

Permalink
extensions: add EGL_MESA_gl_texture_cubemap_image
Browse files Browse the repository at this point in the history
  • Loading branch information
bl4ckb0ne committed Aug 10, 2022
1 parent b11ad22 commit 4eefa79
Show file tree
Hide file tree
Showing 5 changed files with 132 additions and 6 deletions.
4 changes: 2 additions & 2 deletions api/EGL/egl.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ extern "C" {
** used to make the header, and the header can be found at
** http://www.khronos.org/registry/egl
**
** Khronos $Git commit SHA1: 6fb1daea15 $ on $Git commit date: 2022-05-25 09:41:13 -0600 $
** Khronos $Git commit SHA1: 2960edc99f $ on $Git commit date: 2022-08-05 06:59:49 -0400 $
*/

#include <EGL/eglplatform.h>
Expand All @@ -23,7 +23,7 @@ extern "C" {
#define EGL_EGL_PROTOTYPES 1
#endif

/* Generated on date 20220525 */
/* Generated on date 20220810 */

/* Generated C header for:
* API: egl
Expand Down
9 changes: 7 additions & 2 deletions api/EGL/eglext.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ extern "C" {
** used to make the header, and the header can be found at
** http://www.khronos.org/registry/egl
**
** Khronos $Git commit SHA1: 6fb1daea15 $ on $Git commit date: 2022-05-25 09:41:13 -0600 $
** Khronos $Git commit SHA1: 2960edc99f $ on $Git commit date: 2022-08-05 06:59:49 -0400 $
*/

#include <EGL/eglplatform.h>

#define EGL_EGLEXT_VERSION 20220525
#define EGL_EGLEXT_VERSION 20220810

/* Generated C header for:
* API: egl
Expand Down Expand Up @@ -1077,6 +1077,11 @@ EGLAPI EGLBoolean EGLAPIENTRY eglExportDRMImageMESA (EGLDisplay dpy, EGLImageKHR
#endif
#endif /* EGL_MESA_drm_image */

#ifndef EGL_MESA_gl_texture_cubemap_image
#define EGL_MESA_gl_texture_cubemap_image 1
#define EGL_GL_TEXTURE_CUBE_MAP_MESA 0x3530
#endif /* EGL_MESA_gl_texture_cubemap_image */

#ifndef EGL_MESA_image_dma_buf_export
#define EGL_MESA_image_dma_buf_export 1
typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDMABUFIMAGEQUERYMESAPROC) (EGLDisplay dpy, EGLImageKHR image, int *fourcc, int *num_planes, EGLuint64KHR *modifiers);
Expand Down
12 changes: 11 additions & 1 deletion api/egl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,11 @@
<unused start="0x3500" end="0x352F"/>
</enums>

<enums namespace="EGL" start="0x3530" end="0x353F" vendor="MESA" comment="Reserved for Simon Zeni (PR 165)">
<enum value="0x3530" name="EGL_GL_TEXTURE_CUBE_MAP_MESA"/>
<unused start="0x3531" end="0x353F"/>
</enums>

<!-- Please remember that new enumerant allocations must be obtained by
request to the Khronos API registrar (see comments at the top of this
file) File requests in the Khronos Bugzilla, EGL project, Registry
Expand All @@ -1077,7 +1082,7 @@

<!-- Reservable for future use. To generate a new range, allocate multiples
of 16 starting at the lowest available point in this block. -->
<enums namespace="EGL" start="0x3530" end="0x3FFF" vendor="KHR" comment="Reserved for future use">
<enums namespace="EGL" start="0x3540" end="0x3FFF" vendor="KHR" comment="Reserved for future use">
<unused start="0x3530" end="0x3FFF"/>
</enums>

Expand Down Expand Up @@ -3528,5 +3533,10 @@
<enum name="EGL_DEVICE_EXT"/>
</require>
</extension>
<extension name="EGL_MESA_gl_texture_cubemap_image" supported="egl">
<require>
<enum name="EGL_GL_TEXTURE_CUBE_MAP_MESA"/>
</require>
</extension>
</extensions>
</registry>
106 changes: 106 additions & 0 deletions extensions/MESA/EGL_MESA_gl_texture_cubemap_image.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
Name

MESA_gl_texture_cubemap_image

Name Strings

EGL_MESA_gl_texture_cubemap_image

Contributors

Simon Zeni

Contacts

Simon Zeni, Status Holdings Ltd. <[email protected]>

Status

Draft

Version

Version 0.1, 2022/08/04

Number

EGL Extension 149

Extension type

EGL client extension

Dependencies

EGL 1.2 is required.

EGL_KHR_image_base and EGL_KHR_gl_image are required.

This extension is written against the wording of the EGL 1.2 Specification.

This extension requires an OpenGL or OpenGL ES client API supporting
texture cube maps, either in the core API or via extensions.

Overview

This extension allows adds functionality to that provided by
KHR_gl_image in order to support EGLImage cubemaps. It extends the
existing eglCreateImageKHR entry point from EGL_KHR_image_base.

For an overview of EGLImage operation, please see the EGL_KHR_image
specification.

New types

None

New functions

None

New tokens

Accepted in the <target> parameter of eglCreateImageKHR:

EGL_GL_TEXTURE_CUBE_MAP_MESA 0x3530

Additions to the EGL Image (EGL_KHR_image_base) specification:

Add the following to Table aaa (Legal values for eglCreateImageKHR
<target> parameter), Section 2.5.1 (EGLImage Specification) following the
specification added by KHR_gl_image.

+---------------------------------+-------------------------------------+
| <target> | Notes |
+---------------------------------+-------------------------------------+
| EGL_GL_TEXTURE_CUBE_MAP_MESA | Used for GL cubemap texture images |
+---------------------------------+-------------------------------------+

In Section 2.5.1 (EGLImage specification), within the specification added
by KHR_gl_image.

"If <target> is EGL_GL_TEXTURE_2D_KHR, EGL_GL_TEXTURE_3D_KHR,
EGL_GL_RENDERBUFFER_KHR,
EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR,
EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR,
EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR,
EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR,
EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR,
EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR, or
EGL_GL_TEXTURE_CUBE_MAP_MESA,
<dpy> must be a valid EGLDisplay,
and <ctx> must be a valid GL API context on that display."

"If <target> is one of the EGL_GL_TEXTURE_CUBE_MAP_* enumerants or
EGL_GL_TEXTURE_CUBE_MAP_MESA, <buffer> must be the name of a
cube-complete, nonzero, GL_TEXTURE_CUBE_MAP (or equivalent in GL
extensions) target texture object, cast into the type EGLClientBuffer."

In Section 2.5.1 (EGLImage specification), within the specification added
by KHR_gl_image at the end of the error list, every occurence of the
token "EGL_GL_TEXTURE_CUBE_MAP_*_KHR" must be replaces by
"EGL_GL_TEXTURE_CUBE_MAP_*_KHR, EGL_GL_TEXTURE_CUBE_MAP_MESA".

Revision History
Version 0.1, 2022-08-04 (Simon Zeni)
- Initial draft
7 changes: 6 additions & 1 deletion registry.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -767,4 +767,9 @@ extension EGL_EXT_explicit_device {
flags public
filename extensions/EXT/EGL_EXT_explicit_device.txt
}
# Next free extension number: 149
extension EGL_MESA_gl_texture_cubemap_image {
number 149
flags public
filename extensions/MESA/EGL_MESA_gl_texture_cubemap_image.txt
}
# Next free extension number: 150

0 comments on commit 4eefa79

Please sign in to comment.