Lines Matching defs:program
57 #include "compiler/glsl/program.h"
58 #include "program/program.h"
59 #include "program/prog_print.h"
60 #include "program/prog_parameter.h"
324 * Attach shader to a shader program.
346 attach_shader_err(struct gl_context *ctx, GLuint program, GLuint shader,
355 shProg = _mesa_lookup_shader_program_err(ctx, program, caller);
367 /* The shader is already attched to this program. The
377 /* Shader with the same type is already attached to this program,
381 * to a single program object. [...] The error INVALID_OPERATION
383 * as shader is already attached to program."
394 attach_shader_no_error(struct gl_context *ctx, GLuint program, GLuint shader)
399 shProg = _mesa_lookup_shader_program(ctx, program);
458 * Delete a shader program. Actually, just decrement the program's
467 * texture objects (and buffer objects, etc). Shader/program
507 detach_shader(struct gl_context *ctx, GLuint program, GLuint shader,
515 shProg = _mesa_lookup_shader_program_err(ctx, program, "glDetachShader");
519 shProg = _mesa_lookup_shader_program(ctx, program);
581 detach_shader_error(struct gl_context *ctx, GLuint program, GLuint shader)
583 detach_shader(ctx, program, shader, false);
588 detach_shader_no_error(struct gl_context *ctx, GLuint program, GLuint shader)
590 detach_shader(ctx, program, shader, true);
595 * Return list of shaders attached to shader program.
600 get_attached_shaders(struct gl_context *ctx, GLuint program, GLsizei maxCount,
611 _mesa_lookup_shader_program_err(ctx, program, "glGetAttachedShaders");
631 * glGetHandleARB() - return ID/name of currently bound shader program.
656 * are queried for a program which has not been linked successfully, or
680 * "If TESS_CONTROL_OUTPUT_VERTICES is queried for a program which has
705 * "If any of the pname values in this paragraph are queried for a program
753 * glGetProgramiv() - get shader program state.
758 get_programiv(struct gl_context *ctx, GLuint program, GLenum pname,
762 = _mesa_lookup_shader_program_err(ctx, program, "glGetProgramiv(program)");
931 _mesa_error(ctx, GL_INVALID_OPERATION, "glGetProgramiv(program not "
946 /* If the program has not been linked, return initial value 0. */
1073 get_program_info_log(struct gl_context *ctx, GLuint program, GLsizei bufSize,
1089 shProg = _mesa_lookup_shader_program_err(ctx, program,
1090 "glGetProgramInfoLog(program)");
1296 * Link a program's shaders.
1307 * "The error INVALID_OPERATION is generated by LinkProgram if <program>
1308 * is the name of a program being used by one or more transform feedback
1313 "glLinkProgram(transform feedback is using the program)");
1334 * "If LinkProgram or ProgramBinary successfully re-links a program
1337 * state for all shader stages where the program is active.
1339 * the state of any program pipeline for all stages where the program
1412 _mesa_debug(ctx, "Error linking program %u:\n%s\n",
1425 printf("Link %u shaders in program %u: %s\n",
1492 * Use the named shader program for subsequent glUniform calls
1500 "%s(program %u not linked)", caller, shProg->Name);
1512 * Use the named shader program for subsequent rendering.
1529 * Do validation of the given shader program.
1541 /* From the GL spec, a program is invalid if any of these are true:
1543 any two active samplers in the current program object are of
1546 any active sampler in the current program object refers to a texture
1550 the sum of the number of active samplers in the program and the
1557 * Check: any two active samplers in the current program object are of
1571 validate_program(struct gl_context *ctx, GLuint program)
1576 shProg = _mesa_lookup_shader_program_err(ctx, program, "glValidateProgram");
1593 _mesa_AttachObjectARB_no_error(GLhandleARB program, GLhandleARB shader)
1596 attach_shader_no_error(ctx, program, shader);
1601 _mesa_AttachObjectARB(GLhandleARB program, GLhandleARB shader)
1604 attach_shader_err(ctx, program, shader, "glAttachObjectARB");
1609 _mesa_AttachShader_no_error(GLuint program, GLuint shader)
1612 attach_shader_no_error(ctx, program, shader);
1617 _mesa_AttachShader(GLuint program, GLuint shader)
1620 attach_shader_err(ctx, program, shader, "glAttachShader");
1736 _mesa_DetachObjectARB_no_error(GLhandleARB program, GLhandleARB shader)
1739 detach_shader_no_error(ctx, program, shader);
1744 _mesa_DetachObjectARB(GLhandleARB program, GLhandleARB shader)
1747 detach_shader_error(ctx, program, shader);
1752 _mesa_DetachShader_no_error(GLuint program, GLuint shader)
1755 detach_shader_no_error(ctx, program, shader);
1760 _mesa_DetachShader(GLuint program, GLuint shader)
1763 detach_shader_error(ctx, program, shader);
1777 _mesa_GetAttachedShaders(GLuint program, GLsizei maxCount,
1781 get_attached_shaders(ctx, program, maxCount, count, obj, NULL);
1840 _mesa_GetProgramiv(GLuint program, GLenum pname, GLint *params)
1843 get_programiv(ctx, program, pname, params);
1856 _mesa_GetProgramInfoLog(GLuint program, GLsizei bufSize,
1860 get_program_info_log(ctx, program, bufSize, length, infoLog);
2187 use_program(GLuint program, bool no_error)
2193 _mesa_debug(ctx, "glUseProgram %u\n", program);
2196 if (program) {
2197 shProg = _mesa_lookup_shader_program(ctx, program);
2206 if (program) {
2208 _mesa_lookup_shader_program_err(ctx, program, "glUseProgram");
2214 "glUseProgram(program %u not linked)", program);
2228 * the current program for that stage. If there is a current program
2229 * object established by UseProgram, that program is considered current
2230 * for all stages. Otherwise, if there is a bound program pipeline
2231 * object (section 2.14.PPO), the program bound to the appropriate
2237 /* Update the program */
2259 _mesa_UseProgram_no_error(GLuint program)
2261 use_program(program, true);
2266 _mesa_UseProgram(GLuint program)
2268 use_program(program, false);
2273 _mesa_ValidateProgram(GLuint program)
2276 validate_program(ctx, program);
2408 _mesa_GetProgramBinary(GLuint program, GLsizei bufSize, GLsizei *length,
2420 shProg = _mesa_lookup_shader_program_err(ctx, program, "glGetProgramBinary");
2437 * "When a program object's LINK_STATUS is FALSE, its program binary
2443 "glGetProgramBinary(program %u not linked)",
2461 _mesa_ProgramBinary(GLuint program, GLenum binaryFormat,
2467 shProg = _mesa_lookup_shader_program_err(ctx, program, "glProgramBinary");
2490 * program binary as returned by GetProgramBinary or GetProgramiv with
2491 * <pname> PROGRAM_BINARY_LENGTH. Loading the program binary will fail,
2492 * setting the LINK_STATUS of <program> to FALSE, if these conditions
2534 * "To indicate that a program binary is likely to be retrieved,
2543 * to indicate to the GL implementation that this program will
2546 * changes made to the program before being saved such that when it
2580 _mesa_ProgramParameteri_no_error(GLuint program, GLenum pname, GLint value)
2584 struct gl_shader_program *shProg = _mesa_lookup_shader_program(ctx, program);
2590 _mesa_ProgramParameteri(GLuint program, GLenum pname, GLint value)
2595 shProg = _mesa_lookup_shader_program_err(ctx, program,
2637 * Copy program-specific data generated by linking from the gl_shader_program
2641 * called setting the gl_linked_shaders program reference.
2679 GLuint program = 0;
2687 return program;
2696 program = create_shader_program(ctx);
2697 if (program) {
2701 shProg = _mesa_lookup_shader_program(ctx, program);
2707 attach_shader_err(ctx, program, shader, "glCreateShaderProgramv");
2709 detach_shader_error(ctx, program, shader);
2713 if (active-user-defined-varyings-in-linked-program) {
2726 return program;
2809 _mesa_GetSubroutineUniformLocation(GLuint program, GLenum shadertype,
2823 shProg = _mesa_lookup_shader_program_err(ctx, program, api_name);
2838 _mesa_GetSubroutineIndex(GLuint program, GLenum shadertype,
2853 shProg = _mesa_lookup_shader_program_err(ctx, program, api_name);
2874 _mesa_GetActiveSubroutineUniformiv(GLuint program, GLenum shadertype,
2892 shProg = _mesa_lookup_shader_program_err(ctx, program, api_name);
2959 _mesa_GetActiveSubroutineUniformName(GLuint program, GLenum shadertype,
2974 shProg = _mesa_lookup_shader_program_err(ctx, program, api_name);
2985 /* get program resource name */
2993 _mesa_GetActiveSubroutineName(GLuint program, GLenum shadertype,
3008 shProg = _mesa_lookup_shader_program_err(ctx, program, api_name);
3128 _mesa_GetProgramStageiv(GLuint program, GLenum shadertype,
3142 shProg = _mesa_lookup_shader_program_err(ctx, program, api_name);
3149 /* ARB_shader_subroutine doesn't ask the program to be linked, or list any
3154 * need of the program to be linked, being the value for that case 0.
3156 * But at the same time, some other methods require the program to be