1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
   61
   62
   63
   64
   65
   66
   67
   68
   69
   70
   71
   72
   73
   74
   75
   76
   77
   78
   79
   80
   81
   82
   83
   84
   85
   86
   87
   88
   89
   90
   91
   92
   93
   94
   95
   96
   97
   98
   99
  100
  101
  102
  103
  104
  105
  106
  107
  108
  109
  110
  111
  112
  113
  114
  115
  116

gpu / GLES2 / extensions / CHROMIUM / CHROMIUM_shared_image.txt [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

      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.

    This function indicates that the calling context will access the SharedImage
    bound to <texture> until glEndSharedImageAccessDirectCHROMIUM is called, or
    the calling context deletes <texture>.

    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,
    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.
    2020-06-21   Added mode SHARED_IMAGE_ACCESS_MODE_OVERLAY_CHROMIUM.
    2023-01-18   Removed mode SHARED_IMAGE_ACCESS_MODE_OVERLAY_CHROMIUM.
    2023-09-28   Added glTexImage2DSharedImageCHROMIUM().