diff options
author | Eric Engestrom <eric.engestrom@intel.com> | 2018-11-20 11:59:28 +0000 |
---|---|---|
committer | Eric Engestrom <eric.engestrom@intel.com> | 2019-07-19 22:39:38 +0100 |
commit | dffeaa55dd1155d7a1e8feb5ecfc54fff688fcd8 (patch) | |
tree | a232b3bef0f7251f90cd3a279674218c46a60d65 /src/gallium | |
parent | 00e23cd96998deae429508efa10545be13420379 (diff) |
util: use standard name for snprintf()
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'src/gallium')
33 files changed, 86 insertions, 86 deletions
diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c index c1fde690e3a..da19af7bda9 100644 --- a/src/gallium/auxiliary/draw/draw_llvm.c +++ b/src/gallium/auxiliary/draw/draw_llvm.c @@ -403,7 +403,7 @@ create_jit_vertex_header(struct gallivm_state *gallivm, int data_elems) LLVMTypeRef vertex_header; char struct_name[24]; - util_snprintf(struct_name, 23, "vertex_header%d", data_elems); + snprintf(struct_name, 23, "vertex_header%d", data_elems); elem_types[DRAW_JIT_VERTEX_VERTEX_ID] = LLVMIntTypeInContext(gallivm->context, 32); elem_types[DRAW_JIT_VERTEX_CLIP_POS] = LLVMArrayType(LLVMFloatTypeInContext(gallivm->context), 4); @@ -578,8 +578,8 @@ draw_llvm_create_variant(struct draw_llvm *llvm, variant->llvm = llvm; variant->shader = shader; - util_snprintf(module_name, sizeof(module_name), "draw_llvm_vs_variant%u", - variant->shader->variants_cached); + snprintf(module_name, sizeof(module_name), "draw_llvm_vs_variant%u", + variant->shader->variants_cached); variant->gallivm = gallivm_create(module_name, llvm->context); @@ -1595,8 +1595,8 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant) memset(&system_values, 0, sizeof(system_values)); - util_snprintf(func_name, sizeof(func_name), "draw_llvm_vs_variant%u", - variant->shader->variants_cached); + snprintf(func_name, sizeof(func_name), "draw_llvm_vs_variant%u", + variant->shader->variants_cached); i = 0; arg_types[i++] = get_context_ptr_type(variant); /* context */ @@ -2282,8 +2282,8 @@ draw_gs_llvm_generate(struct draw_llvm *llvm, memset(&system_values, 0, sizeof(system_values)); - util_snprintf(func_name, sizeof(func_name), "draw_llvm_gs_variant%u", - variant->shader->variants_cached); + snprintf(func_name, sizeof(func_name), "draw_llvm_gs_variant%u", + variant->shader->variants_cached); assert(variant->vertex_header_ptr_type); @@ -2420,8 +2420,8 @@ draw_gs_llvm_create_variant(struct draw_llvm *llvm, variant->llvm = llvm; variant->shader = shader; - util_snprintf(module_name, sizeof(module_name), "draw_llvm_gs_variant%u", - variant->shader->variants_cached); + snprintf(module_name, sizeof(module_name), "draw_llvm_gs_variant%u", + variant->shader->variants_cached); variant->gallivm = gallivm_create(module_name, llvm->context); diff --git a/src/gallium/auxiliary/driver_ddebug/dd_draw.c b/src/gallium/auxiliary/driver_ddebug/dd_draw.c index eef44a7c348..b25ac87e543 100644 --- a/src/gallium/auxiliary/driver_ddebug/dd_draw.c +++ b/src/gallium/auxiliary/driver_ddebug/dd_draw.c @@ -51,13 +51,13 @@ dd_get_debug_filename_and_mkdir(char *buf, size_t buflen, bool verbose) strcpy(proc_name, "unknown"); } - util_snprintf(dir, sizeof(dir), "%s/"DD_DIR, debug_get_option("HOME", ".")); + snprintf(dir, sizeof(dir), "%s/"DD_DIR, debug_get_option("HOME", ".")); if (mkdir(dir, 0774) && errno != EEXIST) fprintf(stderr, "dd: can't create a directory (%i)\n", errno); - util_snprintf(buf, buflen, "%s/%s_%u_%08u", dir, proc_name, getpid(), - p_atomic_inc_return(&index) - 1); + snprintf(buf, buflen, "%s/%s_%u_%08u", dir, proc_name, getpid(), + p_atomic_inc_return(&index) - 1); if (verbose) fprintf(stderr, "dd: dumping to file %s\n", buf); @@ -1086,9 +1086,9 @@ dd_thread_main(void *input) const char *process_name = util_get_process_name(); if (process_name) { char threadname[16]; - util_snprintf(threadname, sizeof(threadname), "%.*s:ddbg", - (int)MIN2(strlen(process_name), sizeof(threadname) - 6), - process_name); + snprintf(threadname, sizeof(threadname), "%.*s:ddbg", + (int)MIN2(strlen(process_name), sizeof(threadname) - 6), + process_name); u_thread_setname(threadname); } diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit_overflow.c b/src/gallium/auxiliary/gallivm/lp_bld_arit_overflow.c index 152ad573451..ab931190cf6 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_arit_overflow.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_arit_overflow.c @@ -80,8 +80,8 @@ build_binary_int_overflow(struct gallivm_state *gallivm, debug_assert(type_width == 16 || type_width == 32 || type_width == 64); - util_snprintf(intr_str, sizeof intr_str, "%s.i%u", - intr_prefix, type_width); + snprintf(intr_str, sizeof intr_str, "%s.i%u", + intr_prefix, type_width); oelems[0] = type_ref; oelems[1] = LLVMInt1TypeInContext(gallivm->context); diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp index 23ada3d0433..1bada6ff394 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp +++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp @@ -241,9 +241,9 @@ lp_profile(LLVMValueRef func, const void *code) if (getenv("PERF_BUILDID_DIR")) { pid_t pid = getpid(); char filename[256]; - util_snprintf(filename, sizeof filename, "/tmp/perf-%llu.map", (unsigned long long)pid); + snprintf(filename, sizeof filename, "/tmp/perf-%llu.map", (unsigned long long)pid); perf_map_file = fopen(filename, "wt"); - util_snprintf(filename, sizeof filename, "/tmp/perf-%llu.map.asm", (unsigned long long)pid); + snprintf(filename, sizeof filename, "/tmp/perf-%llu.map.asm", (unsigned long long)pid); perf_asm_file.open(filename); } first_time = FALSE; diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c b/src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c index 9020aabf337..6d934891ce5 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c @@ -1948,8 +1948,8 @@ update_cached_block(struct gallivm_state *gallivm, LLVMBasicBlockRef bb; LLVMValueRef args[3]; - util_snprintf(name, sizeof name, "%s_update_cache_one_block", - format_desc->short_name); + snprintf(name, sizeof name, "%s_update_cache_one_block", + format_desc->short_name); function = LLVMGetNamedFunction(module, name); if (!function) { diff --git a/src/gallium/auxiliary/gallivm/lp_bld_gather.c b/src/gallium/auxiliary/gallivm/lp_bld_gather.c index 8cabe9ef01e..21c906bd9f8 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_gather.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_gather.c @@ -327,8 +327,8 @@ lp_build_gather_avx2(struct gallivm_state *gallivm, src_ptr = LLVMBuildGEP(builder, base_ptr, &offsets, 1, "vector-gep"); char intrinsic[64]; - util_snprintf(intrinsic, sizeof intrinsic, "llvm.masked.gather.v%u%s%u", - length, dst_type.floating ? "f" : "i", src_width); + snprintf(intrinsic, sizeof intrinsic, "llvm.masked.gather.v%u%s%u", + length, dst_type.floating ? "f" : "i", src_width); LLVMValueRef alignment = LLVMConstInt(i32_type, src_width/8, 0); LLVMValueRef mask = LLVMConstAllOnes(i1_vec_type); LLVMValueRef passthru = LLVMGetUndef(src_vec_type); diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c index ee64bc9b953..544c23ee96d 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_init.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c @@ -372,7 +372,7 @@ init_gallivm_state(struct gallivm_state *gallivm, const char *name, { const unsigned pointer_size = 8 * sizeof(void *); char layout[512]; - util_snprintf(layout, sizeof layout, "%c-p:%u:%u:%u-i64:64:64-a0:0:%u-s0:%u:%u", + snprintf(layout, sizeof layout, "%c-p:%u:%u:%u-i64:64:64-a0:0:%u-s0:%u:%u", #ifdef PIPE_ARCH_LITTLE_ENDIAN 'e', // little endian #else @@ -595,7 +595,7 @@ gallivm_compile_module(struct gallivm_state *gallivm) if (gallivm_debug & GALLIVM_DEBUG_DUMP_BC) { char filename[256]; assert(gallivm->module_name); - util_snprintf(filename, sizeof(filename), "ir_%s.bc", gallivm->module_name); + snprintf(filename, sizeof(filename), "ir_%s.bc", gallivm->module_name); LLVMWriteBitcodeToFile(gallivm->module, filename); debug_printf("%s written\n", filename); debug_printf("Invoke as \"opt %s %s | llc -O%d %s%s\"\n", diff --git a/src/gallium/auxiliary/gallivm/lp_bld_intr.c b/src/gallium/auxiliary/gallivm/lp_bld_intr.c index cf1f058ff38..2f853457bf0 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_intr.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_intr.c @@ -90,9 +90,9 @@ lp_format_intrinsic(char *name, } if (length) { - util_snprintf(name, size, "%s.v%u%c%u", name_root, length, c, width); + snprintf(name, size, "%s.v%u%c%u", name_root, length, c, width); } else { - util_snprintf(name, size, "%s.%c%u", name_root, c, width); + snprintf(name, size, "%s.%c%u", name_root, c, width); } } diff --git a/src/gallium/auxiliary/gallivm/lp_bld_printf.c b/src/gallium/auxiliary/gallivm/lp_bld_printf.c index cf58c3b1eaa..a4233a24e33 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_printf.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_printf.c @@ -108,7 +108,7 @@ lp_build_print_value(struct gallivm_state *gallivm, type_fmt[5] = '\0'; } else if (type_kind == LLVMIntegerTypeKind) { if (LLVMGetIntTypeWidth(type_ref) == 64) { - util_snprintf(type_fmt + 2, 3, "%s", PRId64); + snprintf(type_fmt + 2, 3, "%s", PRId64); } else if (LLVMGetIntTypeWidth(type_ref) == 8) { type_fmt[2] = 'u'; } else { diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c index 5599ca99e74..d5bd9161119 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c @@ -3565,8 +3565,8 @@ lp_build_sample_soa_func(struct gallivm_state *gallivm, * Additionally lod_property has to be included too. */ - util_snprintf(func_name, sizeof(func_name), "texfunc_res_%d_sam_%d_%x", - texture_index, sampler_index, sample_key); + snprintf(func_name, sizeof(func_name), "texfunc_res_%d_sam_%d_%x", + texture_index, sampler_index, sample_key); function = LLVMGetNamedFunction(module, func_name); diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c index cda9429f52f..a50b2acbf9f 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c @@ -97,9 +97,9 @@ emit_dump_reg(struct gallivm_state *gallivm, { char buf[32]; - util_snprintf(buf, sizeof buf, " %s[%u].%c = ", - tgsi_file_name(file), - index, "xyzw"[chan]); + snprintf(buf, sizeof buf, " %s[%u].%c = ", + tgsi_file_name(file), + index, "xyzw"[chan]); lp_build_print_value(gallivm, buf, value); } diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader.c b/src/gallium/auxiliary/pipe-loader/pipe_loader.c index b435486903c..54af4d531ca 100644 --- a/src/gallium/auxiliary/pipe-loader/pipe_loader.c +++ b/src/gallium/auxiliary/pipe-loader/pipe_loader.c @@ -142,12 +142,12 @@ pipe_loader_find_module(const char *driver_name, len = next - library_paths; if (len) - ret = util_snprintf(path, sizeof(path), "%.*s/%s%s%s", - len, library_paths, - MODULE_PREFIX, driver_name, UTIL_DL_EXT); + ret = snprintf(path, sizeof(path), "%.*s/%s%s%s", + len, library_paths, + MODULE_PREFIX, driver_name, UTIL_DL_EXT); else - ret = util_snprintf(path, sizeof(path), "%s%s%s", - MODULE_PREFIX, driver_name, UTIL_DL_EXT); + ret = snprintf(path, sizeof(path), "%s%s%s", + MODULE_PREFIX, driver_name, UTIL_DL_EXT); if (ret > 0 && ret < sizeof(path) && u_file_access(path, 0) != -1) { lib = util_dl_open(path); diff --git a/src/gallium/auxiliary/util/u_debug_flush.c b/src/gallium/auxiliary/util/u_debug_flush.c index c0be6681800..cc60ab1d7b7 100644 --- a/src/gallium/auxiliary/util/u_debug_flush.c +++ b/src/gallium/auxiliary/util/u_debug_flush.c @@ -364,8 +364,8 @@ debug_flush_might_flush_cb(UNUSED void *key, void *value, void *data) const char *reason = (const char *) data; char message[80]; - util_snprintf(message, sizeof(message), - "%s referenced mapped buffer detected.", reason); + snprintf(message, sizeof(message), + "%s referenced mapped buffer detected.", reason); debug_flush_alert(message, reason, 3, item->bt_depth, TRUE, TRUE, NULL); debug_flush_alert(NULL, "Map", 0, fbuf->bt_depth, TRUE, FALSE, diff --git a/src/gallium/auxiliary/util/u_debug_image.c b/src/gallium/auxiliary/util/u_debug_image.c index f0fd6cf8339..4e7984886d0 100644 --- a/src/gallium/auxiliary/util/u_debug_image.c +++ b/src/gallium/auxiliary/util/u_debug_image.c @@ -57,7 +57,7 @@ debug_dump_image(const char *prefix, unsigned char *rgb8; FILE *f; - util_snprintf(filename, sizeof(filename), "%s.ppm", prefix); + snprintf(filename, sizeof(filename), "%s.ppm", prefix); rgb8 = MALLOC(height * width * 3); if (!rgb8) { diff --git a/src/gallium/auxiliary/util/u_debug_symbol.c b/src/gallium/auxiliary/util/u_debug_symbol.c index a3290142b33..5bc1c3d4fb2 100644 --- a/src/gallium/auxiliary/util/u_debug_symbol.c +++ b/src/gallium/auxiliary/util/u_debug_symbol.c @@ -191,9 +191,9 @@ debug_symbol_name_dbghelp(const void *addr, char* buf, unsigned size) if (GetModuleFileNameA(hModule, buffer, sizeof buffer) == sizeof buffer) { return FALSE; } - util_snprintf(buf, size, "%p at %s+0x%lx", - addr, buffer, - (unsigned long)((uintptr_t)addr - (uintptr_t)hModule)); + snprintf(buf, size, "%p at %s+0x%lx", + addr, buffer, + (unsigned long)((uintptr_t)addr - (uintptr_t)hModule)); return TRUE; } @@ -208,9 +208,9 @@ debug_symbol_name_dbghelp(const void *addr, char* buf, unsigned size) } if (Line.FileName) { - util_snprintf(buf, size, "%s at %s:%lu", pSymbol->Name, Line.FileName, Line.LineNumber); + snprintf(buf, size, "%s at %s:%lu", pSymbol->Name, Line.FileName, Line.LineNumber); } else { - util_snprintf(buf, size, "%s", pSymbol->Name); + snprintf(buf, size, "%s", pSymbol->Name); } return TRUE; @@ -258,7 +258,7 @@ debug_symbol_name(const void *addr, char* buf, unsigned size) } #endif /* defined(HAVE_EXECINFO_H) */ - util_snprintf(buf, size, "%p", addr); + snprintf(buf, size, "%p", addr); buf[size - 1] = 0; } diff --git a/src/gallium/auxiliary/util/u_network.c b/src/gallium/auxiliary/util/u_network.c index 89395f54ea5..15c30f375b0 100644 --- a/src/gallium/auxiliary/util/u_network.c +++ b/src/gallium/auxiliary/util/u_network.c @@ -119,7 +119,7 @@ u_socket_connect(const char *hostname, uint16_t port) hints.ai_family = AF_UNSPEC; // AF_INET or AF_INET6 to force version hints.ai_socktype = SOCK_STREAM; - util_snprintf(portString, sizeof(portString), "%d", port); + snprintf(portString, sizeof(portString), "%d", port); r = getaddrinfo(hostname, portString, NULL, &addr); if (r != 0) { diff --git a/src/gallium/auxiliary/util/u_simple_shaders.c b/src/gallium/auxiliary/util/u_simple_shaders.c index 2fdd60b0bb3..983307ead73 100644 --- a/src/gallium/auxiliary/util/u_simple_shaders.c +++ b/src/gallium/auxiliary/util/u_simple_shaders.c @@ -556,8 +556,8 @@ util_make_fs_blit_msaa_gen(struct pipe_context *pipe, assert(tgsi_tex == TGSI_TEXTURE_2D_MSAA || tgsi_tex == TGSI_TEXTURE_2D_ARRAY_MSAA); - util_snprintf(text, sizeof(text), shader_templ, type, samp_type, - output_semantic, conversion_decl, type, conversion, output_mask); + snprintf(text, sizeof(text), shader_templ, type, samp_type, + output_semantic, conversion_decl, type, conversion, output_mask); if (!tgsi_text_translate(text, tokens, ARRAY_SIZE(tokens))) { puts(text); diff --git a/src/gallium/auxiliary/util/u_tests.c b/src/gallium/auxiliary/util/u_tests.c index e9cbb464229..a5a54a4d2c9 100644 --- a/src/gallium/auxiliary/util/u_tests.c +++ b/src/gallium/auxiliary/util/u_tests.c @@ -623,8 +623,8 @@ test_texture_barrier(struct pipe_context *ctx, bool use_fbfetch, assert(num_samples >= 1 && num_samples <= 8); - util_snprintf(name, sizeof(name), "%s: %s, %u samples", __func__, - use_fbfetch ? "FBFETCH" : "sampler", MAX2(num_samples, 1)); + snprintf(name, sizeof(name), "%s: %s, %u samples", __func__, + use_fbfetch ? "FBFETCH" : "sampler", MAX2(num_samples, 1)); if (!ctx->screen->get_param(ctx->screen, PIPE_CAP_TEXTURE_BARRIER)) { util_report_result_helper(SKIP, name); diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c b/src/gallium/drivers/etnaviv/etnaviv_screen.c index 519c25d5474..62ebd9d0564 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_screen.c +++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c @@ -110,8 +110,8 @@ etna_screen_get_name(struct pipe_screen *pscreen) struct etna_screen *priv = etna_screen(pscreen); static char buffer[128]; - util_snprintf(buffer, sizeof(buffer), "Vivante GC%x rev %04x", priv->model, - priv->revision); + snprintf(buffer, sizeof(buffer), "Vivante GC%x rev %04x", priv->model, + priv->revision); return buffer; } diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c index f0853ffd002..c5bc6068357 100644 --- a/src/gallium/drivers/freedreno/freedreno_screen.c +++ b/src/gallium/drivers/freedreno/freedreno_screen.c @@ -101,7 +101,7 @@ static const char * fd_screen_get_name(struct pipe_screen *pscreen) { static char buffer[128]; - util_snprintf(buffer, sizeof(buffer), "FD%03d", + snprintf(buffer, sizeof(buffer), "FD%03d", fd_screen(pscreen)->device_id); return buffer; } diff --git a/src/gallium/drivers/i915/i915_screen.c b/src/gallium/drivers/i915/i915_screen.c index 5ee3ffed0fd..b3b83cdd68f 100644 --- a/src/gallium/drivers/i915/i915_screen.c +++ b/src/gallium/drivers/i915/i915_screen.c @@ -103,7 +103,7 @@ i915_get_name(struct pipe_screen *screen) break; } - util_snprintf(buffer, sizeof(buffer), "i915 (chipset: %s)", chipset); + snprintf(buffer, sizeof(buffer), "i915 (chipset: %s)", chipset); return buffer; } diff --git a/src/gallium/drivers/llvmpipe/lp_flush.c b/src/gallium/drivers/llvmpipe/lp_flush.c index 452753f8810..94c78ef18c4 100644 --- a/src/gallium/drivers/llvmpipe/lp_flush.c +++ b/src/gallium/drivers/llvmpipe/lp_flush.c @@ -62,12 +62,12 @@ llvmpipe_flush( struct pipe_context *pipe, unsigned i; for (i = 0; i < llvmpipe->framebuffer.nr_cbufs; i++) { - util_snprintf(filename, sizeof(filename), "cbuf%u_%u", i, frame_no); + snprintf(filename, sizeof(filename), "cbuf%u_%u", i, frame_no); debug_dump_surface_bmp(&llvmpipe->pipe, filename, llvmpipe->framebuffer.cbufs[i]); } if (0) { - util_snprintf(filename, sizeof(filename), "zsbuf_%u", frame_no); + snprintf(filename, sizeof(filename), "zsbuf_%u", frame_no); debug_dump_surface_bmp(&llvmpipe->pipe, filename, llvmpipe->framebuffer.zsbuf); } diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c b/src/gallium/drivers/llvmpipe/lp_rast.c index 9d4f9f8d027..a4cb211e14b 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast.c +++ b/src/gallium/drivers/llvmpipe/lp_rast.c @@ -789,7 +789,7 @@ thread_function(void *init_data) char thread_name[16]; unsigned fpstate; - util_snprintf(thread_name, sizeof thread_name, "llvmpipe-%u", task->thread_index); + snprintf(thread_name, sizeof thread_name, "llvmpipe-%u", task->thread_index); u_thread_setname(thread_name); /* Make sure that denorms are treated like zeros. This is diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c index c4aace9aa67..58dbf2d4301 100644 --- a/src/gallium/drivers/llvmpipe/lp_screen.c +++ b/src/gallium/drivers/llvmpipe/lp_screen.c @@ -97,9 +97,9 @@ static const char * llvmpipe_get_name(struct pipe_screen *screen) { static char buf[100]; - util_snprintf(buf, sizeof(buf), "llvmpipe (LLVM %u.%u, %u bits)", - HAVE_LLVM >> 8, HAVE_LLVM & 0xff, - lp_native_vector_width ); + snprintf(buf, sizeof(buf), "llvmpipe (LLVM %u.%u, %u bits)", + HAVE_LLVM >> 8, HAVE_LLVM & 0xff, + lp_native_vector_width ); return buf; } diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index 6934c12c243..9efad74b741 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -2490,8 +2490,8 @@ generate_fragment(struct llvmpipe_context *lp, blend_vec_type = lp_build_vec_type(gallivm, blend_type); - util_snprintf(func_name, sizeof(func_name), "fs%u_variant%u_%s", - shader->no, variant->no, partial_mask ? "partial" : "whole"); + snprintf(func_name, sizeof(func_name), "fs%u_variant%u_%s", + shader->no, variant->no, partial_mask ? "partial" : "whole"); arg_types[0] = variant->jit_context_ptr_type; /* context */ arg_types[1] = int32_type; /* x */ @@ -2829,8 +2829,8 @@ generate_variant(struct llvmpipe_context *lp, if (!variant) return NULL; - util_snprintf(module_name, sizeof(module_name), "fs%u_variant%u", - shader->no, shader->variants_created); + snprintf(module_name, sizeof(module_name), "fs%u_variant%u", + shader->no, shader->variants_created); variant->gallivm = gallivm_create(module_name, lp->context); if (!variant->gallivm) { diff --git a/src/gallium/drivers/llvmpipe/lp_state_setup.c b/src/gallium/drivers/llvmpipe/lp_state_setup.c index 77c7ac1bbde..915e21db52c 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_setup.c +++ b/src/gallium/drivers/llvmpipe/lp_state_setup.c @@ -727,8 +727,8 @@ generate_setup_variant(struct lp_setup_variant_key *key, variant->no = setup_no++; - util_snprintf(func_name, sizeof(func_name), "setup_variant_%u", - variant->no); + snprintf(func_name, sizeof(func_name), "setup_variant_%u", + variant->no); variant->gallivm = gallivm = gallivm_create(func_name, lp->context); if (!variant->gallivm) { diff --git a/src/gallium/drivers/llvmpipe/lp_test_arit.c b/src/gallium/drivers/llvmpipe/lp_test_arit.c index eb3f67dc1fe..184e50089f7 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_arit.c +++ b/src/gallium/drivers/llvmpipe/lp_test_arit.c @@ -399,7 +399,7 @@ static boolean test_unary(unsigned verbose, FILE *fp, const struct unary_test_t *test, unsigned length) { char test_name[128]; - util_snprintf(test_name, sizeof test_name, "%s.v%u", test->name, length); + snprintf(test_name, sizeof test_name, "%s.v%u", test->name, length); LLVMContextRef context; struct gallivm_state *gallivm; LLVMValueRef test_func; diff --git a/src/gallium/drivers/llvmpipe/lp_test_format.c b/src/gallium/drivers/llvmpipe/lp_test_format.c index d9ba5ef6c0f..31d965de597 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_format.c +++ b/src/gallium/drivers/llvmpipe/lp_test_format.c @@ -96,8 +96,8 @@ add_fetch_rgba_test(struct gallivm_state *gallivm, unsigned verbose, LLVMValueRef rgba; LLVMValueRef cache = NULL; - util_snprintf(name, sizeof name, "fetch_%s_%s", desc->short_name, - type.floating ? "float" : "unorm8"); + snprintf(name, sizeof name, "fetch_%s_%s", desc->short_name, + type.floating ? "float" : "unorm8"); args[0] = LLVMPointerType(lp_build_vec_type(gallivm, type), 0); args[1] = LLVMPointerType(LLVMInt8TypeInContext(context), 0); diff --git a/src/gallium/drivers/nouveau/nouveau_screen.c b/src/gallium/drivers/nouveau/nouveau_screen.c index cbd45a1dc35..b425ac4f721 100644 --- a/src/gallium/drivers/nouveau/nouveau_screen.c +++ b/src/gallium/drivers/nouveau/nouveau_screen.c @@ -34,7 +34,7 @@ nouveau_screen_get_name(struct pipe_screen *pscreen) struct nouveau_device *dev = nouveau_screen(pscreen)->device; static char buffer[128]; - util_snprintf(buffer, sizeof(buffer), "NV%02X", dev->chipset); + snprintf(buffer, sizeof(buffer), "NV%02X", dev->chipset); return buffer; } diff --git a/src/gallium/drivers/softpipe/sp_flush.c b/src/gallium/drivers/softpipe/sp_flush.c index 5eccbe34d46..ef9d787ca7a 100644 --- a/src/gallium/drivers/softpipe/sp_flush.c +++ b/src/gallium/drivers/softpipe/sp_flush.c @@ -82,9 +82,9 @@ softpipe_flush( struct pipe_context *pipe, if (flags & PIPE_FLUSH_END_OF_FRAME) { static unsigned frame_no = 1; static char filename[256]; - util_snprintf(filename, sizeof(filename), "cbuf_%u.bmp", frame_no); + snprintf(filename, sizeof(filename), "cbuf_%u.bmp", frame_no); debug_dump_surface_bmp(pipe, filename, softpipe->framebuffer.cbufs[0]); - util_snprintf(filename, sizeof(filename), "zsbuf_%u.bmp", frame_no); + snprintf(filename, sizeof(filename), "zsbuf_%u.bmp", frame_no); debug_dump_surface_bmp(pipe, filename, softpipe->framebuffer.zsbuf); ++frame_no; } diff --git a/src/gallium/drivers/svga/svga_pipe_flush.c b/src/gallium/drivers/svga/svga_pipe_flush.c index 1f4eebc124a..7e809d0cda8 100644 --- a/src/gallium/drivers/svga/svga_pipe_flush.c +++ b/src/gallium/drivers/svga/svga_pipe_flush.c @@ -60,12 +60,12 @@ static void svga_flush( struct pipe_context *pipe, unsigned i; for (i = 0; i < fb->nr_cbufs; i++) { - util_snprintf(filename, sizeof(filename), "cbuf%u_%04u.bmp", i, frame_no); + snprintf(filename, sizeof(filename), "cbuf%u_%04u.bmp", i, frame_no); debug_dump_surface_bmp(&svga->pipe, filename, fb->cbufs[i]); } if (0 && fb->zsbuf) { - util_snprintf(filename, sizeof(filename), "zsbuf_%04u.bmp", frame_no); + snprintf(filename, sizeof(filename), "zsbuf_%04u.bmp", frame_no); debug_dump_surface_bmp(&svga->pipe, filename, fb->zsbuf); } diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c index cf90c759198..9a13e68f17c 100644 --- a/src/gallium/drivers/svga/svga_screen.c +++ b/src/gallium/drivers/svga/svga_screen.c @@ -98,7 +98,7 @@ svga_get_name( struct pipe_screen *pscreen ) llvm = "LLVM;"; #endif - util_snprintf(name, sizeof(name), "SVGA3D; %s %s %s", build, mutex, llvm); + snprintf(name, sizeof(name), "SVGA3D; %s %s %s", build, mutex, llvm); return name; } @@ -900,12 +900,12 @@ init_logging(struct pipe_screen *screen) char host_log[1000]; /* Log Version to Host */ - util_snprintf(host_log, sizeof(host_log) - strlen(log_prefix), - "%s%s\n", log_prefix, svga_get_name(screen)); + snprintf(host_log, sizeof(host_log) - strlen(log_prefix), + "%s%s\n", log_prefix, svga_get_name(screen)); svgascreen->sws->host_log(svgascreen->sws, host_log); - util_snprintf(host_log, sizeof(host_log) - strlen(log_prefix), - "%s" PACKAGE_VERSION MESA_GIT_SHA1, log_prefix); + snprintf(host_log, sizeof(host_log) - strlen(log_prefix), + "%s" PACKAGE_VERSION MESA_GIT_SHA1, log_prefix); svgascreen->sws->host_log(svgascreen->sws, host_log); /* If the SVGA_EXTRA_LOGGING env var is set, log the process's command @@ -914,8 +914,8 @@ init_logging(struct pipe_screen *screen) if (debug_get_bool_option("SVGA_EXTRA_LOGGING", FALSE)) { char cmdline[1000]; if (os_get_command_line(cmdline, sizeof(cmdline))) { - util_snprintf(host_log, sizeof(host_log) - strlen(log_prefix), - "%s%s\n", log_prefix, cmdline); + snprintf(host_log, sizeof(host_log) - strlen(log_prefix), + "%s%s\n", log_prefix, cmdline); svgascreen->sws->host_log(svgascreen->sws, host_log); } } diff --git a/src/gallium/drivers/swr/swr_screen.cpp b/src/gallium/drivers/swr/swr_screen.cpp index f22bb3bf19b..9b146284672 100644 --- a/src/gallium/drivers/swr/swr_screen.cpp +++ b/src/gallium/drivers/swr/swr_screen.cpp @@ -69,9 +69,9 @@ static const char * swr_get_name(struct pipe_screen *screen) { static char buf[100]; - util_snprintf(buf, sizeof(buf), "SWR (LLVM %u.%u, %u bits)", - HAVE_LLVM >> 8, HAVE_LLVM & 0xff, - lp_native_vector_width ); + snprintf(buf, sizeof(buf), "SWR (LLVM %u.%u, %u bits)", + HAVE_LLVM >> 8, HAVE_LLVM & 0xff, + lp_native_vector_width); return buf; } |