From: Caio Marcelo de Oliveira Filho Date: Thu, 11 Feb 2021 20:35:44 +0000 (-0800) Subject: compiler: Drop now unused gl_varying_slot_name() X-Git-Tag: upstream/21.2.3~7943 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a36d5bf11b51717c04cca13dc6a215e54d3a20ac;p=platform%2Fupstream%2Fmesa.git compiler: Drop now unused gl_varying_slot_name() There's reuse of values depending on the stage, so a function that just takes the value might produce invalid results. All the codebase was already changed to use the gl_varying_slot_name_for_stage() instead. Reviewed-by: Kenneth Graunke Reviewed-by: Christian Gmeiner Part-of: --- diff --git a/src/compiler/shader_enums.c b/src/compiler/shader_enums.c index d6fe197..7c53a09 100644 --- a/src/compiler/shader_enums.c +++ b/src/compiler/shader_enums.c @@ -155,8 +155,11 @@ gl_vert_attrib_name(gl_vert_attrib attrib) } const char * -gl_varying_slot_name(gl_varying_slot slot) +gl_varying_slot_name_for_stage(gl_varying_slot slot, gl_shader_stage stage) { + if (stage != MESA_SHADER_FRAGMENT && slot == VARYING_SLOT_PRIMITIVE_SHADING_RATE) + return "VARYING_SLOT_PRIMITIVE_SHADING_RATE"; + static const char *names[] = { ENUM(VARYING_SLOT_POS), ENUM(VARYING_SLOT_COL0), @@ -228,14 +231,6 @@ gl_varying_slot_name(gl_varying_slot slot) } const char * -gl_varying_slot_name_for_stage(gl_varying_slot slot, gl_shader_stage stage) -{ - if (stage != MESA_SHADER_FRAGMENT && slot == VARYING_SLOT_PRIMITIVE_SHADING_RATE) - return "VARYING_SLOT_PRIMITIVE_SHADING_RATE"; - return gl_varying_slot_name(slot); -} - -const char * gl_system_value_name(gl_system_value sysval) { static const char *names[] = { diff --git a/src/compiler/shader_enums.h b/src/compiler/shader_enums.h index f76d863..1af7f12 100644 --- a/src/compiler/shader_enums.h +++ b/src/compiler/shader_enums.h @@ -253,6 +253,7 @@ const char *gl_vert_attrib_name(gl_vert_attrib attrib); * - vertResults (in prog_print.c's arb_output_attrib_string()) * - fragAttribs (in prog_print.c's arb_input_attrib_string()) * - _mesa_varying_slot_in_fs() + * - _mesa_varying_slot_name_for_stage() */ typedef enum { @@ -332,7 +333,6 @@ typedef enum #define VARYING_SLOT_TESS_MAX (VARYING_SLOT_PATCH0 + MAX_VARYING) #define MAX_VARYINGS_INCL_PATCH (VARYING_SLOT_TESS_MAX - VARYING_SLOT_VAR0) -const char *gl_varying_slot_name(gl_varying_slot slot); const char *gl_varying_slot_name_for_stage(gl_varying_slot slot, gl_shader_stage stage);