st/oxr: Tidy and print out suggested uuid in physical device selection code

This commit is contained in:
Jakob Bornecrantz 2022-04-28 10:29:56 +01:00
parent 8dfae6d1d1
commit 3492c9e948

View file

@ -441,17 +441,14 @@ oxr_vk_get_physical_device(struct oxr_logger *log,
if (memcmp(pdidp.deviceUUID, sys->xsysc->info.client_vk_deviceUUID, XRT_GPU_UUID_SIZE) == 0) { if (memcmp(pdidp.deviceUUID, sys->xsysc->info.client_vk_deviceUUID, XRT_GPU_UUID_SIZE) == 0) {
gpu_index = i; gpu_index = i;
if (log_level <= U_LOGGING_DEBUG) { if (log_level <= U_LOGGING_DEBUG) {
oxr_log(log, oxr_log(log, "Using GPU %d with uuid %s suggested by runtime", gpu_index, uuid_str);
"Using GPU %d with uuid %s suggested "
"by runtime",
gpu_index, uuid_str);
} }
break; break;
} }
} }
if (gpu_index == -1) { if (gpu_index == -1) {
oxr_warn(log, "Did not find runtime suggested GPU, fall back to GPU 0"); oxr_warn(log, "Did not find runtime suggested GPU, fall back to GPU 0\n\tuuid: %s", suggested_uuid_str);
gpu_index = 0; gpu_index = 0;
} }