diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2021-03-29 00:58:48 +0200 |
---|---|---|
committer | Jan Beich <jbeich@FreeBSD.org> | 2021-03-30 02:25:25 +0200 |
commit | 9b50b23a509c87920405fc66edcf5761a8cdbb62 (patch) | |
tree | 6f8ed6a7a97e3c658f62e6094a2d3d30a949a108 /src/video_core/vulkan_common/vulkan_memory_allocator.cpp | |
parent | Merge pull request #6102 from ogniK5377/fd-pass (diff) | |
download | yuzu-9b50b23a509c87920405fc66edcf5761a8cdbb62.tar yuzu-9b50b23a509c87920405fc66edcf5761a8cdbb62.tar.gz yuzu-9b50b23a509c87920405fc66edcf5761a8cdbb62.tar.bz2 yuzu-9b50b23a509c87920405fc66edcf5761a8cdbb62.tar.lz yuzu-9b50b23a509c87920405fc66edcf5761a8cdbb62.tar.xz yuzu-9b50b23a509c87920405fc66edcf5761a8cdbb62.tar.zst yuzu-9b50b23a509c87920405fc66edcf5761a8cdbb62.zip |
Diffstat (limited to 'src/video_core/vulkan_common/vulkan_memory_allocator.cpp')
-rw-r--r-- | src/video_core/vulkan_common/vulkan_memory_allocator.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/video_core/vulkan_common/vulkan_memory_allocator.cpp b/src/video_core/vulkan_common/vulkan_memory_allocator.cpp index 2a8b7a907..fa37aa79a 100644 --- a/src/video_core/vulkan_common/vulkan_memory_allocator.cpp +++ b/src/video_core/vulkan_common/vulkan_memory_allocator.cpp @@ -62,7 +62,7 @@ public: : memory{std::move(memory_)}, allocation_size{allocation_size_}, property_flags{properties}, shifted_memory_type{1U << type} {} -#if defined(_WIN32) || defined(__linux__) +#if defined(_WIN32) || defined(__unix__) ~MemoryAllocation() { if (owning_opengl_handle != 0) { glDeleteMemoryObjectsEXT(1, &owning_opengl_handle); @@ -114,7 +114,7 @@ public: } return owning_opengl_handle; } -#elif __linux__ +#elif __unix__ [[nodiscard]] u32 ExportOpenGLHandle() { if (!owning_opengl_handle) { glCreateMemoryObjectsEXT(1, &owning_opengl_handle); @@ -165,7 +165,7 @@ private: const u32 shifted_memory_type; ///< Shifted Vulkan memory type. std::vector<Range> commits; ///< All commit ranges done from this allocation. std::span<u8> memory_mapped_span; ///< Memory mapped span. Empty if not queried before. -#if defined(_WIN32) || defined(__linux__) +#if defined(_WIN32) || defined(__unix__) u32 owning_opengl_handle{}; ///< Owning OpenGL memory object handle. #endif }; @@ -249,7 +249,7 @@ void MemoryAllocator::AllocMemory(VkMemoryPropertyFlags flags, u32 type_mask, u6 .pNext = nullptr, #ifdef _WIN32 .handleTypes = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT, -#elif __linux__ +#elif __unix__ .handleTypes = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT, #else .handleTypes = 0, |