Merge branch 'dev' into ddutchie/uitweaks

This commit is contained in:
ddutchie 2024-03-18 08:00:03 -04:00
commit 5b0136dafe
22 changed files with 152 additions and 20 deletions

View file

@ -31,6 +31,7 @@ clang-format:
# - Linux # - Linux
# - Windows # - Windows
- Parallelized - Parallelized
- Format
#LINUX BUILD - BUILDS LINUX APPIMAGE #LINUX BUILD - BUILDS LINUX APPIMAGE
build-linux: build-linux:

View file

@ -3,6 +3,9 @@
cmake_minimum_required(VERSION 3.22) cmake_minimum_required(VERSION 3.22)
set(CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT OFF)
set(CMAKE_XCODE_EMIT_RELATIVE_PATH YES)
project(suyu) project(suyu)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules") list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules")
@ -68,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)

View file

@ -5,5 +5,5 @@ SPDX-License-Identifier: GPL-2.0-or-later
Please check out the Please check out the
* [Conributors's guide](https://gitlab.com/suyu-emu/suyu/-/wikis/Contributing). * [Contributors's guide](https://gitlab.com/suyu-emu/suyu/-/wikis/Contributing).
* [Merge request guidelines](https://gitlab.com/suyu-emu/suyu/-/wikis/Merge-requests) * [Merge request guidelines](https://gitlab.com/suyu-emu/suyu/-/wikis/Merge-requests)

View file

@ -38,7 +38,7 @@ ICommonStateGetter::ICommonStateGetter(Core::System& system_, std::shared_ptr<Ap
{30, nullptr, "GetHomeButtonReaderLockAccessor"}, {30, nullptr, "GetHomeButtonReaderLockAccessor"},
{31, D<&ICommonStateGetter::GetReaderLockAccessorEx>, "GetReaderLockAccessorEx"}, {31, D<&ICommonStateGetter::GetReaderLockAccessorEx>, "GetReaderLockAccessorEx"},
{32, D<&ICommonStateGetter::GetWriterLockAccessorEx>, "GetWriterLockAccessorEx"}, {32, D<&ICommonStateGetter::GetWriterLockAccessorEx>, "GetWriterLockAccessorEx"},
{40, nullptr, "GetCradleFwVersion"}, {40, D<&ICommonStateGetter::GetCradleFwVersion>, "GetCradleFwVersion"},
{50, D<&ICommonStateGetter::IsVrModeEnabled>, "IsVrModeEnabled"}, {50, D<&ICommonStateGetter::IsVrModeEnabled>, "IsVrModeEnabled"},
{51, D<&ICommonStateGetter::SetVrModeEnabled>, "SetVrModeEnabled"}, {51, D<&ICommonStateGetter::SetVrModeEnabled>, "SetVrModeEnabled"},
{52, D<&ICommonStateGetter::SetLcdBacklighOffEnabled>, "SetLcdBacklighOffEnabled"}, {52, D<&ICommonStateGetter::SetLcdBacklighOffEnabled>, "SetLcdBacklighOffEnabled"},
@ -159,6 +159,17 @@ Result ICommonStateGetter::GetBootMode(Out<PM::SystemBootMode> out_boot_mode) {
R_SUCCEED(); R_SUCCEED();
} }
Result ICommonStateGetter::GetCradleFwVersion(OutArray<uint32_t, 4> out_version) {
LOG_DEBUG(Service_AM, "(STUBBED) called");
out_version[0] = 0;
out_version[1] = 0;
out_version[2] = 0;
out_version[3] = 0;
R_SUCCEED();
}
Result ICommonStateGetter::IsVrModeEnabled(Out<bool> out_is_vr_mode_enabled) { Result ICommonStateGetter::IsVrModeEnabled(Out<bool> out_is_vr_mode_enabled) {
LOG_DEBUG(Service_AM, "called"); LOG_DEBUG(Service_AM, "called");

View file

@ -38,6 +38,7 @@ private:
Result GetOperationMode(Out<OperationMode> out_operation_mode); Result GetOperationMode(Out<OperationMode> out_operation_mode);
Result GetPerformanceMode(Out<APM::PerformanceMode> out_performance_mode); Result GetPerformanceMode(Out<APM::PerformanceMode> out_performance_mode);
Result GetBootMode(Out<PM::SystemBootMode> out_boot_mode); Result GetBootMode(Out<PM::SystemBootMode> out_boot_mode);
Result GetCradleFwVersion(OutArray<uint32_t, 4> out_version);
Result IsVrModeEnabled(Out<bool> out_is_vr_mode_enabled); Result IsVrModeEnabled(Out<bool> out_is_vr_mode_enabled);
Result SetVrModeEnabled(bool is_vr_mode_enabled); Result SetVrModeEnabled(bool is_vr_mode_enabled);
Result SetLcdBacklighOffEnabled(bool is_lcd_backlight_off_enabled); Result SetLcdBacklighOffEnabled(bool is_lcd_backlight_off_enabled);

View file

@ -14,7 +14,7 @@ IGlobalStateController::IGlobalStateController(Core::System& system_)
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{0, nullptr, "RequestToEnterSleep"}, {0, nullptr, "RequestToEnterSleep"},
{1, nullptr, "EnterSleep"}, {1, nullptr, "EnterSleep"},
{2, nullptr, "StartSleepSequence"}, {2, D<&IGlobalStateController::StartSleepSequence>, "StartSleepSequence"},
{3, D<&IGlobalStateController::StartShutdownSequence>, "StartShutdownSequence"}, {3, D<&IGlobalStateController::StartShutdownSequence>, "StartShutdownSequence"},
{4, D<&IGlobalStateController::StartRebootSequence>, "StartRebootSequence"}, {4, D<&IGlobalStateController::StartRebootSequence>, "StartRebootSequence"},
{9, nullptr, "IsAutoPowerDownRequested"}, {9, nullptr, "IsAutoPowerDownRequested"},
@ -31,6 +31,13 @@ IGlobalStateController::IGlobalStateController(Core::System& system_)
RegisterHandlers(functions); RegisterHandlers(functions);
} }
IGlobalStateController::~IGlobalStateController() = default;
Result IGlobalStateController::StartSleepSequence(u8 a) {
LOG_WARNING(Service_AM, "(STUBBED) called, a={}", a);
R_SUCCEED();
}
Result IGlobalStateController::StartShutdownSequence() { Result IGlobalStateController::StartShutdownSequence() {
LOG_INFO(Service_AM, "called"); LOG_INFO(Service_AM, "called");
system.Exit(); system.Exit();
@ -43,8 +50,6 @@ Result IGlobalStateController::StartRebootSequence() {
R_SUCCEED(); R_SUCCEED();
} }
IGlobalStateController::~IGlobalStateController() = default;
Result IGlobalStateController::LoadAndApplyIdlePolicySettings() { Result IGlobalStateController::LoadAndApplyIdlePolicySettings() {
LOG_WARNING(Service_AM, "(STUBBED) called"); LOG_WARNING(Service_AM, "(STUBBED) called");
R_SUCCEED(); R_SUCCEED();

View file

@ -18,6 +18,7 @@ public:
~IGlobalStateController() override; ~IGlobalStateController() override;
private: private:
Result StartSleepSequence(u8 a);
Result StartShutdownSequence(); Result StartShutdownSequence();
Result StartRebootSequence(); Result StartRebootSequence();
Result LoadAndApplyIdlePolicySettings(); Result LoadAndApplyIdlePolicySettings();

View file

@ -23,7 +23,7 @@ IHomeMenuFunctions::IHomeMenuFunctions(Core::System& system_, std::shared_ptr<Ap
{21, D<&IHomeMenuFunctions::GetPopFromGeneralChannelEvent>, "GetPopFromGeneralChannelEvent"}, {21, D<&IHomeMenuFunctions::GetPopFromGeneralChannelEvent>, "GetPopFromGeneralChannelEvent"},
{30, nullptr, "GetHomeButtonWriterLockAccessor"}, {30, nullptr, "GetHomeButtonWriterLockAccessor"},
{31, nullptr, "GetWriterLockAccessorEx"}, {31, nullptr, "GetWriterLockAccessorEx"},
{40, nullptr, "IsSleepEnabled"}, {40, D<&IHomeMenuFunctions::IsSleepEnabled>, "IsSleepEnabled"},
{41, D<&IHomeMenuFunctions::IsRebootEnabled>, "IsRebootEnabled"}, {41, D<&IHomeMenuFunctions::IsRebootEnabled>, "IsRebootEnabled"},
{50, nullptr, "LaunchSystemApplet"}, {50, nullptr, "LaunchSystemApplet"},
{51, nullptr, "LaunchStarter"}, {51, nullptr, "LaunchStarter"},
@ -64,9 +64,15 @@ Result IHomeMenuFunctions::GetPopFromGeneralChannelEvent(
R_SUCCEED(); R_SUCCEED();
} }
Result IHomeMenuFunctions::IsRebootEnabled(Out<bool> out_is_reboot_enbaled) { Result IHomeMenuFunctions::IsSleepEnabled(Out<bool> out_is_sleep_enabled) {
LOG_INFO(Service_AM, "called"); LOG_INFO(Service_AM, "called");
*out_is_reboot_enbaled = true; *out_is_sleep_enabled = true;
R_SUCCEED();
}
Result IHomeMenuFunctions::IsRebootEnabled(Out<bool> out_is_reboot_enabled) {
LOG_INFO(Service_AM, "called");
*out_is_reboot_enabled = true;
R_SUCCEED(); R_SUCCEED();
} }

View file

@ -24,7 +24,8 @@ private:
Result LockForeground(); Result LockForeground();
Result UnlockForeground(); Result UnlockForeground();
Result GetPopFromGeneralChannelEvent(OutCopyHandle<Kernel::KReadableEvent> out_event); Result GetPopFromGeneralChannelEvent(OutCopyHandle<Kernel::KReadableEvent> out_event);
Result IsRebootEnabled(Out<bool> out_is_reboot_enbaled); Result IsSleepEnabled(Out<bool> out_is_sleep_enabled);
Result IsRebootEnabled(Out<bool> out_is_reboot_enabled);
Result IsForceTerminateApplicationDisabledForDebug( Result IsForceTerminateApplicationDisabledForDebug(
Out<bool> out_is_force_terminate_application_disabled_for_debug); Out<bool> out_is_force_terminate_application_disabled_for_debug);

View file

@ -67,7 +67,7 @@ FSP_SRV::FSP_SRV(Core::System& system_)
{24, nullptr, "RegisterSaveDataFileSystemAtomicDeletion"}, {24, nullptr, "RegisterSaveDataFileSystemAtomicDeletion"},
{25, nullptr, "DeleteSaveDataFileSystemBySaveDataSpaceId"}, {25, nullptr, "DeleteSaveDataFileSystemBySaveDataSpaceId"},
{26, nullptr, "FormatSdCardDryRun"}, {26, nullptr, "FormatSdCardDryRun"},
{27, nullptr, "IsExFatSupported"}, {27, D<&FSP_SRV::IsExFatSupported>, "IsExFatSupported"},
{28, nullptr, "DeleteSaveDataFileSystemBySaveDataAttribute"}, {28, nullptr, "DeleteSaveDataFileSystemBySaveDataAttribute"},
{30, nullptr, "OpenGameCardStorage"}, {30, nullptr, "OpenGameCardStorage"},
{31, nullptr, "OpenGameCardFileSystem"}, {31, nullptr, "OpenGameCardFileSystem"},
@ -235,6 +235,14 @@ Result FSP_SRV::CreateSaveDataFileSystem(FileSys::SaveDataCreationInfo save_crea
save_struct)); save_struct));
} }
Result FSP_SRV::IsExFatSupported(Out<bool> out_is_supported) {
LOG_WARNING(Service_FS, "(STUBBED) called");
*out_is_supported = true;
R_SUCCEED();
}
Result FSP_SRV::CreateSaveDataFileSystemBySystemSaveDataId( Result FSP_SRV::CreateSaveDataFileSystemBySystemSaveDataId(
FileSys::SaveDataAttribute save_struct, FileSys::SaveDataCreationInfo save_create_struct) { FileSys::SaveDataAttribute save_struct, FileSys::SaveDataCreationInfo save_create_struct) {
LOG_DEBUG(Service_FS, "called save_struct = {}", save_struct.DebugInfo()); LOG_DEBUG(Service_FS, "called save_struct = {}", save_struct.DebugInfo());

View file

@ -53,6 +53,7 @@ private:
Result OpenSdCardFileSystem(OutInterface<IFileSystem> out_interface); Result OpenSdCardFileSystem(OutInterface<IFileSystem> out_interface);
Result CreateSaveDataFileSystem(FileSys::SaveDataCreationInfo save_create_struct, Result CreateSaveDataFileSystem(FileSys::SaveDataCreationInfo save_create_struct,
FileSys::SaveDataAttribute save_struct, u128 uid); FileSys::SaveDataAttribute save_struct, u128 uid);
Result IsExFatSupported(Out<bool> out_is_supported);
Result CreateSaveDataFileSystemBySystemSaveDataId( Result CreateSaveDataFileSystemBySystemSaveDataId(
FileSys::SaveDataAttribute save_struct, FileSys::SaveDataCreationInfo save_create_struct); FileSys::SaveDataAttribute save_struct, FileSys::SaveDataCreationInfo save_create_struct);
Result OpenSaveDataFileSystem(OutInterface<IFileSystem> out_interface, Result OpenSaveDataFileSystem(OutInterface<IFileSystem> out_interface,

View file

@ -30,10 +30,10 @@ Result ISfMonitorService::Initialize(Out<u32> out_value) {
} }
Result ISfMonitorService::GetGroupInfo( Result ISfMonitorService::GetGroupInfo(
OutLargeData<GroupInfo, BufferAttr_HipcAutoSelect> out_group_info) { GroupInfo in_group_info, OutLargeData<GroupInfo, BufferAttr_HipcAutoSelect> out_group_info) {
LOG_WARNING(Service_LDN, "(STUBBED) called"); LOG_WARNING(Service_LDN, "(STUBBED) called");
*out_group_info = GroupInfo{}; memcpy(out_group_info, &in_group_info, sizeof(GroupInfo));
R_SUCCEED(); R_SUCCEED();
} }

View file

@ -20,7 +20,8 @@ public:
private: private:
Result Initialize(Out<u32> out_value); Result Initialize(Out<u32> out_value);
Result GetGroupInfo(OutLargeData<GroupInfo, BufferAttr_HipcAutoSelect> out_group_info); Result GetGroupInfo(GroupInfo in_group_info,
OutLargeData<GroupInfo, BufferAttr_HipcAutoSelect> out_group_info);
}; };
} // namespace Service::LDN } // namespace Service::LDN

