diff options
author | Ian Romanick <[email protected]> | 2015-08-26 13:45:52 +0100 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2015-09-09 19:15:15 -0700 |
commit | 13a974f9aea03a538c2a67417b5bee8bc732cca2 (patch) | |
tree | 3468b78753cca59083b0c734709d869a8ce9ff7a /src | |
parent | bd0245b8b2fba3852178d635f4e9602845ea6dd3 (diff) |
glsl: Remove ADD_VARYING macro
The purpose of the macro was to create the name_as_gs_input from name.
The previous commit removed the name_as_gs_input from add_varying, so
the macro is unnecessary.
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/glsl/builtin_variables.cpp | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp index 560155aa761..cf1be037525 100644 --- a/src/glsl/builtin_variables.cpp +++ b/src/glsl/builtin_variables.cpp @@ -1090,32 +1090,29 @@ builtin_variable_generator::add_varying(int slot, const glsl_type *type, void builtin_variable_generator::generate_varyings() { -#define ADD_VARYING(loc, type, name) \ - add_varying(loc, type, name) - /* gl_Position and gl_PointSize are not visible from fragment shaders. */ if (state->stage != MESA_SHADER_FRAGMENT) { - ADD_VARYING(VARYING_SLOT_POS, vec4_t, "gl_Position"); - ADD_VARYING(VARYING_SLOT_PSIZ, float_t, "gl_PointSize"); + add_varying(VARYING_SLOT_POS, vec4_t, "gl_Position"); + add_varying(VARYING_SLOT_PSIZ, float_t, "gl_PointSize"); } if (state->is_version(130, 0)) { - ADD_VARYING(VARYING_SLOT_CLIP_DIST0, array(float_t, 0), + add_varying(VARYING_SLOT_CLIP_DIST0, array(float_t, 0), "gl_ClipDistance"); } if (compatibility) { - ADD_VARYING(VARYING_SLOT_TEX0, array(vec4_t, 0), "gl_TexCoord"); - ADD_VARYING(VARYING_SLOT_FOGC, float_t, "gl_FogFragCoord"); + add_varying(VARYING_SLOT_TEX0, array(vec4_t, 0), "gl_TexCoord"); + add_varying(VARYING_SLOT_FOGC, float_t, "gl_FogFragCoord"); if (state->stage == MESA_SHADER_FRAGMENT) { - ADD_VARYING(VARYING_SLOT_COL0, vec4_t, "gl_Color"); - ADD_VARYING(VARYING_SLOT_COL1, vec4_t, "gl_SecondaryColor"); + add_varying(VARYING_SLOT_COL0, vec4_t, "gl_Color"); + add_varying(VARYING_SLOT_COL1, vec4_t, "gl_SecondaryColor"); } else { - ADD_VARYING(VARYING_SLOT_CLIP_VERTEX, vec4_t, "gl_ClipVertex"); - ADD_VARYING(VARYING_SLOT_COL0, vec4_t, "gl_FrontColor"); - ADD_VARYING(VARYING_SLOT_BFC0, vec4_t, "gl_BackColor"); - ADD_VARYING(VARYING_SLOT_COL1, vec4_t, "gl_FrontSecondaryColor"); - ADD_VARYING(VARYING_SLOT_BFC1, vec4_t, "gl_BackSecondaryColor"); + add_varying(VARYING_SLOT_CLIP_VERTEX, vec4_t, "gl_ClipVertex"); + add_varying(VARYING_SLOT_COL0, vec4_t, "gl_FrontColor"); + add_varying(VARYING_SLOT_BFC0, vec4_t, "gl_BackColor"); + add_varying(VARYING_SLOT_COL1, vec4_t, "gl_FrontSecondaryColor"); + add_varying(VARYING_SLOT_BFC1, vec4_t, "gl_BackSecondaryColor"); } } |