Home | History | Annotate | Download | only in glsl

Lines Matching refs:shader

31  * In the first stage shaders are partitioned into groups based on the shader
35 * - Undefined references in each shader are resolve to definitions in
36 * another shader.
42 * The result, in the terminology of the GLSL spec, is a set of shader
46 * on each of the shader executables.
48 * - Each shader executable must define a \c main function.
49 * - Each vertex shader executable must write to \c gl_Position.
50 * - Each fragment shader executable must write to either \c gl_FragData or
53 * In the final stage individual shader executables are linked to create a
56 * - Types of uniforms defined in multiple shader stages with the same name
58 * - Initializers for uniforms defined in multiple shader stages with the
256 * Verify that a vertex shader executable meets all semantic requirements.
261 * \param shader Vertex shader executable to be verified
265 struct gl_shader *shader)
267 if (shader == NULL)
274 * position. All executions of a well-formed vertex shader
278 * position. All executions of a well-formed vertex shader
285 * position. It can be written at any time during shader
286 * execution. It may also be read back by a vertex shader
291 * the vertex shader executable does not write gl_Position."
295 find.run(shader->ir);
297 linker_error(prog, "vertex shader does not write to `gl_Position'\n");
305 /* From section 7.1 (Vertex Shader Special Variables) of the
308 * "It is an error for a shader to statically write both
314 clip_vertex.run(shader->ir);
315 clip_distance.run(shader->ir);
317 linker_error(prog, "vertex shader writes to both `gl_ClipVertex' "
323 shader->symbols->get_variable("gl_ClipDistance");
333 * Verify that a fragment shader executable meets all semantic requirements
335 * \param shader Fragment shader executable to be verified
339 struct gl_shader *shader)
341 if (shader == NULL)
347 frag_color.run(shader->ir);
348 frag_data.run(shader->ir);
351 linker_error(prog, "fragment shader writes to both "
371 case ir_var_in: return "shader input";
372 case ir_var_out: return "shader output";
373 case ir_var_inout: return "shader inout";
463 * "If gl_FragDepth is redeclared in any fragment shader in a
485 "qualifier in any fragment shader, it must be "
521 * FINISHME: not be modified! Imagine a case where a shader
525 * FINISHME: modify the shader, and linking with the second
575 * Perform validation of uniforms used across multiple shader stages
639 /* Find all shader outputs in the "producer" stage.
654 /* Find all shader inputs in the "consumer" stage. Any variables that have
675 * language in the GLSL spec that implies the fragment shader
676 * and vertex shader do not have to agree on this size. Other
693 "%s shader output `%s' declared as type `%s', "
694 "but %s shader input declared as type `%s'\n",
706 "%s shader output `%s' %s centroid qualifier, "
707 "but %s shader input %s centroid qualifier\n",
718 "%s shader output `%s' %s invariant qualifier, "
719 "but %s shader input %s invariant qualifier\n",
730 "%s shader output `%s' specifies %s "
732 "but %s shader input specifies %s "
773 * This is used when instruction trees are cloned from one shader and placed in
775 * do not exist in the target shader. This function finds these \c ir_variable
777 * shader.
779 * If there is no matching variable in the target shader, a clone of the
780 * \c ir_variable is made and added to the target shader. The new variable is
785 * linked shader.
910 * Get the function signature for main from a shader
920 * This keeps the linker from accidentally pick a shader that just
957 * Combine a group of shaders for a single stage to generate a linked shader
960 * If this function is supplied a single shader, it is cloned, and the new
961 * shader is returned.
1011 /* If the other shader has no function (and therefore no function
1012 * signatures) with the same name, skip to the next shader.
1038 /* Find the shader that defines main, and make a clone of it.
1041 * found, find the shader that defines it. Clone the reference and add
1042 * it to the shader. Repeat until there are no undefined references or
1054 linker_error(prog, "%s shader lacks `main'\n",
1070 /* The a pointer to the main function in the final linked shader (i.e., the
1071 * copy of the original shader that contained the main function).
1090 /* Resolve initializers for global variables in the linked shader.
1141 * Update the sizes of linked shader uniform arrays to the maximum
1254 * \param prog Shader program whose variables need locations assigned
1264 * error is emitted to the shader link log and false is returned.
1285 * 1. Invalidate the location assignments for all vertex shader inputs.
1365 * assigned in the shader (presumably via a layout qualifier), make sure
1389 * path through the shader consumes more than one attribute of
1392 * through the shader consumes multiple aliased attributes,
1413 ? "vertex shader input" : "fragment shader output";
1462 ? "vertex shader input" : "fragment shader output";
1480 * Demote shader inputs and outputs that are not used in other stages
1491 /* A shader 'in' or 'out' variable is only really an input or output if
1492 * its value is used by other shader stages. This will cause the variable
1589 * The vertex shader output location that the linker assigned for this
1812 * declared as an output in the geometry shader (if present) or
1813 * the vertex shader (if no geometry shader is present);
2055 /* FINISHME: Set dynamically when geometry shader support is added. */
2121 * the fragment shader executable must be written to
2122 * by the vertex shader executable; declaring
2123 * superfluous varying variables in a vertex shader is
2131 linker_error(prog, "fragment shader varying %s not written "
2132 "by vertex shader\n.", var->name);
2135 /* An 'in' variable is only really a shader input if its
2140 /* The packing rules are used for vertex shader inputs are also
2141 * used for fragment shader inputs.
2151 linker_warning(prog, "shader uses too many varying vectors "
2157 linker_error(prog, "shader uses too many varying vectors "
2167 linker_warning(prog, "shader uses too many varying components "
2173 linker_error(prog, "shader uses too many varying components "
2268 * gl_FragDepth is not used in the shader, it's removed from the IR.
2341 linker_error(prog, "Too many %s shader texture samplers",
2347 linker_warning(prog, "Too many %s shader uniform components, "
2352 linker_error(prog, "Too many %s shader uniform components",
2589 * shader;
2593 "no vertex or geometry shader is present.");
2619 /* There was no fragment shader, but we still have to assign varying
2676 /* OpenGL ES requires that a vertex shader and a fragment shader both be
2683 linker_error(prog, "program lacks a vertex shader\n");
2685 linker_error(prog, "program lacks a fragment shader\n");
2689 /* FINISHME: Assign fragment shader output locations. */