mirror of https://git.suyu.dev/suyu/suyu
Macos moltenvk headers
This commit is contained in:
parent
2a28c85ff9
commit
19c2b08ab4
|
@ -71,7 +71,7 @@ option(SUYU_ENABLE_PORTABLE "Allow suyu to enable portable mode if a user folder
|
||||||
|
|
||||||
CMAKE_DEPENDENT_OPTION(SUYU_USE_FASTER_LD "Check if a faster linker is available" ON "NOT WIN32" OFF)
|
CMAKE_DEPENDENT_OPTION(SUYU_USE_FASTER_LD "Check if a faster linker is available" ON "NOT WIN32" OFF)
|
||||||
|
|
||||||
CMAKE_DEPENDENT_OPTION(USE_SYSTEM_MOLTENVK "Use the system MoltenVK lib (instead of the bundled one)" OFF "APPLE" OFF)
|
CMAKE_DEPENDENT_OPTION(USE_SYSTEM_MOLTENVK "Use the system MoltenVK lib (instead of the bundled one)" OFF "APPLE" ON)
|
||||||
|
|
||||||
option(USE_CCACHE "Use CCache for faster building" ON)
|
option(USE_CCACHE "Use CCache for faster building" ON)
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include "video_core/renderer_vulkan/renderer_vulkan.h"
|
#include "video_core/renderer_vulkan/renderer_vulkan.h"
|
||||||
#include "video_core/video_core.h"
|
#include "video_core/video_core.h"
|
||||||
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
std::unique_ptr<VideoCore::RendererBase> CreateRenderer(
|
std::unique_ptr<VideoCore::RendererBase> CreateRenderer(
|
||||||
|
@ -21,9 +22,20 @@ std::unique_ptr<VideoCore::RendererBase> CreateRenderer(
|
||||||
auto& device_memory = system.Host1x().MemoryManager();
|
auto& device_memory = system.Host1x().MemoryManager();
|
||||||
|
|
||||||
switch (Settings::values.renderer_backend.GetValue()) {
|
switch (Settings::values.renderer_backend.GetValue()) {
|
||||||
|
#ifdef __APPLE__
|
||||||
|
// do nothing for now, include metal in here at later date.
|
||||||
|
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
// openGL, not supported on Apple so not bothering to include if macos
|
||||||
case Settings::RendererBackend::OpenGL:
|
case Settings::RendererBackend::OpenGL:
|
||||||
return std::make_unique<OpenGL::RendererOpenGL>(emu_window, device_memory, gpu,
|
return std::make_unique<OpenGL::RendererOpenGL>(emu_window, device_memory, gpu,
|
||||||
std::move(context));
|
std::move(context));
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
case Settings::RendererBackend::Vulkan:
|
case Settings::RendererBackend::Vulkan:
|
||||||
return std::make_unique<Vulkan::RendererVulkan>(emu_window, device_memory, gpu,
|
return std::make_unique<Vulkan::RendererVulkan>(emu_window, device_memory, gpu,
|
||||||
std::move(context));
|
std::move(context));
|
||||||
|
|
|
@ -15,7 +15,11 @@
|
||||||
#define VK_USE_PLATFORM_WAYLAND_KHR
|
#define VK_USE_PLATFORM_WAYLAND_KHR
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#include <MoltenVK/mvk_vulkan.h>
|
||||||
|
#else
|
||||||
#include <vulkan/vulkan.h>
|
#include <vulkan/vulkan.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
// Sanitize macros
|
// Sanitize macros
|
||||||
#undef CreateEvent
|
#undef CreateEvent
|
||||||
|
|
Loading…
Reference in New Issue