From 665b8d7b6d8eae03c9dc0ef1a744fe59d9cc6cb6 Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Tue, 7 Jan 2014 10:11:39 -0800 Subject: mesa: Clean up nomenclature for pipeline stages. Previously, we had an enum called gl_shader_type which represented pipeline stages in the order they occur in the pipeline (i.e. MESA_SHADER_VERTEX=0, MESA_SHADER_GEOMETRY=1, etc), and several inconsistently named functions for converting between it and other representations: - _mesa_shader_type_to_string: gl_shader_type -> string - _mesa_shader_type_to_index: GLenum (GL_*_SHADER) -> gl_shader_type - _mesa_program_target_to_index: GLenum (GL_*_PROGRAM) -> gl_shader_type - _mesa_shader_enum_to_string: GLenum (GL_*_{SHADER,PROGRAM}) -> string This patch tries to clean things up so that we use more consistent terminology: the enum is now called gl_shader_stage (to emphasize that it is in the order of pipeline stages), and the conversion functions are: - _mesa_shader_stage_to_string: gl_shader_stage -> string - _mesa_shader_enum_to_shader_stage: GLenum (GL_*_SHADER) -> gl_shader_stage - _mesa_program_enum_to_shader_stage: GLenum (GL_*_PROGRAM) -> gl_shader_stage - _mesa_progshader_enum_to_string: GLenum (GL_*_{SHADER,PROGRAM}) -> string In addition, MESA_SHADER_TYPES has been renamed to MESA_SHADER_STAGES, for consistency with the new name for the enum. Reviewed-by: Kenneth Graunke v2: Also rename the "target" field of _mesa_glsl_parse_state and the "target" parameter of _mesa_shader_stage_to_string to "stage". Reviewed-by: Brian Paul --- src/glsl/glsl_parser_extras.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/glsl/glsl_parser_extras.h') diff --git a/src/glsl/glsl_parser_extras.h b/src/glsl/glsl_parser_extras.h index 0e281ae203e..8e0ae3bd7e0 100644 --- a/src/glsl/glsl_parser_extras.h +++ b/src/glsl/glsl_parser_extras.h @@ -165,7 +165,7 @@ struct _mesa_glsl_parse_state { bool es_shader; unsigned language_version; - gl_shader_type target; + gl_shader_stage stage; /** * Number of nested struct_specifier levels @@ -424,11 +424,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 (which is a - * gl_shader_type). + * Get the textual name of the specified shader stage (which is a + * gl_shader_stage). */ extern const char * -_mesa_shader_type_to_string(unsigned target); +_mesa_shader_stage_to_string(unsigned stage); #endif /* __cplusplus */ @@ -442,7 +442,7 @@ extern "C" { #endif extern const char * -_mesa_shader_enum_to_string(GLenum type); +_mesa_progshader_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); -- cgit v1.2.3