Lines Matching defs:shader

81       // original glsl shader sha1
83 // shader stage
94 And a method to replace the shader without sha1 matching:
193 * Initialize context's shader state.
227 * Free the per-context shader-related state.
273 * Confirm that the a shader type is valid and supported by the implementation
284 * a shader target we recognize, not that it's supported in the current
318 struct gl_shader *shader = _mesa_lookup_shader(ctx, name);
319 return shader ? GL_TRUE : GL_FALSE;
324 * Attach shader to a shader program.
346 attach_shader_err(struct gl_context *ctx, GLuint program, GLuint shader,
359 sh = _mesa_lookup_shader_err(ctx, shader, caller);
367 /* The shader is already attched to this program. The
380 * "Multiple shader objects of the same type may not be attached
382 * is generated if [...] another shader object of the same type
383 * as shader is already attached to program."
394 attach_shader_no_error(struct gl_context *ctx, GLuint program, GLuint shader)
400 sh = _mesa_lookup_shader(ctx, shader);
458 * Delete a shader program. Actually, just decrement the program's
489 delete_shader(struct gl_context *ctx, GLuint shader)
493 sh = _mesa_lookup_shader_err(ctx, shader, "glDeleteShader");
507 detach_shader(struct gl_context *ctx, GLuint program, GLuint shader,
525 if (shProg->Shaders[i]->Name == shader) {
570 if (is_shader(ctx, shader) || is_program(ctx, shader))
574 _mesa_error(ctx, err, "glDetachShader(shader)");
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.
631 * glGetHandleARB() - return ID/name of currently bound shader program.
650 * Check if a geometry shader query is valid at this time. If not, report an
657 * which does not contain objects to form a geometry shader, then an
669 "glGetProgramv(linked geometry shader required)");
675 * Check if a tessellation control shader query is valid at this time.
682 * form a tessellation control shader, then an INVALID_OPERATION error is
694 "glGetProgramv(linked tessellation control shader required)");
700 * Check if a tessellation evaluation shader query is valid at this time.
707 * objects to form a tessellation evaluation shader, then an
720 "evaluation shader required)");
753 * glGetProgramiv() - get shader program state.
754 * Note that this is for GLSL shader programs, not ARB vertex/fragment
830 * shader (ARB_enhanced_layouts). If there isn't any, return the number of
1029 * glGetShaderiv() - get GLSL shader state
1034 struct gl_shader *shader =
1037 if (!shader) {
1043 *params = shader->Type;
1046 *params = shader->DeletePending;
1053 *params = shader->CompileStatus ? GL_TRUE : GL_FALSE;
1056 *params = (shader->InfoLog && shader->InfoLog[0] != '\0') ?
1057 strlen(shader->InfoLog) + 1 : 0;
1060 *params = shader->Source ? strlen((char *) shader->Source) + 1 : 0;
1063 *params = (shader->spirv_data != NULL);
1100 get_shader_info_log(struct gl_context *ctx, GLuint shader, GLsizei bufSize,
1116 sh = _mesa_lookup_shader_err(ctx, shader, "glGetShaderInfoLog(shader)");
1126 * Return shader source code.
1129 get_shader_source(struct gl_context *ctx, GLuint shader, GLsizei maxLength,
1139 sh = _mesa_lookup_shader_err(ctx, shader, "glGetShaderSource");
1148 * Set/replace shader source code. A helper function used by
1160 * "If <shader> was previously associated with a SPIR-V module (via the
1162 * completion of this command the SPIR_V_BINARY_ARB state of <shader>
1168 /* If shader was previously compiled back-up the source in case of cache
1175 /* free old shader source string and install new one */
1193 * Compile a shader.
1206 * state of <shader> is TRUE."
1220 _mesa_log("GLSL source for %s shader %d:\n",
1227 /* this call will set the shader->CompileStatus field to indicate if
1239 _mesa_log("GLSL IR for shader %d:\n", sh->Name);
1242 _mesa_log("No GLSL IR for shader %d (shader may be from "
1247 _mesa_log("GLSL shader %d failed to compile.\n", sh->Name);
1250 _mesa_log("GLSL shader %d info log:\n", sh->Name);
1258 _mesa_log("GLSL source for %s shader %d:\n",
1265 _mesa_debug(ctx, "Error compiling shader %u:\n%s\n",
1335 * object that is active for any shader stage, then the newly generated
1337 * state for all shader stages where the program is active.
1397 fprintf(file, "[%s shader]\n%s\n",
1430 printf(" shader %u, stage %u\n",
1460 * Print basic shader info (for debug).
1469 printf(" %s shader %u\n",
1492 * Use the named shader program for subsequent glUniform calls
1512 * Use the named shader program for subsequent rendering.
1529 * Do validation of the given shader program.
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);
1848 _mesa_GetShaderiv(GLuint shader, GLenum pname, GLint *params)
1851 get_shaderiv(ctx, shader, pname, params);
1865 _mesa_GetShaderInfoLog(GLuint shader, GLsizei bufSize,
1869 get_shader_info_log(ctx, shader, bufSize, length, infoLog);
1874 _mesa_GetShaderSource(GLuint shader, GLsizei maxLength,
1878 get_shader_source(ctx, shader, maxLength, length, sourceOut);
1933 * Construct a full path for shader replacement functionality using
1953 * Write given shader source to a file in MESA_SHADER_DUMP_PATH.
1983 _mesa_warning(ctx, "could not open %s for dumping shader (%s)", name,
1991 * Read shader source code from a file.
1992 * Useful for debugging to override an app's shader.
2044 /* allocate enough room for the entire shader */
2143 /* Compute the original source sha1 before shader replacement. */
2150 /* Dump original shader source to MESA_SHADER_DUMP_PATH and replace
2227 * "The executable code for an individual shader stage is taken from
2235 /* Attach shader state to the binding point */
2372 /* Get all shader objects at once so we can make the operation
2530 * the next time the shader is linked.
2678 const GLuint shader = create_shader_err(ctx, type, "glCreateShaderProgramv");
2690 if (shader) {
2691 struct gl_shader *sh = _mesa_lookup_shader(ctx, shader);
2693 _mesa_ShaderSource(shader, count, strings, NULL);
2705 get_shaderiv(ctx, shader, GL_COMPILE_STATUS, &compiled);
2707 attach_shader_err(ctx, program, shader, "glCreateShaderProgramv");
2709 detach_shader_error(ctx, program, shader);
2723 delete_shader(ctx, shader);
3229 * tokens of a parsed shader include path.
3238 /* Nodes of the shader include tree */
3251 /* Root hash table holding the shader include tree */
3609 _mesa_CompileShaderIncludeARB(GLuint shader, GLsizei count,
3654 struct gl_shader *sh = _mesa_lookup_shader(ctx, shader);
3656 _mesa_error(ctx, GL_INVALID_OPERATION, "%s(shader)", caller);