Skip to content

Commit

Permalink
fix: build
Browse files Browse the repository at this point in the history
  • Loading branch information
sangjanai committed Dec 19, 2024
1 parent 636df84 commit 814b4b2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion engine/utils/hardware/gpu/vulkan/vulkan_gpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ inline cpp::result<std::vector<cortex::hw::GPU>, std::string> GetGpuInfoList() {
};
// Load the Vulkan library
#if defined(__APPLE__) && defined(__MACH__)
void* vulkanLibrary = nullptr;
return std::vector<cortex::hw::GPU>{};
#elif defined(__linux__)
auto vulkan_path = get_vulkan_path("libvulkan.so");
Expand All @@ -270,6 +269,7 @@ inline cpp::result<std::vector<cortex::hw::GPU>, std::string> GetGpuInfoList() {
}
HMODULE vulkanLibrary = LoadLibraryW(vulkan_path.value().wstring().c_str());
#endif
#if defined(_WIN32) || defined(_WIN64) || defined(__linux__)
if (!vulkanLibrary) {
std::cerr << "Failed to load the Vulkan library." << std::endl;
return cpp::fail("Failed to load the Vulkan library.");
Expand Down Expand Up @@ -420,5 +420,6 @@ inline cpp::result<std::vector<cortex::hw::GPU>, std::string> GetGpuInfoList() {
vkDestroyInstance(instance, nullptr);
FreeLibrary(vulkanLibrary);
return gpus;
#endif
}
} // namespace cortex::hw

0 comments on commit 814b4b2

Please sign in to comment.