• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Name
2
3    EXT_gpu_program_parameters
4
5Name Strings
6
7    GL_EXT_gpu_program_parameters
8
9Contributors
10
11    Pat Brown
12    Haroon Sheikh
13
14Contact
15
16    Pat Brown, NVIDIA Corporation (pbrown 'at' nvidia.com)
17    Geoff Stahl, Apple Computer, Inc. (gstahl 'at' apple.com)
18
19Status
20
21    Shipping for GeForce 8 Series (November 2006)
22
23Version
24
25    Last Modified Date:         4/17/08
26    Revision:                   7
27
28Number
29
30    320
31
32Dependencies
33
34    ARB_vertex_program or ARB_fragment_program is required.
35
36    This specification is written against the spec language from the
37    ARB_vertex_program extension.
38
39Overview
40
41    This extension provides a new set of procedures to load multiple
42    consecutive program environment parameters more efficiently, via a single
43    GL call instead of multiple calls.  This will reduce the amount of CPU
44    overhead involved in loading parameters.
45
46    With the existing ARB_vertex_program and ARB_fragment_program APIs,
47    program parameters must be loaded one at a time, via separate calls.
48    While the NV_vertex_program extension provides a set of similar functions
49    that can be used to load program environment parameters (which are
50    equivalent to "program parameters" in NV_vertex_program), no such function
51    exists for program local parameters.
52
53New Procedures and Functions
54
55    void ProgramEnvParameters4fvEXT(enum target, uint index, sizei count,
56                                   const float *params);
57
58    void ProgramLocalParameters4fvEXT(enum target, uint index, sizei count,
59                                     const float *params);
60
61New Tokens
62
63    None.
64
65Additions to Chapter 2 of the OpenGL 2.0 Specification (OpenGL Operation)
66
67    (modify ARB_vertex_program and ARB_fragment_program, add paragraph after
68    introduction of ProgramEnvParameter* calls)
69
70    The command
71
72      void ProgramEnvParameters4fvEXT(enum target, uint index, sizei count,
73                                      const float *params);
74
75    updates the values of the program environment parameters numbered <index>
76    through <index> + <count> - 1 for the given program target <target>.
77    <params> points to an array of 4*<count> values, where the first four are
78    used to update the program environment parameter numbered <index> and the
79    last four update the program environment parameter numbered <index> +
80    <count> - 1.  The error INVALID_VALUE is generated if <count> is less than
81    zero or if the sum of <index> and <count> is greater than the number of
82    program environment parameters supported by <target>.
83
84    (modify ARB_vertex_program and ARB_fragment_program, add paragraph after
85    introduction of ProgramLocalParameter* calls)
86
87    The command
88
89      void ProgramLocalParameters4fvEXT(enum target, uint index, sizei count,
90                                        const float *params);
91
92    updates the values of the program local parameters numbered <index>
93    through <index> + <count> - 1 belonging to the program object currently
94    bound to <target>.  <params> points to an array of 4*<count> values, where
95    the first four are used to update the program local parameter numbered
96    <index> and the last four update the program local parameter numbered
97    <index> + <count> - 1.  The error INVALID_VALUE is generated if <count> is
98    less than zero or if the sum of <index> and <count> is greater than the
99    number of program local parameters supported by <target>.
100
101Additions to Chapter 3 of the OpenGL 2.0 Specification (Rasterization)
102
103    None.
104
105Additions to Chapter 4 of the OpenGL 2.0 Specification (Per-Fragment
106Operations and the Frame Buffer)
107
108    None.
109
110Additions to Chapter 5 of the OpenGL 2.0 Specification (Special Functions)
111
112    None.
113
114Additions to Chapter 6 of the OpenGL 2.0 Specification (State and
115State Requests)
116
117    None.
118
119Additions to Appendix A of the OpenGL 2.0 Specification (Invariance)
120
121    None.
122
123Additions to the AGL/GLX/WGL Specifications
124
125    None.
126
127GLX Protocol
128
129    Two new GL commands are added.  The following commands are sent to the
130    server as part of a glXRender request:
131
132        ProgramEnvParameters4fvEXT
133            2           16+16*n         rendering command length
134            2           4281            rendering command opcode
135            4           ENUM            target
136            4           CARD32          index
137            4           CARD32          n
138            16*n        FLOAT32         params
139
140        ProgramLocalParameters4fvEXT
141            2           16+16*n         rendering command length
142            2           4282            rendering command opcode
143            4           ENUM            target
144            4           CARD32          index
145            4           CARD32          n
146            16*n        FLOAT32         params
147
148Errors
149
150    INVALID_VALUE is generated by ProgramEnvParameters4fvEXT or
151    ProgramLocalParameters4fvEXT if <count> is less than zero.
152
153    INVALID_VALUE is generated by ProgramEnvParameters4fvEXT if <index> plus
154    <count> is greater than the number of program environment parameters
155    supported by <target>.
156
157    INVALID_VALUE is generated by ProgramLocalParameters4fvEXT if <index> plus
158    <count> is greater than the number of program local parameters supported
159    by <target>.
160
161New State
162
163    None.
164
165Issues
166
167    (1) Should a set of ProgramEnvParameters*EXT() calls be added, or is using
168        NV_vertex_program's ProgramParameters*NV() sufficient?
169
170      RESOLVED:  We should add an ARB-style ProgramEnvParameters*() call for
171      naming consistency. Also ProgramParameters*NV() are not available on
172      all platforms.
173
174    (2) Should an equivalent set of calls be added to query multiple program
175        parameters at once?
176
177      RESOLVED:  No.
178
179    (3) Should double-precision versions be supported?
180
181      RESOLVED:  No.  Double-precision parameter values will be converted to
182      single-precision in current driver implementations, anyway.
183
184    (4) Why is this spec called "EXT_gpu_program_parameters"?
185
186      RESOLVED:  The functionality provided by this spec applies to more than
187      one program type.  The term "GPU" was used in the extension name to
188      indicate functionality common to all supported program types, which are
189      commonly executed on a GPU.
190
191    (5) Is it an error to load multiple parameters with a <count> of zero?
192
193      RESOLVED:  No.  However, it was illegal in versions of the spec prior to
194      9/27/07.  The spec was changed to resolve differences between the
195      shipping implementations from NVIDIA (which did enforce the error) and
196      Apple (which did not).  The new behavior is more consistent with the
197      standard OpenGL practice of allowing zero to be passed to GLsizei
198      parameters, and avoids the need for special-case behavior to
199      handle/avoid zero counts in both drivers and applications.  Since
200      loading zero program parameters has no actual effect, the only
201      difference between the two behaviors is the update of the GL error
202      state.
203
204
205Revision History
206
207    Rev.    Date    Author    Changes
208    ----  --------  --------  --------------------------------------------
209    7     04/17/08  pbrown    Fix GLX protocol section to indicate two
210                              functions instead of four.
211
212    6     09/27/07  pbrown    Change the spec to indicate that it's not
213                              illegal to load zero parameters, just
214                              pointless.
215
216    5     11/06/06  mjk       Indicate shipping
217
218    4     06/28/06  barthold  Make clear that this spec modifies both
219                              ARB_vertex_program and ARB_fragment_program.
220
221    3     06/27/06  pbrown    Fix incorrect error language in checking the
222                              sum of <index> and <count>, added an issue
223                              about the spec name.
224
225    2     06/02/06  haroon    Changed to EXT. Added contributors.
226
227    1     04/24/06  pbrown    Initial revision.
228
229