-
Notifications
You must be signed in to change notification settings - Fork 278
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 MESA_EGL_image_cubemap #533
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
Name | ||
|
||
MESA_EGL_image_cubemap | ||
|
||
Name Strings | ||
|
||
GL_MESA_EGL_image_cubemap | ||
|
||
Contact | ||
|
||
Simon Zeni, Status Holdings Ltd. <[email protected]> | ||
|
||
Contributors | ||
|
||
Simon Zeni | ||
|
||
Status | ||
|
||
Draft | ||
|
||
Version | ||
|
||
Version 0.1, 2022/08/05 | ||
|
||
Number | ||
|
||
OpenGL ES Extension #546 | ||
|
||
Dependencies | ||
|
||
OpenGL ES 2.0 is required, or any previous version that offers support | ||
for GL_ARB_texture_cube_map extension | ||
|
||
GL_OES_EGL_image is required. | ||
|
||
EGL 1.2 is required, with the EGL_KHR_image or EGL_KHR_image_base | ||
|
||
This extension is written based on the wording of the OpenGL 2.0 | ||
|
||
Overview | ||
|
||
This extension provides a mechanism for creating cubemap textures from | ||
EGLImage objects. | ||
|
||
MESA_gl_texture_cubemap_image defines the process of creating an EGLImage | ||
from an OpenGL ES cubemap texture. | ||
|
||
The companion EGL_KHR_image_base and EGL_KHR_image extensions provide the | ||
definition and rationale for EGLImage objects. | ||
|
||
EGL extension specifications are located in the EGL Registry at | ||
http://www.khronos.org/registry/egl/ | ||
|
||
New Tokens | ||
|
||
None. | ||
|
||
New Procedures and Functions | ||
|
||
void EGLImageTargetCubemapMESA(enum target, eglImageOES image) | ||
|
||
Additions to Chapter 3 of the OpenGL 2.0 Specification (Rasterization) | ||
|
||
In section 3.8.2 following the specification added by OES_EGL_image: | ||
|
||
"It is also possible to specify cubemap textures images from existing | ||
EGLImage objects. Images specified this way will be EGLImage sibilings | ||
with the original EGLImage source and any other EGLImage targets. | ||
|
||
The command | ||
|
||
void EGLImageTargetCubemapMESA(enum target, eglImageOES image); | ||
|
||
defines an complete cubemap texture with 6 faces. All properties of the | ||
texture images (including width, height, format, border, mipmap levels of | ||
detail, and image data) are taken from the specified eglImageOES <image>, | ||
rather than from the client or the framebuffer. Any existing image arrays | ||
associated with any mipmap levels in the texture object are freed (as if | ||
TexImage was called for each, with an image of zero size). As a result of | ||
this referencing operation, all of the pixel data in the <buffer> used as | ||
the EGLImage source resource (i.e., the <buffer> parameter passed to the | ||
CreateImageOES command that returned <image>) will become undefined. | ||
|
||
<target> must be TEXTURE_CUBE_MAP, and <image> must be the handle of a | ||
valid EGLImage resource, cast into the type eglImageOES. Assuming no | ||
errors are generated by the command EGLImageTargetCubemapMESA, the newly | ||
specified texture object will be an EGLImage target of the specified | ||
eglImageOES. If an application later respecifies any face of the cubemap | ||
texture object (through mechanism such as calls to TexImage2D or | ||
TexSubImage2D), the implementation must allocate a new space for the image | ||
and copy any existing data to the newly (re)specified texture object. The | ||
(re)specified texture object will not be an EGLImage target. | ||
|
||
If the GL is unable to specify a texture object using the supploed | ||
eglImageOES <image> (if the <image> refers to a different type of image, | ||
such as a TEXTURE_2D), the error INVALID_OPERATION is generated. | ||
|
||
If <image> does not refer to a valid eglImageOES object, the error | ||
INVALID_VALUE is generated. | ||
|
||
If <target> is not TEXTURE_CUBE_MAP, the error INVALID_ENUM is generated. | ||
|
||
Revision History | ||
|
||
Version 0.1, 2022-08-05 (Simon Zeni) | ||
- Initial draft |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this now a subset of https://registry.khronos.org/OpenGL/extensions/EXT/EXT_EGL_image_storage.txt - or am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have somehow missed this extension, maybe because it's not implemented in mesa 1, thanks!
I'll take care of fixing that.