diff options
author | Paul Berry <[email protected]> | 2013-12-17 12:13:11 -0800 |
---|---|---|
committer | Paul Berry <[email protected]> | 2013-12-30 11:21:08 -0800 |
commit | 26707abe5635e99814603a0f4895865e977cf267 (patch) | |
tree | be2b80723c8fef82c7cb50f0f290ee3927eb79b5 /src/glsl/glsl_parser_extras.h | |
parent | f425d56ba41382be04366d011536ee78a03a2f33 (diff) |
Rename overloads of _mesa_glsl_shader_target_name().
Previously, _mesa_glsl_shader_target_name() had an overload for GLenum
and an overload for the gl_shader_type enum, each of which behaved
differently. However, since GLenum is a synonym for unsigned int, and
unsigned ints are often used in place of gl_shader_type (e.g. in loop
indices), there was a big risk of calling the wrong overload by
mistake. This patch gives the two overloads different names so that
it's always clear which one we mean to call.
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/glsl/glsl_parser_extras.h')
-rw-r--r-- | src/glsl/glsl_parser_extras.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/glsl/glsl_parser_extras.h b/src/glsl/glsl_parser_extras.h index 622ddbac726..7b013fa6dee 100644 --- a/src/glsl/glsl_parser_extras.h +++ b/src/glsl/glsl_parser_extras.h @@ -422,10 +422,11 @@ extern bool _mesa_glsl_process_extension(const char *name, YYLTYPE *name_locp, _mesa_glsl_parse_state *state); /** - * Get the textual name of the specified shader target + * Get the textual name of the specified shader target (which is a + * gl_shader_type). */ extern const char * -_mesa_glsl_shader_target_name(gl_shader_type target); +_mesa_shader_type_to_string(unsigned target); #endif /* __cplusplus */ @@ -439,7 +440,7 @@ extern "C" { #endif extern const char * -_mesa_glsl_shader_target_name(GLenum type); +_mesa_shader_enum_to_string(GLenum type); extern int glcpp_preprocess(void *ctx, const char **shader, char **info_log, const struct gl_extensions *extensions, struct gl_context *gl_ctx); |