mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-08-22 23:50:32 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7d9fcb0533 | |||
| a88d8e3ebb | |||
| 86eae5cc41 | |||
| 8b9a841d99 | |||
| ca1fcaca3b |
@@ -444,11 +444,6 @@ if (NOT YUZU_STATIC_ROOM)
|
||||
if (NOT TARGET Opus::opus)
|
||||
add_library(Opus::opus ALIAS opus)
|
||||
endif()
|
||||
|
||||
if (APPLE)
|
||||
# KosmicKrisp
|
||||
AddJsonPackage(kosmickrisp)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT TARGET Boost::headers)
|
||||
|
||||
@@ -114,14 +114,5 @@
|
||||
"QUAZIP_INSTALL OFF",
|
||||
"QUAZIP_ENABLE_QTEXTCODEC OFF"
|
||||
]
|
||||
},
|
||||
"kosmickrisp": {
|
||||
"package": "KosmicKrisp",
|
||||
"repo": "crueter-ci/KosmicKrisp",
|
||||
"hash": "4709fb3735ed40048cab9a64abed9a661517dada92b6e8928d578e947fdd6af21b3da4887822f4c3ad3055c6641f9a63243e10e2dd2bba00379618dcc0cda4be",
|
||||
"git_version": "26.0.6",
|
||||
"tag": "v%VERSION%",
|
||||
"artifact": "KosmicKrisp-%VERSION%.tar.zst",
|
||||
"bundled": true
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+14
@@ -389,3 +389,17 @@ if (ANDROID)
|
||||
|
||||
add_library(oboe::oboe ALIAS oboe)
|
||||
endif()
|
||||
|
||||
if (APPLE)
|
||||
# moltenvk
|
||||
if (NOT YUZU_USE_BUNDLED_MOLTENVK)
|
||||
find_library(MOLTENVK_LIBRARY MoltenVK)
|
||||
endif()
|
||||
|
||||
# TODO: kosmickrisp?
|
||||
if (NOT MOLTENVK_LIBRARY OR YUZU_USE_BUNDLED_MOLTENVK)
|
||||
AddJsonPackage(moltenvk)
|
||||
|
||||
set(MOLTENVK_LIBRARY "${moltenvk_SOURCE_DIR}/MoltenVK/dylib/macOS/libMoltenVK.dylib" CACHE STRING "" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
Vendored
+8
@@ -174,6 +174,14 @@
|
||||
"bundled": true,
|
||||
"skip_updates": "true"
|
||||
},
|
||||
"moltenvk": {
|
||||
"repo": "V380-Ori/Ryujinx.MoltenVK",
|
||||
"tag": "v%VERSION%-ryujinx",
|
||||
"git_version": "1.4.1",
|
||||
"artifact": "MoltenVK-macOS.tar",
|
||||
"hash": "5695b36ca5775819a71791557fcb40a4a5ee4495be6b8442e0b666d0c436bec02aae68cc6210183f7a5c986bdbec0e117aecfad5396e496e9c2fd5c89133a347",
|
||||
"bundled": true
|
||||
},
|
||||
"gamemode": {
|
||||
"repo": "FeralInteractive/gamemode",
|
||||
"sha": "ce6fe122f3",
|
||||
|
||||
@@ -415,7 +415,6 @@ struct System::Impl {
|
||||
cpu_manager.Shutdown();
|
||||
debugger.reset();
|
||||
kernel.Shutdown();
|
||||
device_memory.reset();
|
||||
stop_event = {};
|
||||
Network::RestartSocketOperations();
|
||||
|
||||
|
||||
@@ -53,38 +53,53 @@ public:
|
||||
{20102, nullptr, "GetFriendDetailedInfo"},
|
||||
{20103, nullptr, "SyncFriendList"},
|
||||
{20104, &IFriendService::RequestSyncFriendList, "RequestSyncFriendList"},
|
||||
{20105, &IFriendService::GetFriendListForViewer, "GetFriendListForViewer"},
|
||||
{20110, nullptr, "LoadFriendSetting"},
|
||||
{20105, &IFriendService::GetFriendListForViewer, "GetFriendListForViewerV1"},
|
||||
{20106, nullptr, "UpdateFriendInfoForViewerV1"},
|
||||
{20107, nullptr, "GetFriendDetailedInfoV2"}, // 20.0.0+
|
||||
{20108, &IFriendService::GetFriendListForViewer, "GetFriendListForViewerV2"}, // 22.0.0+
|
||||
{20109, nullptr, "UpdateFriendInfoForViewerV2"}, // 22.0.0+
|
||||
{20110, nullptr, "LoadFriendSettingV1"},
|
||||
{20111, nullptr, "LoadFriendSettingV2"}, // 22.0.0+
|
||||
{20200, &IFriendService::GetReceivedFriendRequestCount, "GetReceivedFriendRequestCount"},
|
||||
{20201, nullptr, "GetFriendRequestList"},
|
||||
{20201, nullptr, "GetFriendRequestListV1"},
|
||||
{20202, nullptr, "GetFriendRequestListV2"}, // 20.0.0+
|
||||
{20203, nullptr, "GetFriendRequestReceivedNotificationCount"}, // 22.0.0+
|
||||
{20300, nullptr, "GetFriendCandidateList"},
|
||||
{20301, nullptr, "GetNintendoNetworkIdInfo"},
|
||||
{20302, nullptr, "GetSnsAccountLinkage"},
|
||||
{20303, nullptr, "GetSnsAccountProfile"},
|
||||
{20304, nullptr, "GetSnsAccountFriendList"},
|
||||
{20400, nullptr, "GetBlockedUserList"},
|
||||
{20302, nullptr, "GetSnsAccountLinkage"}, // 5.0.0-19.0.1
|
||||
{20303, nullptr, "GetSnsAccountProfile"}, // 5.0.0-19.0.1
|
||||
{20304, nullptr, "GetSnsAccountFriendList"}, // 5.0.0-19.0.1
|
||||
{20400, nullptr, "GetBlockedUserListV1"},
|
||||
{20401, nullptr, "SyncBlockedUserList"},
|
||||
{20500, nullptr, "GetProfileExtraList"},
|
||||
{20402, nullptr, "GetBlockedUserListV2"}, // 20.0.0+
|
||||
{20500, nullptr, "GetProfileExtraListV1"},
|
||||
{20501, nullptr, "GetRelationship"},
|
||||
{20502, nullptr, "GetProfileExtraListV2"}, // 19.0.0+
|
||||
{20600, &IFriendService::GetUserPresenceView, "GetUserPresenceViewV1"},
|
||||
{20601, &IFriendService::GetUserPresenceView, "GetUserPresenceViewV2"},
|
||||
{20700, nullptr, "GetPlayHistoryList"},
|
||||
{20601, &IFriendService::GetUserPresenceView, "GetUserPresenceViewV2"}, // 19.0.0+
|
||||
{20700, nullptr, "GetPlayHistoryListV1"},
|
||||
{20701, &IFriendService::GetPlayHistoryStatistics, "GetPlayHistoryStatistics"},
|
||||
{20702, nullptr, "GetPlayHistoryListV2"}, // 19.0.0+
|
||||
{20800, &IFriendService::LoadUserSetting, "LoadUserSettingV1"},
|
||||
{20801, nullptr, "SyncUserSetting"},
|
||||
{20802, &IFriendService::LoadUserSetting, "LoadUserSettingV2"},
|
||||
{20802, &IFriendService::LoadUserSetting, "LoadUserSettingV2"}, // 19.0.0+
|
||||
{20900, &IFriendService::RequestListSummaryOverlayNotification, "RequestListSummaryOverlayNotification"},
|
||||
{21000, nullptr, "GetExternalApplicationCatalog"},
|
||||
{22000, nullptr, "GetReceivedFriendInvitationList"},
|
||||
{22001, nullptr, "GetReceivedFriendInvitationDetailedInfo"},
|
||||
{22000, nullptr, "GetReceivedFriendInvitationListV1"},
|
||||
{22001, nullptr, "GetReceivedFriendInvitationDetailedInfoV1"},
|
||||
{22002, nullptr, "GetReceivedFriendInvitationListV2"}, // 19.0.0+
|
||||
{22003, nullptr, "GetReceivedFriendInvitationDetailedInfoV2"}, // 19.0.0+
|
||||
{22010, &IFriendService::GetReceivedFriendInvitationCountCache, "GetReceivedFriendInvitationCountCache"},
|
||||
{30100, nullptr, "DropFriendNewlyFlags"},
|
||||
{30101, nullptr, "DeleteFriend"},
|
||||
{30110, nullptr, "DropFriendNewlyFlag"},
|
||||
{30120, nullptr, "ChangeFriendFavoriteFlag"},
|
||||
{30121, nullptr, "ChangeFriendOnlineNotificationFlag"},
|
||||
{30130, nullptr, "SetFriendNote"}, // 22.0.0+
|
||||
{30131, nullptr, "RequestUploadPendingNote"}, // 22.0.0+
|
||||
{30190, nullptr, "RequestSyncLocalUpdates"}, // 22.0.0+
|
||||
{30200, nullptr, "SendFriendRequest"},
|
||||
{30201, nullptr, "SendFriendRequestWithApplicationInfo"},
|
||||
{30201, nullptr, "SendFriendRequestWithApplicationInfoV1"},
|
||||
{30202, nullptr, "CancelFriendRequest"},
|
||||
{30203, nullptr, "AcceptFriendRequest"},
|
||||
{30204, nullptr, "RejectFriendRequest"},
|
||||
@@ -97,21 +112,27 @@ public:
|
||||
{30215, nullptr, "SendFriendRequestWithExternalApplicationCatalogId"},
|
||||
{30216, nullptr, "ResendFacedFriendRequest"},
|
||||
{30217, nullptr, "SendFriendRequestWithNintendoNetworkIdInfo"},
|
||||
{30300, nullptr, "GetSnsAccountLinkPageUrl"},
|
||||
{30301, nullptr, "UnlinkSnsAccount"},
|
||||
{30218, nullptr, "SendFriendRequestWithApplicationInfoV2"}, // 20.0.0+
|
||||
{30300, nullptr, "GetSnsAccountLinkPageUrl"}, // 5.0.0-19.0.1
|
||||
{30301, nullptr, "UnlinkSnsAccount"}, // 5.0.0-19.0.1
|
||||
{30400, nullptr, "BlockUser"},
|
||||
{30401, nullptr, "BlockUserWithApplicationInfo"},
|
||||
{30401, nullptr, "BlockUserWithApplicationInfoV1"},
|
||||
{30402, nullptr, "UnblockUser"},
|
||||
{30500, nullptr, "GetProfileExtraFromFriendCode"},
|
||||
{30403, nullptr, "BlockUserWithApplicationInfoV2"}, // 20.0.0+
|
||||
{30500, nullptr, "GetProfileExtraFromFriendCodeV1"},
|
||||
{30501, nullptr, "GetProfileExtraFromFriendCodeV2"}, // 19.0.0+
|
||||
{30700, nullptr, "DeletePlayHistory"},
|
||||
{30701, nullptr, "AddPlayHistoryWithApplication"}, // 19.0.0+
|
||||
{30810, nullptr, "ChangePresencePermission"},
|
||||
{30811, nullptr, "ChangeFriendRequestReception"},
|
||||
{30812, nullptr, "ChangePlayLogPermission"},
|
||||
{30820, nullptr, "IssueFriendCode"},
|
||||
{30830, nullptr, "ClearPlayLog"},
|
||||
{30900, nullptr, "SendFriendInvitation"},
|
||||
{30900, nullptr, "SendFriendInvitationV1"},
|
||||
{30901, nullptr, "SendFriendInvitationV2"}, // 19.0.0+
|
||||
{30910, nullptr, "ReadFriendInvitation"},
|
||||
{30911, nullptr, "ReadAllFriendInvitations"},
|
||||
{31000, nullptr, "OpenUser"}, // 19.0.0+
|
||||
{40100, nullptr, "DeleteFriendListCache"},
|
||||
{40400, nullptr, "DeleteBlockedUserListCache"},
|
||||
{49900, nullptr, "DeleteNetworkServiceAccountCache"},
|
||||
|
||||
@@ -866,17 +866,10 @@ void EmitIR<IR::Opcode::VectorMaxS32>(oaknut::CodeGenerator& code, EmitContext&
|
||||
|
||||
template<>
|
||||
void EmitIR<IR::Opcode::VectorMaxS64>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
|
||||
#ifdef __APPLE__
|
||||
EmitThreeOp(code, ctx, inst, [&](auto& Qresult, auto& Qa, auto& Qb) {
|
||||
code.CMGT(Qresult->D2(), Qa->D2(), Qb->D2());
|
||||
code.BSL(Qresult->B16(), Qa->B16(), Qb->B16());
|
||||
});
|
||||
#else
|
||||
(void)code;
|
||||
(void)ctx;
|
||||
(void)inst;
|
||||
UNREACHABLE();
|
||||
#endif
|
||||
}
|
||||
|
||||
template<>
|
||||
@@ -896,17 +889,10 @@ void EmitIR<IR::Opcode::VectorMaxU32>(oaknut::CodeGenerator& code, EmitContext&
|
||||
|
||||
template<>
|
||||
void EmitIR<IR::Opcode::VectorMaxU64>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
|
||||
#ifdef __APPLE__
|
||||
EmitThreeOp(code, ctx, inst, [&](auto& Qresult, auto& Qa, auto& Qb) {
|
||||
code.CMHI(Qresult->D2(), Qa->D2(), Qb->D2());
|
||||
code.BSL(Qresult->B16(), Qa->B16(), Qb->B16());
|
||||
});
|
||||
#else
|
||||
(void)code;
|
||||
(void)ctx;
|
||||
(void)inst;
|
||||
UNREACHABLE();
|
||||
#endif
|
||||
}
|
||||
|
||||
template<>
|
||||
@@ -926,17 +912,10 @@ void EmitIR<IR::Opcode::VectorMinS32>(oaknut::CodeGenerator& code, EmitContext&
|
||||
|
||||
template<>
|
||||
void EmitIR<IR::Opcode::VectorMinS64>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
|
||||
#ifdef __APPLE__
|
||||
EmitThreeOp(code, ctx, inst, [&](auto& Qresult, auto& Qa, auto& Qb) {
|
||||
code.CMGT(Qresult->D2(), Qb->D2(), Qa->D2());
|
||||
code.BSL(Qresult->B16(), Qa->B16(), Qb->B16());
|
||||
});
|
||||
#else
|
||||
(void)code;
|
||||
(void)ctx;
|
||||
(void)inst;
|
||||
UNREACHABLE();
|
||||
#endif
|
||||
}
|
||||
|
||||
template<>
|
||||
@@ -956,17 +935,10 @@ void EmitIR<IR::Opcode::VectorMinU32>(oaknut::CodeGenerator& code, EmitContext&
|
||||
|
||||
template<>
|
||||
void EmitIR<IR::Opcode::VectorMinU64>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
|
||||
#ifdef __APPLE__
|
||||
EmitThreeOp(code, ctx, inst, [&](auto& Qresult, auto& Qa, auto& Qb) {
|
||||
code.CMHI(Qresult->D2(), Qb->D2(), Qa->D2());
|
||||
code.BSL(Qresult->B16(), Qa->B16(), Qb->B16());
|
||||
});
|
||||
#else
|
||||
(void)code;
|
||||
(void)ctx;
|
||||
(void)inst;
|
||||
UNREACHABLE();
|
||||
#endif
|
||||
}
|
||||
|
||||
template<>
|
||||
|
||||
@@ -323,7 +323,10 @@ if (ENABLE_OPENGL)
|
||||
endif()
|
||||
|
||||
target_link_libraries(video_core PUBLIC common core)
|
||||
target_link_libraries(video_core PUBLIC glad shader_recompiler stb bc_decoder gpu_logging)
|
||||
target_link_libraries(video_core PUBLIC shader_recompiler stb bc_decoder gpu_logging)
|
||||
if (ENABLE_OPENGL)
|
||||
target_link_libraries(video_core PUBLIC glad)
|
||||
endif()
|
||||
|
||||
if (YUZU_USE_EXTERNAL_FFMPEG)
|
||||
add_dependencies(video_core ffmpeg-build)
|
||||
|
||||
@@ -24,7 +24,10 @@ std::shared_ptr<Common::DynamicLibrary> OpenLibrary(
|
||||
#ifdef __APPLE__
|
||||
const auto libvulkan_filename =
|
||||
Common::FS::GetBundleDirectory() / "Contents/Frameworks/libvulkan.1.dylib";
|
||||
const char* library_paths[] = {std::getenv("LIBVULKAN_PATH"), libvulkan_filename.c_str()};
|
||||
const auto libmoltenvk_filename =
|
||||
Common::FS::GetBundleDirectory() / "Contents/Frameworks/libMoltenVK.dylib";
|
||||
const char* library_paths[] = {std::getenv("LIBVULKAN_PATH"), libvulkan_filename.c_str(),
|
||||
libmoltenvk_filename.c_str()};
|
||||
// Check if a path to a specific Vulkan library has been specified.
|
||||
for (const auto& library_path : library_paths) {
|
||||
if (library_path && library->Open(library_path)) {
|
||||
|
||||
+9
-14
@@ -389,22 +389,14 @@ if (APPLE)
|
||||
set_target_properties(yuzu PROPERTIES MACOSX_BUNDLE TRUE)
|
||||
set_target_properties(yuzu PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
|
||||
|
||||
set(KK_LIBS
|
||||
"${KosmicKrisp_SOURCE_DIR}/lib/libMoltenVK.dylib"
|
||||
"${KosmicKrisp_SOURCE_DIR}/lib/libvulkan.1.dylib"
|
||||
"${KosmicKrisp_SOURCE_DIR}/lib/libvulkan_kosmickrisp.dylib")
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib")
|
||||
find_library(MOLTENVK_LIBRARY MoltenVK REQUIRED)
|
||||
message(STATUS "Using MoltenVK at ${MOLTENVK_LIBRARY}.")
|
||||
|
||||
set_source_files_properties(${KK_LIBS} PROPERTIES
|
||||
set_source_files_properties(${MOLTENVK_LIBRARY} PROPERTIES
|
||||
MACOSX_PACKAGE_LOCATION Frameworks
|
||||
XCODE_FILE_ATTRIBUTES "CodeSignOnCopy")
|
||||
|
||||
target_sources(yuzu PRIVATE ${KK_LIBS})
|
||||
|
||||
add_custom_command(TARGET yuzu POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
"${KosmicKrisp_SOURCE_DIR}/vulkan"
|
||||
"$<TARGET_FILE_DIR:yuzu>/../Resources/vulkan"
|
||||
COMMENT "Copying Vulkan ICDs")
|
||||
target_sources(yuzu PRIVATE ${MOLTENVK_LIBRARY})
|
||||
elseif(WIN32)
|
||||
# compile as a win32 gui application instead of a console application
|
||||
target_link_libraries(yuzu PRIVATE Qt6::EntryPointPrivate)
|
||||
@@ -419,8 +411,11 @@ endif()
|
||||
|
||||
target_link_libraries(yuzu PRIVATE nlohmann_json::nlohmann_json)
|
||||
target_link_libraries(yuzu PRIVATE common core input_common frontend_common network video_core qt_common)
|
||||
target_link_libraries(yuzu PRIVATE Boost::headers glad Qt6::Widgets Qt6::Charts Qt6::Concurrent)
|
||||
target_link_libraries(yuzu PRIVATE Boost::headers Qt6::Widgets Qt6::Charts Qt6::Concurrent)
|
||||
target_link_libraries(yuzu PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads)
|
||||
if (ENABLE_OPENGL)
|
||||
target_link_libraries(yuzu PRIVATE glad)
|
||||
endif()
|
||||
|
||||
if (UNIX AND NOT APPLE)
|
||||
target_link_libraries(yuzu PRIVATE Qt6::DBus)
|
||||
|
||||
@@ -8,11 +8,17 @@
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
#include <type_traits>
|
||||
|
||||
#ifdef HAS_OPENGL
|
||||
#include <glad/glad.h>
|
||||
#endif
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
#include "common/settings_enums.h"
|
||||
|
||||
#include "qt_common/config/uisettings.h"
|
||||
#include "qt_common/abstract/frontend.h"
|
||||
|
||||
#if YUZU_USE_QT_MULTIMEDIA
|
||||
#include <QCamera>
|
||||
#include <QImageCapture>
|
||||
@@ -1039,11 +1045,12 @@ void GRenderWindow::InitializeNull() {
|
||||
}
|
||||
|
||||
bool GRenderWindow::LoadOpenGL() {
|
||||
#ifdef HAS_OPENGL
|
||||
auto context = CreateSharedContext();
|
||||
auto scope = context->Acquire();
|
||||
if (!gladLoadGL()) {
|
||||
QMessageBox::warning(
|
||||
this, tr("Error while initializing OpenGL!"),
|
||||
QtCommon::Frontend::Warning(
|
||||
tr("Error while initializing OpenGL!"),
|
||||
tr("Your GPU may not support OpenGL, or you do not have the latest graphics driver."));
|
||||
return false;
|
||||
}
|
||||
@@ -1052,15 +1059,16 @@ bool GRenderWindow::LoadOpenGL() {
|
||||
const QString renderer =
|
||||
QString::fromUtf8(reinterpret_cast<const char*>(glGetString(GL_RENDERER)));
|
||||
if (!GLAD_GL_VERSION_4_6) {
|
||||
QMessageBox::warning(this, tr("Error while initializing OpenGL 4.6!"),
|
||||
tr("Your GPU may not support OpenGL 4.6, or you do not have the "
|
||||
"latest graphics driver.<br><br>GL Renderer:<br>%1")
|
||||
.arg(renderer));
|
||||
QtCommon::Frontend::Warning(
|
||||
tr("Error while initializing OpenGL 4.6!"),
|
||||
tr("Your GPU may not support OpenGL 4.6, or you do not have the "
|
||||
"latest graphics driver.<br><br>GL Renderer:<br>%1")
|
||||
.arg(renderer));
|
||||
return false;
|
||||
}
|
||||
if (QStringList missing_ext = GetUnsupportedGLExtensions(); !missing_ext.empty()) {
|
||||
QMessageBox::warning(
|
||||
this, tr("Error while initializing OpenGL!"),
|
||||
QtCommon::Frontend::Warning(
|
||||
tr("Error while initializing OpenGL!"),
|
||||
tr("Your GPU may not support one or more required OpenGL extensions. Please ensure you "
|
||||
"have the latest graphics driver.<br><br>GL Renderer:<br>%1<br><br>Unsupported "
|
||||
"extensions:<br>%2")
|
||||
@@ -1069,10 +1077,17 @@ bool GRenderWindow::LoadOpenGL() {
|
||||
// Non fatal
|
||||
}
|
||||
return true;
|
||||
#else
|
||||
QtCommon::Frontend::Warning(
|
||||
tr("Error while initializing OpenGL!"),
|
||||
tr("This build doesn't have OpenGL support."));
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
QStringList GRenderWindow::GetUnsupportedGLExtensions() const {
|
||||
QStringList missing_ext;
|
||||
QStringList missing_ext{};
|
||||
#ifdef HAS_OPENGL
|
||||
// Extensions required to support some texture formats.
|
||||
if (!GLAD_GL_EXT_texture_compression_s3tc)
|
||||
missing_ext.append(QStringLiteral("EXT_texture_compression_s3tc"));
|
||||
@@ -1082,6 +1097,7 @@ QStringList GRenderWindow::GetUnsupportedGLExtensions() const {
|
||||
LOG_ERROR(Frontend, "GPU does not support all required extensions");
|
||||
for (const QString& ext : missing_ext)
|
||||
LOG_ERROR(Frontend, "Unsupported GL extension: {}", ext.toStdString());
|
||||
#endif
|
||||
return missing_ext;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,11 +15,18 @@ function(create_resource file output filename)
|
||||
file(WRITE "${PROJECT_BINARY_DIR}/dist/${output}" "const unsigned char ${filename}[] = {${filedata}};\nconst unsigned ${filename}_size = sizeof(${filename});\n")
|
||||
endfunction()
|
||||
|
||||
if (ENABLE_OPENGL)
|
||||
list(APPEND OPENGL_SOURCES
|
||||
emu_window/emu_window_sdl2_gl.cpp
|
||||
emu_window/emu_window_sdl2_gl.h
|
||||
)
|
||||
else()
|
||||
set(OPENGL_SOURCES "")
|
||||
endif()
|
||||
|
||||
add_executable(yuzu-cmd
|
||||
emu_window/emu_window_sdl2.cpp
|
||||
emu_window/emu_window_sdl2.h
|
||||
emu_window/emu_window_sdl2_gl.cpp
|
||||
emu_window/emu_window_sdl2_gl.h
|
||||
emu_window/emu_window_sdl2_null.cpp
|
||||
emu_window/emu_window_sdl2_null.h
|
||||
emu_window/emu_window_sdl2_vk.cpp
|
||||
@@ -28,10 +35,13 @@ add_executable(yuzu-cmd
|
||||
sdl_config.h
|
||||
yuzu.cpp
|
||||
yuzu.rc
|
||||
${OPENGL_SOURCES}
|
||||
)
|
||||
|
||||
target_link_libraries(yuzu-cmd PRIVATE common core input_common frontend_common video_core)
|
||||
target_link_libraries(yuzu-cmd PRIVATE glad)
|
||||
if (ENABLE_OPENGL)
|
||||
target_link_libraries(yuzu-cmd PRIVATE glad)
|
||||
endif()
|
||||
if (MSVC)
|
||||
target_link_libraries(yuzu-cmd PRIVATE getopt)
|
||||
endif()
|
||||
|
||||
@@ -59,20 +59,16 @@ private:
|
||||
};
|
||||
|
||||
bool EmuWindow_SDL2_GL::SupportsRequiredGLExtensions() {
|
||||
std::vector<std::string_view> unsupported_ext;
|
||||
|
||||
std::vector<std::string_view> unsupported_ext{};
|
||||
#ifdef HAS_OPENGL
|
||||
// Extensions required to support some texture formats.
|
||||
if (!GLAD_GL_EXT_texture_compression_s3tc) {
|
||||
if (!GLAD_GL_EXT_texture_compression_s3tc)
|
||||
unsupported_ext.push_back("EXT_texture_compression_s3tc");
|
||||
}
|
||||
if (!GLAD_GL_ARB_texture_compression_rgtc) {
|
||||
if (!GLAD_GL_ARB_texture_compression_rgtc)
|
||||
unsupported_ext.push_back("ARB_texture_compression_rgtc");
|
||||
}
|
||||
|
||||
for (const auto& extension : unsupported_ext) {
|
||||
for (const auto& extension : unsupported_ext)
|
||||
LOG_CRITICAL(Frontend, "Unsupported GL extension: {}", extension);
|
||||
}
|
||||
|
||||
#endif
|
||||
return unsupported_ext.empty();
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,9 @@
|
||||
#include "sdl_config.h"
|
||||
#include "video_core/renderer_base.h"
|
||||
#include "yuzu_cmd/emu_window/emu_window_sdl2.h"
|
||||
#ifdef HAS_OPENGL
|
||||
#include "yuzu_cmd/emu_window/emu_window_sdl2_gl.h"
|
||||
#endif
|
||||
#include "yuzu_cmd/emu_window/emu_window_sdl2_null.h"
|
||||
#include "yuzu_cmd/emu_window/emu_window_sdl2_vk.h"
|
||||
|
||||
@@ -349,17 +351,22 @@ int main(int argc, char** argv) {
|
||||
|
||||
std::unique_ptr<EmuWindow_SDL2> emu_window;
|
||||
switch (Settings::values.renderer_backend.GetValue()) {
|
||||
#ifdef HAS_OPENGL
|
||||
case Settings::RendererBackend::OpenGL_GLSL:
|
||||
case Settings::RendererBackend::OpenGL_GLASM:
|
||||
case Settings::RendererBackend::OpenGL_SPIRV:
|
||||
emu_window = std::make_unique<EmuWindow_SDL2_GL>(&input_subsystem, system, fullscreen);
|
||||
break;
|
||||
#endif
|
||||
case Settings::RendererBackend::Vulkan:
|
||||
emu_window = std::make_unique<EmuWindow_SDL2_VK>(&input_subsystem, system, fullscreen);
|
||||
break;
|
||||
case Settings::RendererBackend::Null:
|
||||
emu_window = std::make_unique<EmuWindow_SDL2_Null>(&input_subsystem, system, fullscreen);
|
||||
break;
|
||||
default:
|
||||
LOG_CRITICAL(Frontend, "Invalid renderer backend");
|
||||
return -1;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
Reference in New Issue
Block a user