aux/vk: Properly set log_level in given vk_bundles

This commit is contained in:
Jakob Bornecrantz 2022-03-01 11:59:21 +00:00 committed by Jakob Bornecrantz
parent 3044794f93
commit 3c8378631f
3 changed files with 15 additions and 4 deletions

View file

@ -1832,12 +1832,14 @@ vk_init_from_given(struct vk_bundle *vk,
VkPhysicalDevice physical_device,
VkDevice device,
uint32_t queue_family_index,
uint32_t queue_index)
uint32_t queue_index,
enum u_logging_level log_level)
{
VkResult ret;
// First memset it clear.
U_ZERO(vk);
vk->log_level = log_level;
ret = vk_get_loader_functions(vk, vkGetInstanceProcAddr);
if (ret != VK_SUCCESS) {

View file

@ -505,7 +505,8 @@ vk_init_from_given(struct vk_bundle *vk,
VkPhysicalDevice physical_device,
VkDevice device,
uint32_t queue_family_index,
uint32_t queue_index);
uint32_t queue_index,
enum u_logging_level log_level);
/*!
* @ingroup aux_vk

View file

@ -661,9 +661,17 @@ client_vk_compositor_create(struct xrt_compositor_native *xcn,
c->base.base.info.format_count = xcn->base.info.format_count;
// Default to info.
c->vk.log_level = U_LOGGING_INFO;
enum u_logging_level log_level = U_LOGGING_INFO;
ret = vk_init_from_given(&c->vk, getProc, instance, physicalDevice, device, queueFamilyIndex, queueIndex);
ret = vk_init_from_given( //
&c->vk, // vk_bundle
getProc, // vkGetInstanceProcAddr
instance, // instance
physicalDevice, // physical_device
device, // device
queueFamilyIndex, // queue_family_index
queueIndex, // queue_index
log_level); // log_level
if (ret != VK_SUCCESS) {
goto err_free;
}