Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extensions: add EGL_MESA_gl_texture_cubemap_image #165

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: af97e2c27b $ on $Git commit date: 2022-09-20 03:01:16 -0700 $
*/

#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 20221027 */

/* 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: af97e2c27b $ on $Git commit date: 2022-09-20 03:01:16 -0700 $
*/

#include <EGL/eglplatform.h>

#define EGL_EGLEXT_VERSION 20220525
#define EGL_EGLEXT_VERSION 20221027

/* 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
5,617 changes: 5,617 additions & 0 deletions api/diag.txt

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions api/egl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1069,8 +1069,8 @@
</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"/>
bl4ckb0ne marked this conversation as resolved.
Show resolved Hide resolved
<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
Expand Down Expand Up @@ -3533,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 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
2 changes: 2 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,8 @@
</li>
<li value=147> <a href="extensions/EXT/EGL_EXT_surface_compression.txt">EGL_EXT_surface_compression</a>
</li>
<li value=149> <a href="extensions/MESA/EGL_MESA_gl_texture_cubemap_image.txt">EGL_MESA_gl_texture_cubemap_image</a>
</li>
</ol>

<h6> Providing Feedback on the Registry </h6>
Expand Down
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