53#ifdef HELIOS_HAVE_VULKAN
64 static std::unique_ptr<VulkanDevice> shared_device;
65 static bool initialized =
false;
66 static bool available =
false;
73 const char *no_gpu = std::getenv(
"HELIOS_NO_GPU");
74 if (no_gpu && std::string(no_gpu) !=
"0") {
75 std::cout <<
"[Vulkan Test] HELIOS_NO_GPU is set. Skipping GPU tests." << std::endl;
81 shared_device = std::make_unique<VulkanDevice>();
82 shared_device->initialize(
false);
88 shared_device->shutdown();
89 shared_device.reset();
92 }
catch (
const std::exception &e) {
93 std::cout <<
"[Vulkan Test] No Vulkan device available: " << e.what() << std::endl;
94 std::cout <<
"[Vulkan Test] GPU-dependent radiation tests will be skipped." << std::endl;
95 shared_device.reset();
100 return available ? shared_device.get() :
nullptr;
114#ifdef HELIOS_HAVE_VULKAN
115 if (gpu_runtime_failed) {
118 return getSharedDevice() !=
nullptr;
131 gpu_runtime_failed =
true;
140 static inline bool gpu_runtime_failed =
false;