freedreno: remove shader_stage_name()
authorRob Clark <robdclark@gmail.com>
Fri, 9 Nov 2018 15:50:48 +0000 (10:50 -0500)
committerRob Clark <robdclark@gmail.com>
Tue, 27 Nov 2018 20:44:02 +0000 (15:44 -0500)
Signed-off-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/disasm.h
src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
src/gallium/drivers/freedreno/ir3/ir3_shader.c

index e155370..f20d2ca 100644 (file)
@@ -51,25 +51,6 @@ shader_debug_enabled(gl_shader_stage type)
        }
 }
 
-static inline const char *
-shader_stage_name(gl_shader_stage type)
-{
-       /* NOTE these names are chosen to match the INTEL_DEBUG output
-        * which frameretrace parses.  Hurray accidental ABI!
-        */
-       switch (type) {
-       case MESA_SHADER_VERTEX:      return "vertex";
-       case MESA_SHADER_TESS_CTRL:   return "tessellation control";
-       case MESA_SHADER_TESS_EVAL:   return "tessellation evaluation";
-       case MESA_SHADER_GEOMETRY:    return "geometry";
-       case MESA_SHADER_FRAGMENT:    return "fragment";
-       case MESA_SHADER_COMPUTE:     return "compute";
-       default:
-               debug_assert(0);
-               return NULL;
-       }
-}
-
 /* bitmask of debug flags */
 enum debug_t {
        PRINT_RAW      = 0x1,    /* dump raw hexdump */
index abdff85..a75c6c3 100644 (file)
@@ -190,7 +190,7 @@ compile_init(struct ir3_compiler *compiler,
 
        if (shader_debug_enabled(so->type)) {
                fprintf(stderr, "NIR (final form) for %s shader:\n",
-                       shader_stage_name(so->type));
+                       _mesa_shader_stage_to_string(so->type));
                nir_print_shader(ctx->s, stderr);
        }
 
index 797d75e..c13c47c 100644 (file)
@@ -152,7 +152,8 @@ assemble_variant(struct ir3_shader_variant *v)
 
        if (shader_debug_enabled(v->shader->type)) {
                fprintf(stderr, "Native code for unnamed %s shader %s:\n",
-                       shader_stage_name(v->shader->type), v->shader->nir->info.name);
+                       _mesa_shader_stage_to_string(v->shader->type),
+                       v->shader->nir->info.name);
                if (v->shader->type == MESA_SHADER_FRAGMENT)
                        fprintf(stderr, "SIMD0\n");
                ir3_shader_disasm(v, bin, stderr);