summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/video_core/vulkan_common/vulkan_device.cpp2
-rw-r--r--src/video_core/vulkan_common/vulkan_memory_allocator.cpp8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp
index 34d396434..697cb16b9 100644
--- a/src/video_core/vulkan_common/vulkan_device.cpp
+++ b/src/video_core/vulkan_common/vulkan_device.cpp
@@ -51,7 +51,7 @@ constexpr std::array REQUIRED_EXTENSIONS{
51#ifdef _WIN32 51#ifdef _WIN32
52 VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME, 52 VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME,
53#endif 53#endif
54#ifdef __linux__ 54#ifdef __unix__
55 VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME, 55 VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME,
56#endif 56#endif
57}; 57};
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:
62 : memory{std::move(memory_)}, allocation_size{allocation_size_}, property_flags{properties}, 62 : memory{std::move(memory_)}, allocation_size{allocation_size_}, property_flags{properties},
63 shifted_memory_type{1U << type} {} 63 shifted_memory_type{1U << type} {}
64 64
65#if defined(_WIN32) || defined(__linux__) 65#if defined(_WIN32) || defined(__unix__)
66 ~MemoryAllocation() { 66 ~MemoryAllocation() {
67 if (owning_opengl_handle != 0) { 67 if (owning_opengl_handle != 0) {
68 glDeleteMemoryObjectsEXT(1, &owning_opengl_handle); 68 glDeleteMemoryObjectsEXT(1, &owning_opengl_handle);
@@ -114,7 +114,7 @@ public:
114 } 114 }
115 return owning_opengl_handle; 115 return owning_opengl_handle;
116 } 116 }
117#elif __linux__ 117#elif __unix__
118 [[nodiscard]] u32 ExportOpenGLHandle() { 118 [[nodiscard]] u32 ExportOpenGLHandle() {
119 if (!owning_opengl_handle) { 119 if (!owning_opengl_handle) {
120 glCreateMemoryObjectsEXT(1, &owning_opengl_handle); 120 glCreateMemoryObjectsEXT(1, &owning_opengl_handle);
@@ -165,7 +165,7 @@ private:
165 const u32 shifted_memory_type; ///< Shifted Vulkan memory type. 165 const u32 shifted_memory_type; ///< Shifted Vulkan memory type.
166 std::vector<Range> commits; ///< All commit ranges done from this allocation. 166 std::vector<Range> commits; ///< All commit ranges done from this allocation.
167 std::span<u8> memory_mapped_span; ///< Memory mapped span. Empty if not queried before. 167 std::span<u8> memory_mapped_span; ///< Memory mapped span. Empty if not queried before.
168#if defined(_WIN32) || defined(__linux__) 168#if defined(_WIN32) || defined(__unix__)
169 u32 owning_opengl_handle{}; ///< Owning OpenGL memory object handle. 169 u32 owning_opengl_handle{}; ///< Owning OpenGL memory object handle.
170#endif 170#endif
171}; 171};
@@ -249,7 +249,7 @@ void MemoryAllocator::AllocMemory(VkMemoryPropertyFlags flags, u32 type_mask, u6
249 .pNext = nullptr, 249 .pNext = nullptr,
250#ifdef _WIN32 250#ifdef _WIN32
251 .handleTypes = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT, 251 .handleTypes = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT,
252#elif __linux__ 252#elif __unix__
253 .handleTypes = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT, 253 .handleTypes = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT,
254#else 254#else
255 .handleTypes = 0, 255 .handleTypes = 0,