Automatically enable passthrough if color passthrough is supported

This commit is contained in:
Guillaume Meunier
2024-03-16 20:05:57 +01:00
parent b60c1f7b61
commit 3a02198156
9 changed files with 74 additions and 28 deletions
+13 -4
View File
@@ -18,8 +18,6 @@
*/
#include "application.h"
#include "hardware.h"
#include "magic_enum.hpp"
#include "openxr/openxr.h"
#include "scene.h"
#include "spdlog/common.h"
@@ -395,7 +393,7 @@ void application::initialize_vulkan()
spdlog::info("Available Vulkan instance extensions:");
for(vk::ExtensionProperties& i: vk_context.enumerateInstanceExtensionProperties(nullptr))
{
spdlog::info(" {}", i.extensionName);
spdlog::info(" {} (version {})", i.extensionName, i.specVersion);
#ifndef NDEBUG
if (!strcmp(i.extensionName, VK_EXT_DEBUG_REPORT_EXTENSION_NAME))
@@ -804,7 +802,18 @@ void application::initialize()
}
}
spdlog::info("Passthrough: {}", xr_system_id.passthrough_supported() ? "supported" : "not supported");
switch(xr_system_id.passthrough_supported())
{
case xr::system::passthrough_type::no_passthrough:
spdlog::info("Passthrough: not supported");
break;
case xr::system::passthrough_type::bw:
spdlog::info("Passthrough: black and white");
break;
case xr::system::passthrough_type::color:
spdlog::info("Passthrough: color");
break;
}
vk::CommandPoolCreateInfo cmdpool_create_info;