prop->component_layer_names.count);
// If layer logging is on, list the internals included in the meta-layer
- if ((loader_get_global_debug_level() & VULKAN_LOADER_LAYER_BIT) != 0) {
- for (uint32_t comp_layer = 0; comp_layer < prop->component_layer_names.count; comp_layer++) {
- loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, " [%d] %s", comp_layer, prop->component_layer_names.list[comp_layer]);
- }
+ for (uint32_t comp_layer = 0; comp_layer < prop->component_layer_names.count; comp_layer++) {
+ loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, " [%d] %s", comp_layer, prop->component_layer_names.list[comp_layer]);
}
return true;
}
// If layer debugging is enabled, let's print out the full callstack with layers in their
// defined order.
- if ((loader_get_global_debug_level() & VULKAN_LOADER_LAYER_BIT) != 0) {
- loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, "vkCreateInstance layer callstack setup to:");
- loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, " <Application>");
- loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, " ||");
- loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, " <Loader>");
+ loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, "vkCreateInstance layer callstack setup to:");
+ loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, " <Application>");
+ loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, " ||");
+ loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, " <Loader>");
+ loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, " ||");
+ for (uint32_t cur_layer = 0; cur_layer < num_activated_layers; ++cur_layer) {
+ uint32_t index = num_activated_layers - cur_layer - 1;
+ loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, " %s", activated_layers[index].name);
+ loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, " Type: %s",
+ activated_layers[index].is_implicit ? "Implicit" : "Explicit");
+ if (activated_layers[index].is_implicit) {
+ loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, " Disable Env Var: %s",
+ activated_layers[index].disable_env);
+ }
+ loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, " Manifest: %s", activated_layers[index].manifest);
+ loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, " Library: %s", activated_layers[index].library);
loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, " ||");
- for (uint32_t cur_layer = 0; cur_layer < num_activated_layers; ++cur_layer) {
- uint32_t index = num_activated_layers - cur_layer - 1;
- loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, " %s", activated_layers[index].name);
- loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, " Type: %s",
- activated_layers[index].is_implicit ? "Implicit" : "Explicit");
- if (activated_layers[index].is_implicit) {
- loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, " Disable Env Var: %s",
- activated_layers[index].disable_env);
- }
- loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, " Manifest: %s", activated_layers[index].manifest);
- loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, " Library: %s", activated_layers[index].library);
- loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, " ||");
- }
- loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, " <Drivers>");
}
+ loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, " <Drivers>");
res = fpCreateInstance(&loader_create_info, pAllocator, created_instance);
} else {
// If layer debugging is enabled, let's print out the full callstack with layers in their
// defined order.
uint32_t layer_driver_bits = VULKAN_LOADER_LAYER_BIT | VULKAN_LOADER_DRIVER_BIT;
- if ((loader_get_global_debug_level() & layer_driver_bits) != 0) {
- loader_log(inst, layer_driver_bits, 0, "vkCreateDevice layer callstack setup to:");
- loader_log(inst, layer_driver_bits, 0, " <Application>");
- loader_log(inst, layer_driver_bits, 0, " ||");
- loader_log(inst, layer_driver_bits, 0, " <Loader>");
- loader_log(inst, layer_driver_bits, 0, " ||");
- if ((loader_get_global_debug_level() & VULKAN_LOADER_LAYER_BIT) != 0) {
- for (uint32_t cur_layer = 0; cur_layer < num_activated_layers; ++cur_layer) {
- uint32_t index = num_activated_layers - cur_layer - 1;
- loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, " %s", activated_layers[index].name);
- loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, " Type: %s",
- activated_layers[index].is_implicit ? "Implicit" : "Explicit");
- if (activated_layers[index].is_implicit) {
- loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, " Disable Env Var: %s",
- activated_layers[index].disable_env);
- }
- loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, " Manifest: %s", activated_layers[index].manifest);
- loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, " Library: %s", activated_layers[index].library);
- loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, " ||");
- }
- }
- loader_log(inst, layer_driver_bits, 0, " <Device>");
+ loader_log(inst, layer_driver_bits, 0, "vkCreateDevice layer callstack setup to:");
+ loader_log(inst, layer_driver_bits, 0, " <Application>");
+ loader_log(inst, layer_driver_bits, 0, " ||");
+ loader_log(inst, layer_driver_bits, 0, " <Loader>");
+ loader_log(inst, layer_driver_bits, 0, " ||");
+ for (uint32_t cur_layer = 0; cur_layer < num_activated_layers; ++cur_layer) {
+ uint32_t index = num_activated_layers - cur_layer - 1;
+ loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, " %s", activated_layers[index].name);
+ loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, " Type: %s",
+ activated_layers[index].is_implicit ? "Implicit" : "Explicit");
+ if (activated_layers[index].is_implicit) {
+ loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, " Disable Env Var: %s",
+ activated_layers[index].disable_env);
+ }
+ loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, " Manifest: %s", activated_layers[index].manifest);
+ loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, " Library: %s", activated_layers[index].library);
+ loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, " ||");
}
+ loader_log(inst, layer_driver_bits, 0, " <Device>");
create_info_disp.pNext = loader_create_info.pNext;
loader_create_info.pNext = &create_info_disp;
res = fpCreateDevice(pd, &loader_create_info, pAllocator, &created_device);
// Sort device groups by PCI info
qsort(sorted_group_term, group_count, sizeof(struct loader_physical_device_group_term), compare_device_groups);
- if (loader_get_global_debug_level() & (VULKAN_LOADER_INFO_BIT | VULKAN_LOADER_DRIVER_BIT)) {
- loader_log(inst, VULKAN_LOADER_INFO_BIT | VULKAN_LOADER_DRIVER_BIT, 0, "linux_sort_physical_device_groups: Sorted order:");
- for (uint32_t group = 0; group < group_count; ++group) {
- loader_log(inst, VULKAN_LOADER_INFO_BIT | VULKAN_LOADER_DRIVER_BIT, 0, " Group %u", group);
- for (uint32_t gpu = 0; gpu < sorted_group_term[group].group_props.physicalDeviceCount; ++gpu) {
- loader_log(inst, VULKAN_LOADER_INFO_BIT | VULKAN_LOADER_DRIVER_BIT, 0, " [%u] %s %p %s", gpu,
- sorted_group_term[group].internal_device_info[gpu].device_name,
- sorted_group_term[group].internal_device_info[gpu].physical_device,
- (sorted_group_term[group].internal_device_info[gpu].default_device ? "[default]" : ""));
- }
+ loader_log(inst, VULKAN_LOADER_INFO_BIT | VULKAN_LOADER_DRIVER_BIT, 0, "linux_sort_physical_device_groups: Sorted order:");
+ for (uint32_t group = 0; group < group_count; ++group) {
+ loader_log(inst, VULKAN_LOADER_INFO_BIT | VULKAN_LOADER_DRIVER_BIT, 0, " Group %u", group);
+ for (uint32_t gpu = 0; gpu < sorted_group_term[group].group_props.physicalDeviceCount; ++gpu) {
+ loader_log(inst, VULKAN_LOADER_INFO_BIT | VULKAN_LOADER_DRIVER_BIT, 0, " [%u] %s %p %s", gpu,
+ sorted_group_term[group].internal_device_info[gpu].device_name,
+ sorted_group_term[group].internal_device_info[gpu].physical_device,
+ (sorted_group_term[group].internal_device_info[gpu].default_device ? "[default]" : ""));
}
}