15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    NV_parameter_buffer_object
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    None (implied by NV_gpu_program4)
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciContact
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    Pat Brown, NVIDIA Corporation (pbrown 'at' nvidia.com)
125bd8deadSopenharmony_ci    Eric Werness, NVIDIA Corporation (ewerness 'at' nvidia.com)
135bd8deadSopenharmony_ci
145bd8deadSopenharmony_ciStatus
155bd8deadSopenharmony_ci
165bd8deadSopenharmony_ci    Shipping for GeForce 8 Series (November 2006)
175bd8deadSopenharmony_ci
185bd8deadSopenharmony_ciVersion
195bd8deadSopenharmony_ci
205bd8deadSopenharmony_ci    Last Modified Date:         03/09/2011
215bd8deadSopenharmony_ci    NVIDIA Revision:            9
225bd8deadSopenharmony_ci
235bd8deadSopenharmony_ciNumber
245bd8deadSopenharmony_ci
255bd8deadSopenharmony_ci    339
265bd8deadSopenharmony_ci
275bd8deadSopenharmony_ciDependencies
285bd8deadSopenharmony_ci
295bd8deadSopenharmony_ci    OpenGL 2.0 is required.
305bd8deadSopenharmony_ci
315bd8deadSopenharmony_ci    NV_gpu_program4 is required.
325bd8deadSopenharmony_ci
335bd8deadSopenharmony_ci    This extension is written against the OpenGL 2.0 specification.
345bd8deadSopenharmony_ci
355bd8deadSopenharmony_ci    NV_transform_feedback affects this extension.
365bd8deadSopenharmony_ci
375bd8deadSopenharmony_ci    OpenGL 3.0 affects this extension.
385bd8deadSopenharmony_ci
395bd8deadSopenharmony_ciOverview
405bd8deadSopenharmony_ci
415bd8deadSopenharmony_ci    This extension, in conjunction with NV_gpu_program4, provides a new type
425bd8deadSopenharmony_ci    of program parameter than can be used as a constant during vertex,
435bd8deadSopenharmony_ci    fragment, or geometry program execution.  Each program target has a set of
445bd8deadSopenharmony_ci    parameter buffer binding points to which buffer objects can be attached.
455bd8deadSopenharmony_ci
465bd8deadSopenharmony_ci    A vertex, fragment, or geometry program can read data from the attached
475bd8deadSopenharmony_ci    buffer objects using a binding of the form "program.buffer[a][b]".  This
485bd8deadSopenharmony_ci    binding reads data from the buffer object attached to binding point <a>.
495bd8deadSopenharmony_ci    The buffer object attached is treated either as an array of 32-bit words
505bd8deadSopenharmony_ci    or an array of four-component vectors, and the binding above reads the
515bd8deadSopenharmony_ci    array element numbered <b>.
525bd8deadSopenharmony_ci
535bd8deadSopenharmony_ci    The use of buffer objects allows applications to change large blocks of
545bd8deadSopenharmony_ci    program parameters at once, simply by binding a new buffer object.  It
555bd8deadSopenharmony_ci    also provides a number of new ways to load parameter values, including
565bd8deadSopenharmony_ci    readback from the frame buffer (EXT_pixel_buffer_object), transform
575bd8deadSopenharmony_ci    feedback (NV_transform_feedback), buffer object loading functions such as
585bd8deadSopenharmony_ci    MapBuffer and BufferData, as well as dedicated parameter buffer update
595bd8deadSopenharmony_ci    functions provided by this extension.
605bd8deadSopenharmony_ci
615bd8deadSopenharmony_ciNew Procedures and Functions
625bd8deadSopenharmony_ci
635bd8deadSopenharmony_ci    void BindBufferRangeNV(enum target, uint index, uint buffer,
645bd8deadSopenharmony_ci                           intptr offset, sizeiptr size);
655bd8deadSopenharmony_ci    void BindBufferOffsetNV(enum target, uint index, uint buffer,
665bd8deadSopenharmony_ci                            intptr offset);
675bd8deadSopenharmony_ci    void BindBufferBaseNV(enum target, uint index, uint buffer);
685bd8deadSopenharmony_ci    void ProgramBufferParametersfvNV(enum target, uint bindingIndex, uint wordIndex,
695bd8deadSopenharmony_ci                                     sizei count, const float *params);
705bd8deadSopenharmony_ci    void ProgramBufferParametersIivNV(enum target, uint bindingIndex, uint wordIndex, 
715bd8deadSopenharmony_ci                                      sizei count, const int *params);
725bd8deadSopenharmony_ci    void ProgramBufferParametersIuivNV(enum target, uint bindingIndex, uint wordIndex, 
735bd8deadSopenharmony_ci                                       sizei count, const uint *params);
745bd8deadSopenharmony_ci    void GetIntegerIndexedvEXT(enum value, uint index, int *data);
755bd8deadSopenharmony_ci
765bd8deadSopenharmony_ciNew Tokens
775bd8deadSopenharmony_ci
785bd8deadSopenharmony_ci    Accepted by the <pname> parameter of GetProgramivARB:
795bd8deadSopenharmony_ci
805bd8deadSopenharmony_ci      MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV          0x8DA0
815bd8deadSopenharmony_ci      MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV              0x8DA1
825bd8deadSopenharmony_ci
835bd8deadSopenharmony_ci    Accepted by the <target> parameter of ProgramBufferParametersfvNV,
845bd8deadSopenharmony_ci    ProgramBufferParametersIivNV, and ProgramBufferParametersIuivNV,
855bd8deadSopenharmony_ci    BindBufferRangeNV, BindBufferOffsetNV, BindBufferBaseNV, and BindBuffer
865bd8deadSopenharmony_ci    and the <value> parameter of GetIntegerv and GetIntegerIndexedvEXT:
875bd8deadSopenharmony_ci
885bd8deadSopenharmony_ci      VERTEX_PROGRAM_PARAMETER_BUFFER_NV                0x8DA2
895bd8deadSopenharmony_ci      GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV              0x8DA3
905bd8deadSopenharmony_ci      FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV              0x8DA4
915bd8deadSopenharmony_ci
925bd8deadSopenharmony_ciAdditions to Chapter 2 of the OpenGL 2.0 Specification (OpenGL Operation)
935bd8deadSopenharmony_ci
945bd8deadSopenharmony_ci    Modify "Section 2.14.1" of the ARB_vertex_program specification.
955bd8deadSopenharmony_ci
965bd8deadSopenharmony_ci    (Add after the discussion of environment parameters.)
975bd8deadSopenharmony_ci
985bd8deadSopenharmony_ci    Additionally, each program target has an array of parameter buffer binding
995bd8deadSopenharmony_ci    points, to which a buffer object (Section 2.9) can be bound.  The number
1005bd8deadSopenharmony_ci    of available binding points is given by the implementation-dependent
1015bd8deadSopenharmony_ci    constant MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV. These binding points
1025bd8deadSopenharmony_ci    are shared by all programs of a given type.  All bindings are initialized
1035bd8deadSopenharmony_ci    to the name zero, which indicates that no valid binding is present.
1045bd8deadSopenharmony_ci
1055bd8deadSopenharmony_ci    A program parameter binding is associated with a buffer object using
1065bd8deadSopenharmony_ci    BindBufferOffsetNV with a <target> of VERTEX_PROGRAM_PARAMETER_BUFFER_NV,
1075bd8deadSopenharmony_ci    GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV, or
1085bd8deadSopenharmony_ci    FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV and <index> corresponding to the
1095bd8deadSopenharmony_ci    number of the desired binding point. The error INVALID_VALUE is generated
1105bd8deadSopenharmony_ci    if the value of <index> is greater than or equal to
1115bd8deadSopenharmony_ci    MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS.
1125bd8deadSopenharmony_ci
1135bd8deadSopenharmony_ci    Buffer objects are made to be sources of program parameter buffers by
1145bd8deadSopenharmony_ci    calling one of
1155bd8deadSopenharmony_ci
1165bd8deadSopenharmony_ci      void BindBufferRangeNV(enum target, uint index, uint buffer,
1175bd8deadSopenharmony_ci                             intptr offset, sizeiptr size)
1185bd8deadSopenharmony_ci      void BindBufferOffsetNV(enum target, uint index, uint buffer,
1195bd8deadSopenharmony_ci                              intptr offset)
1205bd8deadSopenharmony_ci      void BindBufferBaseNV(enum target, uint index, uint buffer)
1215bd8deadSopenharmony_ci
1225bd8deadSopenharmony_ci    where <target> is set to VERTEX_PROGRAM_PARAMETER_BUFFER_NV,
1235bd8deadSopenharmony_ci    GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV, or
1245bd8deadSopenharmony_ci    FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV.  Any of the three BindBuffer*
1255bd8deadSopenharmony_ci    commands perform the equivalent of BindBuffer(target, buffer).  <buffer>
1265bd8deadSopenharmony_ci    specifies which buffer object to bind to the target at index number
1275bd8deadSopenharmony_ci    <index>.  <index> must be less than the value of
1285bd8deadSopenharmony_ci    MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV.  <offset> specifies a starting
1295bd8deadSopenharmony_ci    offset into the buffer object <buffer>.  <size> specifies the number of
1305bd8deadSopenharmony_ci    elements in the bound portion of the buffer.  Both <offset> and <size> are
1315bd8deadSopenharmony_ci    in basic machine units. The error INVALID_VALUE is generated if the value
1325bd8deadSopenharmony_ci    of <size> is less than or equal to zero.  The error INVALID_VALUE is
1335bd8deadSopenharmony_ci    generated if <offset> or <size> are not word-aligned.  For program
1345bd8deadSopenharmony_ci    parameter buffers, the error INVALID_VALUE is generated if <offset> is
1355bd8deadSopenharmony_ci    non-zero.
1365bd8deadSopenharmony_ci
1375bd8deadSopenharmony_ci    BindBufferBaseNV is equivalent to calling BindBufferOffsetNV with an
1385bd8deadSopenharmony_ci    <offset> of 0. BindBufferOffsetNV is the equivalent of calling
1395bd8deadSopenharmony_ci    BindBufferRangeNV with <size> = sizeof(buffer) - <offset> and rounding
1405bd8deadSopenharmony_ci    <size> down so that it is word-aligned.
1415bd8deadSopenharmony_ci
1425bd8deadSopenharmony_ci    All program parameter buffer parameters are either single-component 32-bit
1435bd8deadSopenharmony_ci    words or four-component vectors made up of 32-bit words.  The program
1445bd8deadSopenharmony_ci    parameter buffers may hold signed integer, unsigned integer, or
1455bd8deadSopenharmony_ci    floating-point data.  There is a limit on the maximum number of words of a
1465bd8deadSopenharmony_ci    buffer object that can be accessed using any single parameter buffer
1475bd8deadSopenharmony_ci    binding point, given by the implementation-dependent constant
1485bd8deadSopenharmony_ci    MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV.  Buffer objects larger than this
1495bd8deadSopenharmony_ci    size may be used, but the results of accessing portions of the buffer
1505bd8deadSopenharmony_ci    object beyond the limit are undefined.
1515bd8deadSopenharmony_ci
1525bd8deadSopenharmony_ci    The commands
1535bd8deadSopenharmony_ci
1545bd8deadSopenharmony_ci      void ProgramBufferParametersfvNV(enum target, uint bindingIndex, uint wordIndex,
1555bd8deadSopenharmony_ci                                       sizei count, const float *params);
1565bd8deadSopenharmony_ci      void ProgramBufferParametersIivNV(enum target, uint bindingIndex, uint wordIndex, 
1575bd8deadSopenharmony_ci                                        sizei count, const int *params);
1585bd8deadSopenharmony_ci      void ProgramBufferParametersIuivNV(enum target, uint bindingIndex, uint wordIndex, 
1595bd8deadSopenharmony_ci                                        sizei count, const uint *params);
1605bd8deadSopenharmony_ci
1615bd8deadSopenharmony_ci    update words <wordIndex> through <wordIndex>+<count>-1 in the buffer object bound
1625bd8deadSopenharmony_ci    to the binding point numbered <bindingIndex> for the program target <target>.
1635bd8deadSopenharmony_ci    The new data is referenced by <params>.  The error INVALID_OPERATION is
1645bd8deadSopenharmony_ci    generated if no buffer object is bound to the binding point numbered
1655bd8deadSopenharmony_ci    <bindingIndex>.  The error INVALID_VALUE is generated if <wordIndex>+<count> is
1665bd8deadSopenharmony_ci    greater than either the number of words in the buffer object or the
1675bd8deadSopenharmony_ci    maximum parameter buffer size MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV.  These
1685bd8deadSopenharmony_ci    functions perform an operation functionally equivalent to calling
1695bd8deadSopenharmony_ci    BufferSubData, but possibly with higher performance.
1705bd8deadSopenharmony_ci
1715bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL 2.0 Specification (Rasterization)
1725bd8deadSopenharmony_ci
1735bd8deadSopenharmony_ci    None.
1745bd8deadSopenharmony_ci
1755bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL 2.0 Specification (Per-Fragment
1765bd8deadSopenharmony_ciOperations and the Frame Buffer)
1775bd8deadSopenharmony_ci
1785bd8deadSopenharmony_ci    None.
1795bd8deadSopenharmony_ci
1805bd8deadSopenharmony_ciAdditions to Chapter 5 of the OpenGL 2.0 Specification (Special Functions)
1815bd8deadSopenharmony_ci
1825bd8deadSopenharmony_ci    None.
1835bd8deadSopenharmony_ci
1845bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL 2.0 Specification (State and
1855bd8deadSopenharmony_ciState Requests)
1865bd8deadSopenharmony_ci
1875bd8deadSopenharmony_ci    Modify the second paragraph of section 6.1.1 (Simple Queries) p. 244 to
1885bd8deadSopenharmony_ci    read as follows:
1895bd8deadSopenharmony_ci
1905bd8deadSopenharmony_ci    ...<data> is a pointer to a scalar or array of the indicated type in which
1915bd8deadSopenharmony_ci    to place the returned data.
1925bd8deadSopenharmony_ci
1935bd8deadSopenharmony_ci        void GetIntegerIndexedvEXT(enum target, uint index,
1945bd8deadSopenharmony_ci                                   int *data);
1955bd8deadSopenharmony_ci
1965bd8deadSopenharmony_ci    are used to query indexed state.  <target> is the name of the indexed
1975bd8deadSopenharmony_ci    state and <index> is the index of the particular element being queried.
1985bd8deadSopenharmony_ci    <data> is a pointer to a scalar or array of the indicated type in which to
1995bd8deadSopenharmony_ci    place the returned data.
2005bd8deadSopenharmony_ci
2015bd8deadSopenharmony_ci    When <target> is one of VERTEX_PROGRAM_PARAMETER_BUFFER_NV,
2025bd8deadSopenharmony_ci    GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV, or
2035bd8deadSopenharmony_ci    FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV, the <index> is a buffer
2045bd8deadSopenharmony_ci    binding index; the error INVALID_VALUE is generated if <index>
2055bd8deadSopenharmony_ci    is greater or equal to the implementation-dependent value of
2065bd8deadSopenharmony_ci    MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS.
2075bd8deadSopenharmony_ci
2085bd8deadSopenharmony_ciAdditions to the AGL/GLX/WGL Specifications
2095bd8deadSopenharmony_ci
2105bd8deadSopenharmony_ci    None
2115bd8deadSopenharmony_ci
2125bd8deadSopenharmony_ciGLX Protocol
2135bd8deadSopenharmony_ci
2145bd8deadSopenharmony_ci    TBD
2155bd8deadSopenharmony_ci
2165bd8deadSopenharmony_ciDependencies on NV_transform_feedback
2175bd8deadSopenharmony_ci
2185bd8deadSopenharmony_ci    Both NV_transform_feedback and this extension define the behavior of
2195bd8deadSopenharmony_ci    BindBuffer{Range, Offset, Base}NV. Both definitions should be functionally
2205bd8deadSopenharmony_ci    identical.
2215bd8deadSopenharmony_ci
2225bd8deadSopenharmony_ciDependencies on OpenGL 3.0
2235bd8deadSopenharmony_ci
2245bd8deadSopenharmony_ci    GetIntegeri_v accepts the same target parameters GetIntegerIndexedvEXT
2255bd8deadSopenharmony_ci    and the two queries return identical results.
2265bd8deadSopenharmony_ci
2275bd8deadSopenharmony_ciErrors
2285bd8deadSopenharmony_ci
2295bd8deadSopenharmony_ci    The error INVALID_VALUE is generated by BindBufferRangeNV,
2305bd8deadSopenharmony_ci    BindBufferOffsetNV, or BindBufferBaseNV if <target> is
2315bd8deadSopenharmony_ci    VERTEX_PROGRAM_PARAMETER_BUFFER_NV, GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV,
2325bd8deadSopenharmony_ci    or FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV, and <index> is greater than or
2335bd8deadSopenharmony_ci    equal to MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS.
2345bd8deadSopenharmony_ci
2355bd8deadSopenharmony_ci    The error INVALID_VALUE is generated by BindBufferRangeNV or
2365bd8deadSopenharmony_ci    BindBufferOffsetNV if <offset> or <size> is not word-aligned.
2375bd8deadSopenharmony_ci
2385bd8deadSopenharmony_ci    The error INVALID_VALUE is generated by BindBufferRangeNV if <size> is
2395bd8deadSopenharmony_ci    less than zero.
2405bd8deadSopenharmony_ci
2415bd8deadSopenharmony_ci    The error INVALID_VALUE is generated by BindBufferRangeNV or
2425bd8deadSopenharmony_ci    BindBufferOffsetNV if <target> is VERTEX_PROGRAM_PARAMETER_BUFFER_NV,
2435bd8deadSopenharmony_ci    GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV, or
2445bd8deadSopenharmony_ci    FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV, and <offset> is non-zero.
2455bd8deadSopenharmony_ci
2465bd8deadSopenharmony_ci    The error INVALID_OPERATION is generated by ProgramBufferParametersfvNV,
2475bd8deadSopenharmony_ci    ProgramBufferParametersIivNV, or ProgramBufferParametersIuivNV if no
2485bd8deadSopenharmony_ci    buffer object is bound to the binding point numbered <bindingIndex> for program
2495bd8deadSopenharmony_ci    target <target>.
2505bd8deadSopenharmony_ci
2515bd8deadSopenharmony_ci    The error INVALID_VALUE is generated by ProgramBufferParametersfvNV,
2525bd8deadSopenharmony_ci    ProgramBufferParametersIivNV, or ProgramBufferParametersIuivNV if the sum
2535bd8deadSopenharmony_ci    of <wordIndex> and <count> is greater than either the number of words in the
2545bd8deadSopenharmony_ci    buffer object bound to <bindingIndex> or the maximum parameter buffer size
2555bd8deadSopenharmony_ci    MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV.
2565bd8deadSopenharmony_ci
2575bd8deadSopenharmony_ci    The error INVALID_VALUE is generated by GetIntegerIndexedvEXT
2585bd8deadSopenharmony_ci    when <target> is one of VERTEX_PROGRAM_PARAMETER_BUFFER_NV,
2595bd8deadSopenharmony_ci    GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV, or
2605bd8deadSopenharmony_ci    FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV, and the <index> is greater
2615bd8deadSopenharmony_ci    than or equal to MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS.
2625bd8deadSopenharmony_ci
2635bd8deadSopenharmony_ciNew State
2645bd8deadSopenharmony_ci
2655bd8deadSopenharmony_ci    (Modify ARB_vertex_program, Table X.6 -- Program State)
2665bd8deadSopenharmony_ci
2675bd8deadSopenharmony_ci                                                      Initial
2685bd8deadSopenharmony_ci    Get Value                    Type    Get Command  Value   Description               Sec.    Attribute
2695bd8deadSopenharmony_ci    ---------                    ------- -----------  ------- ------------------------  ------  ---------
2705bd8deadSopenharmony_ci    VERTEX_PROGRAM_PARAMETER_    Z+      GetIntegerv  0       Active vertex program     2.14.1  -
2715bd8deadSopenharmony_ci      BUFFER_NV                                               buffer object binding
2725bd8deadSopenharmony_ci    VERTEX_PROGRAM_PARAMETER_    nxZ+    GetInteger-  0       Buffer objects bound for  2.14.1  -
2735bd8deadSopenharmony_ci      BUFFER_NV                          IndexedvEXT          vertex program use
2745bd8deadSopenharmony_ci    GEOMETRY_PROGRAM_PARAMETER_  Z+      GetIntegerv  0       Active geometry program   2.14.1  -
2755bd8deadSopenharmony_ci      BUFFER_NV                                               buffer object binding
2765bd8deadSopenharmony_ci    GEOMETRY_PROGRAM_PARAMETER_  nxZ+    GetInteger-  0       Buffer objects bound for  2.14.1  -
2775bd8deadSopenharmony_ci      BUFFER_NV                          IndexedvEXT          geometry program use
2785bd8deadSopenharmony_ci    FRAGMENT_PROGRAM_PARAMETER_  Z+      GetIntegerv  0       Active fragment program   2.14.1  -
2795bd8deadSopenharmony_ci      BUFFER_NV                                               buffer object binding
2805bd8deadSopenharmony_ci    FRAGMENT_PROGRAM_PARAMETER_  nxZ+    GetInteger-  0       Buffer objects bound for  2.14.1  -
2815bd8deadSopenharmony_ci      BUFFER_NV                          IndexedvEXT          fragment program use
2825bd8deadSopenharmony_ci
2835bd8deadSopenharmony_ciNew Implementation Dependent State
2845bd8deadSopenharmony_ci
2855bd8deadSopenharmony_ci                                                      Minimum
2865bd8deadSopenharmony_ci    Get Value                    Type    Get Command  Value   Description       Sec.    Attribute
2875bd8deadSopenharmony_ci    ---------                    ------- -----------  ------- ----------------  ------  ---------
2885bd8deadSopenharmony_ci    MAX_PROGRAM_PARAMETER_       Z       GetProgram-  8       size of program   2.14.1  -
2895bd8deadSopenharmony_ci      BUFFER_BINDINGS_NV                   ivARB              parameter binding
2905bd8deadSopenharmony_ci                                                              tables
2915bd8deadSopenharmony_ci    MAX_PROGRAM_PARAMETER_       Z       GetProgram-  4096    maximum usable    2.14.1  -
2925bd8deadSopenharmony_ci      BUFFER_SIZE_NV                       ivARB              size of program
2935bd8deadSopenharmony_ci                                                              parameter buffers
2945bd8deadSopenharmony_ci
2955bd8deadSopenharmony_ciExamples
2965bd8deadSopenharmony_ci
2975bd8deadSopenharmony_ci    !!NVfp4.0
2985bd8deadSopenharmony_ci    # Legal
2995bd8deadSopenharmony_ci    BUFFER bones[] = { program.buffer[0] };
3005bd8deadSopenharmony_ci    ALIAS funBone = bones[69];
3015bd8deadSopenharmony_ci    MOV t, bones[1];
3025bd8deadSopenharmony_ci    # Illegal
3035bd8deadSopenharmony_ci    ALIAS numLights = program.buffer[5][6];
3045bd8deadSopenharmony_ci    MOV t, program.buffer[3][x];
3055bd8deadSopenharmony_ci    END
3065bd8deadSopenharmony_ci
3075bd8deadSopenharmony_ciIssues
3085bd8deadSopenharmony_ci
3095bd8deadSopenharmony_ci    (1) PBO is already taken as an acronym?  What do we call this?
3105bd8deadSopenharmony_ci
3115bd8deadSopenharmony_ci      RESOLVED: PaBO.
3125bd8deadSopenharmony_ci
3135bd8deadSopenharmony_ci    (2) How should the ability to simultaneously access multiple parameter
3145bd8deadSopenharmony_ci        buffers be exposed?
3155bd8deadSopenharmony_ci
3165bd8deadSopenharmony_ci      RESOLVED: In the program text (see NV_gpu_program4), the buffers are
3175bd8deadSopenharmony_ci      referred to using a buffer binding statement which is dereferenced in
3185bd8deadSopenharmony_ci      the instructions.  In the rest of the APIs, an array of internal binding
3195bd8deadSopenharmony_ci      points is provided, which are dereferenced using the index parameter of
3205bd8deadSopenharmony_ci      BindBufferBaseNV and associated functions.
3215bd8deadSopenharmony_ci
3225bd8deadSopenharmony_ci    (3) Should program parameter buffer bindings be provided per-target (i.e.,
3235bd8deadSopenharmony_ci        environment parameters), per-program (i.e., local parameters), or some
3245bd8deadSopenharmony_ci        combination of the two?
3255bd8deadSopenharmony_ci
3265bd8deadSopenharmony_ci      RESOLVED: Per-target. That fits most naturally with the ARB program
3275bd8deadSopenharmony_ci      model, similar to textures. Having both per-program and per-target add
3285bd8deadSopenharmony_ci      complexity with no benefit.
3295bd8deadSopenharmony_ci
3305bd8deadSopenharmony_ci    (4) Should references to the parameter buffer be scalar or vector?
3315bd8deadSopenharmony_ci
3325bd8deadSopenharmony_ci      RESOLVED: Scalar. Having vector is more consistent with the legacy APIs,
3335bd8deadSopenharmony_ci      but is more difficult to build the arbitrary data structures that are
3345bd8deadSopenharmony_ci      interesting to store in a parameter buffer. A future extension can
3355bd8deadSopenharmony_ci      define an alternate keyword in the program text to specify accesses of a
3365bd8deadSopenharmony_ci      different size.
3375bd8deadSopenharmony_ci
3385bd8deadSopenharmony_ci    (5) Should parameter buffers be editable using the ProgramEnvParameter
3395bd8deadSopenharmony_ci        API?
3405bd8deadSopenharmony_ci
3415bd8deadSopenharmony_ci      RESOLVED: No. There is a new parallel API for the bindable buffers,
3425bd8deadSopenharmony_ci      including the ability to update multiple parameters at a time. These are
3435bd8deadSopenharmony_ci      more convenient than having to rebind for BufferData and potentially
3445bd8deadSopenharmony_ci      faster.
3455bd8deadSopenharmony_ci
3465bd8deadSopenharmony_ci    (6) Should parameter buffers be editable outside the ProgramBufferParameters
3475bd8deadSopenharmony_ci        API?
3485bd8deadSopenharmony_ci
3495bd8deadSopenharmony_ci      RESOLVED:  Yes.  The use of buffer objects allows the buffers to be
3505bd8deadSopenharmony_ci      naturally manipulated using normal buffer object mechanisms.  That
3515bd8deadSopenharmony_ci      includes CPU mapping, loading via BufferData or BufferSubData, and even
3525bd8deadSopenharmony_ci      reading data back using the ARB_pixel_buffer_object extension.
3535bd8deadSopenharmony_ci
3545bd8deadSopenharmony_ci    (7) Will buffer object updates from different sources cause potential
3555bd8deadSopenharmony_ci        synchronization problems?  If so, how will they be resolved.
3565bd8deadSopenharmony_ci
3575bd8deadSopenharmony_ci      RESOLVED: If reads and write occur in the course of the same call
3585bd8deadSopenharmony_ci      (e.g. reading from a buffer using parameter buffer binding while writing
3595bd8deadSopenharmony_ci      to it using transform feedback. All other cases are allowed and occur in
3605bd8deadSopenharmony_ci      command order. Any synchronization is handled by the GL.
3615bd8deadSopenharmony_ci
3625bd8deadSopenharmony_ci    (8) Is there an implementation-dependent limit to the size of program
3635bd8deadSopenharmony_ci        parameter buffers?
3645bd8deadSopenharmony_ci
3655bd8deadSopenharmony_ci      RESOLVED: Yes, limited-size buffers are provided to reduce the
3665bd8deadSopenharmony_ci      complexity of the GPU design that supports program parameter buffer
3675bd8deadSopenharmony_ci      access and updates.  However, the minimum limit is 16K scalar
3685bd8deadSopenharmony_ci      parameters, or 64KB.  A larger buffer object can be provided, but only
3695bd8deadSopenharmony_ci      the first 64KB is accessible. The limit is queryable with
3705bd8deadSopenharmony_ci      GetProgramivARB with <pname> MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV.
3715bd8deadSopenharmony_ci
3725bd8deadSopenharmony_ci    (9) With scalar buffers, which parameter setting routines do we need?
3735bd8deadSopenharmony_ci
3745bd8deadSopenharmony_ci      UNRESOLVED: A function to set N scalars is very important. It might be
3755bd8deadSopenharmony_ci      nice to have convenience functions that take 1 or 4 parameters directly.
3765bd8deadSopenharmony_ci
3775bd8deadSopenharmony_ci    (10) Do we need GetProgramBufferParameter functions?
3785bd8deadSopenharmony_ci
3795bd8deadSopenharmony_ci      UNRESOLVED: Probably not - they aren't performance critical and offer no
3805bd8deadSopenharmony_ci      functionality beyond getting the buffer object data any of the standard
3815bd8deadSopenharmony_ci      ways.
3825bd8deadSopenharmony_ci
3835bd8deadSopenharmony_ci    (11) What happens if a value written using ProgramBufferParametersfNV is
3845bd8deadSopenharmony_ci         read as an integer or the other way around?
3855bd8deadSopenharmony_ci
3865bd8deadSopenharmony_ci      RESOLVED: Undefined - likely just a raw bit cast between whatever
3875bd8deadSopenharmony_ci      internal representations are used by the GL.
3885bd8deadSopenharmony_ci
3895bd8deadSopenharmony_ci    (12) What's the differece between the "GLuint buffer"
3905bd8deadSopenharmony_ci         in BindBuffer*NV commands and the "GLuint bindingIndex"
3915bd8deadSopenharmony_ci         in ProgramBufferParameter*NV commands?
3925bd8deadSopenharmony_ci
3935bd8deadSopenharmony_ci      RESOLVED: The "GLuint buffer" parameter is a buffer object name
3945bd8deadSopenharmony_ci      created with glBindBuffer or glGenBuffers.
3955bd8deadSopenharmony_ci
3965bd8deadSopenharmony_ci      The "GLuint bindingIndex" parameter is an unsigned index into the target's
3975bd8deadSopenharmony_ci      array of buffer bindings.
3985bd8deadSopenharmony_ci
3995bd8deadSopenharmony_ci      The index used by GetIntegerIndexvEXT for NV_parameter_buffer_object
4005bd8deadSopenharmony_ci      query tokens is an index into the query token's array of buffer
4015bd8deadSopenharmony_ci      bindings (similar to bindingIndex).
4025bd8deadSopenharmony_ci
4035bd8deadSopenharmony_ciRevision History
4045bd8deadSopenharmony_ci
4055bd8deadSopenharmony_ci    Rev.    Date    Author    Changes
4065bd8deadSopenharmony_ci    ----  --------  --------  -----------------------------------------
4075bd8deadSopenharmony_ci     9    03/09/11  mjk       Fix glGetIntegerIndexedvEXT prototype
4085bd8deadSopenharmony_ci                              Note about glGetIntegeri_v
4095bd8deadSopenharmony_ci                              Rename buffer and index parameters and
4105bd8deadSopenharmony_ci                              add Issue #12 to clarify the API
4115bd8deadSopenharmony_ci
4125bd8deadSopenharmony_ci     8    10/02/08  mjk       Fix New Tokens to note glGetIntegerv works
4135bd8deadSopenharmony_ci                              for *_PROGRAM_PARAMETER_NV (matching the table);
4145bd8deadSopenharmony_ci                              NVIDIA drivers before 180.00 fail to implement
4155bd8deadSopenharmony_ci                              this get, later drivers do
4165bd8deadSopenharmony_ci     7    04/18/07  pbrown    Fixed state table to include the buffer
4175bd8deadSopenharmony_ci                              object binding array for each program type.
4185bd8deadSopenharmony_ci
4195bd8deadSopenharmony_ci     6    02/07/07  ewerness  Updated inconsistent prototypes in spec -
4205bd8deadSopenharmony_ci                              <count> for ProgramBufferParameters* is
4215bd8deadSopenharmony_ci                              a <sizei>, not a <uint>.
4225bd8deadSopenharmony_ci
4235bd8deadSopenharmony_ci    1-5                       Internal revisions.
424