View file

@ -40,10 +40,10 @@ Result ISfServiceMonitor::Initialize(Out<u32> out_value) {
} }
Result ISfServiceMonitor::GetGroupInfo( Result ISfServiceMonitor::GetGroupInfo(
OutLargeData<GroupInfo, BufferAttr_HipcAutoSelect> out_group_info) { GroupInfo in_group_info, OutLargeData<GroupInfo, BufferAttr_HipcAutoSelect> out_group_info) {
LOG_WARNING(Service_LDN, "(STUBBED) called"); LOG_WARNING(Service_LDN, "(STUBBED) called");
*out_group_info = GroupInfo{}; memcpy(out_group_info, &in_group_info, sizeof(GroupInfo));
R_SUCCEED(); R_SUCCEED();
} }

View file

@ -20,7 +20,8 @@ public:
private: private:
Result Initialize(Out<u32> out_value); Result Initialize(Out<u32> out_value);
Result GetGroupInfo(OutLargeData<GroupInfo, BufferAttr_HipcAutoSelect> out_group_info); Result GetGroupInfo(GroupInfo in_group_info,
OutLargeData<GroupInfo, BufferAttr_HipcAutoSelect> out_group_info);
}; };
} // namespace Service::LDN } // namespace Service::LDN

View file

@ -507,7 +507,7 @@ void IGeneralService::GetCurrentIpConfigInfo(HLERequestContext& ctx) {
} }
void IGeneralService::IsWirelessCommunicationEnabled(HLERequestContext& ctx) { void IGeneralService::IsWirelessCommunicationEnabled(HLERequestContext& ctx) {
LOG_WARNING(Service_NIFM, "(STUBBED) called"); LOG_WARNING(Service_NIFM, "called");
IPC::ResponseBuilder rb{ctx, 3}; IPC::ResponseBuilder rb{ctx, 3};
rb.Push(ResultSuccess); rb.Push(ResultSuccess);

View file

@ -509,4 +509,13 @@ struct TvSettings {
}; };
static_assert(sizeof(TvSettings) == 0x20, "TvSettings is an invalid size"); static_assert(sizeof(TvSettings) == 0x20, "TvSettings is an invalid size");
/// This is nn::settings::system::RebootlessSystemUpdateVersion
struct RebootlessSystemUpdateVersion {
u32 version;
u8 reserved[0x1c];
char display_version[0x20];
};
static_assert(sizeof(RebootlessSystemUpdateVersion) == 0x40,
"RebootlessSystemUpdateVersion is an invalid size");
} // namespace Service::Set } // namespace Service::Set

