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 <jason@jlekstrand.net>
This commit is contained in:
@@ -50,7 +50,7 @@ compiler_perf_log(void *data, const char *fmt, ...)
|
||||
va_start(args, fmt);
|
||||
|
||||
if (unlikely(INTEL_DEBUG & DEBUG_PERF))
|
||||
vfprintf(stderr, fmt, args);
|
||||
intel_logd_v(fmt, args);
|
||||
|
||||
va_end(args);
|
||||
}
|
||||
@@ -294,11 +294,11 @@ anv_physical_device_init(struct anv_physical_device *device,
|
||||
}
|
||||
|
||||
if (device->info.is_haswell) {
|
||||
fprintf(stderr, "WARNING: Haswell Vulkan support is incomplete\n");
|
||||
intel_logw("Haswell Vulkan support is incomplete");
|
||||
} else if (device->info.gen == 7 && !device->info.is_baytrail) {
|
||||
fprintf(stderr, "WARNING: Ivy Bridge Vulkan support is incomplete\n");
|
||||
intel_logw("Ivy Bridge Vulkan support is incomplete");
|
||||
} else if (device->info.gen == 7 && device->info.is_baytrail) {
|
||||
fprintf(stderr, "WARNING: Bay Trail Vulkan support is incomplete\n");
|
||||
intel_logw("Bay Trail Vulkan support is incomplete");
|
||||
} else if (device->info.gen >= 8 && device->info.gen <= 9) {
|
||||
/* Broadwell, Cherryview, Skylake, Broxton, Kabylake is as fully
|
||||
* supported as anything */
|
||||
@@ -365,8 +365,7 @@ anv_physical_device_init(struct anv_physical_device *device,
|
||||
* many platforms, but otherwise, things will just work.
|
||||
*/
|
||||
if (device->subslice_total < 1 || device->eu_total < 1) {
|
||||
fprintf(stderr, "WARNING: Kernel 4.1 required to properly"
|
||||
" query GPU properties.\n");
|
||||
intel_logw("Kernel 4.1 required to properly query GPU properties");
|
||||
}
|
||||
} else if (device->info.gen == 7) {
|
||||
device->subslice_total = 1 << (device->info.gt - 1);
|
||||
|
Reference in New Issue
Block a user