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/link_varyings.cpp | |
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/link_varyings.cpp')
-rw-r--r-- | src/glsl/link_varyings.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/glsl/link_varyings.cpp b/src/glsl/link_varyings.cpp index 229a4cb8584..98f902ca4ef 100644 --- a/src/glsl/link_varyings.cpp +++ b/src/glsl/link_varyings.cpp @@ -82,10 +82,10 @@ cross_validate_types_and_qualifiers(struct gl_shader_program *prog, linker_error(prog, "%s shader output `%s' declared as type `%s', " "but %s shader input declared as type `%s'\n", - _mesa_glsl_shader_target_name(producer_type), + _mesa_shader_enum_to_string(producer_type), output->name, output->type->name, - _mesa_glsl_shader_target_name(consumer_type), + _mesa_shader_enum_to_string(consumer_type), input->type->name); return; } @@ -97,10 +97,10 @@ cross_validate_types_and_qualifiers(struct gl_shader_program *prog, linker_error(prog, "%s shader output `%s' %s centroid qualifier, " "but %s shader input %s centroid qualifier\n", - _mesa_glsl_shader_target_name(producer_type), + _mesa_shader_enum_to_string(producer_type), output->name, (output->data.centroid) ? "has" : "lacks", - _mesa_glsl_shader_target_name(consumer_type), + _mesa_shader_enum_to_string(consumer_type), (input->data.centroid) ? "has" : "lacks"); return; } @@ -109,10 +109,10 @@ cross_validate_types_and_qualifiers(struct gl_shader_program *prog, linker_error(prog, "%s shader output `%s' %s sample qualifier, " "but %s shader input %s sample qualifier\n", - _mesa_glsl_shader_target_name(producer_type), + _mesa_shader_enum_to_string(producer_type), output->name, (output->data.sample) ? "has" : "lacks", - _mesa_glsl_shader_target_name(consumer_type), + _mesa_shader_enum_to_string(consumer_type), (input->data.sample) ? "has" : "lacks"); return; } @@ -121,10 +121,10 @@ cross_validate_types_and_qualifiers(struct gl_shader_program *prog, linker_error(prog, "%s shader output `%s' %s invariant qualifier, " "but %s shader input %s invariant qualifier\n", - _mesa_glsl_shader_target_name(producer_type), + _mesa_shader_enum_to_string(producer_type), output->name, (output->data.invariant) ? "has" : "lacks", - _mesa_glsl_shader_target_name(consumer_type), + _mesa_shader_enum_to_string(consumer_type), (input->data.invariant) ? "has" : "lacks"); return; } @@ -135,10 +135,10 @@ cross_validate_types_and_qualifiers(struct gl_shader_program *prog, "interpolation qualifier, " "but %s shader input specifies %s " "interpolation qualifier\n", - _mesa_glsl_shader_target_name(producer_type), + _mesa_shader_enum_to_string(producer_type), output->name, interpolation_string(output->data.interpolation), - _mesa_glsl_shader_target_name(consumer_type), + _mesa_shader_enum_to_string(consumer_type), interpolation_string(input->data.interpolation)); return; } @@ -1217,9 +1217,9 @@ assign_varying_locations(struct gl_context *ctx, linker_error(prog, "%s shader varying %s not written " "by %s shader\n.", - _mesa_glsl_shader_target_name(consumer->Type), + _mesa_shader_enum_to_string(consumer->Type), var->name, - _mesa_glsl_shader_target_name(producer->Type)); + _mesa_shader_enum_to_string(producer->Type)); } /* An 'in' variable is only really a shader input if its |