15bd8deadSopenharmony_ciName 
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    EXT_gpu_program_parameters 
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings 
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    GL_EXT_gpu_program_parameters 
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciContributors
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    Pat Brown
125bd8deadSopenharmony_ci    Haroon Sheikh
135bd8deadSopenharmony_ci   
145bd8deadSopenharmony_ciContact 
155bd8deadSopenharmony_ci
165bd8deadSopenharmony_ci    Pat Brown, NVIDIA Corporation (pbrown 'at' nvidia.com) 
175bd8deadSopenharmony_ci    Geoff Stahl, Apple Computer, Inc. (gstahl 'at' apple.com)
185bd8deadSopenharmony_ci
195bd8deadSopenharmony_ciStatus 
205bd8deadSopenharmony_ci
215bd8deadSopenharmony_ci    Shipping for GeForce 8 Series (November 2006) 
225bd8deadSopenharmony_ci
235bd8deadSopenharmony_ciVersion 
245bd8deadSopenharmony_ci
255bd8deadSopenharmony_ci    Last Modified Date:         4/17/08
265bd8deadSopenharmony_ci    Revision:                   7
275bd8deadSopenharmony_ci
285bd8deadSopenharmony_ciNumber 
295bd8deadSopenharmony_ci
305bd8deadSopenharmony_ci    320 
315bd8deadSopenharmony_ci
325bd8deadSopenharmony_ciDependencies 
335bd8deadSopenharmony_ci
345bd8deadSopenharmony_ci    ARB_vertex_program or ARB_fragment_program is required. 
355bd8deadSopenharmony_ci
365bd8deadSopenharmony_ci    This specification is written against the spec language from the 
375bd8deadSopenharmony_ci    ARB_vertex_program extension. 
385bd8deadSopenharmony_ci
395bd8deadSopenharmony_ciOverview 
405bd8deadSopenharmony_ci
415bd8deadSopenharmony_ci    This extension provides a new set of procedures to load multiple 
425bd8deadSopenharmony_ci    consecutive program environment parameters more efficiently, via a single 
435bd8deadSopenharmony_ci    GL call instead of multiple calls.  This will reduce the amount of CPU 
445bd8deadSopenharmony_ci    overhead involved in loading parameters. 
455bd8deadSopenharmony_ci
465bd8deadSopenharmony_ci    With the existing ARB_vertex_program and ARB_fragment_program APIs, 
475bd8deadSopenharmony_ci    program parameters must be loaded one at a time, via separate calls. 
485bd8deadSopenharmony_ci    While the NV_vertex_program extension provides a set of similar functions 
495bd8deadSopenharmony_ci    that can be used to load program environment parameters (which are 
505bd8deadSopenharmony_ci    equivalent to "program parameters" in NV_vertex_program), no such function 
515bd8deadSopenharmony_ci    exists for program local parameters. 
525bd8deadSopenharmony_ci
535bd8deadSopenharmony_ciNew Procedures and Functions 
545bd8deadSopenharmony_ci
555bd8deadSopenharmony_ci    void ProgramEnvParameters4fvEXT(enum target, uint index, sizei count, 
565bd8deadSopenharmony_ci                                   const float *params); 
575bd8deadSopenharmony_ci
585bd8deadSopenharmony_ci    void ProgramLocalParameters4fvEXT(enum target, uint index, sizei count, 
595bd8deadSopenharmony_ci                                     const float *params); 
605bd8deadSopenharmony_ci
615bd8deadSopenharmony_ciNew Tokens 
625bd8deadSopenharmony_ci    
635bd8deadSopenharmony_ci    None. 
645bd8deadSopenharmony_ci
655bd8deadSopenharmony_ciAdditions to Chapter 2 of the OpenGL 2.0 Specification (OpenGL Operation) 
665bd8deadSopenharmony_ci
675bd8deadSopenharmony_ci    (modify ARB_vertex_program and ARB_fragment_program, add paragraph after
685bd8deadSopenharmony_ci    introduction of ProgramEnvParameter* calls) 
695bd8deadSopenharmony_ci
705bd8deadSopenharmony_ci    The command 
715bd8deadSopenharmony_ci
725bd8deadSopenharmony_ci      void ProgramEnvParameters4fvEXT(enum target, uint index, sizei count, 
735bd8deadSopenharmony_ci                                      const float *params); 
745bd8deadSopenharmony_ci
755bd8deadSopenharmony_ci    updates the values of the program environment parameters numbered <index>
765bd8deadSopenharmony_ci    through <index> + <count> - 1 for the given program target <target>.
775bd8deadSopenharmony_ci    <params> points to an array of 4*<count> values, where the first four are
785bd8deadSopenharmony_ci    used to update the program environment parameter numbered <index> and the
795bd8deadSopenharmony_ci    last four update the program environment parameter numbered <index> +
805bd8deadSopenharmony_ci    <count> - 1.  The error INVALID_VALUE is generated if <count> is less than
815bd8deadSopenharmony_ci    zero or if the sum of <index> and <count> is greater than the number of
825bd8deadSopenharmony_ci    program environment parameters supported by <target>.
835bd8deadSopenharmony_ci
845bd8deadSopenharmony_ci    (modify ARB_vertex_program and ARB_fragment_program, add paragraph after
855bd8deadSopenharmony_ci    introduction of ProgramLocalParameter* calls) 
865bd8deadSopenharmony_ci
875bd8deadSopenharmony_ci    The command 
885bd8deadSopenharmony_ci
895bd8deadSopenharmony_ci      void ProgramLocalParameters4fvEXT(enum target, uint index, sizei count, 
905bd8deadSopenharmony_ci                                        const float *params); 
915bd8deadSopenharmony_ci
925bd8deadSopenharmony_ci    updates the values of the program local parameters numbered <index>
935bd8deadSopenharmony_ci    through <index> + <count> - 1 belonging to the program object currently
945bd8deadSopenharmony_ci    bound to <target>.  <params> points to an array of 4*<count> values, where
955bd8deadSopenharmony_ci    the first four are used to update the program local parameter numbered
965bd8deadSopenharmony_ci    <index> and the last four update the program local parameter numbered
975bd8deadSopenharmony_ci    <index> + <count> - 1.  The error INVALID_VALUE is generated if <count> is
985bd8deadSopenharmony_ci    less than zero or if the sum of <index> and <count> is greater than the
995bd8deadSopenharmony_ci    number of program local parameters supported by <target>.
1005bd8deadSopenharmony_ci
1015bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL 2.0 Specification (Rasterization) 
1025bd8deadSopenharmony_ci
1035bd8deadSopenharmony_ci    None. 
1045bd8deadSopenharmony_ci
1055bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL 2.0 Specification (Per-Fragment 
1065bd8deadSopenharmony_ciOperations and the Frame Buffer) 
1075bd8deadSopenharmony_ci
1085bd8deadSopenharmony_ci    None. 
1095bd8deadSopenharmony_ci
1105bd8deadSopenharmony_ciAdditions to Chapter 5 of the OpenGL 2.0 Specification (Special Functions) 
1115bd8deadSopenharmony_ci
1125bd8deadSopenharmony_ci    None. 
1135bd8deadSopenharmony_ci
1145bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL 2.0 Specification (State and 
1155bd8deadSopenharmony_ciState Requests) 
1165bd8deadSopenharmony_ci
1175bd8deadSopenharmony_ci    None. 
1185bd8deadSopenharmony_ci
1195bd8deadSopenharmony_ciAdditions to Appendix A of the OpenGL 2.0 Specification (Invariance) 
1205bd8deadSopenharmony_ci
1215bd8deadSopenharmony_ci    None. 
1225bd8deadSopenharmony_ci
1235bd8deadSopenharmony_ciAdditions to the AGL/GLX/WGL Specifications 
1245bd8deadSopenharmony_ci
1255bd8deadSopenharmony_ci    None. 
1265bd8deadSopenharmony_ci
1275bd8deadSopenharmony_ciGLX Protocol 
1285bd8deadSopenharmony_ci
1295bd8deadSopenharmony_ci    Two new GL commands are added.  The following commands are sent to the
1305bd8deadSopenharmony_ci    server as part of a glXRender request:
1315bd8deadSopenharmony_ci
1325bd8deadSopenharmony_ci        ProgramEnvParameters4fvEXT 
1335bd8deadSopenharmony_ci            2           16+16*n         rendering command length 
1345bd8deadSopenharmony_ci            2           4281            rendering command opcode 
1355bd8deadSopenharmony_ci            4           ENUM            target 
1365bd8deadSopenharmony_ci            4           CARD32          index 
1375bd8deadSopenharmony_ci            4           CARD32          n 
1385bd8deadSopenharmony_ci            16*n        FLOAT32         params 
1395bd8deadSopenharmony_ci
1405bd8deadSopenharmony_ci        ProgramLocalParameters4fvEXT 
1415bd8deadSopenharmony_ci            2           16+16*n         rendering command length 
1425bd8deadSopenharmony_ci            2           4282            rendering command opcode 
1435bd8deadSopenharmony_ci            4           ENUM            target 
1445bd8deadSopenharmony_ci            4           CARD32          index 
1455bd8deadSopenharmony_ci            4           CARD32          n 
1465bd8deadSopenharmony_ci            16*n        FLOAT32         params 
1475bd8deadSopenharmony_ci
1485bd8deadSopenharmony_ciErrors 
1495bd8deadSopenharmony_ci
1505bd8deadSopenharmony_ci    INVALID_VALUE is generated by ProgramEnvParameters4fvEXT or
1515bd8deadSopenharmony_ci    ProgramLocalParameters4fvEXT if <count> is less than zero.
1525bd8deadSopenharmony_ci
1535bd8deadSopenharmony_ci    INVALID_VALUE is generated by ProgramEnvParameters4fvEXT if <index> plus
1545bd8deadSopenharmony_ci    <count> is greater than the number of program environment parameters
1555bd8deadSopenharmony_ci    supported by <target>.
1565bd8deadSopenharmony_ci
1575bd8deadSopenharmony_ci    INVALID_VALUE is generated by ProgramLocalParameters4fvEXT if <index> plus
1585bd8deadSopenharmony_ci    <count> is greater than the number of program local parameters supported
1595bd8deadSopenharmony_ci    by <target>.
1605bd8deadSopenharmony_ci
1615bd8deadSopenharmony_ciNew State 
1625bd8deadSopenharmony_ci
1635bd8deadSopenharmony_ci    None. 
1645bd8deadSopenharmony_ci
1655bd8deadSopenharmony_ciIssues 
1665bd8deadSopenharmony_ci
1675bd8deadSopenharmony_ci    (1) Should a set of ProgramEnvParameters*EXT() calls be added, or is using 
1685bd8deadSopenharmony_ci        NV_vertex_program's ProgramParameters*NV() sufficient? 
1695bd8deadSopenharmony_ci
1705bd8deadSopenharmony_ci      RESOLVED:  We should add an ARB-style ProgramEnvParameters*() call for 
1715bd8deadSopenharmony_ci      naming consistency. Also ProgramParameters*NV() are not available on 
1725bd8deadSopenharmony_ci      all platforms.
1735bd8deadSopenharmony_ci
1745bd8deadSopenharmony_ci    (2) Should an equivalent set of calls be added to query multiple program 
1755bd8deadSopenharmony_ci        parameters at once? 
1765bd8deadSopenharmony_ci
1775bd8deadSopenharmony_ci      RESOLVED:  No. 
1785bd8deadSopenharmony_ci
1795bd8deadSopenharmony_ci    (3) Should double-precision versions be supported? 
1805bd8deadSopenharmony_ci
1815bd8deadSopenharmony_ci      RESOLVED:  No.  Double-precision parameter values will be converted to 
1825bd8deadSopenharmony_ci      single-precision in current driver implementations, anyway. 
1835bd8deadSopenharmony_ci
1845bd8deadSopenharmony_ci    (4) Why is this spec called "EXT_gpu_program_parameters"?
1855bd8deadSopenharmony_ci
1865bd8deadSopenharmony_ci      RESOLVED:  The functionality provided by this spec applies to more than
1875bd8deadSopenharmony_ci      one program type.  The term "GPU" was used in the extension name to
1885bd8deadSopenharmony_ci      indicate functionality common to all supported program types, which are
1895bd8deadSopenharmony_ci      commonly executed on a GPU.
1905bd8deadSopenharmony_ci
1915bd8deadSopenharmony_ci    (5) Is it an error to load multiple parameters with a <count> of zero?
1925bd8deadSopenharmony_ci
1935bd8deadSopenharmony_ci      RESOLVED:  No.  However, it was illegal in versions of the spec prior to
1945bd8deadSopenharmony_ci      9/27/07.  The spec was changed to resolve differences between the
1955bd8deadSopenharmony_ci      shipping implementations from NVIDIA (which did enforce the error) and
1965bd8deadSopenharmony_ci      Apple (which did not).  The new behavior is more consistent with the
1975bd8deadSopenharmony_ci      standard OpenGL practice of allowing zero to be passed to GLsizei
1985bd8deadSopenharmony_ci      parameters, and avoids the need for special-case behavior to
1995bd8deadSopenharmony_ci      handle/avoid zero counts in both drivers and applications.  Since
2005bd8deadSopenharmony_ci      loading zero program parameters has no actual effect, the only
2015bd8deadSopenharmony_ci      difference between the two behaviors is the update of the GL error
2025bd8deadSopenharmony_ci      state.
2035bd8deadSopenharmony_ci
2045bd8deadSopenharmony_ci
2055bd8deadSopenharmony_ciRevision History 
2065bd8deadSopenharmony_ci
2075bd8deadSopenharmony_ci    Rev.    Date    Author    Changes 
2085bd8deadSopenharmony_ci    ----  --------  --------  -------------------------------------------- 
2095bd8deadSopenharmony_ci    7     04/17/08  pbrown    Fix GLX protocol section to indicate two
2105bd8deadSopenharmony_ci                              functions instead of four.
2115bd8deadSopenharmony_ci
2125bd8deadSopenharmony_ci    6     09/27/07  pbrown    Change the spec to indicate that it's not
2135bd8deadSopenharmony_ci                              illegal to load zero parameters, just
2145bd8deadSopenharmony_ci                              pointless.
2155bd8deadSopenharmony_ci
2165bd8deadSopenharmony_ci    5     11/06/06  mjk       Indicate shipping
2175bd8deadSopenharmony_ci
2185bd8deadSopenharmony_ci    4     06/28/06  barthold  Make clear that this spec modifies both
2195bd8deadSopenharmony_ci                              ARB_vertex_program and ARB_fragment_program.
2205bd8deadSopenharmony_ci
2215bd8deadSopenharmony_ci    3     06/27/06  pbrown    Fix incorrect error language in checking the
2225bd8deadSopenharmony_ci                              sum of <index> and <count>, added an issue
2235bd8deadSopenharmony_ci                              about the spec name.
2245bd8deadSopenharmony_ci
2255bd8deadSopenharmony_ci    2     06/02/06  haroon    Changed to EXT. Added contributors.
2265bd8deadSopenharmony_ci
2275bd8deadSopenharmony_ci    1     04/24/06  pbrown    Initial revision. 
2285bd8deadSopenharmony_ci
229