From 8a654f092eaa6a6435e26668ea7fb0bc2a5de99c Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Fri, 9 Nov 2018 10:50:48 -0500 Subject: [PATCH] freedreno: remove shader_stage_name() Signed-off-by: Rob Clark --- src/gallium/drivers/freedreno/disasm.h | 19 ------------------- .../drivers/freedreno/ir3/ir3_compiler_nir.c | 2 +- .../drivers/freedreno/ir3/ir3_shader.c | 3 ++- 3 files changed, 3 insertions(+), 21 deletions(-) diff --git a/src/gallium/drivers/freedreno/disasm.h b/src/gallium/drivers/freedreno/disasm.h index e1553707a42..f20d2caed67 100644 --- a/src/gallium/drivers/freedreno/disasm.h +++ b/src/gallium/drivers/freedreno/disasm.h @@ -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 */ diff --git a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c index abdff85874f..a75c6c3a6df 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c @@ -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); } diff --git a/src/gallium/drivers/freedreno/ir3/ir3_shader.c b/src/gallium/drivers/freedreno/ir3/ir3_shader.c index 797d75e3155..c13c47ce499 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_shader.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_shader.c @@ -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); -- 2.30.2