blob: def75e9bf6cd70723b0b9bcd9782a0597b676c99 [file] [log] [blame]
Name
CHROMIUM_shared_image
Name Strings
GL_CHROMIUM_shared_image
Version
Last Modified Date: Oct 15, 2018
Dependencies
OpenGL ES 2.0 is required.
CHROMIUM_texture_mailbox is required.
Overview
This extensions defines a way of importing into GL texture image data
produced externally to GL via Chromium's SharedImage system.
New Procedures and Functions
The command
GLuint glCreateAndTexStorage2DSharedImageCHROMIUM (const GLbyte *mailbox)
takes one argument:
mailbox - the mailbox referring to the SharedImage to assign to the
first level of the mailbox.
Logically, this function does three things:
1) Creates a texture name and returns it to the caller.
2) Creates a texture object for the name.
3) Assigns the SharedImage represented by mailbox to the first level of
the texture object.
Note that the texture created by this function is immutable.
On success, this function extends the lifetime of the SharedImage
referenced by mailbox by taking a ref. The texture object is deleted and
the ref released once the calling context delete the texture name
associated with the texture object, and detaches it from all framebuffer
objects as well as texture unit bindings.
Does not alter the texture bindings or alter the currently
bound texture in any way.
INVALID_OPERATION is generated if <mailbox> is not associated with a
texture object. In this case the new texture name remains unbound. It is
treated in the same way as a new texture name returned by GenTextures.
The command
GLuint glCreateAndTexStorage2DSharedImageWithInternalFormatCHROMIUM (
const GLbyte *mailbox,
GLenum internal_format)
takes two arguments:
internal_format - Must match the internal format of the SharedImage at
creation time, with the exception that a caller may pass GL_RGB or
GL_RGBA for a SharedImage created as RGBA_8888.
mailbox - the mailbox referring to the SharedImage to assign to the
first level of the mailbox.
This function works similar to glCreateAndTexStorage2DSharedImageCHROMIUM
in other respects.
The command
void glBeginSharedImageAccessDirectCHROMIUM (GLuint texture,
GLenum mode)
takes two arguments:
texture - the texture id for which to begin a shared image access scope.
mode - the access mode with which to begin access.
INVALID_OPERATION is generated if the texture id indicated is not
backed by a shared image.
INVALID_OPERATION is generated if we are requesting a READWRITE scope
and another consumer of the shared image is currently within a
READ or READWRITE scope.
INVALID_OPERATION is generated if we are requesting a READ scope and
another comsumer of the shared image is currently within a READWRITE
scope.
INVALID_ENUM is generated if <mode> is not one of
SHARED_IMAGE_ACCESS_MODE_READ_CHROMIUM or
SHARED_IMAGE_ACCESS_MODE_READWRITE_CHROMIUM.
The command
void glEndSharedImageAccessDirectCHROMIUM (GLuint texture)
takes one argument:
texture - the texture id for which to end a shared image access scope.
INVALID_OPERATION is generated if this function is called without a
preceding call to glBeginSharedImageAccessCHROMIUM.
New Tokens
Accepted by the <mode> parameter of BeginSharedImageAccessCHROMIUM:
SHARED_IMAGE_ACCESS_MODE_READ_CHROMIUM 0x8AF6
SHARED_IMAGE_ACCESS_MODE_READWRITE_CHROMIUM 0x8AF7
Errors
None.
New State
None.
Revision History
2018-10-15 Created.
2018-10-31 Added Begin/End calls.