Name EXT_gpu_program_parameters Name Strings GL_EXT_gpu_program_parameters Contributors Pat Brown Haroon Sheikh Contact Pat Brown, NVIDIA Corporation (pbrown 'at' nvidia.com) Geoff Stahl, Apple Computer, Inc. (gstahl 'at' apple.com) Status DRAFT SPECIFICATION Version Last Modified Date: 06/02/06 Revision: 2 Number 320 Dependencies ARB_vertex_program or ARB_fragment_program is required. This specification is written against the spec language from the ARB_vertex_program extension. Overview This extension provides a new set of procedures to load multiple consecutive program environment parameters more efficiently, via a single GL call instead of multiple calls. This will reduce the amount of CPU overhead involved in loading parameters. With the existing ARB_vertex_program and ARB_fragment_program APIs, program parameters must be loaded one at a time, via separate calls. While the NV_vertex_program extension provides a set of similar functions that can be used to load program environment parameters (which are equivalent to "program parameters" in NV_vertex_program), no such function exists for program local parameters. New Procedures and Functions void ProgramEnvParameters4fvEXT(enum target, uint index, sizei count, const float *params); void ProgramLocalParameters4fvEXT(enum target, uint index, sizei count, const float *params); New Tokens None. Additions to Chapter 2 of the OpenGL 2.0 Specification (OpenGL Operation) (modify ARB_vertex_program, add paragraph after introduction of ProgramEnvParameter* calls) The command void ProgramEnvParameters4fvEXT(enum target, uint index, sizei count, const float *params); updates the values of the program environment parameters numbered through + - 1 for the given program target . points to an array of 4* values, where the first four are used to update the program environment parameter numbered and the last four update the program environment parameter numbered + - 1. The error INVALID_VALUE is generated if is less than or equal to zero or if the sum of and is greater than or equal to the number of program environment parameters supported by . (modify ARB_vertex_program, add paragraph after introduction of ProgramLocalParameter* calls) The command void ProgramLocalParameters4fvEXT(enum target, uint index, sizei count, const float *params); updates the values of the program local parameters numbered through + - 1 belonging to the program object currently bound to . points to an array of 4* values, where the first four are used to update the program local parameter numbered and the last four update the program local parameter numbered + - 1. The error INVALID_VALUE is generated if is less than or equal to zero or if the sum of and is greater than or equal to the number of program local parameters supported by . Additions to Chapter 3 of the OpenGL 2.0 Specification (Rasterization) None. Additions to Chapter 4 of the OpenGL 2.0 Specification (Per-Fragment Operations and the Frame Buffer) None. Additions to Chapter 5 of the OpenGL 2.0 Specification (Special Functions) None. Additions to Chapter 6 of the OpenGL 2.0 Specification (State and State Requests) None. Additions to Appendix A of the OpenGL 2.0 Specification (Invariance) None. Additions to the AGL/GLX/WGL Specifications None. GLX Protocol Four new GL commands are added. The following commands are sent to the server as part of a glXRender request: ProgramEnvParameters4fvEXT 2 16+16*n rendering command length 2 4281 rendering command opcode 4 ENUM target 4 CARD32 index 4 CARD32 n 16*n FLOAT32 params ProgramLocalParameters4fvEXT 2 16+16*n rendering command length 2 4282 rendering command opcode 4 ENUM target 4 CARD32 index 4 CARD32 n 16*n FLOAT32 params Errors INVALID_VALUE is generated by ProgramEnvParameters4fvEXT or ProgramLocalParameters4fvEXT if is less than or equal to zero. INVALID_VALUE is generated by ProgramEnvParameters4fvEXT if plus is greater than or equal to the number of program environment parameters supported by . INVALID_VALUE is generated by ProgramLocalParameters4fvEXT if plus is greater than or equal to the number of program local parameters supported by . New State None. Issues (1) Should a set of ProgramEnvParameters*EXT() calls be added, or is using NV_vertex_program's ProgramParameters*NV() sufficient? RESOLVED: We should add an ARB-style ProgramEnvParameters*() call for naming consistency. Also ProgramParameters*NV() are not available on all platforms. (2) Should an equivalent set of calls be added to query multiple program parameters at once? RESOLVED: No. (3) Should double-precision versions be supported? RESOLVED: No. Double-precision parameter values will be converted to single-precision in current driver implementations, anyway. Revision History Rev. Date Author Changes ---- -------- -------- -------------------------------------------- 2 06/02/06 haroon Changed to EXT. Added contributors. 1 04/24/06 pbrown Initial revision.