diff options
author | Chad Versace <[email protected]> | 2017-07-10 11:11:40 -0700 |
---|---|---|
committer | Chad Versace <[email protected]> | 2017-10-17 11:08:26 -0700 |
commit | a9ca8f370d6cce0569f15cbbf0986f5d2e0c1384 (patch) | |
tree | 56fa9323a77ad944e92687849280b37f0e456dcc /src/intel/vulkan/anv_util.c | |
parent | aa716db0f64ddb60da17ed64cfcf1248b9ddf907 (diff) |
anv: Better support for Android logging (v2)
In src/intel/vulkan/*, redirect all instances of printf, vk_error,
anv_loge, anv_debug, anv_finishme, anv_perf_warn, anv_assert, and their
many variants to the new intel_log functions. I believe I caught them
all.
The other subdirs of src/intel are left for a future exercise.
v2:
- Rebase onto Tapani's VK_EXT_debug_report changes.
- Drop unused #include <cutils/log.h>.
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_util.c')
-rw-r--r-- | src/intel/vulkan/anv_util.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/src/intel/vulkan/anv_util.c b/src/intel/vulkan/anv_util.c index ec61f7355ef..59f893492b7 100644 --- a/src/intel/vulkan/anv_util.c +++ b/src/intel/vulkan/anv_util.c @@ -47,22 +47,7 @@ anv_loge(const char *format, ...) void anv_loge_v(const char *format, va_list va) { - fprintf(stderr, "vk: error: "); - vfprintf(stderr, format, va); - fprintf(stderr, "\n"); -} - -void anv_printflike(3, 4) -__anv_finishme(const char *file, int line, const char *format, ...) -{ - va_list ap; - char buffer[256]; - - va_start(ap, format); - vsnprintf(buffer, sizeof(buffer), format, ap); - va_end(ap); - - fprintf(stderr, "%s:%d: FINISHME: %s\n", file, line, buffer); + intel_loge_v(format, va); } void anv_printflike(6, 7) @@ -89,7 +74,7 @@ __anv_perf_warn(struct anv_instance *instance, const void *object, "anv", report); - fprintf(stderr, "%s:%d: PERF: %s\n", file, line, buffer); + intel_logw("%s:%d: PERF: %s", file, line, buffer); } VkResult @@ -123,7 +108,7 @@ __vk_errorf(struct anv_instance *instance, const void *object, "anv", report); - fprintf(stderr, "%s\n", report); + intel_loge("%s", report); if (error == VK_ERROR_DEVICE_LOST && env_var_as_boolean("ANV_ABORT_ON_DEVICE_LOSS", false)) |