View file

@ -238,7 +238,7 @@ ISystemSettingsServer::ISystemSettingsServer(Core::System& system_)
{146, nullptr, "SetConsoleSixAxisSensorAngularVelocityTimeBias"}, {146, nullptr, "SetConsoleSixAxisSensorAngularVelocityTimeBias"},
{147, nullptr, "GetConsoleSixAxisSensorAngularAcceleration"}, {147, nullptr, "GetConsoleSixAxisSensorAngularAcceleration"},
{148, nullptr, "SetConsoleSixAxisSensorAngularAcceleration"}, {148, nullptr, "SetConsoleSixAxisSensorAngularAcceleration"},
{149, nullptr, "GetRebootlessSystemUpdateVersion"}, {149, C<&ISystemSettingsServer::GetRebootlessSystemUpdateVersion>, "GetRebootlessSystemUpdateVersion"},
{150, C<&ISystemSettingsServer::GetDeviceTimeZoneLocationUpdatedTime>, "GetDeviceTimeZoneLocationUpdatedTime"}, {150, C<&ISystemSettingsServer::GetDeviceTimeZoneLocationUpdatedTime>, "GetDeviceTimeZoneLocationUpdatedTime"},
{151, C<&ISystemSettingsServer::SetDeviceTimeZoneLocationUpdatedTime>, "SetDeviceTimeZoneLocationUpdatedTime"}, {151, C<&ISystemSettingsServer::SetDeviceTimeZoneLocationUpdatedTime>, "SetDeviceTimeZoneLocationUpdatedTime"},
{152, C<&ISystemSettingsServer::GetUserSystemClockAutomaticCorrectionUpdatedTime>, "GetUserSystemClockAutomaticCorrectionUpdatedTime"}, {152, C<&ISystemSettingsServer::GetUserSystemClockAutomaticCorrectionUpdatedTime>, "GetUserSystemClockAutomaticCorrectionUpdatedTime"},
@ -1194,6 +1194,16 @@ Result ISystemSettingsServer::SetKeyboardLayout(KeyboardLayout keyboard_layout)
R_SUCCEED(); R_SUCCEED();
} }
Result ISystemSettingsServer::GetRebootlessSystemUpdateVersion(
Out<RebootlessSystemUpdateVersion> out_rebootless_system_update) {
LOG_INFO(Service_SET, "(STUBBED) called");
out_rebootless_system_update->version = 0;
strcpy(out_rebootless_system_update->display_version, "0.0.0");
R_SUCCEED();
}
Result ISystemSettingsServer::GetDeviceTimeZoneLocationUpdatedTime( Result ISystemSettingsServer::GetDeviceTimeZoneLocationUpdatedTime(
Out<Service::PSC::Time::SteadyClockTimePoint> out_time_point) { Out<Service::PSC::Time::SteadyClockTimePoint> out_time_point) {
LOG_INFO(Service_SET, "called"); LOG_INFO(Service_SET, "called");

View file

@ -136,6 +136,8 @@ public:
Result SetAppletLaunchFlags(u32 applet_launch_flag); Result SetAppletLaunchFlags(u32 applet_launch_flag);
Result GetKeyboardLayout(Out<KeyboardLayout> out_keyboard_layout); Result GetKeyboardLayout(Out<KeyboardLayout> out_keyboard_layout);
Result SetKeyboardLayout(KeyboardLayout keyboard_layout); Result SetKeyboardLayout(KeyboardLayout keyboard_layout);
Result GetRebootlessSystemUpdateVersion(
Out<RebootlessSystemUpdateVersion> out_rebootless_system_update);
Result GetDeviceTimeZoneLocationUpdatedTime( Result GetDeviceTimeZoneLocationUpdatedTime(
Out<Service::PSC::Time::SteadyClockTimePoint> out_time_point); Out<Service::PSC::Time::SteadyClockTimePoint> out_time_point);
Result SetDeviceTimeZoneLocationUpdatedTime( Result SetDeviceTimeZoneLocationUpdatedTime(

View file

@ -9,7 +9,7 @@ if(LIBVA_FOUND)
list(APPEND FFmpeg_LIBRARIES ${LIBVA_LIBRARIES}) list(APPEND FFmpeg_LIBRARIES ${LIBVA_LIBRARIES})
endif() endif()
add_library(video_core STATIC set(sources
buffer_cache/buffer_base.h buffer_cache/buffer_base.h
buffer_cache/buffer_cache_base.h buffer_cache/buffer_cache_base.h
buffer_cache/buffer_cache.cpp buffer_cache/buffer_cache.cpp
@ -315,6 +315,67 @@ add_library(video_core STATIC
vulkan_common/vulkan.h vulkan_common/vulkan.h
) )
if (APPLE)
list(REMOVE_ITEM sources
renderer_opengl/present/filters.cpp
renderer_opengl/present/filters.h
renderer_opengl/present/fsr.cpp
renderer_opengl/present/fsr.h
renderer_opengl/present/fxaa.cpp
renderer_opengl/present/fxaa.h
renderer_opengl/present/layer.cpp
renderer_opengl/present/layer.h
renderer_opengl/present/present_uniforms.h
renderer_opengl/present/smaa.cpp
renderer_opengl/present/smaa.h
renderer_opengl/present/util.h
renderer_opengl/present/window_adapt_pass.cpp
renderer_opengl/present/window_adapt_pass.h
renderer_opengl/blit_image.cpp
renderer_opengl/blit_image.h
renderer_opengl/gl_blit_screen.cpp
renderer_opengl/gl_blit_screen.h
renderer_opengl/gl_buffer_cache_base.cpp
renderer_opengl/gl_buffer_cache.cpp
renderer_opengl/gl_buffer_cache.h
renderer_opengl/gl_compute_pipeline.cpp
renderer_opengl/gl_compute_pipeline.h
renderer_opengl/gl_device.cpp
renderer_opengl/gl_device.h
renderer_opengl/gl_fence_manager.cpp
renderer_opengl/gl_fence_manager.h
renderer_opengl/gl_graphics_pipeline.cpp
renderer_opengl/gl_graphics_pipeline.h
renderer_opengl/gl_rasterizer.cpp
renderer_opengl/gl_rasterizer.h
renderer_opengl/gl_resource_manager.cpp
renderer_opengl/gl_resource_manager.h
renderer_opengl/gl_shader_cache.cpp
renderer_opengl/gl_shader_cache.h
renderer_opengl/gl_shader_manager.cpp
renderer_opengl/gl_shader_manager.h
renderer_opengl/gl_shader_context.h
renderer_opengl/gl_shader_util.cpp
renderer_opengl/gl_shader_util.h
renderer_opengl/gl_state_tracker.cpp
renderer_opengl/gl_state_tracker.h
renderer_opengl/gl_staging_buffer_pool.cpp
renderer_opengl/gl_staging_buffer_pool.h
renderer_opengl/gl_texture_cache.cpp
renderer_opengl/gl_texture_cache.h
renderer_opengl/gl_texture_cache_base.cpp
renderer_opengl/gl_query_cache.cpp
renderer_opengl/gl_query_cache.h
renderer_opengl/maxwell_to_gl.h
renderer_opengl/renderer_opengl.cpp
renderer_opengl/renderer_opengl.h
renderer_opengl/util_shaders.cpp
renderer_opengl/util_shaders.h
)
endif()
add_library(video_core STATIC ${sources})
target_link_libraries(video_core PUBLIC common core) target_link_libraries(video_core PUBLIC common core)
target_link_libraries(video_core PUBLIC glad shader_recompiler stb bc_decoder) target_link_libraries(video_core PUBLIC glad shader_recompiler stb bc_decoder)

View file

@ -21,9 +21,15 @@ 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
// common renderers
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));

View file

@ -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