diff options
author | Brian Paul <[email protected]> | 2015-01-02 16:56:12 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2015-01-05 13:50:54 -0700 |
commit | c0a445037bf3453c60dd060894539e31223fb821 (patch) | |
tree | 5748d50744d8d70faaa0d11b1f279ef1ff88edfe /src | |
parent | 6d9aed19f389539e2c3c7bb928d2160004a0038b (diff) |
mesa: minor whitespace fixes in shaderapi.c
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/shaderapi.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 43170b817dd..e38189cda41 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -307,7 +307,7 @@ create_shader(struct gl_context *ctx, GLenum type) } -static GLuint +static GLuint create_shader_program(struct gl_context *ctx) { GLuint name; @@ -513,7 +513,8 @@ check_gs_query(struct gl_context *ctx, const struct gl_shader_program *shProg) * 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); @@ -533,7 +534,8 @@ get_programiv(struct gl_context *ctx, GLuint program, GLenum pname, GLint *param /* 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); @@ -601,7 +603,8 @@ get_programiv(struct gl_context *ctx, GLuint program, GLenum pname, GLint *param 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; @@ -755,8 +758,7 @@ static void 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; @@ -871,7 +873,6 @@ compile_shader(struct gl_context *ctx, GLuint shaderObj) } fflush(stderr); } - } if (!sh->CompileStatus) { @@ -918,7 +919,7 @@ link_program(struct gl_context *ctx, GLuint program) _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); @@ -986,8 +987,7 @@ _mesa_active_program(struct gl_context *ctx, struct gl_shader_program *shProg, } } -/** - */ + static void use_shader_program(struct gl_context *ctx, GLenum type, struct gl_shader_program *shProg, @@ -1034,6 +1034,7 @@ use_shader_program(struct gl_context *ctx, GLenum type, } } + /** * Use the named shader program for subsequent rendering. */ @@ -1071,7 +1072,7 @@ validate_shader_program(const struct gl_shader_program *shProg, 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 @@ -1079,7 +1080,6 @@ validate_shader_program(const struct gl_shader_program *shProg, 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, @@ -1806,6 +1806,7 @@ invalid_value: value); } + void _mesa_use_shader_program(struct gl_context *ctx, GLenum type, struct gl_shader_program *shProg, |