Mesa (master): mesa: Clean up nomenclature for pipeline stages.

Paul Berry stereotype441 at kemper.freedesktop.org
Wed Jan 8 15:44:12 UTC 2014


Module: Mesa
Branch: master
Commit: 665b8d7b6d8eae03c9dc0ef1a744fe59d9cc6cb6
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=665b8d7b6d8eae03c9dc0ef1a744fe59d9cc6cb6

Author: Paul Berry <stereotype441 at gmail.com>
Date:   Tue Jan  7 10:11:39 2014 -0800

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 <kenneth at whitecape.org>

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 <brianp at vmware.com>

---

 src/glsl/ast_to_hir.cpp                          |   76 +++++++++++-----------
 src/glsl/builtin_functions.cpp                   |   22 +++----
 src/glsl/builtin_variables.cpp                   |   12 ++--
 src/glsl/glsl_parser.yy                          |    8 +--
 src/glsl/glsl_parser_extras.cpp                  |   22 +++----
 src/glsl/glsl_parser_extras.h                    |   10 +--
 src/glsl/ir_uniform.h                            |    2 +-
 src/glsl/link_atomics.cpp                        |   22 +++----
 src/glsl/link_uniform_initializers.cpp           |    8 +--
 src/glsl/link_uniforms.cpp                       |   12 ++--
 src/glsl/link_varyings.cpp                       |   24 +++----
 src/glsl/linker.cpp                              |   62 +++++++++---------
 src/glsl/main.cpp                                |    2 +-
 src/glsl/standalone_scaffolding.cpp              |    2 +-
 src/glsl/standalone_scaffolding.h                |    6 +-
 src/glsl/test_optpass.cpp                        |    2 +-
 src/glsl/tests/set_uniform_initializer_tests.cpp |    4 +-
 src/mesa/drivers/dri/i965/brw_context.c          |    2 +-
 src/mesa/drivers/dri/i965/brw_shader.cpp         |   10 +--
 src/mesa/main/context.c                          |    8 +--
 src/mesa/main/mtypes.h                           |   12 ++--
 src/mesa/main/shaderapi.c                        |   14 ++--
 src/mesa/main/shaderapi.h                        |    2 +-
 src/mesa/main/shaderobj.c                        |    4 +-
 src/mesa/main/shaderobj.h                        |    6 +-
 src/mesa/main/uniform_query.cpp                  |    6 +-
 src/mesa/main/uniforms.c                         |    4 +-
 src/mesa/program/ir_to_mesa.cpp                  |   18 ++---
 src/mesa/program/program.c                       |    2 +-
 src/mesa/program/program.h                       |    8 +--
 src/mesa/program/sampler.cpp                     |    2 +-
 src/mesa/state_tracker/st_glsl_to_tgsi.cpp       |   12 ++--
 32 files changed, 203 insertions(+), 203 deletions(-)

Diff:   http://cgit.freedesktop.org/mesa/mesa/diff/?id=665b8d7b6d8eae03c9dc0ef1a744fe59d9cc6cb6



More information about the mesa-commit mailing list