Lines Matching full:program
57 be linked into a single monolithic program object to specify a GLSL shader
68 allowing multiple different GLSL program objects to be bound at once each
70 bindings. This allows program objects to contain only the shader stages
73 This extension introduces the program pipeline object that serves as a
74 container for the program bound to any particular rendering stage. It can
76 shader stage to program object bindings. Like framebuffer
77 and vertex array objects, program pipeline objects are "container"
80 To bind a program object to a specific shader stage or set of stages,
84 program that Uniform* commands will update.
87 uniform values of a program object with the conventional Uniform* commands,
89 of a GLSL program object without an explicit bind. This selector-free model
108 uint program);
110 void ActiveShaderProgramEXT(uint pipeline, uint program);
123 void ProgramParameteriEXT(uint program, enum pname, int value);
127 void ProgramUniform1iEXT(uint program, int location,
129 void ProgramUniform2iEXT(uint program, int location,
131 void ProgramUniform3iEXT(uint program, int location,
133 void ProgramUniform4iEXT(uint program, int location,
136 void ProgramUniform1fEXT(uint program, int location,
138 void ProgramUniform2fEXT(uint program, int location,
140 void ProgramUniform3fEXT(uint program, int location,
142 void ProgramUniform4fEXT(uint program, int location,
145 void ProgramUniform1uiEXT(uint program, int location,
147 void ProgramUniform2uiEXT(uint program, int location,
149 void ProgramUniform3uiEXT(uint program, int location,
151 void ProgramUniform4uiEXT(uint program, int location,
154 void ProgramUniform1ivEXT(uint program, int location,
156 void ProgramUniform2ivEXT(uint program, int location,
158 void ProgramUniform3ivEXT(uint program, int location,
160 void ProgramUniform4ivEXT(uint program, int location,
163 void ProgramUniform1fvEXT(uint program, int location,
165 void ProgramUniform2fvEXT(uint program, int location,
167 void ProgramUniform3fvEXT(uint program, int location,
169 void ProgramUniform4fvEXT(uint program, int location,
172 void ProgramUniform1uivEXT(uint program, int location,
174 void ProgramUniform2uivEXT(uint program, int location,
176 void ProgramUniform3uivEXT(uint program, int location,
178 void ProgramUniform4uivEXT(uint program, int location,
181 void ProgramUniformMatrix2fvEXT(uint program, int location,
184 void ProgramUniformMatrix3fvEXT(uint program, int location,
187 void ProgramUniformMatrix4fvEXT(uint program, int location,
190 void ProgramUniformMatrix2x3fvEXT(uint program, int location,
193 void ProgramUniformMatrix3x2fvEXT(uint program, int location,
196 void ProgramUniformMatrix2x4fvEXT(uint program, int location,
199 void ProgramUniformMatrix4x2fvEXT(uint program, int location,
202 void ProgramUniformMatrix3x4fvEXT(uint program, int location,
205 void ProgramUniformMatrix4x3fvEXT(uint program, int location,
253 program object. The program object is then linked, which generates
254 executable code from the compiled shader object(s) attached to the program.
255 When program objects are bound to a shader stage, they become the current
256 program object for that stage. When the current program object for the
257 vertex stage includes a vertex shader, it is considered the active program
258 object for the vertex stage. The current program object for all stages may
259 be set at once using a single unified program object, or the current
260 program object may be set for each stage individually using a separable
261 program object where different separable program objects may be current for
262 other stages. The set of separable program objects current for all stages
263 are collected in a program pipeline object that must be bound for use.
264 When a linked program object is made active for the vertex stage, the
270 "... A single program object can contain either a vertex shader, a fragment
275 "When the program object currently in use for the vertex stage
277 is used to process vertices. If the current vertex stage program
278 object has no vertex shader or no program object is current for the
281 -- Section 2.10.3 "Program Objects" (page 30)
286 "... if <program> is not separable and does not contain both a vertex and a
291 "If a program has been successfully linked by LinkProgram, it can be made
294 void UseProgram(uint program);
296 If <program> is non-zero, this command will make <program> the current
297 program object. This will install executable code as part of the current
298 rendering state for each shader stage present when the program was last
299 successfully linked. If UseProgram is called with <program> set to zero,
300 then there is no current program object. If <program> has not been
307 current program for that stage. If there is a current program object
308 established by UseProgram, that program is considered current for all
309 stages. Otherwise, if there is a bound program pipeline object (section
310 2.10.PPO), the program bound to the appropriate stage of the pipeline
311 object is considered current. If there is no current program object or
312 bound program pipeline object, no program is current for any stage. The
313 current program for a stage is considered active if it contains executable
314 code for that stage; otherwise, no program is considered active for that
315 stage. If there is no active program for the vertex or fragment shader
321 "If a program object that is active for any shader stage is re-linked
324 stages where the program is active. Additionally, the newly generated
325 executable code is made part of the state of any program pipeline for all
326 stages where the program is attached.
328 If a program object that is active for any shader stage is re-linked
332 BindProgramPipelineEXT removes them from use. If such a program is
333 attached to any program pipeline object, the existing executables and
334 associated state will remain part of the program pipeline object until a
336 unsuccessfully linked program may not be made part of the current rendering
337 state by UseProgram or added to program pipeline objects by
338 UseProgramStagesEXT until it is successfully re-linked. If such a program
339 was attached to a program pipeline at the time of a failed link, its
345 "Program parameters control aspects of how the program is linked,
346 executed, or stored. To set a program parameter, call
348 void ProgramParameteriEXT(uint program, enum pname, int value);
350 <pname> identifies which parameter to set for program object
351 <program>. <value> holds the value being set.
354 and indicates whether the <program> can be bound for individual
359 "If <program> is not current for any GL context, is not the active
360 program for any program pipeline object, and is not the current
361 program for any stage of any program pipeline object, it is deleted
362 immediately. Otherwise, <program> is flagged ..."
371 creates a stand-alone program from an array of null-terminated source
379 const uint program = CreateProgram();
380 if (program) {
383 ProgramParameteriEXT(program, PROGRAM_SEPARABLE_EXT, TRUE);
385 AttachShader(program, shader);
386 LinkProgram(program);
387 DetachShader(program, shader);
389 append-shader-info-log-to-program-info-log
392 return program;
397 The program may not actually link if the output variables in the
398 shader attached to the final stage of the linked program take up
404 sequence, the info log of the shader object is copied to the program
408 -- Add new section 2.10.PPO "Program Pipeline Objects" after 2.10.3
409 "Program Objects"
411 "Instead of packaging all shader stages into a single program object,
412 shader types might be contained in multiple program objects each
413 consisting of part of the complete pipeline. A program object may
416 requiring a program object for each combination.
418 Program bindings associating program objects with shader types are
419 collected to form a program pipeline object.
425 returns <n> previously unused program pipeline object names in
430 Program pipeline objects are deleted by calling
434 <pipelines> contains <n> names of program pipeline objects to be
435 deleted. Once a program pipeline object is deleted, it has no
438 program pipeline object becomes current. Unused names in <pipelines>
441 A program pipeline object is created by binding a name returned by
446 <pipeline> is the program pipeline object name. The resulting program
450 BindProgramPipelineEXT may also be used to bind an existing program
452 the state of the bound program pipeline object, and any previous
454 set to zero, then there is no current program pipeline object.
456 If no current program object has been established by UseProgram, the
457 program objects used for each shader stage and for uniform updates are
458 taken from the bound program pipeline object, if any. If there is a
459 current program object established by UseProgram, the bound program
461 bound program pipeline object is used for rendering, individual shader
462 executables are taken from its program objects as described in the
470 The executables in a program object associated with one or more
471 shader stages can be made part of the program pipeline state for
475 uint program);
477 where <pipeline> is the program pipeline object to be updated,
479 shader stages, and <program> is the program object from which the
480 executables are taken. The bits set in <stages> indicate the program
481 stages for which the program object named by <program> becomes
484 constant ALL_SHADER_BITS_EXT indicates <program> is to be made current
485 for all shader stages. If <program> refers to a program object with a valid
487 the executable code for that stage in the indicated program pipeline
488 object state. If UseProgramStagesEXT is called with <program> set to
489 zero or with a program object that contains no executable code for the
493 recognized, the error INVALID_VALUE is generated. If the program object
494 named by <program> was linked without the PROGRAM_SEPARABLE_EXT parameter
497 program pipeline object are not modified.
500 deletion) by GenProgramPipelinesEXT, but refers to a program pipeline
503 creates a new program pipeline object. If <pipeline> is not a name
510 void ActiveShaderProgramEXT(uint pipeline, uint program);
512 sets the linked program named by <program> to be the active program
513 (discussed later in the secion 2.10.4) for the program pipeline
514 object <pipeline>. If <program> has not been successfully linked,
515 the error INVALID_OPERATION is generated and active program is not
519 deletion) by GenProgramPipelinesEXT, but refers to a program pipeline
522 creates a new program pipeline object. If <pipeline> is not a name
530 When linking a non-separable program object with multiple shader types,
534 the same program object, LinkProgram will detect mismatches on an
537 With separable program objects, interfaces between shader stages may
538 involve the outputs from one program object and the inputs from a
539 second program object. For such interfaces, it is not possible to
541 separately. When each such program is linked, all inputs or outputs
542 interfacing with another program stage are treated as active. The
544 compatible program on the other side of the interface. If a mismatch
548 At an interface between program objects, the inputs and outputs are
571 well-defined as long as the other program writes to an output with the
573 will be well-defined if the other program writes to an output matching
586 Program Pipeline Object State
588 The state required to support program pipeline objects consists of
589 a single binding name of the current program pipeline object. This
590 binding is initially zero indicating no program pipeline object is
593 The state of each program pipeline object consists of:
596 each respective name of the current vertex stage program, current
597 fragment stage program, and active program respectively.
608 "When a program is linked, any active attributes without a binding
623 "To load values into the uniform variables of the active program object,
628 If a non-zero program object is bound by UseProgram, it is the
629 active program object whose uniforms are updated by these commands.
630 If no program object is bound using UseProgram, the active program
631 object of the current program pipeline object set by
632 ActiveShaderProgramEXT is the active program object. If the current
633 program pipeline object has no active program or there is no current
634 program pipeline object, then there is no active program.
640 "* if there is no active program in use."
644 To load values into the uniform variables of a program which may not
647 void ProgramUniform{1234}{if}EXT(uint program, int location,
649 void ProgramUniform{1234}uiEXT(uint program, int location,
651 void ProgramUniform{1234}{if}vEXT(uint program, int location,
653 void ProgramUniform{1234}uivEXT(uint program, int location,
655 void ProgramUniformMatrix{234}fvEXT(uint program, int location,
659 4x2,3x4,4x3}fvEXT(uint program,
666 above without "Program" in the command name except, rather than
667 updating the currently active program object, these "Program"
668 commands update the program object named by the initial <program>
669 parameter. The remaining parameters following the initial <program>
670 parameter match the parameters for the corresponding non-"Program"
671 uniform command. If <program> is not the name of a created program
672 or shader object, the error INVALID_VALUE is generated. If <program>
673 identifies a shader object or a program object that has not been
680 "If there is an active program object present for the vertex stage, the
681 executable code for this active program is used to process incoming vertex
686 "It is not always possible to determine at link time if a program object
690 the set of active program objects can be executed. If the current set of
691 active program objects cannot be executed, no primitives
696 "* A program object is active for at least one, but not all of the
697 shader stages that were present when the program was linked.
699 * There is no current unified program object and the current program
700 pipeline object includes a program object that was relinked since
707 "Separable program objects may have validation failures that cannot
708 be detected without the complete program pipeline. Mismatched
709 interfaces, improper usage of program objects together, and the same
711 program objects. As a development aid, use the command
715 to validate the program pipeline object <pipeline> against the
716 current GL state. Each program pipeline object has a boolean status,
719 If validation succeeded, the program pipeline object is guaranteed
723 deletion) by GenProgramPipelinesEXT, but refers to a program pipeline
726 creates a new program pipeline object. If <pipeline> is not a name
737 "When the program object currently in use for the fragment stage
739 is used to process fragments. If the current fragment stage program
740 object has no fragment shader or no program object is current for the
755 -- Section 6.1.8 "Shader and Program Queries"
759 "If <pname> is PROGRAM_SEPARABLE_EXT, TRUE is returned if the program has
760 been flagged for use as a separable program object that can be bound
769 returns TRUE if <pipeline> is the name of a program pipeline object.
771 program pipeline object, IsProgramPipelineEXT returns FALSE. No error
772 is generated if <pipeline> is not a valid program pipeline object
779 returns properties of the program pipeline object named <pipeline>
783 deletion) by GenProgramPipelinesEXT, but refers to a program pipeline
786 creates a new program pipeline object. If <pipeline> is not a name
791 If <pname> is ACTIVE_PROGRAM_EXT, the name of the active program
792 object of the program pipeline object is returned.
794 If <pname> is VERTEX_SHADER, the name of the current program
795 object for the vertex shader type of the program pipeline object is
798 If <pname> is FRAGMENT_SHADER, the name of the current program
799 object for the fragment shader type of the program pipeline object
803 program pipeline object, as determined by ValidateProgramPipelineEXT
814 program object, or last validation attempt on a program pipeline
819 void GetProgramInfoLog(uint program, sizei bufSize,
834 ation attempt for that object. If <program> is a program object, the
837 for that object. If <pipeline> is a program pipeline object, the
844 (add sentence to third paragraph, p. 164) Program pipeline objects are not
891 separate program objects, it is not possible to detect mismatches between
937 A program will fail to link if any attached shader uses a location greater
939 device-dependent optimizations are able to make the program fit within
942 A program will fail to link if any two varying variables are assigned to
1019 extension do not have this requirement.)) A separable program object
1031 UseProgramStagesEXT generates INVALID_OPERATION if the program
1038 ActiveShaderProgramEXT generates INVALID_OPERATION if <program>
1041 DrawArrays and DrawElements generate INVALID_OPERATION when a program
1043 all of the shader program types corresponding to the shaders that are
1048 Add to table 6.15 (Program Object State):
1053 PROGRAM_PIPELINE_- Z+ GetIntegerv 0 Current program pipeline 2.10.PPO
1056 Add new table 6.PPO (Program Pipeline Object State):
1061 …ACTIVE_PROGRAM_EXT Z+ GetProgramPipelineivEXT 0 The program object 2.10.PPO
1065 shader program object
1067 shader program object
1069 program pipeline object
1070 S GetProgramPipelineInfoLogEXT empty Info log for program 6.1.8