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
  117
  118
  119
  120
  121

gpu / GLES2 / extensions / CHROMIUM / CHROMIUM_sync_point.txt [blame]

Name

    CHROMIUM_sync_point

Name Strings

    GL_CHROMIUM_sync_point

Version

    Last Modified Date: March 18, 2024

Dependencies

    OpenGL ES 2.0 is required.

Overview

    This extension allows a client to order operations between contexts.

    This extension introduces the concept of a "sync token" that can be passed
    to other clients to issue a "wait" command for synchronization. Generating a
    sync token inserts a fence into the command stream. This wait command will
    then guarantee that commands before the inserted fence are submitted before
    commands after the sync token wait.

    Combined with mailboxes from CHROMIUM_texture_mailbox, this allows clients
    across processes to synchronize resources.

Issues

    None

New Procedures and Functions

    The command

        void GenSyncTokenCHROMIUM(GLbyte *sync_token)

    inserts a fence into the current context's command stream and returns a
    <sync_token>. The <sync_token> can be passed and used by any context on the
    same server, including other context groups. The fence also implies an
    ordering barrier between contexts in the current scheduling group (stream).
    An INVALID_OPERATION error is generated if <sync_token> is NULL.

    <sync_token> returns a GL_SYNC_TOKEN_SIZE_CHROMIUM byte sized name.

    The command

        void GenUnverifiedSyncTokenCHROMIUM(GLbyte *sync_token)

    inserts a fence into the current context's command stream and returns a
    <sync_token>. The <sync_token> can be passed and used by any context on the
    same client (process), including other context groups. The fence also
    implies an ordering barrier between contexts in the current scheduling group
    (stream). However, to pass the <sync_token> to a context in another client
    (process), the <sync_token> must be verified using VerifySyncTokensCHROMIUM.
    An INVALID_OPERATION error is generated if <sync_token> is NULL.

    The command

        void VerifySyncTokensCHROMIUM(GLbyte **sync_tokens, GLsizei count)

    verifies array <sync_tokens> of length <count> and ensures that these sync
    tokens have all been verified. The generated sync token did not have to be
    generated from the same context but it must belong to the same client
    (process). If a sync token was generated by GenUnverifiedSyncTokenCHROMIUM
    and but isn't from the same client (process), an INVALID_OPERATION error is
    generated. Sync tokens which have already been verified are ignored, if all
    sync tokens were already verified then nothing will be done.

    The command

        void WaitSyncTokenCHROMIUM(const GLbyte *sync_token)

    causes the current context to stop submitting commands until the specified
    fence sync becomes signaled. This is implemented as a server-side wait.
    <sync_token> must be a sync token generated by GenSyncTokenCHROMIUM, or
    generated by GenUnverifiedSyncTokenCHROMIUM and from the same client
    (process). If <sync_token> isn't a valid sync token returned by
    GenSyncTokenCHROMIUM or GenUnverifiedSyncTokenCHROMIUM, the result is
    undefined.

New Tokens

    The size of a sync token name in bytes.

        GL_SYNC_TOKEN_SIZE_CHROMIUM                        24

Errors

    INVALID_VALUE is generated if the <sync_token> parameter of
    GenSyncTokenCHROMIUM or GenUnverifiedSyncTokenCHROMIUM is NULL.

    INVALID_OPERATION is generated if the <sync_token> parameter of
    WaitSyncTokenCHROMIUM or VerifySyncTokensCHROMIUM was generated using
    GenUnverifiedSyncTokenCHROMIUM but is not from the same client (process).

New State

    None.

Revision History

    2/25/2013    Documented the extension

    9/8/2015     Modified functions InsertFenceSyncCHROMIUM,
    GenSyncTokenCHROMIUM, and WaitSyncTokenCHROMIUM.

    10/12/2015   Added function GenUnverifiedSyncTokenCHROMIUM.

    11/24/2015   Clarified that GenUnverifiedSyncTokenCHROMIUM only needs an
    ordering barrier and added proper error values.

    11/25/2015   Added function VerifySyncTokensCHROMIUM.

    12/13/2017   Simplified functions GenSyncTokenCHROMIUM and
                 GenUnverifiedSyncTokenCHROMIUM to generate the fence
                 implicitly. Removed function InsertFenceSyncCHROMIUM.
 
    03/18/2024   Removed reference to glProduceTextureDirectCHROMIUM.