}
-static GLuint
+static GLuint
create_shader_program(struct gl_context *ctx)
{
GLuint name;
* programs (see glGetProgramivARB).
*/
static void
-get_programiv(struct gl_context *ctx, GLuint program, GLenum pname, GLint *params)
+get_programiv(struct gl_context *ctx, GLuint program, GLenum pname,
+ GLint *params)
{
struct gl_shader_program *shProg
= _mesa_lookup_shader_program(ctx, program);
/* Are uniform buffer objects available in this context?
*/
const bool has_ubo =
- (ctx->API == API_OPENGL_COMPAT && ctx->Extensions.ARB_uniform_buffer_object)
+ (ctx->API == API_OPENGL_COMPAT &&
+ ctx->Extensions.ARB_uniform_buffer_object)
|| ctx->API == API_OPENGL_CORE
|| _mesa_is_gles3(ctx);
for (i = 0; i < shProg->TransformFeedback.NumVarying; i++) {
/* Add one for the terminating NUL character.
*/
- const GLint len = strlen(shProg->TransformFeedback.VaryingNames[i]) + 1;
+ const GLint len =
+ strlen(shProg->TransformFeedback.VaryingNames[i]) + 1;
if (len > max_len)
max_len = len;
get_program_info_log(struct gl_context *ctx, GLuint program, GLsizei bufSize,
GLsizei *length, GLchar *infoLog)
{
- struct gl_shader_program *shProg
- = _mesa_lookup_shader_program(ctx, program);
+ struct gl_shader_program *shProg = _mesa_lookup_shader_program(ctx, program);
if (!shProg) {
_mesa_error(ctx, GL_INVALID_VALUE, "glGetProgramInfoLog(program)");
return;
}
fflush(stderr);
}
-
}
if (!sh->CompileStatus) {
_mesa_glsl_link_shader(ctx, shProg);
- if (shProg->LinkStatus == GL_FALSE &&
+ if (shProg->LinkStatus == GL_FALSE &&
(ctx->_Shader->Flags & GLSL_REPORT_ERRORS)) {
_mesa_debug(ctx, "Error linking program %u:\n%s\n",
shProg->Name, shProg->InfoLog);
}
}
-/**
- */
+
static void
use_shader_program(struct gl_context *ctx, GLenum type,
struct gl_shader_program *shProg,
}
}
+
/**
* Use the named shader program for subsequent rendering.
*/
any active sampler in the current program object refers to a texture
image unit where fixed-function fragment processing accesses a
- texture target that does not match the sampler type, or
+ texture target that does not match the sampler type, or
the sum of the number of active samplers in the program and the
number of texture image units enabled for fixed-function fragment
image units allowed.
*/
-
/*
* Check: any two active samplers in the current program object are of
* different types, but refer to the same texture image unit,
value);
}
+
void
_mesa_use_shader_program(struct gl_context *ctx, GLenum type,
struct gl_shader_program *shProg,