• Home
  • Raw
  • Download

Lines Matching full:program

93     evaluation) to be linked into a single monolithic program object to
101 Shaders written for HLSL9, Cg, the prior OpenGL assembly program
109 allowing multiple different GLSL program objects to be bound at once
111 other stage bindings. This allows program objects to contain only
114 This extension introduces the program pipeline object that serves as
115 a container for the program bound to any particular rendering stage.
117 complete shader stage to program object bindings. Like framebuffer
118 and vertex array objects, program pipeline objects are "container"
121 To bind a program object to a specific shader stage or set of
127 program that Uniform* commands will update.
130 commands to update uniform variable values for separable program
133 but take a parameter indicating the program object to be updated,
134 rather than updating the currently active program object. These
138 querying uniform values of a program object, the glProgramUniform*
140 program object without an explicit bind. This selector-free model
171 uint program);
173 void ActiveShaderProgram(uint pipeline, uint program);
186 void ProgramParameteri(uint program, enum pname, int value);
190 void ProgramUniform1i(uint program, int location,
192 void ProgramUniform2i(uint program, int location,
194 void ProgramUniform3i(uint program, int location,
196 void ProgramUniform4i(uint program, int location,
199 void ProgramUniform1ui(uint program, int location,
201 void ProgramUniform2ui(uint program, int location,
203 void ProgramUniform3ui(uint program, int location,
205 void ProgramUniform4ui(uint program, int location,
208 void ProgramUniform1f(uint program, int location,
210 void ProgramUniform2f(uint program, int location,
212 void ProgramUniform3f(uint program, int location,
214 void ProgramUniform4f(uint program, int location,
217 void ProgramUniform1d(uint program, int location,
219 void ProgramUniform2d(uint program, int location,
221 void ProgramUniform3d(uint program, int location,
223 void ProgramUniform4d(uint program, int location,
226 void ProgramUniform1iv(uint program, int location,
228 void ProgramUniform2iv(uint program, int location,
230 void ProgramUniform3iv(uint program, int location,
232 void ProgramUniform4iv(uint program, int location,
235 void ProgramUniform1uiv(uint program, int location,
237 void ProgramUniform2uiv(uint program, int location,
239 void ProgramUniform3uiv(uint program, int location,
241 void ProgramUniform4uiv(uint program, int location,
244 void ProgramUniform1fv(uint program, int location,
246 void ProgramUniform2fv(uint program, int location,
248 void ProgramUniform3fv(uint program, int location,
250 void ProgramUniform4fv(uint program, int location,
253 void ProgramUniform1dv(uint program, int location,
255 void ProgramUniform2dv(uint program, int location,
257 void ProgramUniform3dv(uint program, int location,
259 void ProgramUniform4dv(uint program, int location,
262 void ProgramUniformMatrix2fv(uint program, int location,
265 void ProgramUniformMatrix3fv(uint program, int location,
268 void ProgramUniformMatrix4fv(uint program, int location,
272 void ProgramUniformMatrix2dv(uint program, int location,
275 void ProgramUniformMatrix3dv(uint program, int location,
278 void ProgramUniformMatrix4dv(uint program, int location,
282 void ProgramUniformMatrix2x3fv(uint program, int location,
285 void ProgramUniformMatrix3x2fv(uint program, int location,
288 void ProgramUniformMatrix2x4fv(uint program, int location,
291 void ProgramUniformMatrix4x2fv(uint program, int location,
294 void ProgramUniformMatrix3x4fv(uint program, int location,
297 void ProgramUniformMatrix4x3fv(uint program, int location,
301 void ProgramUniformMatrix2x3dv(uint program, int location,
304 void ProgramUniformMatrix3x2dv(uint program, int location,
307 void ProgramUniformMatrix2x4dv(uint program, int location,
310 void ProgramUniformMatrix4x2dv(uint program, int location,
313 void ProgramUniformMatrix3x4dv(uint program, int location,
316 void ProgramUniformMatrix4x3dv(uint program, int location,
360 type. One or more vertex shader objects are attached to a program
361 object. The program object is then linked, which generates
363 program. When program objects are bound to a shader stage, they
364 become the current program object for that stage. When the current
365 program object for the vertex stage includes a vertex shader, it is
366 considered the active program object for the vertex stage. The
367 current program object for all stages may be set at once using a
368 single unified program object, or the current program object may be
369 set for each stage individually using a separable program object
370 where different separable program objects may be current for other
371 stages. The set of separable program objects current for all stages
372 are collected in a program pipeline object that must be bound for
373 use. When a linked program object is made active for the vertex
379 "... A single program object can contain all of vertex, tessellation
385 "When the program object currently in use for the vertex stage
387 is used to process vertices. If the current vertex stage program
388 object has no vertex shader or no program object is current for the
391 -- Section 2.14.2 "Program Objects" (page 91)
394 LinkProgram, modify the bullets reading "the program contains no objects
398 - the program is not separable and contains no objects to form a
403 If a program has been successfully linked by LinkProgram, it can be made
406 void UseProgram(uint program);
408 If <program> is non-zero, this command will make <program> the current
409 program object. This will install executable code as part of the current
410 rendering state for each shader stage present when the program was last
411 successfully linked. If UseProgram is called with <program> set to zero,
412 then there is no current program object. If <program> has not been
419 current program for that stage. If there is a current program object
420 established by UseProgram, that program is considered current for all
421 stages. Otherwise, if there is a bound program pipeline object (section
422 2.14.PPO), the program bound to the appropriate stage of the pipeline
423 object is considered current. If there is no current program object or
424 bound program pipeline object, no program is current for any stage. The
425 current program for a stage is considered active if it contains executable
426 code for that stage; otherwise, no program is considered active for that
427 stage. If there is no active program for the vertex or fragment shader
436 If there is no active program for the tessellation control, tessellation
447 creates a stand-alone program from an array of null-terminated
455 const uint program = CreateProgram();
456 if (program) {
459 ProgramParameteri(program, PROGRAM_SEPARABLE, TRUE);
461 AttachShader(program, shader);
462 LinkProgram(program);
463 DetachShader(program, shader);
465 append-shader-info-log-to-program-info-log
468 return program;
473 The program may not actually link if the output variables in the
474 shader attached to the final stage of the linked program take up
480 sequence, the info log of the shader object is copied to the program
486 If a program object that is active for any shader stage is re-linked
489 stages where the program is active. Additionally, the newly generated
490 executable code is made part of the state of any program pipeline for all
491 stages where the program is attached.
493 If a program object that is active for any shader stage is re-linked
497 BindProgramPipeline removes them from use. If such a program is attached
498 to any program pipeline object, the existing executables and associated
499 state will remain part of the program pipeline object until a subsequent
501 program may not be made part of the current rendering state by UseProgram
502 or added to program pipeline objects by UseProgramStages until it is
503 successfully re-linked. If such a program was attached to a program
510 "If <program> is not current for any GL context, is not the active
511 program for any program pipeline object, and is not the current
512 program for any stage of any program pipeline object, it is deleted
513 immediately. Otherwise, program is flagged ..."
518 "Program parameters control aspects of how the program is linked,
519 executed, or stored. To set a program parameter, call
521 void ProgramParameteri(uint program, enum pname, int value)
523 <pname> identifies which parameter to set for program object
524 <program>. <value> holds the value being set.
526 and indicates whether the <program> can be bound for individual
531 -- New section 2.14.PPO "Program Pipeline Objects" after 2.14.2
532 "Program Objects"
534 Instead of packaging all shader stages into a single program object,
535 shader types might be contained in multiple program objects each
536 consisting of part of the complete pipeline. A program object may
539 requiring a program object for each combination.
541 Program bindings associating program objects with shader types are
542 collected to form a program pipeline object.
548 returns <n> previously unused program pipeline object names in
553 Program pipeline objects are deleted by calling
557 <pipelines> contains <n> names of program pipeline objects to be
558 deleted. Once a program pipeline object is deleted, it has no
561 program pipeline object becomes current. Unused names in <pipelines>
564 A program pipeline object is created by binding a name returned by
569 <pipeline> is the program pipeline object name. The resulting program
574 BindProgramPipeline may also be used to bind an existing program
576 the state of the bound program pipeline object, and any previous
578 set to zero, then there is no current program pipeline object.
580 If no current program object has been established by UseProgram, the
581 program objects used for each shader stage and for uniform updates are
582 taken from the bound program pipeline object, if any. If there is a
583 current program object established by UseProgram, the bound program
585 bound program pipeline object is used for rendering, individual shader
586 executables are taken from its program objects as described in the
594 The executables in a program object associated with one or more
595 shader stages can be made part of the program pipeline state for
599 uint program);
601 where <pipeline> is the program pipeline object to be updated,
603 shader stages, and <program> is the program object from which the
604 executables are taken. The bits set in <stages> indicate the program
605 stages for which the program object named by <program> becomes
610 SHADER_BITS indicates <program> is to be made current for all
611 shader stages. If <program> refers to a program object with a valid
613 the executable code for that stage in the indicated program pipeline
614 object state. If UseProgramStages is called with <program> set to
615 zero or with a program object that contains no executable code for a
619 the error INVALID_VALUE is generated. If the program object named
620 by <program> was linked without the PROGRAM_SEPARABLE parameter set
623 program pipeline object are not modified.
626 deletion) by GenProgramPipelines, but refers to a program pipeline
629 creates a new program pipeline object. If <pipeline> is not a name
636 void ActiveShaderProgram(uint pipeline, uint program);
638 sets the linked program named by <program> to be the active program
639 (discussed later in the secion 2.14.4) for the program pipeline
640 object <pipeline> . If <program> has not been successfully linked,
641 the error INVALID_OPERATION is generated and active program is not
645 deletion) by GenProgramPipelines, but refers to a program pipeline
648 creates a new program pipeline object. If <pipeline> is not a name
689 For program objects containing multiple shaders, LinkProgram will check
690 for mismatches on interfaces between shader stages in the program being
700 With separable program objects, interfaces between shader stages may
701 involve the outputs from one program object and the inputs from a
702 second program object. For such interfaces, it is not possible to
704 separately. When each such program is linked, all inputs or outputs
705 interfacing with another program stage are treated as active. The
707 compatible program on the other side of the interface. If a mismatch
711 At an interface between program objects, the set of inputs and outputs are
736 well-defined as long as the other program writes to a matching output, as
759 gl_PerFragment blocks in separable program objects, shader code must
760 redeclare those blocks prior to use. A separable program will
819 Program Pipeline Object State
821 "The state required to support program pipeline objects consists of
822 a single binding name of the current program pipeline object. This
823 binding is initially zero indicating no program pipeline object is
826 The state of each program pipeline object consists of:
829 each respective name of the current vertex stage program, current
830 geometry stage program, current fragment stage program, current
831 tessellation control stage program, current tessellation evaluation
832 stage program, and active program respectively.
844 "To load values into the uniform variables of the active program
847 ... If a non-zero program object is bound by UseProgram, it is the
848 active program object whose uniforms are updated by these commands.
849 If no program object is bound using UseProgram, the active program
850 object of the current program pipeline object set by ActiveShader-
851 Program is the active program object. If the current program pipeline
852 object has no active program or there is not current program pipeline
853 object, then there is no active program.
859 "* if there is no active program in use."
865 block of a program which may not necessarily be bound, use the
868 void ProgramUniform{1234}{ifd}(uint program, int location,
870 void ProgramUniform{1234}{ifd}v(uint program, int location,
872 void ProgramUniform{1234}ui(uint program, int location,
874 void ProgramUniform{1234}uiv(uint program, int location,
877 (uint program, int location,
881 (uint program, int location,
886 above without "Program" in the command name except, rather than
887 updating the currently active program object, these "Program"
888 commands update the program object named by the initial <program>
889 parameter.The remaining parameters following the initial <program>
890 parameter match the parameters for the corresponding non-"Program"
891 uniform command. If <program> is not the name of a created program
892 or shader object, the error INVALID_VALUE is generated. If <program>
893 identifies a shader object or a program object that has not been
900 When the active program for a shader stage is re-linked or changed by a
910 "If there is an active program object present for the vertex,
920 time if a program object can execute successfully, given that LinkProgram
923 determine if the set of active program objects can be executed. If the
924 current set of active program objects cannot be executed, no primitives
930 "* A program object is active for at least one, but not all of the
931 shader stages that were present when the program was linked.
933 * One program object is active for at least two shader stages and
934 a second program is active for a shader stage between two stages
935 for which the first program was active.
937 * There is an active program for tessellation control, tessellation
939 shader, but there is no active program with executable vertex
942 * There is not current unified program object and the current program
943 pipeline object includes a program object that was relinked since
950 "Separable program objects may have validation failures that cannot
951 be detected without the complete program pipeline. Mismatched
952 interfaces, improper usage of program objects together, and the same
954 program objects. As a development aid, use the command
958 to validate the program pipeline object <pipeline> against the
959 current GL state. Each program pipeline object has a boolean status,
962 If validation succeeded, the program pipeline object is guaranteed
966 deletion) by GenProgramPipelines, but refers to a program pipeline
969 creates a new program pipeline object. If <pipeline> is not a name
978 evaluation program object.
982 no active tessellation evaluation program, the error INVALID_OPERATION is
988 "A program object or program pipeline object that includes a
990 If the current program state has a tessellation shader but no
999 "If there is an active program for the tessellation control stage, the
1000 executable version of the program's tessellation control shader is used
1008 "If there is an active program for the tessellation evaluation stage, the
1009 executable version of the program's tessellation evaluation shader is
1016 "A program object or program pipeline object that includes a
1018 program state has a geometry shader but no vertex shader at Begin or
1027 geometry program object, as discussed below.
1033 "If there is an active program for the geometry stage, the executable
1034 version of the program's geometry shader is used ..."
1047 determined when a program is linked.
1050 programs on each of the shader stages. If a program is active for
1053 program is active for the tessellation evaluation shader stage,
1059 If separable program objects are in use, the set of attributes
1060 captured is taken from the program object active on the last shader
1063 other program active on a previous shader stage is ignored."
1067 * by UseProgramStages if the program pipeline object it refers to is
1074 * by ResumeTransformFeedback if the program pipeline object being
1076 its shader stage bindings has changed, or a single program object
1086 "When the current fragment shader program object currently includes
1088 used to process fragments. If the fragment shader program object
1089 has no fragment shader, or no fragment shader program object is
1104 Pipelines, and BindProgramPipelines to the "Program and shader
1111 -- Section 6.1.18 "Shader and Program Queries"
1115 "If <pname> is PROGRAM_SEPARABLE, TRUE is returned if the program has
1116 been flagged for use as a separable program object that can be bound
1125 returns TRUE if <pipeline> is the name of a program pipeline object.
1127 program pipeline object, IsProgramPipeline returns FALSE. No error
1128 is generated if <pipeline> is not a valid program pipeline object
1135 returns properties of the program pipeline object named <pipeline>
1139 deletion) by GenProgramPipelines, but refers to a program pipeline
1142 creates a new program pipeline object. If <pipeline> is not a name
1147 If <pname> is ACTIVE_PROGRAM, the name of the active program
1148 object of the program pipeline object is returned.
1149 If <pname> is VERTEX_SHADER, the name of the current program
1150 object for the vertex shader type of the program pipeline object is
1152 If <pname> is FRAGMENT_SHADER, the name of the current program
1153 object for the fragment shader type of the program pipeline object
1155 If <pname> is GEOMETRY_SHADER, the name of the current program
1156 object for the geometry shader type of the program pipeline object
1159 program object for the tessellation control shader type of the
1160 program pipeline object is returned;
1162 program object for the tessellation evaluations shader type of the
1163 program pipeline object is returned.
1165 program pipeline object, as determined by ValidateProgramPipeline
1177 program object, or last validation attempt on a program pipeline
1182 void GetProgramInfoLog (uint program, sizei bufSize,
1197 ation attempt for that object. If <program> is a program object, the
1200 for that object. If <pipeline> is a program pipeline object, the
1208 (modify third paragraph, p. 533, making program pipeline objects
1209 non-shared) Framebuffer, query, vertex array, and program pipeline
1253 separate program objects, it is not possible to detect mismatches between
1280 shader is in a different program object.
1331 A program will fail to link if any attached shader uses a location greater
1333 device-dependent optimizations are able to make the program fit within
1336 A program will fail to link if any two non-vertex shader input variables
1344 location. For all shader types, a program will fail to link if explicit
1389 shader is in a different program object.
1424 program will fail to link if any attached shader uses a location greater
1426 device-dependent optimizations are able to make the program fit within
1429 A program will fail to link if any two fragment shader output variables
1434 program will fail to link if explicit location assignments leave the
1470 4 CARD32 program
1475 4 CARD32 program
1479 UseProgramStages generates INVALID_OPERATION if the program
1490 ActiveShaderProgram generates INVALID_OPERATION if the program
1493 The INVALID_OPERATION error produced by LinkProgram if the program
1499 that implicitly calls Begin, is called when a program object with
1501 the shader program types corresponding to the shaders that are
1505 that implicitly calls Begin, is called when an active program object
1506 has two shaders attached that have shader program types in between
1508 active program of the first two shaders.
1588 extension do not have this requirement.)) A separable program object
1662 This extension provides program pipeline objects, to which separable
1663 program objects can be attached via UseProgramStages (for rendering) and
1671 pipeline objects. Instead, the single program attachment point set by
1675 functionally equivalent to the program pipeline object in this extension,
1682 object, and treat that object as higher priority if it has a program
1687 current program for that stage. If there is a current program object
1689 UseShaderProgramEXT, or ActiveProgramEXT, the current program for that
1691 program pipeline object ...
1693 Note that with these rules, it's not possible to mix program objects bound
1694 to the context with program objects bound to a program pipeline object; if
1695 any program is bound to the context, the current pipeline object is
1703 run in each program stage. The logic for determining the active
1706 * If there is an active GLSL program for the stage, either from a
1707 program bound by UseProgram or from a program bound to the active
1708 program pipeline object, that program's executable will be used.
1710 * Otherwise, the bound assembly program from this stage will be used if
1724 Add to Table 6.45 (Program Object State):
1728 …ACTIVE_PROGRAM Z+ GetProgramPipelineiv 0 The program object 2.20.2 …
1732 shader program object
1734 shader program object
1736 shader program object
1739 program object
1742 program object
1744 program pipeline object
1745 …PROGRAM_PIPELINE_- Z+ GetIntegerv 0 Current program pipeline 2.14.PPO…
1774 The ability to use monolithic program objects that might be more
1775 optimized with individual shader program objects makes this name
1788 * A container program pipeline object to bind separate
1836 3. Do different program objects currently used by different shader
1839 RESOLVED: No, different program objects have their own separate
1841 unique program object.
1843 4. How do the glUniform* commands determine what program object
1846 RESOLVED: In a program pipeline object, this extension provides
1847 separate program binding points for each stage, as well as an "active"
1848 program specified by glActiveShaderProgram. When glUniform is called
1849 when a program pipeline object is active, the active program specifies
1850 the program used by glUniform* commands. This active program is
1854 The active program can be queried with glGetProgramPipelineiv with a
1857 When a non-zero program is passed to UseProgram, any subsequent
1858 uniform updates will affect that program, ignoring the active program
1864 glUniform1f(0, 3.0); // affects program 2
1866 glUniform1f(0, 3.0); // affects program 3
1868 glUniform1f(0, 3.0); // affects program 2
1875 selector but specify the program object with which to update
1878 5. Do the glGetUniform* queries depend on the active program state
1881 RESOLVED: No, the glGetUniform* queries take the program
1886 6a. Should the fragment shader program object be allowed to changed
1898 Perhaps it is desirable to allow different shader program objects
1903 6b. Should the active program be allowed to changed within transform
1908 The active program simply allows uniforms to be changed but
1913 7. What happens if you have a program object current for a shader stage,
1914 but the program object doesn't contain an executable for that stage?
1917 program bound to that stage. We have two different notions for
1918 programs bound to shader stages. A program is "current" for a stage
1919 if it bound to that stage in the active program pipeline object. A
1920 program is "active" for a stage if it is current and it has an
1921 executable for this stage. In this case, the program would be current
1924 When no program is active for a stage, the stage will be replaced with
1931 different types of separate program object -- one for all types of
1950 possible bits, which removes the old program from all non-fragment
1951 stages. For stages not present in the new program, the program will
1952 be current but not active, and it will be as though no program were
1955 8a. What happens if a linked program object with multiple stages (e.g.,
1957 program active in stages between the first and last stages of that
1958 program (e.g., a geometry-only program)?
1962 interfaces between stages of a multi-stage program object. For a
1963 vertex-fragment program, the vertex shader outputs can be optimized to
1966 outputs to a separate geometry-only program, even if the declared
1970 8b. What happens if a linked program object with multiple stages is
1974 validation error. Consider a program with vertex and fragment
1976 previous example. If the vertex shader from this program were to be
1977 used with a separate fragment-only program instead of the program's
1979 match the inputs from the second program, even if the set of
1989 program that programs a single shader type?
1993 The existing GLSL API for creating a GLSL program involves a lot
2030 sequence. This means if you call glLinkProgram on a program
2035 to the program and then relink would work.
2047 is used to easily create a vertex shader program, but the
2083 Now creating and using a linked program from this shader where
2095 const uint program = glCreateProgram();
2096 if (program) {
2100 glAttachShader(program, shader);
2103 glBindAttribLocation(program, 5, "attribA");
2104 glBindAttribLocation(program, 7, "attribB");
2106 glLinkProgram(program);
2107 glDetachShader(program, shader);
2109 // Show this program can actually be used as a vertex shader
2110 glUseProgramStages(GL_VERTEX_SHADER, program);
2114 return program;
2120 be removed to allow this program to be re-linked after different
2124 variables from a fragment shader program created by
2129 program with the standard GLSL creation process where you attach
2156 Now creating and using a linked program from this shader where
2168 const uint program = glCreateProgram();
2169 if (program) {
2173 glAttachShader(program, shader);
2176 glBindFragDataLocation(program, 0, "bufferA");
2177 glBindFragDataLocation(program, 1, "bufferB");
2179 glLinkProgram(program);
2180 glDetachShader(program, shader);
2182 // Show this program can actually be used as a fragment shader
2183 glUseProgramStages(GL_FRAGMENT_SHADER, program);
2187 return program;
2193 removed to allow this program to be re-linked after different
2197 shader program created with glCreateShaderProgram?
2202 a program. glCreateShaderProgram detaches and deletes the
2203 shader object use to create the program so a glLinkProgram will
2206 You can still create a vertex or geometry shader program
2221 For GLSL today, this situation today requires 4 program objects,
2230 Each GLSL program object has its own (combined) set of GLuint
2232 shaders objects linked into the particular program object.
2234 The locations for a given program object are arbitrary and
2235 the location values of two distinct program objects have no
2242 the values of these variables are mirroed over all four program
2245 What's worse is despite all the program objects being loaded
2248 one of these program objects to another is going to result in
2251 of program objects (when the uniform fragment shader variables
2256 It's only the current fragment shader program that is changing
2263 19. Which should take precedence if both are bound, program objects
2264 or program pipeline objects?
2266 RESOLVED: Program objects. Due to concerns about existing
2267 middleware depending on the program object state to determine
2268 the current program rendering state, the program object should
2269 override any program pipeline object that might be bound.
2273 information from the program object?
2277 not present in the program object, without it there is no way to
2278 disassociate a shader type from a program object once it has
2281 21. What should the behavior be if a program object is deleted that
2282 is part of the current program pipeline object?
2284 RESOLVED: Just as program objects made current via UseProgram
2286 program objects that form part of the current program pipeline
2289 Deletion of current program objects has special treatment in
2292 current indirectly as part of the current program pipeline object
2294 difference to the state of the program object or the rendering
2298 objections to perpetuating the irregular behavior of program
2303 active from different program objects, where should transform feedback
2309 due to binding and releasing of different program objects. So if
2310 a geometry shader program is active and then removed, transform
2439 outputs in one program but not inputs in another.
2493 30. Can program pipeline objects be shared between contexts?
2618 program types. In non-separable programs, both sides of an interface
2619 are contained in the same linked program. In this case, if the linker
2639 the same program and where they are in
2661 was used to indicate the last program set by
2664 are now program pipeline object state and
2666 the last program set by UseProgram (bug 7822).
2671 22 6 Jun 2011 pbrown Treat program pipeline objects as non-shared
2685 18 13 Jul 2010 Jon Leech Clarify interactions of current program
2686 & pbrown object and current program pipeline object,
2693 Add interactions for assembly program
2706 program without a vertex shader (bug 6517).
2755 5 08 May 2010 groth remove default PPO. add active program