15bd8deadSopenharmony_ciXXX - Not complete yet!!!
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ciName
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ci    SGIX_async
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ciName Strings
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ci    GL_SGIX_async
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ciVersion
125bd8deadSopenharmony_ci
135bd8deadSopenharmony_ci    $Date: 1998/06/04 20:57:36 $ $Revision: 1.8 $
145bd8deadSopenharmony_ci
155bd8deadSopenharmony_ciNumber
165bd8deadSopenharmony_ci
175bd8deadSopenharmony_ci    132
185bd8deadSopenharmony_ci
195bd8deadSopenharmony_ciDependencies
205bd8deadSopenharmony_ci
215bd8deadSopenharmony_ci    None.
225bd8deadSopenharmony_ci
235bd8deadSopenharmony_ciOverview
245bd8deadSopenharmony_ci
255bd8deadSopenharmony_ci    This extension provides a framework for asynchronous OpenGL
265bd8deadSopenharmony_ci    commands.  It also provides commands allowing a program to wait
275bd8deadSopenharmony_ci    for the completion of asynchronous commands.
285bd8deadSopenharmony_ci    
295bd8deadSopenharmony_ci    Asynchronous commands have two properties:
305bd8deadSopenharmony_ci    
315bd8deadSopenharmony_ci    1) Asynchronous commands are non-blocking.  For example, an
325bd8deadSopenharmony_ci    asynchronous ReadPixels command returns control to the program
335bd8deadSopenharmony_ci    immediately rather than blocking until the command completes.
345bd8deadSopenharmony_ci    This property allows the program to issue other OpenGL commands in
355bd8deadSopenharmony_ci    parallel with the execution of commands that normally block.
365bd8deadSopenharmony_ci    
375bd8deadSopenharmony_ci    2) Asynchronous commands may complete out-of-order with respect to
385bd8deadSopenharmony_ci    other OpenGL commands.  For example, an asynchronous TexImage
395bd8deadSopenharmony_ci    command may complete after subsequent OpenGL commands issued by
405bd8deadSopenharmony_ci    the program rather than maintaining the normal serial order of the
415bd8deadSopenharmony_ci    OpenGL command stream.  This property allows the graphics
425bd8deadSopenharmony_ci    accelerator to execute asynchronous commands in parallel with the
435bd8deadSopenharmony_ci    normal command stream, for instance using a secondary path to
445bd8deadSopenharmony_ci    transfer data from or to the host, without doing any dependency
455bd8deadSopenharmony_ci    checking.
465bd8deadSopenharmony_ci    
475bd8deadSopenharmony_ci    Programs that issue asynchronous commands must also be able to
485bd8deadSopenharmony_ci    determine when the commands have completed.  The completion status
495bd8deadSopenharmony_ci    may be needed so that results can be retrieved (e.g. the image
505bd8deadSopenharmony_ci    data from a ReadPixels command) or so that dependent commands can
515bd8deadSopenharmony_ci    be issued (e.g. drawing commands that use texture data downloaded
525bd8deadSopenharmony_ci    by an earlier asynchronous command).  This extension provides
535bd8deadSopenharmony_ci    fine-grain control over asynchronous commands by introducing a
545bd8deadSopenharmony_ci    mechanism for determining the status of individual commands.
555bd8deadSopenharmony_ci
565bd8deadSopenharmony_ci    Each invocation of an asynchronous command is associated with an
575bd8deadSopenharmony_ci    integer called a "marker."  A program specifies a marker before it
585bd8deadSopenharmony_ci    issues an asynchronous command.  The program may later issue a
595bd8deadSopenharmony_ci    command to query if any asynchronous commands have completed.  The
605bd8deadSopenharmony_ci    query commands return a marker to identify the command that
615bd8deadSopenharmony_ci    completed.  This extension provides both blocking and non-blocking
625bd8deadSopenharmony_ci    query commands.
635bd8deadSopenharmony_ci
645bd8deadSopenharmony_ci    This extension does not define any asynchronous commands.
655bd8deadSopenharmony_ci    See SGIX_async_pixel for the asynchronous pixel commands.
665bd8deadSopenharmony_ci
675bd8deadSopenharmony_ciIssues
685bd8deadSopenharmony_ci
695bd8deadSopenharmony_ci    * Should all asynchronous operations share the same marker name space?
705bd8deadSopenharmony_ci
715bd8deadSopenharmony_ci      Ans: Yes.  The argument for separate name spaces is that it
725bd8deadSopenharmony_ci      makes modularizing an application easier.  The proposal was to
735bd8deadSopenharmony_ci      use a separate name space for each category of commands,
745bd8deadSopenharmony_ci      e.g. readpixels, teximage, drawpixels, and histogram. That works
755bd8deadSopenharmony_ci      if each name space is used by only one part of the application
765bd8deadSopenharmony_ci      (e.g. one part of the application issues asynchronous readpixels
775bd8deadSopenharmony_ci      and some other part issues asynchronous teximage), but it
785bd8deadSopenharmony_ci      doesn't work if there are multiple uses of one name space
795bd8deadSopenharmony_ci      (e.g. two libraries that both use asynchronous readpixels).  It
805bd8deadSopenharmony_ci      doesn't seem worth complicating the API to provide such a
815bd8deadSopenharmony_ci      limited benefit.  The better solution is for a higher-level API
825bd8deadSopenharmony_ci      to provide a mechanism for registering an interest in particular
835bd8deadSopenharmony_ci      markers, similar to the X Windows mechanism for distributing
845bd8deadSopenharmony_ci      window events.
855bd8deadSopenharmony_ci
865bd8deadSopenharmony_ci    * Should the order of asynchronous operations be preserved, even
875bd8deadSopenharmony_ci      if they are executed out-of-order with respect to normal commands?
885bd8deadSopenharmony_ci    
895bd8deadSopenharmony_ci      Ans: No, let the extensions that define the async operations choose
905bd8deadSopenharmony_ci      whether or not to preserve order.
915bd8deadSopenharmony_ci
925bd8deadSopenharmony_ci    * Should the extension also define a WaitAsyncSGIX command that
935bd8deadSopenharmony_ci      guarantees completion of a specified asynchronous command before
945bd8deadSopenharmony_ci      subsequent commands are executed?  This command wouldn't require
955bd8deadSopenharmony_ci      the marker to make a round trip back to the host like
965bd8deadSopenharmony_ci      FinishAsyncSGIX does, so it could be implemented more efficiently.
975bd8deadSopenharmony_ci
985bd8deadSopenharmony_ci      Ans: No for now (no compelling application).
995bd8deadSopenharmony_ci
1005bd8deadSopenharmony_ci    * When are errors associated with an asynchronous command
1015bd8deadSopenharmony_ci      reported?
1025bd8deadSopenharmony_ci
1035bd8deadSopenharmony_ci      Ans: A call to GetError after an asynchronous command always
1045bd8deadSopenharmony_ci      reports any errors associated with the command.  The behavior
1055bd8deadSopenharmony_ci      is as if errors are detected at the time a command is issued rather
1065bd8deadSopenharmony_ci      than when it is executed.  In this respect asynchronous commands
1075bd8deadSopenharmony_ci      are no different from synchronous commands.
1085bd8deadSopenharmony_ci      
1095bd8deadSopenharmony_ci    * Should a call to MakeCurrent implicitly force all pending
1105bd8deadSopenharmony_ci      asynchronous commands to complete?
1115bd8deadSopenharmony_ci
1125bd8deadSopenharmony_ci      Ans: This is an implementation issue.  It does not affect the
1135bd8deadSopenharmony_ci      semantics of this extension.
1145bd8deadSopenharmony_ci
1155bd8deadSopenharmony_ci    * Should there be an implementation-dependent limit on the
1165bd8deadSopenharmony_ci      number of outstanding asynchronous commands before the
1175bd8deadSopenharmony_ci      application calls FinishAsync?
1185bd8deadSopenharmony_ci      
1195bd8deadSopenharmony_ci      Ans: This extension does not impose such a limit, but the
1205bd8deadSopenharmony_ci      extensions that introduce asynchronous commands must address the
1215bd8deadSopenharmony_ci      issue.  An asynchronous command that uses an application-allocated
1225bd8deadSopenharmony_ci      buffer for return results (e.g. instruments) lets the application
1235bd8deadSopenharmony_ci      determine the limit by sizing the buffer appropriately.
1245bd8deadSopenharmony_ci
1255bd8deadSopenharmony_ci    * Should this extension modify the instruments extension to use
1265bd8deadSopenharmony_ci      the new PollAsyncSGIX command instead of PollInstrumentsSGIX?
1275bd8deadSopenharmony_ci
1285bd8deadSopenharmony_ci      Ans: No for now.
1295bd8deadSopenharmony_ci
1305bd8deadSopenharmony_ci    * Should there be a generic command to set the current marker
1315bd8deadSopenharmony_ci      instead of a different mechanism for each asynchronous command?
1325bd8deadSopenharmony_ci
1335bd8deadSopenharmony_ci      Ans: Yes, this has been added (AsyncMarkerSGIX).
1345bd8deadSopenharmony_ci
1355bd8deadSopenharmony_ci    * Should there be a command to reserve a set of markers, like
1365bd8deadSopenharmony_ci      GenLists?
1375bd8deadSopenharmony_ci
1385bd8deadSopenharmony_ci      Ans: Yes, this has been added (GenAsyncMarkers and
1395bd8deadSopenharmony_ci      DeleteAsyncMarkers).
1405bd8deadSopenharmony_ci
1415bd8deadSopenharmony_ci    * Should name spaces be specified using enums instead of bitmasks?
1425bd8deadSopenharmony_ci
1435bd8deadSopenharmony_ci      Ans: Yes, but name spaces have now been removed (see above).
1445bd8deadSopenharmony_ci
1455bd8deadSopenharmony_ci    * Would it be better to define an extension that provides non-blocking
1465bd8deadSopenharmony_ci      commands rather than asynchronous commands?
1475bd8deadSopenharmony_ci
1485bd8deadSopenharmony_ci      Ans: No.  Non-blocking commands would require the GL to preserve
1495bd8deadSopenharmony_ci      the order of commands, but that limits the potential for
1505bd8deadSopenharmony_ci      optimization.  The GL would have to check for dependencies
1515bd8deadSopenharmony_ci      between a non-blocking command and all subsequent commands
1525bd8deadSopenharmony_ci      (which is hard to do efficiently), or stall all subsequent
1535bd8deadSopenharmony_ci      commands until the non-blocking command completes, or maintain
1545bd8deadSopenharmony_ci      multiple sets of state.  By defining an asynchronous style of
1555bd8deadSopenharmony_ci      execution we place the burden of detecting dependencies on the
1565bd8deadSopenharmony_ci      application.  There is a large class of applications which can
1575bd8deadSopenharmony_ci      easily guarantee that there are no dependencies.
1585bd8deadSopenharmony_ci
1595bd8deadSopenharmony_ciNew Procedures and Functions
1605bd8deadSopenharmony_ci
1615bd8deadSopenharmony_ci    void AsyncMarkerSGIX(uint marker)
1625bd8deadSopenharmony_ci
1635bd8deadSopenharmony_ci    int FinishAsyncSGIX(uint *markerp)
1645bd8deadSopenharmony_ci
1655bd8deadSopenharmony_ci    int PollAsyncSGIX(uint *markerp)
1665bd8deadSopenharmony_ci
1675bd8deadSopenharmony_ci    uint GenAsyncMarkersSGIX(sizei range)
1685bd8deadSopenharmony_ci
1695bd8deadSopenharmony_ci    void DeleteAsyncMarkersSGIX(uint marker, sizei range)
1705bd8deadSopenharmony_ci
1715bd8deadSopenharmony_ci    boolean IsAsyncMarkerSGIX(uint marker)
1725bd8deadSopenharmony_ci
1735bd8deadSopenharmony_ciNew Tokens
1745bd8deadSopenharmony_ci
1755bd8deadSopenharmony_ci    Accepted by the <pname> parameters of GetBooleanv, GetIntegerv,
1765bd8deadSopenharmony_ci    GetFloatv, and GetDoublev:
1775bd8deadSopenharmony_ci
1785bd8deadSopenharmony_ci	ASYNC_MARKER_SGIX		0x8329
1795bd8deadSopenharmony_ci
1805bd8deadSopenharmony_ciAdditions to Chapter 2 of the 1.1 Specification (OpenGL Operation)
1815bd8deadSopenharmony_ci
1825bd8deadSopenharmony_ci    None
1835bd8deadSopenharmony_ci
1845bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.1 Specification (Rasterization)
1855bd8deadSopenharmony_ci
1865bd8deadSopenharmony_ci    None
1875bd8deadSopenharmony_ci
1885bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.1 Specification (Fragments and the
1895bd8deadSopenharmony_ciFrame Buffer)
1905bd8deadSopenharmony_ci
1915bd8deadSopenharmony_ci    None
1925bd8deadSopenharmony_ci
1935bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.1 Specification (Special Functions)
1945bd8deadSopenharmony_ci
1955bd8deadSopenharmony_ci    Add to section 5.4 (Display Lists):
1965bd8deadSopenharmony_ci    
1975bd8deadSopenharmony_ci    The following commands are not included in display lists:
1985bd8deadSopenharmony_ci
1995bd8deadSopenharmony_ci	FinishAsyncSGIX
2005bd8deadSopenharmony_ci	PollAsyncSGIX
2015bd8deadSopenharmony_ci        GenAsyncMarkersSGIX
2025bd8deadSopenharmony_ci        DeleteAsyncMarkersSGIX
2035bd8deadSopenharmony_ci	IsAsyncMarkerSGIX
2045bd8deadSopenharmony_ci
2055bd8deadSopenharmony_ci    Add a section 5.X prior to the Instruments section entitled
2065bd8deadSopenharmony_ci    "Asynchronous Commands":
2075bd8deadSopenharmony_ci
2085bd8deadSopenharmony_ci    Asynchronous commands are commands that may complete out-of-order
2095bd8deadSopenharmony_ci    with respect to other OpenGL commands.  An asynchronous command
2105bd8deadSopenharmony_ci    samples the OpenGL state vector when it is issued.  The sampled
2115bd8deadSopenharmony_ci    state includes the results from the complete execution of all
2125bd8deadSopenharmony_ci    synchronous (normal) commands issued prior to the asynchronous
2135bd8deadSopenharmony_ci    command.  However, the results of an asynchronous command (state
2145bd8deadSopenharmony_ci    changes or framebuffer updates) are not necessarily committed in
2155bd8deadSopenharmony_ci    order.  An asynchronous command may commit its results any time
2165bd8deadSopenharmony_ci    after the completion of all synchronous commands issued prior to
2175bd8deadSopenharmony_ci    the asynchronous command.  An implementation may choose to execute
2185bd8deadSopenharmony_ci    asynchronous commands in parallel with subsequent commands or at
2195bd8deadSopenharmony_ci    some convenient time in the future.
2205bd8deadSopenharmony_ci
2215bd8deadSopenharmony_ci    Implementations of asynchronous commands may also be non-blocking.
2225bd8deadSopenharmony_ci    For example, a non-blocking query command returns control to the
2235bd8deadSopenharmony_ci    program immediately rather than stalling the program until the
2245bd8deadSopenharmony_ci    results of the query are available.
2255bd8deadSopenharmony_ci
2265bd8deadSopenharmony_ci    When an asynchronous command is issued the current value of
2275bd8deadSopenharmony_ci    ASYNC_MARKER_SGIX is associated with the particular invocation of
2285bd8deadSopenharmony_ci    the command.  This value is an integer called a "marker" which can
2295bd8deadSopenharmony_ci    be used by the application to identify a particular command when
2305bd8deadSopenharmony_ci    it completes as described later in this section.  The value of
2315bd8deadSopenharmony_ci    ASYNC_MARKER_SGIX is specified by calling AsyncMarkerSGIX with the
2325bd8deadSopenharmony_ci    <marker> parameter set to the marker value.  It is not an error to
2335bd8deadSopenharmony_ci    invoke multiple asynchronous commands without changing
2345bd8deadSopenharmony_ci    ASYNC_MARKER_SGIX, although such a situation may make it
2355bd8deadSopenharmony_ci    impossible for the application to distinguish the completion
2365bd8deadSopenharmony_ci    status of the commands.
2375bd8deadSopenharmony_ci
2385bd8deadSopenharmony_ci    OpenGL provides two commands for determining that
2395bd8deadSopenharmony_ci    previously-issued asynchronous commands have completed:
2405bd8deadSopenharmony_ci    FinishAsyncSGIX, which blocks until an asynchronous command
2415bd8deadSopenharmony_ci    completes, and PollAsyncSGIX, which is non-blocking.  Both
2425bd8deadSopenharmony_ci    commands write the marker associated with the completed
2435bd8deadSopenharmony_ci    asynchronous command into the integer referred to by the <markerp>
2445bd8deadSopenharmony_ci    parameter.
2455bd8deadSopenharmony_ci
2465bd8deadSopenharmony_ci    FinishAsyncSGIX returns 1 when an asynchronous command has
2475bd8deadSopenharmony_ci    completed.  If there are pending asynchronous commands but none
2485bd8deadSopenharmony_ci    have completed then FinishAsyncSGIX blocks until at least one
2495bd8deadSopenharmony_ci    command completes.  If there are no pending asynchronous commands
2505bd8deadSopenharmony_ci    then FinishAsyncSGIX immediately returns 0 and does not modify the
2515bd8deadSopenharmony_ci    integer referred to by <markerp>.
2525bd8deadSopenharmony_ci
2535bd8deadSopenharmony_ci    PollAsyncSGIX is identical to FinishAsyncSGIX except that if there
2545bd8deadSopenharmony_ci    are no asynchronous commands that have completed then
2555bd8deadSopenharmony_ci    PollAsyncSGIX immediately returns 0 rather than blocking.
2565bd8deadSopenharmony_ci
2575bd8deadSopenharmony_ci    Calls to FinishAsyncSGIX and PollAsyncSGIX may be freely
2585bd8deadSopenharmony_ci    intermixed.  Once OpenGL has reported the completion of an
2595bd8deadSopenharmony_ci    asynchronous command via either FinishAsyncSGIX or PollAsyncSGIX
2605bd8deadSopenharmony_ci    the completion status of the command will not be reported again.
2615bd8deadSopenharmony_ci    If several commands have the same marker associated with them, the
2625bd8deadSopenharmony_ci    completion status of each command will be reported separately,
2635bd8deadSopenharmony_ci    although these reports will be indistinguishable.  The order in
2645bd8deadSopenharmony_ci    which asynchronous commands are reported is undefined by this
2655bd8deadSopenharmony_ci    extension, although the extensions that define asynchronous
2665bd8deadSopenharmony_ci    commands may guarantee a particular order.
2675bd8deadSopenharmony_ci    
2685bd8deadSopenharmony_ci    A program may guarantee that all outstanding asynchronous commands
2695bd8deadSopenharmony_ci    have completed by calling Finish.  A call to Finish does not cause
2705bd8deadSopenharmony_ci    the completion status of outstanding commands to be reported, so
2715bd8deadSopenharmony_ci    subsequent calls to FinishAsyncSGIX or PollAsyncSGIX will report
2725bd8deadSopenharmony_ci    the status of such commands.
2735bd8deadSopenharmony_ci    
2745bd8deadSopenharmony_ci    Three commands are provided to manage asynchronous command
2755bd8deadSopenharmony_ci    markers.  A marker is "in use" if it is the current value of
2765bd8deadSopenharmony_ci    ASYNC_MARKER_SGIX or if it is associated with any asynchronous
2775bd8deadSopenharmony_ci    command that has been issued but has not been queried using
2785bd8deadSopenharmony_ci    FinishAsyncSGIX or PollAsyncSGIX.  A marker may also be "reserved"
2795bd8deadSopenharmony_ci    by calling GenAsyncMarkersSGIX.  GenAsyncMarkersSGIX returns an
2805bd8deadSopenharmony_ci    integer n such that the markers n, n+1, n+2, ..., n+s-1 are not
2815bd8deadSopenharmony_ci    previously reserved or in use, where s is the value of the <range>
2825bd8deadSopenharmony_ci    parameter, or it returns 0 if no contiguous range of the specified
2835bd8deadSopenharmony_ci    length could be reserved.  The command also records that each of
2845bd8deadSopenharmony_ci    the markers in the returned range is reserved.
2855bd8deadSopenharmony_ci    
2865bd8deadSopenharmony_ci    DeleteAsyncMarkersSGIX records that each of the markers in the
2875bd8deadSopenharmony_ci    range n, n+1, n+2, ..., n+s-1 is no longer reserved, where n is
2885bd8deadSopenharmony_ci    the value of the <marker> parameter and s is the value of the
2895bd8deadSopenharmony_ci    <range> parameter.  It is not an error if some of the markers in
2905bd8deadSopenharmony_ci    the range are not reserved or are currently in use, but a marker
2915bd8deadSopenharmony_ci    that is in use will remain so even if DeleteAsyncMarkersSGIX is
2925bd8deadSopenharmony_ci    called.  IsAsyncMarkerSGIX returns 1 if the parameter <marker>
2935bd8deadSopenharmony_ci    identifies a marker that is currently in use or reserved, and the
2945bd8deadSopenharmony_ci    command returns 0 otherwise.
2955bd8deadSopenharmony_ci
2965bd8deadSopenharmony_ci    Note that the marker name space is never shared across contexts,
2975bd8deadSopenharmony_ci    as the name spaces for texture objects and display lists may be.
2985bd8deadSopenharmony_ci    
2995bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.1 Specification (State and State Requests)
3005bd8deadSopenharmony_ci
3015bd8deadSopenharmony_ci    None
3025bd8deadSopenharmony_ci
3035bd8deadSopenharmony_ciAdditions to the GLX Specification
3045bd8deadSopenharmony_ci
3055bd8deadSopenharmony_ci    Add to the end of Section 4.4 (Sequentiality):
3065bd8deadSopenharmony_ci    
3075bd8deadSopenharmony_ci    Asynchronous OpenGL commands do not obey the normal sequentiality
3085bd8deadSopenharmony_ci    guarantees for OpenGL commands.  Any command issued asynchronously
3095bd8deadSopenharmony_ci    may be inserted into the GLX protocol stream at any command
3105bd8deadSopenharmony_ci    boundary following the command that was issued before it.
3115bd8deadSopenharmony_ci
3125bd8deadSopenharmony_ciGLX Protocol
3135bd8deadSopenharmony_ci
3145bd8deadSopenharmony_ci    XXX Not complete.  Asynchronous commands should generate events
3155bd8deadSopenharmony_ci    when they complete.  The current GLX spec says that no new events
3165bd8deadSopenharmony_ci    are defined, so this will have to be changed.
3175bd8deadSopenharmony_ci
3185bd8deadSopenharmony_ciErrors
3195bd8deadSopenharmony_ci
3205bd8deadSopenharmony_ci    INVALID_OPERATION is generated if AsyncMarkerSGIX,
3215bd8deadSopenharmony_ci    FinishAsyncSGIX, PollAsyncSGIX, GenAsyncMarkersSGIX,
3225bd8deadSopenharmony_ci    DeleteAsyncMarkersSGIX or IsAsyncMarkerSGIX is called between
3235bd8deadSopenharmony_ci    execution of Begin and the corresponding execution of End.
3245bd8deadSopenharmony_ci
3255bd8deadSopenharmony_ciNew State
3265bd8deadSopenharmony_ci
3275bd8deadSopenharmony_ci    Get Value			Get Command	Type	Value	Attrib
3285bd8deadSopenharmony_ci    ---------			-----------	----	-------	------
3295bd8deadSopenharmony_ci    ASYNC_MARKER_SGIX           GetIntegerv     Z+      0       -
3305bd8deadSopenharmony_ci
3315bd8deadSopenharmony_ciNew Implementation Dependent State
3325bd8deadSopenharmony_ci
3335bd8deadSopenharmony_ci    None
334