From 16923e42a419048b61b72f8fdae2aed32cf1212a Mon Sep 17 00:00:00 2001 From: Nicolai Hähnle Date: Thu, 27 Jul 2017 11:40:25 +0200 Subject: gallium: rename util_dump_* to util_str_* for enum-to-string conversion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is mostly mechanical search-and-replace, plus touching up the macros in u_dump_defines.c manually a bit. Reviewed-by: Marek Olšák --- src/gallium/drivers/ddebug/dd_draw.c | 2 +- src/gallium/drivers/llvmpipe/lp_state_fs.c | 42 ++++++++++++++-------------- src/gallium/drivers/llvmpipe/lp_test_blend.c | 24 ++++++++-------- src/gallium/drivers/trace/tr_dump_defines.h | 2 +- 4 files changed, 35 insertions(+), 35 deletions(-) (limited to 'src/gallium/drivers') diff --git a/src/gallium/drivers/ddebug/dd_draw.c b/src/gallium/drivers/ddebug/dd_draw.c index 9c95d250d1a..3e34f63034e 100644 --- a/src/gallium/drivers/ddebug/dd_draw.c +++ b/src/gallium/drivers/ddebug/dd_draw.c @@ -186,7 +186,7 @@ util_dump_query(FILE *f, struct dd_query *query) fprintf(f, "PIPE_QUERY_DRIVER_SPECIFIC + %i", query->type - PIPE_QUERY_DRIVER_SPECIFIC); else - fprintf(f, "%s", util_dump_query_type(query->type, false)); + fprintf(f, "%s", util_str_query_type(query->type, false)); } static void diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index e6669593329..df3557a7d6f 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -2679,23 +2679,23 @@ dump_fs_variant_key(const struct lp_fragment_shader_variant_key *key) debug_printf("depth.format = %s\n", util_format_name(key->zsbuf_format)); } if (key->depth.enabled) { - debug_printf("depth.func = %s\n", util_dump_func(key->depth.func, TRUE)); + debug_printf("depth.func = %s\n", util_str_func(key->depth.func, TRUE)); debug_printf("depth.writemask = %u\n", key->depth.writemask); } for (i = 0; i < 2; ++i) { if (key->stencil[i].enabled) { - debug_printf("stencil[%u].func = %s\n", i, util_dump_func(key->stencil[i].func, TRUE)); - debug_printf("stencil[%u].fail_op = %s\n", i, util_dump_stencil_op(key->stencil[i].fail_op, TRUE)); - debug_printf("stencil[%u].zpass_op = %s\n", i, util_dump_stencil_op(key->stencil[i].zpass_op, TRUE)); - debug_printf("stencil[%u].zfail_op = %s\n", i, util_dump_stencil_op(key->stencil[i].zfail_op, TRUE)); + debug_printf("stencil[%u].func = %s\n", i, util_str_func(key->stencil[i].func, TRUE)); + debug_printf("stencil[%u].fail_op = %s\n", i, util_str_stencil_op(key->stencil[i].fail_op, TRUE)); + debug_printf("stencil[%u].zpass_op = %s\n", i, util_str_stencil_op(key->stencil[i].zpass_op, TRUE)); + debug_printf("stencil[%u].zfail_op = %s\n", i, util_str_stencil_op(key->stencil[i].zfail_op, TRUE)); debug_printf("stencil[%u].valuemask = 0x%x\n", i, key->stencil[i].valuemask); debug_printf("stencil[%u].writemask = 0x%x\n", i, key->stencil[i].writemask); } } if (key->alpha.enabled) { - debug_printf("alpha.func = %s\n", util_dump_func(key->alpha.func, TRUE)); + debug_printf("alpha.func = %s\n", util_str_func(key->alpha.func, TRUE)); } if (key->occlusion_count) { @@ -2703,15 +2703,15 @@ dump_fs_variant_key(const struct lp_fragment_shader_variant_key *key) } if (key->blend.logicop_enable) { - debug_printf("blend.logicop_func = %s\n", util_dump_logicop(key->blend.logicop_func, TRUE)); + debug_printf("blend.logicop_func = %s\n", util_str_logicop(key->blend.logicop_func, TRUE)); } else if (key->blend.rt[0].blend_enable) { - debug_printf("blend.rgb_func = %s\n", util_dump_blend_func (key->blend.rt[0].rgb_func, TRUE)); - debug_printf("blend.rgb_src_factor = %s\n", util_dump_blend_factor(key->blend.rt[0].rgb_src_factor, TRUE)); - debug_printf("blend.rgb_dst_factor = %s\n", util_dump_blend_factor(key->blend.rt[0].rgb_dst_factor, TRUE)); - debug_printf("blend.alpha_func = %s\n", util_dump_blend_func (key->blend.rt[0].alpha_func, TRUE)); - debug_printf("blend.alpha_src_factor = %s\n", util_dump_blend_factor(key->blend.rt[0].alpha_src_factor, TRUE)); - debug_printf("blend.alpha_dst_factor = %s\n", util_dump_blend_factor(key->blend.rt[0].alpha_dst_factor, TRUE)); + debug_printf("blend.rgb_func = %s\n", util_str_blend_func (key->blend.rt[0].rgb_func, TRUE)); + debug_printf("blend.rgb_src_factor = %s\n", util_str_blend_factor(key->blend.rt[0].rgb_src_factor, TRUE)); + debug_printf("blend.rgb_dst_factor = %s\n", util_str_blend_factor(key->blend.rt[0].rgb_dst_factor, TRUE)); + debug_printf("blend.alpha_func = %s\n", util_str_blend_func (key->blend.rt[0].alpha_func, TRUE)); + debug_printf("blend.alpha_src_factor = %s\n", util_str_blend_factor(key->blend.rt[0].alpha_src_factor, TRUE)); + debug_printf("blend.alpha_dst_factor = %s\n", util_str_blend_factor(key->blend.rt[0].alpha_dst_factor, TRUE)); } debug_printf("blend.colormask = 0x%x\n", key->blend.rt[0].colormask); if (key->blend.alpha_to_coverage) { @@ -2721,17 +2721,17 @@ dump_fs_variant_key(const struct lp_fragment_shader_variant_key *key) const struct lp_static_sampler_state *sampler = &key->state[i].sampler_state; debug_printf("sampler[%u] = \n", i); debug_printf(" .wrap = %s %s %s\n", - util_dump_tex_wrap(sampler->wrap_s, TRUE), - util_dump_tex_wrap(sampler->wrap_t, TRUE), - util_dump_tex_wrap(sampler->wrap_r, TRUE)); + util_str_tex_wrap(sampler->wrap_s, TRUE), + util_str_tex_wrap(sampler->wrap_t, TRUE), + util_str_tex_wrap(sampler->wrap_r, TRUE)); debug_printf(" .min_img_filter = %s\n", - util_dump_tex_filter(sampler->min_img_filter, TRUE)); + util_str_tex_filter(sampler->min_img_filter, TRUE)); debug_printf(" .min_mip_filter = %s\n", - util_dump_tex_mipfilter(sampler->min_mip_filter, TRUE)); + util_str_tex_mipfilter(sampler->min_mip_filter, TRUE)); debug_printf(" .mag_img_filter = %s\n", - util_dump_tex_filter(sampler->mag_img_filter, TRUE)); + util_str_tex_filter(sampler->mag_img_filter, TRUE)); if (sampler->compare_mode != PIPE_TEX_COMPARE_NONE) - debug_printf(" .compare_func = %s\n", util_dump_func(sampler->compare_func, TRUE)); + debug_printf(" .compare_func = %s\n", util_str_func(sampler->compare_func, TRUE)); debug_printf(" .normalized_coords = %u\n", sampler->normalized_coords); debug_printf(" .min_max_lod_equal = %u\n", sampler->min_max_lod_equal); debug_printf(" .lod_bias_non_zero = %u\n", sampler->lod_bias_non_zero); @@ -2744,7 +2744,7 @@ dump_fs_variant_key(const struct lp_fragment_shader_variant_key *key) debug_printf(" .format = %s\n", util_format_name(texture->format)); debug_printf(" .target = %s\n", - util_dump_tex_target(texture->target, TRUE)); + util_str_tex_target(texture->target, TRUE)); debug_printf(" .level_zero_only = %u\n", texture->level_zero_only); debug_printf(" .pot = %u %u %u\n", diff --git a/src/gallium/drivers/llvmpipe/lp_test_blend.c b/src/gallium/drivers/llvmpipe/lp_test_blend.c index 13bed088bc5..98d6bbe50d4 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_blend.c +++ b/src/gallium/drivers/llvmpipe/lp_test_blend.c @@ -95,12 +95,12 @@ write_tsv_row(FILE *fp, fprintf(fp, "%s\t%s\t%s\t%s\t%s\t%s\n", - util_dump_blend_func(blend->rt[0].rgb_func, TRUE), - util_dump_blend_factor(blend->rt[0].rgb_src_factor, TRUE), - util_dump_blend_factor(blend->rt[0].rgb_dst_factor, TRUE), - util_dump_blend_func(blend->rt[0].alpha_func, TRUE), - util_dump_blend_factor(blend->rt[0].alpha_src_factor, TRUE), - util_dump_blend_factor(blend->rt[0].alpha_dst_factor, TRUE)); + util_str_blend_func(blend->rt[0].rgb_func, TRUE), + util_str_blend_factor(blend->rt[0].rgb_src_factor, TRUE), + util_str_blend_factor(blend->rt[0].rgb_dst_factor, TRUE), + util_str_blend_func(blend->rt[0].alpha_func, TRUE), + util_str_blend_factor(blend->rt[0].alpha_src_factor, TRUE), + util_str_blend_factor(blend->rt[0].alpha_dst_factor, TRUE)); fflush(fp); } @@ -119,12 +119,12 @@ dump_blend_type(FILE *fp, fprintf(fp, " %s=%s %s=%s %s=%s %s=%s %s=%s %s=%s", - "rgb_func", util_dump_blend_func(blend->rt[0].rgb_func, TRUE), - "rgb_src_factor", util_dump_blend_factor(blend->rt[0].rgb_src_factor, TRUE), - "rgb_dst_factor", util_dump_blend_factor(blend->rt[0].rgb_dst_factor, TRUE), - "alpha_func", util_dump_blend_func(blend->rt[0].alpha_func, TRUE), - "alpha_src_factor", util_dump_blend_factor(blend->rt[0].alpha_src_factor, TRUE), - "alpha_dst_factor", util_dump_blend_factor(blend->rt[0].alpha_dst_factor, TRUE)); + "rgb_func", util_str_blend_func(blend->rt[0].rgb_func, TRUE), + "rgb_src_factor", util_str_blend_factor(blend->rt[0].rgb_src_factor, TRUE), + "rgb_dst_factor", util_str_blend_factor(blend->rt[0].rgb_dst_factor, TRUE), + "alpha_func", util_str_blend_func(blend->rt[0].alpha_func, TRUE), + "alpha_src_factor", util_str_blend_factor(blend->rt[0].alpha_src_factor, TRUE), + "alpha_dst_factor", util_str_blend_factor(blend->rt[0].alpha_dst_factor, TRUE)); fprintf(fp, " ...\n"); fflush(fp); diff --git a/src/gallium/drivers/trace/tr_dump_defines.h b/src/gallium/drivers/trace/tr_dump_defines.h index b38d63eac59..7f969a30333 100644 --- a/src/gallium/drivers/trace/tr_dump_defines.h +++ b/src/gallium/drivers/trace/tr_dump_defines.h @@ -50,7 +50,7 @@ trace_dump_query_type(unsigned value) if (!trace_dumping_enabled_locked()) return; - trace_dump_enum(util_dump_query_type(value, FALSE)); + trace_dump_enum(util_str_query_type(value, FALSE)); } -- cgit v1.2.3