Compare commits
10 commits
251fc7435a
...
cce9740b79
Author | SHA1 | Date | |
---|---|---|---|
cce9740b79 | |||
7670932cb8 | |||
ce8df65587 | |||
f56ad41943 | |||
65b7d66ebb | |||
83730cd4c1 | |||
272df1fa83 | |||
71a87b2c55 | |||
f4f3425d86 | |||
9173eec402 |
38 changed files with 795 additions and 369 deletions
181
CMakeLists.txt
181
CMakeLists.txt
|
@ -147,6 +147,7 @@ if (ENABLE_SDL2)
|
||||||
option(YUZU_USE_BUNDLED_SDL2 "Download bundled SDL2 build" "${MSVC}")
|
option(YUZU_USE_BUNDLED_SDL2 "Download bundled SDL2 build" "${MSVC}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# qt stuff
|
||||||
option(ENABLE_QT "Enable the Qt frontend" ON)
|
option(ENABLE_QT "Enable the Qt frontend" ON)
|
||||||
option(ENABLE_QT_TRANSLATION "Enable translations for the Qt frontend" OFF)
|
option(ENABLE_QT_TRANSLATION "Enable translations for the Qt frontend" OFF)
|
||||||
option(ENABLE_QT_UPDATE_CHECKER "Enable update checker for the Qt frontend" OFF)
|
option(ENABLE_QT_UPDATE_CHECKER "Enable update checker for the Qt frontend" OFF)
|
||||||
|
@ -163,8 +164,12 @@ if (MSVC OR ANDROID)
|
||||||
endif()
|
endif()
|
||||||
option(YUZU_USE_CPM "Use CPM to fetch system dependencies (fmt, boost, etc) if needed. Externals will still be fetched." ${EXT_DEFAULT})
|
option(YUZU_USE_CPM "Use CPM to fetch system dependencies (fmt, boost, etc) if needed. Externals will still be fetched." ${EXT_DEFAULT})
|
||||||
|
|
||||||
|
# ffmpeg
|
||||||
option(YUZU_USE_BUNDLED_FFMPEG "Download bundled FFmpeg" ${EXT_DEFAULT})
|
option(YUZU_USE_BUNDLED_FFMPEG "Download bundled FFmpeg" ${EXT_DEFAULT})
|
||||||
cmake_dependent_option(YUZU_USE_EXTERNAL_FFMPEG "Build FFmpeg from source" OFF "NOT WIN32 AND NOT ANDROID" OFF)
|
cmake_dependent_option(YUZU_USE_EXTERNAL_FFMPEG "Build FFmpeg from source" "${PLATFORM_SUN}" "NOT WIN32 AND NOT ANDROID" OFF)
|
||||||
|
|
||||||
|
# sirit
|
||||||
|
option(YUZU_USE_BUNDLED_SIRIT "Download bundled sirit" ${EXT_DEFAULT})
|
||||||
|
|
||||||
cmake_dependent_option(ENABLE_LIBUSB "Enable the use of LibUSB" ON "NOT ANDROID" OFF)
|
cmake_dependent_option(ENABLE_LIBUSB "Enable the use of LibUSB" ON "NOT ANDROID" OFF)
|
||||||
|
|
||||||
|
@ -312,7 +317,6 @@ endif()
|
||||||
if (ARCHITECTURE_arm64 AND (ANDROID OR PLATFORM_LINUX))
|
if (ARCHITECTURE_arm64 AND (ANDROID OR PLATFORM_LINUX))
|
||||||
set(HAS_NCE 1)
|
set(HAS_NCE 1)
|
||||||
add_compile_definitions(HAS_NCE=1)
|
add_compile_definitions(HAS_NCE=1)
|
||||||
find_package(oaknut 2.0.1)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (YUZU_ROOM)
|
if (YUZU_ROOM)
|
||||||
|
@ -452,22 +456,6 @@ if (YUZU_USE_CPM)
|
||||||
add_library(zstd::zstd ALIAS libzstd_static)
|
add_library(zstd::zstd ALIAS libzstd_static)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Catch2
|
|
||||||
if (YUZU_TESTS OR DYNARMIC_TESTS)
|
|
||||||
AddJsonPackage(catch2)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# ENet
|
|
||||||
AddJsonPackage(enet)
|
|
||||||
|
|
||||||
if (enet_ADDED)
|
|
||||||
target_include_directories(enet INTERFACE ${enet_SOURCE_DIR}/include)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (NOT TARGET enet::enet)
|
|
||||||
add_library(enet::enet ALIAS enet)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Opus
|
# Opus
|
||||||
AddJsonPackage(opus)
|
AddJsonPackage(opus)
|
||||||
|
|
||||||
|
@ -482,31 +470,10 @@ if (YUZU_USE_CPM)
|
||||||
if (NOT TARGET Opus::opus)
|
if (NOT TARGET Opus::opus)
|
||||||
add_library(Opus::opus ALIAS opus)
|
add_library(Opus::opus ALIAS opus)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# VulkanUtilityHeaders - pulls in headers and utility libs
|
|
||||||
AddJsonPackage(vulkan-utility-headers)
|
|
||||||
|
|
||||||
# small hack
|
|
||||||
if (NOT VulkanUtilityLibraries_ADDED)
|
|
||||||
find_package(VulkanHeaders 1.3.274 REQUIRED)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# SPIRV Headers
|
|
||||||
AddJsonPackage(spirv-headers)
|
|
||||||
|
|
||||||
# SPIRV Tools
|
|
||||||
AddJsonPackage(spirv-tools)
|
|
||||||
|
|
||||||
if (SPIRV-Tools_ADDED)
|
|
||||||
add_library(SPIRV-Tools::SPIRV-Tools ALIAS SPIRV-Tools-static)
|
|
||||||
target_link_libraries(SPIRV-Tools-static PRIVATE SPIRV-Tools-opt SPIRV-Tools-link)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# mbedtls
|
|
||||||
AddJsonPackage(mbedtls)
|
|
||||||
else()
|
else()
|
||||||
# Enforce the search mode of non-required packages for better and shorter failure messages
|
# Enforce the search mode of non-required packages for better and shorter failure messages
|
||||||
find_package(fmt 8 REQUIRED)
|
find_package(fmt 8 REQUIRED)
|
||||||
|
|
||||||
if (NOT YUZU_DISABLE_LLVM)
|
if (NOT YUZU_DISABLE_LLVM)
|
||||||
find_package(LLVM MODULE COMPONENTS Demangle)
|
find_package(LLVM MODULE COMPONENTS Demangle)
|
||||||
endif()
|
endif()
|
||||||
|
@ -515,7 +482,7 @@ else()
|
||||||
find_package(lz4 REQUIRED)
|
find_package(lz4 REQUIRED)
|
||||||
find_package(RenderDoc MODULE)
|
find_package(RenderDoc MODULE)
|
||||||
find_package(stb MODULE)
|
find_package(stb MODULE)
|
||||||
find_package(enet 1.3 MODULE REQUIRED)
|
|
||||||
find_package(Opus 1.3 MODULE REQUIRED)
|
find_package(Opus 1.3 MODULE REQUIRED)
|
||||||
find_package(ZLIB 1.2 REQUIRED)
|
find_package(ZLIB 1.2 REQUIRED)
|
||||||
find_package(zstd 1.5 REQUIRED MODULE)
|
find_package(zstd 1.5 REQUIRED MODULE)
|
||||||
|
@ -527,29 +494,6 @@ else()
|
||||||
find_package(Boost 1.57.0 REQUIRED)
|
find_package(Boost 1.57.0 REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# OpenBSD does not package mbedtls3 (only 2)
|
|
||||||
if (PLATFORM_OPENBSD)
|
|
||||||
AddJsonPackage(mbedtls)
|
|
||||||
else()
|
|
||||||
find_package(MbedTLS 3 REQUIRED)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
find_package(VulkanUtilityLibraries REQUIRED)
|
|
||||||
find_package(VulkanHeaders 1.3.274 REQUIRED)
|
|
||||||
|
|
||||||
# FreeBSD does not package spirv-headers
|
|
||||||
if (PLATFORM_FREEBSD)
|
|
||||||
AddJsonPackage(spirv-headers)
|
|
||||||
else()
|
|
||||||
find_package(SPIRV-Headers 1.3.274 REQUIRED)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
find_package(SPIRV-Tools MODULE REQUIRED)
|
|
||||||
|
|
||||||
if (YUZU_TESTS)
|
|
||||||
find_package(Catch2 3.0.1 REQUIRED)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (CMAKE_SYSTEM_NAME STREQUAL "Linux" OR ANDROID)
|
if (CMAKE_SYSTEM_NAME STREQUAL "Linux" OR ANDROID)
|
||||||
find_package(gamemode 1.7 MODULE)
|
find_package(gamemode 1.7 MODULE)
|
||||||
endif()
|
endif()
|
||||||
|
@ -563,90 +507,6 @@ if(NOT TARGET Boost::headers)
|
||||||
AddJsonPackage(boost_headers)
|
AddJsonPackage(boost_headers)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# DiscordRPC
|
|
||||||
if (USE_DISCORD_PRESENCE)
|
|
||||||
if (ARCHITECTURE_arm64)
|
|
||||||
add_compile_definitions(RAPIDJSON_ENDIAN=RAPIDJSON_LITTLEENDIAN)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
AddJsonPackage(discord-rpc)
|
|
||||||
|
|
||||||
target_include_directories(discord-rpc INTERFACE ${discord-rpc_SOURCE_DIR}/include)
|
|
||||||
add_library(DiscordRPC::discord-rpc ALIAS discord-rpc)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# SimpleIni
|
|
||||||
AddJsonPackage(simpleini)
|
|
||||||
|
|
||||||
# Most linux distros don't package cubeb, so enable regardless of cpm settings
|
|
||||||
if(ENABLE_CUBEB)
|
|
||||||
AddJsonPackage(cubeb)
|
|
||||||
|
|
||||||
if (cubeb_ADDED)
|
|
||||||
if (NOT MSVC)
|
|
||||||
if (TARGET speex)
|
|
||||||
target_compile_options(speex PRIVATE -Wno-sign-compare)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set_target_properties(cubeb PROPERTIES COMPILE_OPTIONS "")
|
|
||||||
target_compile_options(cubeb INTERFACE
|
|
||||||
-Wno-implicit-const-int-float-conversion
|
|
||||||
-Wno-shadow
|
|
||||||
-Wno-missing-declarations
|
|
||||||
-Wno-return-type
|
|
||||||
-Wno-uninitialized
|
|
||||||
)
|
|
||||||
else()
|
|
||||||
target_compile_options(cubeb PRIVATE
|
|
||||||
/wd4456
|
|
||||||
/wd4458
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (NOT TARGET cubeb::cubeb)
|
|
||||||
add_library(cubeb::cubeb ALIAS cubeb)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# find SDL2 exports a bunch of variables that are needed, so its easier to do this outside of the YUZU_find_package
|
|
||||||
if (ENABLE_SDL2)
|
|
||||||
if (YUZU_USE_EXTERNAL_SDL2)
|
|
||||||
message(STATUS "Using SDL2 from externals.")
|
|
||||||
if (NOT WIN32)
|
|
||||||
# Yuzu itself needs: Atomic Audio Events Joystick Haptic Sensor Threads Timers
|
|
||||||
# Since 2.0.18 Atomic+Threads required for HIDAPI/libusb (see https://github.com/libsdl-org/SDL/issues/5095)
|
|
||||||
# Yuzu-cmd also needs: Video (depends on Loadso/Dlopen)
|
|
||||||
# CPUinfo also required for SDL Audio, at least until 2.28.0 (see https://github.com/libsdl-org/SDL/issues/7809)
|
|
||||||
set(SDL_UNUSED_SUBSYSTEMS
|
|
||||||
File Filesystem
|
|
||||||
Locale Power Render)
|
|
||||||
foreach(_SUB ${SDL_UNUSED_SUBSYSTEMS})
|
|
||||||
string(TOUPPER ${_SUB} _OPT)
|
|
||||||
set(SDL_${_OPT} OFF)
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
set(HIDAPI ON)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (APPLE)
|
|
||||||
set(SDL_FILE ON)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if ("${YUZU_SYSTEM_PROFILE}" STREQUAL "steamdeck")
|
|
||||||
set(SDL_PIPEWIRE OFF) # build errors out with this on
|
|
||||||
AddJsonPackage("sdl2_steamdeck")
|
|
||||||
else()
|
|
||||||
AddJsonPackage("sdl2_generic")
|
|
||||||
endif()
|
|
||||||
elseif (YUZU_USE_BUNDLED_SDL2)
|
|
||||||
message(STATUS "Using bundled SDL2")
|
|
||||||
AddJsonPackage(sdl2)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
find_package(SDL2 2.26.4 REQUIRED)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# List of all FFmpeg components required
|
# List of all FFmpeg components required
|
||||||
set(FFmpeg_COMPONENTS
|
set(FFmpeg_COMPONENTS
|
||||||
avcodec
|
avcodec
|
||||||
|
@ -677,6 +537,11 @@ add_subdirectory(externals)
|
||||||
# pass targets from externals
|
# pass targets from externals
|
||||||
find_package(libusb)
|
find_package(libusb)
|
||||||
find_package(VulkanMemoryAllocator)
|
find_package(VulkanMemoryAllocator)
|
||||||
|
find_package(enet)
|
||||||
|
find_package(MbedTLS)
|
||||||
|
find_package(VulkanUtilityLibraries)
|
||||||
|
find_package(SimpleIni)
|
||||||
|
find_package(SPIRV-Tools)
|
||||||
|
|
||||||
if (ARCHITECTURE_x86 OR ARCHITECTURE_x86_64)
|
if (ARCHITECTURE_x86 OR ARCHITECTURE_x86_64)
|
||||||
find_package(xbyak)
|
find_package(xbyak)
|
||||||
|
@ -690,6 +555,26 @@ if (ENABLE_WEB_SERVICE OR ENABLE_QT_UPDATE_CHECKER)
|
||||||
find_package(cpp-jwt)
|
find_package(cpp-jwt)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (ARCHITECTURE_arm64 OR DYNARMIC_TESTS)
|
||||||
|
find_package(oaknut)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (ENABLE_SDL2)
|
||||||
|
find_package(SDL2)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (USE_DISCORD_PRESENCE)
|
||||||
|
find_package(DiscordRPC)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (ENABLE_CUBEB)
|
||||||
|
find_package(cubeb)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (YUZU_TESTS OR DYNARMIC_TESTS)
|
||||||
|
find_package(Catch2)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (ENABLE_QT)
|
if (ENABLE_QT)
|
||||||
if (YUZU_USE_BUNDLED_QT)
|
if (YUZU_USE_BUNDLED_QT)
|
||||||
download_qt(6.8.3)
|
download_qt(6.8.3)
|
||||||
|
|
|
@ -107,7 +107,6 @@ function(AddJsonPackage)
|
||||||
get_json_element("${object}" name name "${JSON_NAME}")
|
get_json_element("${object}" name name "${JSON_NAME}")
|
||||||
get_json_element("${object}" extension extension "tar.zst")
|
get_json_element("${object}" extension extension "tar.zst")
|
||||||
get_json_element("${object}" min_version min_version "")
|
get_json_element("${object}" min_version min_version "")
|
||||||
get_json_element("${object}" cmake_filename cmake_filename "")
|
|
||||||
get_json_element("${object}" raw_disabled disabled_platforms "")
|
get_json_element("${object}" raw_disabled disabled_platforms "")
|
||||||
|
|
||||||
if (raw_disabled)
|
if (raw_disabled)
|
||||||
|
@ -124,7 +123,6 @@ function(AddJsonPackage)
|
||||||
EXTENSION ${extension}
|
EXTENSION ${extension}
|
||||||
MIN_VERSION ${min_version}
|
MIN_VERSION ${min_version}
|
||||||
DISABLED_PLATFORMS ${disabled_platforms}
|
DISABLED_PLATFORMS ${disabled_platforms}
|
||||||
CMAKE_FILENAME ${cmake_filename}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# pass stuff to parent scope
|
# pass stuff to parent scope
|
||||||
|
@ -139,6 +137,7 @@ function(AddJsonPackage)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
get_json_element("${object}" hash hash "")
|
get_json_element("${object}" hash hash "")
|
||||||
|
get_json_element("${object}" hash_suffix hash_suffix "")
|
||||||
get_json_element("${object}" sha sha "")
|
get_json_element("${object}" sha sha "")
|
||||||
get_json_element("${object}" url url "")
|
get_json_element("${object}" url url "")
|
||||||
get_json_element("${object}" key key "")
|
get_json_element("${object}" key key "")
|
||||||
|
@ -208,6 +207,7 @@ function(AddJsonPackage)
|
||||||
VERSION "${version}"
|
VERSION "${version}"
|
||||||
URL "${url}"
|
URL "${url}"
|
||||||
HASH "${hash}"
|
HASH "${hash}"
|
||||||
|
HASH_SUFFIX "${hash_suffix}"
|
||||||
SHA "${sha}"
|
SHA "${sha}"
|
||||||
REPO "${repo}"
|
REPO "${repo}"
|
||||||
KEY "${key}"
|
KEY "${key}"
|
||||||
|
@ -533,7 +533,6 @@ function(AddCIPackage)
|
||||||
EXTENSION
|
EXTENSION
|
||||||
MIN_VERSION
|
MIN_VERSION
|
||||||
DISABLED_PLATFORMS
|
DISABLED_PLATFORMS
|
||||||
CMAKE_FILENAME
|
|
||||||
)
|
)
|
||||||
|
|
||||||
cmake_parse_arguments(PKG_ARGS "" "${oneValueArgs}" "" ${ARGN})
|
cmake_parse_arguments(PKG_ARGS "" "${oneValueArgs}" "" ${ARGN})
|
||||||
|
@ -589,25 +588,28 @@ function(AddCIPackage)
|
||||||
add_ci_package(android)
|
add_ci_package(android)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(PLATFORM_SUN AND NOT "solaris" IN_LIST DISABLED_PLATFORMS)
|
if(PLATFORM_SUN AND NOT "solaris-amd64" IN_LIST DISABLED_PLATFORMS)
|
||||||
add_ci_package(solaris)
|
add_ci_package(solaris-amd64)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(PLATFORM_FREEBSD AND NOT "freebsd" IN_LIST DISABLED_PLATFORMS)
|
if(PLATFORM_FREEBSD AND NOT "freebsd-amd64" IN_LIST DISABLED_PLATFORMS)
|
||||||
add_ci_package(freebsd)
|
add_ci_package(freebsd-amd64)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if((PLATFORM_LINUX AND ARCHITECTURE_x86_64) AND NOT "linux" IN_LIST DISABLED_PLATFORMS)
|
if((PLATFORM_LINUX AND ARCHITECTURE_x86_64) AND NOT "linux-amd64" IN_LIST DISABLED_PLATFORMS)
|
||||||
add_ci_package(linux)
|
add_ci_package(linux-amd64)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if((PLATFORM_LINUX AND ARCHITECTURE_arm64) AND NOT "linux-aarch64" IN_LIST DISABLED_PLATFORMS)
|
if((PLATFORM_LINUX AND ARCHITECTURE_arm64) AND NOT "linux-aarch64" IN_LIST DISABLED_PLATFORMS)
|
||||||
add_ci_package(linux-aarch64)
|
add_ci_package(linux-aarch64)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (DEFINED ARTIFACT_DIR)
|
# TODO(crueter): macOS amd64/aarch64 split mayhaps
|
||||||
include(${ARTIFACT_DIR}/${ARTIFACT_CMAKE}.cmake)
|
if (APPLE AND NOT "macos-universal" IN_LIST DISABLED_PLATFORMS)
|
||||||
|
add_ci_package(macos-universal)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (DEFINED ARTIFACT_DIR)
|
||||||
set(${ARTIFACT_PACKAGE}_ADDED TRUE PARENT_SCOPE)
|
set(${ARTIFACT_PACKAGE}_ADDED TRUE PARENT_SCOPE)
|
||||||
set(${ARTIFACT_PACKAGE}_SOURCE_DIR "${ARTIFACT_DIR}" PARENT_SCOPE)
|
set(${ARTIFACT_PACKAGE}_SOURCE_DIR "${ARTIFACT_DIR}" PARENT_SCOPE)
|
||||||
else()
|
else()
|
||||||
|
|
106
cpmfile.json
106
cpmfile.json
|
@ -4,8 +4,11 @@
|
||||||
"package": "OpenSSL",
|
"package": "OpenSSL",
|
||||||
"name": "openssl",
|
"name": "openssl",
|
||||||
"repo": "crueter-ci/OpenSSL",
|
"repo": "crueter-ci/OpenSSL",
|
||||||
"version": "3.5.3",
|
"version": "3.6.0",
|
||||||
"min_version": "1.1.1"
|
"min_version": "1.1.1",
|
||||||
|
"disabled_platforms": [
|
||||||
|
"macos-universal"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"boost": {
|
"boost": {
|
||||||
"package": "Boost",
|
"package": "Boost",
|
||||||
|
@ -66,20 +69,6 @@
|
||||||
"ZSTD_BUILD_SHARED OFF"
|
"ZSTD_BUILD_SHARED OFF"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"catch2": {
|
|
||||||
"package": "Catch2",
|
|
||||||
"repo": "catchorg/Catch2",
|
|
||||||
"sha": "644821ce28",
|
|
||||||
"hash": "f8795f98acf2c02c0db8e734cc866d5caebab4b4a306e93598b97cb3c0c728dafe8283dce27ffe8d42460e5ae7302f3f32e7e274a7f991b73511ac88eef21b1f",
|
|
||||||
"version": "3.0.1"
|
|
||||||
},
|
|
||||||
"enet": {
|
|
||||||
"repo": "lsalzman/enet",
|
|
||||||
"sha": "2662c0de09",
|
|
||||||
"hash": "3de1beb4fa3d6b1e03eda8dd1e7580694f854af3ed3975dcdabfdcdf76b97f322b9734d35ea7f185855bb490d957842b938b26da4dd2dfded509390f8d2794dd",
|
|
||||||
"version": "1.3",
|
|
||||||
"find_args": "MODULE"
|
|
||||||
},
|
|
||||||
"opus": {
|
"opus": {
|
||||||
"package": "Opus",
|
"package": "Opus",
|
||||||
"repo": "crueter/opus",
|
"repo": "crueter/opus",
|
||||||
|
@ -91,97 +80,12 @@
|
||||||
"OPUS_PRESUME_NEON ON"
|
"OPUS_PRESUME_NEON ON"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"vulkan-utility-headers": {
|
|
||||||
"package": "VulkanUtilityLibraries",
|
|
||||||
"repo": "scripts/VulkanUtilityHeaders",
|
|
||||||
"tag": "1.4.326",
|
|
||||||
"artifact": "VulkanUtilityHeaders.tar.zst",
|
|
||||||
"git_host": "git.crueter.xyz",
|
|
||||||
"hash": "5924629755cb1605c4aa4eee20ef7957a9dd8d61e4df548be656d98054f2730c4109693c1bd35811f401f4705d2ccff9fc849be32b0d8480bc3f73541a5e0964"
|
|
||||||
},
|
|
||||||
"spirv-tools": {
|
|
||||||
"package": "SPIRV-Tools",
|
|
||||||
"repo": "KhronosGroup/SPIRV-Tools",
|
|
||||||
"sha": "40eb301f32",
|
|
||||||
"hash": "58d0fb1047d69373cf24c73e6f78c73a72a6cca3b4df1d9f083b9dcc0962745ef154abf3dbe9b3623b835be20c6ec769431cf11733349f45e7568b3525f707aa",
|
|
||||||
"find_args": "MODULE",
|
|
||||||
"options": [
|
|
||||||
"SPIRV_SKIP_EXECUTABLES ON"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"spirv-headers": {
|
|
||||||
"package": "SPIRV-Headers",
|
|
||||||
"repo": "KhronosGroup/SPIRV-Headers",
|
|
||||||
"sha": "4e209d3d7e",
|
|
||||||
"hash": "f48bbe18341ed55ea0fe280dbbbc0a44bf222278de6e716e143ca1e95ca320b06d4d23d6583fbf8d03e1428f3dac8fa00e5b82ddcd6b425e6236d85af09550a4",
|
|
||||||
"options": [
|
|
||||||
"SPIRV_WERROR OFF"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"mbedtls": {
|
|
||||||
"package": "MbedTLS",
|
|
||||||
"repo": "Mbed-TLS/mbedtls",
|
|
||||||
"tag": "mbedtls-%VERSION%",
|
|
||||||
"hash": "6671fb8fcaa832e5b115dfdce8f78baa6a4aea71f5c89a640583634cdee27aefe3bf4be075744da91f7c3ae5ea4e0c765c8fc3937b5cfd9ea73d87ef496524da",
|
|
||||||
"version": "3",
|
|
||||||
"git_version": "3.6.4",
|
|
||||||
"artifact": "%TAG%.tar.bz2"
|
|
||||||
},
|
|
||||||
"cubeb": {
|
|
||||||
"repo": "mozilla/cubeb",
|
|
||||||
"sha": "fa02160712",
|
|
||||||
"hash": "82d808356752e4064de48c8fecbe7856715ade1e76b53937116bf07129fc1cc5b3de5e4b408de3cd000187ba8dc32ca4109661cb7e0355a52e54bd81b9be1c61",
|
|
||||||
"find_args": "CONFIG",
|
|
||||||
"options": [
|
|
||||||
"USE_SANITIZERS OFF",
|
|
||||||
"BUILD_TESTS OFF",
|
|
||||||
"BUILD_TOOLS OFF",
|
|
||||||
"BUNDLE_SPEEX ON"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"boost_headers": {
|
"boost_headers": {
|
||||||
"repo": "boostorg/headers",
|
"repo": "boostorg/headers",
|
||||||
"sha": "95930ca8f5",
|
"sha": "95930ca8f5",
|
||||||
"hash": "d1dece16f3b209109de02123c537bfe1adf07a62b16c166367e7e5d62e0f7c323bf804c89b3192dd6871bc58a9d879d25a1cc3f7b9da0e497cf266f165816e2a",
|
"hash": "d1dece16f3b209109de02123c537bfe1adf07a62b16c166367e7e5d62e0f7c323bf804c89b3192dd6871bc58a9d879d25a1cc3f7b9da0e497cf266f165816e2a",
|
||||||
"bundled": true
|
"bundled": true
|
||||||
},
|
},
|
||||||
"discord-rpc": {
|
|
||||||
"repo": "eden-emulator/discord-rpc",
|
|
||||||
"sha": "1cf7772bb6",
|
|
||||||
"hash": "e9b35e6f2c075823257bcd59f06fe7bb2ccce1976f44818d2e28810435ef79c712a3c4f20f40da41f691342a4058cf86b078eb7f9d9e4dae83c0547c21ec4f97"
|
|
||||||
},
|
|
||||||
"simpleini": {
|
|
||||||
"package": "SimpleIni",
|
|
||||||
"repo": "brofield/simpleini",
|
|
||||||
"sha": "09c21bda1d",
|
|
||||||
"hash": "99779ca9b6e040d36558cadf484f9ffdab5b47bcc8fc72e4d33639d1d60c0ceb4410d335ba445d72a4324e455167fd6769d99b459943aa135bec085dff2d4b7c",
|
|
||||||
"find_args": "MODULE"
|
|
||||||
},
|
|
||||||
"sdl2_generic": {
|
|
||||||
"package": "SDL2",
|
|
||||||
"repo": "libsdl-org/SDL",
|
|
||||||
"sha": "54772f345a",
|
|
||||||
"hash": "2a68a0e01c390043aa9d9df63d8a20a52076c88bb460ac4e0f33194ca7d9bc8fadbbcc04e7506872ac4b6354a73fbc267c036f82200da59465789b87c7d9e3a4",
|
|
||||||
"key": "generic",
|
|
||||||
"bundled": true
|
|
||||||
},
|
|
||||||
"sdl2_steamdeck": {
|
|
||||||
"package": "SDL2",
|
|
||||||
"repo": "libsdl-org/SDL",
|
|
||||||
"sha": "cc016b0046",
|
|
||||||
"hash": "34d5ef58da6a4f9efa6689c82f67badcbd741f5a4f562a9c2c30828fa839830fb07681c5dc6a7851520e261c8405a416ac0a2c2513b51984fb3b4fa4dcb3e20b",
|
|
||||||
"key": "steamdeck",
|
|
||||||
"bundled": true
|
|
||||||
},
|
|
||||||
"sdl2": {
|
|
||||||
"ci": true,
|
|
||||||
"package": "SDL2",
|
|
||||||
"name": "SDL2",
|
|
||||||
"repo": "crueter-ci/SDL2",
|
|
||||||
"version": "2.32.8",
|
|
||||||
"min_version": "2.26.4",
|
|
||||||
"cmake_filename": "sdl2"
|
|
||||||
},
|
|
||||||
"llvm-mingw": {
|
"llvm-mingw": {
|
||||||
"repo": "misc/llvm-mingw",
|
"repo": "misc/llvm-mingw",
|
||||||
"git_host": "git.crueter.xyz",
|
"git_host": "git.crueter.xyz",
|
||||||
|
|
24
docs/CPM.md
24
docs/CPM.md
|
@ -108,7 +108,9 @@ All dependencies must be identifiable in some way for usage in the dependency vi
|
||||||
URLs:
|
URLs:
|
||||||
|
|
||||||
- `GIT_URL`
|
- `GIT_URL`
|
||||||
- `REPO` as a GitHub repository
|
- `REPO` as a Git repository
|
||||||
|
* You may optionally specify `GIT_HOST` to use a custom host, e.g. `GIT_HOST git.crueter.xyz`. Note that the git host MUST be GitHub-like in its artifact/archive downloads, e.g. Forgejo
|
||||||
|
* If `GIT_HOST` is unspecified, defaults to `github.com`
|
||||||
- `URL`
|
- `URL`
|
||||||
|
|
||||||
Versions (bundled):
|
Versions (bundled):
|
||||||
|
@ -135,11 +137,11 @@ Adds a package that follows crueter's CI repository spec.
|
||||||
* `windows-amd64`
|
* `windows-amd64`
|
||||||
* `windows-arm64`
|
* `windows-arm64`
|
||||||
* `android`
|
* `android`
|
||||||
* `solaris`
|
* `solaris-amd64`
|
||||||
* `freebsd`
|
* `freebsd-amd64`
|
||||||
* `linux`
|
* `linux-amd64`
|
||||||
* `linux-aarch64`
|
* `linux-aarch64`
|
||||||
- `CMAKE_FILENAME`: Custom CMake filename, relative to the package root (default `${PACKAGE_ROOT}/${NAME}.cmake`)
|
* `macos-universal`
|
||||||
|
|
||||||
### AddJsonPackage
|
### AddJsonPackage
|
||||||
|
|
||||||
|
@ -155,10 +157,17 @@ The cpmfile is an object of objects, with each sub-object being named according
|
||||||
If `ci` is `false`:
|
If `ci` is `false`:
|
||||||
|
|
||||||
- `hash` -> `HASH`
|
- `hash` -> `HASH`
|
||||||
|
- `hash_suffix` -> `HASH_SUFFIX`
|
||||||
- `sha` -> `SHA`
|
- `sha` -> `SHA`
|
||||||
|
- `key` -> `KEY`
|
||||||
- `tag` -> `TAG`
|
- `tag` -> `TAG`
|
||||||
|
* If the tag contains `%VERSION%`, that part will be replaced by the `git_version`, OR `version` if `git_version` is not specified
|
||||||
|
- `url` -> `URL`
|
||||||
- `artifact` -> `ARTIFACT`
|
- `artifact` -> `ARTIFACT`
|
||||||
|
* If the artifact contains `%VERSION%`, that part will be replaced by the `git_version`, OR `version` if `git_version` is not specified
|
||||||
|
* If the artifact contains `%TAG%`, that part will be replaced by the `tag` (with its replacement already done)
|
||||||
- `git_version` -> `GIT_VERSION`
|
- `git_version` -> `GIT_VERSION`
|
||||||
|
- `git_host` -> `GIT_HOST`
|
||||||
- `source_subdir` -> `SOURCE_SUBDIR`
|
- `source_subdir` -> `SOURCE_SUBDIR`
|
||||||
- `bundled` -> `BUNDLED_PACKAGE`
|
- `bundled` -> `BUNDLED_PACKAGE`
|
||||||
- `find_args` -> `FIND_PACKAGE_ARGUMENTS`
|
- `find_args` -> `FIND_PACKAGE_ARGUMENTS`
|
||||||
|
@ -172,7 +181,6 @@ If `ci` is `true`:
|
||||||
- `name` -> `NAME`, defaults to the object key
|
- `name` -> `NAME`, defaults to the object key
|
||||||
- `extension` -> `EXTENSION`, defaults to `tar.zst`
|
- `extension` -> `EXTENSION`, defaults to `tar.zst`
|
||||||
- `min_version` -> `MIN_VERSION`
|
- `min_version` -> `MIN_VERSION`
|
||||||
- `cmake_filename` -> `CMAKE_FILENAME`
|
|
||||||
- `extension` -> `EXTENSION`
|
- `extension` -> `EXTENSION`
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
@ -192,8 +200,8 @@ In order: OpenSSL CI, Boost (tag + artifact), Opus (options + find_args), discor
|
||||||
"boost": {
|
"boost": {
|
||||||
"package": "Boost",
|
"package": "Boost",
|
||||||
"repo": "boostorg/boost",
|
"repo": "boostorg/boost",
|
||||||
"tag": "boost-1.88.0",
|
"tag": "boost-%VERSION%",
|
||||||
"artifact": "boost-1.88.0-cmake.7z",
|
"artifact": "%TAG%-cmake.7z",
|
||||||
"hash": "e5b049e5b61964480ca816395f63f95621e66cb9bcf616a8b10e441e0e69f129e22443acb11e77bc1e8170f8e4171b9b7719891efc43699782bfcd4b3a365f01",
|
"hash": "e5b049e5b61964480ca816395f63f95621e66cb9bcf616a8b10e441e0e69f129e22443acb11e77bc1e8170f8e4171b9b7719891efc43699782bfcd4b3a365f01",
|
||||||
"git_version": "1.88.0",
|
"git_version": "1.88.0",
|
||||||
"version": "1.57"
|
"version": "1.57"
|
||||||
|
|
18
docs/User.md
18
docs/User.md
|
@ -9,3 +9,21 @@ Eden will store configuration in the following directories:
|
||||||
- **Linux, macOS, FreeBSD, Solaris, OpenBSD**: `$XDG_DATA_HOME`, `$XDG_CACHE_HOME`, `$XDG_CONFIG_HOME`.
|
- **Linux, macOS, FreeBSD, Solaris, OpenBSD**: `$XDG_DATA_HOME`, `$XDG_CACHE_HOME`, `$XDG_CONFIG_HOME`.
|
||||||
|
|
||||||
If a `user` directory is present in the current working directory, that will override all global configuration directories and the emulator will use that instead.
|
If a `user` directory is present in the current working directory, that will override all global configuration directories and the emulator will use that instead.
|
||||||
|
|
||||||
|
# Enhancements
|
||||||
|
|
||||||
|
## Filters
|
||||||
|
|
||||||
|
Various graphical filters exist - each of them aimed at a specific target/image quality preset.
|
||||||
|
|
||||||
|
- **Nearest**: Provides no filtering - useful for debugging.
|
||||||
|
- **Bilinear**: Provides the hardware default filtering of the Tegra X1.
|
||||||
|
- **Bicubic**: Provides a bicubic interpolation using a Catmull-Rom (or hardware-accelerated) implementation.
|
||||||
|
- **Zero-Tangent, B-Spline, Mitchell**: Provides bicubic interpolation using the respective matrix weights. They're normally not hardware accelerated unless the device supports the `VK_QCOM_filter_cubic_weights` extension. The matrix weights are those matching [the specification itself](https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#VkSamplerCubicWeightsCreateInfoQCOM).
|
||||||
|
- **Spline-1**: Bicubic interpolation (similar to Mitchell) but with a faster texel fetch method. Generally less blurry than bicubic.
|
||||||
|
- **Gaussian**: Whole-area blur, an applied gaussian blur is done to the entire frame.
|
||||||
|
- **Lanczos**: An implementation using `a = 3` (49 texel fetches). Provides sharper edges but blurrier artifacts.
|
||||||
|
- **ScaleForce**: Experimental texture upscale method, see [ScaleFish](https://github.com/BreadFish64/ScaleFish).
|
||||||
|
- **FSR**: Uses AMD FidelityFX Super Resolution to enhance image quality.
|
||||||
|
- **Area**: Area interpolation (high kernel count).
|
||||||
|
- **MMPX**: Nearest-neighbour filter aimed at providing higher pixel-art quality.
|
||||||
|
|
153
externals/CMakeLists.txt
vendored
153
externals/CMakeLists.txt
vendored
|
@ -39,6 +39,144 @@ if (ARCHITECTURE_arm64 OR DYNARMIC_TESTS)
|
||||||
AddJsonPackage(oaknut)
|
AddJsonPackage(oaknut)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# enet
|
||||||
|
AddJsonPackage(enet)
|
||||||
|
|
||||||
|
if (enet_ADDED)
|
||||||
|
target_include_directories(enet INTERFACE ${enet_SOURCE_DIR}/include)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (NOT TARGET enet::enet)
|
||||||
|
add_library(enet::enet ALIAS enet)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# mbedtls
|
||||||
|
AddJsonPackage(mbedtls)
|
||||||
|
|
||||||
|
# VulkanUtilityHeaders - pulls in headers and utility libs
|
||||||
|
AddJsonPackage(vulkan-utility-headers)
|
||||||
|
|
||||||
|
# small hack
|
||||||
|
if (NOT VulkanUtilityLibraries_ADDED)
|
||||||
|
find_package(VulkanHeaders 1.3.274 REQUIRED)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# DiscordRPC
|
||||||
|
if (USE_DISCORD_PRESENCE)
|
||||||
|
if (ARCHITECTURE_arm64)
|
||||||
|
add_compile_definitions(RAPIDJSON_ENDIAN=RAPIDJSON_LITTLEENDIAN)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
AddJsonPackage(discord-rpc)
|
||||||
|
|
||||||
|
if (DiscordRPC_ADDED)
|
||||||
|
target_include_directories(discord-rpc INTERFACE ${DiscordRPC_SOURCE_DIR}/include)
|
||||||
|
add_library(DiscordRPC::discord-rpc ALIAS discord-rpc)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# SimpleIni
|
||||||
|
AddJsonPackage(simpleini)
|
||||||
|
|
||||||
|
# Most linux distros don't package cubeb, so enable regardless of cpm settings
|
||||||
|
if(ENABLE_CUBEB)
|
||||||
|
AddJsonPackage(cubeb)
|
||||||
|
|
||||||
|
if (cubeb_ADDED)
|
||||||
|
if (NOT MSVC)
|
||||||
|
if (TARGET speex)
|
||||||
|
target_compile_options(speex PRIVATE -Wno-sign-compare)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set_target_properties(cubeb PROPERTIES COMPILE_OPTIONS "")
|
||||||
|
target_compile_options(cubeb INTERFACE
|
||||||
|
-Wno-implicit-const-int-float-conversion
|
||||||
|
-Wno-shadow
|
||||||
|
-Wno-missing-declarations
|
||||||
|
-Wno-return-type
|
||||||
|
-Wno-uninitialized
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
target_compile_options(cubeb PRIVATE
|
||||||
|
/wd4456
|
||||||
|
/wd4458
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (NOT TARGET cubeb::cubeb)
|
||||||
|
add_library(cubeb::cubeb ALIAS cubeb)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# find SDL2 exports a bunch of variables that are needed, so its easier to do this outside of the YUZU_find_package
|
||||||
|
if (ENABLE_SDL2)
|
||||||
|
if (YUZU_USE_EXTERNAL_SDL2)
|
||||||
|
message(STATUS "Using SDL2 from externals.")
|
||||||
|
if (NOT WIN32)
|
||||||
|
# Yuzu itself needs: Atomic Audio Events Joystick Haptic Sensor Threads Timers
|
||||||
|
# Since 2.0.18 Atomic+Threads required for HIDAPI/libusb (see https://github.com/libsdl-org/SDL/issues/5095)
|
||||||
|
# Yuzu-cmd also needs: Video (depends on Loadso/Dlopen)
|
||||||
|
# CPUinfo also required for SDL Audio, at least until 2.28.0 (see https://github.com/libsdl-org/SDL/issues/7809)
|
||||||
|
set(SDL_UNUSED_SUBSYSTEMS
|
||||||
|
File Filesystem
|
||||||
|
Locale Power Render)
|
||||||
|
foreach(_SUB ${SDL_UNUSED_SUBSYSTEMS})
|
||||||
|
string(TOUPPER ${_SUB} _OPT)
|
||||||
|
set(SDL_${_OPT} OFF)
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
set(HIDAPI ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (APPLE)
|
||||||
|
set(SDL_FILE ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if ("${YUZU_SYSTEM_PROFILE}" STREQUAL "steamdeck")
|
||||||
|
set(SDL_PIPEWIRE OFF) # build errors out with this on
|
||||||
|
AddJsonPackage("sdl2_steamdeck")
|
||||||
|
else()
|
||||||
|
AddJsonPackage("sdl2_generic")
|
||||||
|
endif()
|
||||||
|
elseif (YUZU_USE_BUNDLED_SDL2)
|
||||||
|
message(STATUS "Using bundled SDL2")
|
||||||
|
AddJsonPackage(sdl2)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_package(SDL2 2.26.4 REQUIRED)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# SPIRV Headers
|
||||||
|
# We only need SPIRV-Headers iff spirv-tools is bundled
|
||||||
|
if (SPIRV-Tools_FORCE_BUNDLED OR CPMUTIL_FORCE_BUNDLED)
|
||||||
|
set(NEED_SPIRV_HEADERS ON)
|
||||||
|
else()
|
||||||
|
find_package(SPIRV-Tools MODULE QUIET)
|
||||||
|
if (NOT SPIRV-Tools_FOUND)
|
||||||
|
set(NEED_SPIRV_HEADERS ON)
|
||||||
|
else()
|
||||||
|
set(NEED_SPIRV_HEADERS OFF)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (NEED_SPIRV_HEADERS)
|
||||||
|
AddJsonPackage(spirv-headers)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# SPIRV Tools
|
||||||
|
AddJsonPackage(spirv-tools)
|
||||||
|
|
||||||
|
if (SPIRV-Tools_ADDED)
|
||||||
|
add_library(SPIRV-Tools::SPIRV-Tools ALIAS SPIRV-Tools-static)
|
||||||
|
target_link_libraries(SPIRV-Tools-static PRIVATE SPIRV-Tools-opt SPIRV-Tools-link)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Catch2
|
||||||
|
if (YUZU_TESTS OR DYNARMIC_TESTS)
|
||||||
|
AddJsonPackage(catch2)
|
||||||
|
endif()
|
||||||
|
|
||||||
# getopt
|
# getopt
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
add_subdirectory(getopt)
|
add_subdirectory(getopt)
|
||||||
|
@ -68,15 +206,18 @@ if (VulkanMemoryAllocator_ADDED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Sirit
|
# Sirit
|
||||||
AddJsonPackage(sirit)
|
if (YUZU_USE_BUNDLED_SIRIT)
|
||||||
|
AddJsonPackage(sirit-ci)
|
||||||
if(MSVC AND USE_CCACHE AND sirit_ADDED)
|
else()
|
||||||
|
AddJsonPackage(sirit)
|
||||||
|
if(MSVC AND USE_CCACHE AND sirit_ADDED)
|
||||||
get_target_property(_opts sirit COMPILE_OPTIONS)
|
get_target_property(_opts sirit COMPILE_OPTIONS)
|
||||||
list(FILTER _opts EXCLUDE REGEX "/Zi")
|
list(FILTER _opts EXCLUDE REGEX "/Zi")
|
||||||
list(APPEND _opts "/Z7")
|
list(APPEND _opts "/Z7")
|
||||||
set_target_properties(sirit PROPERTIES COMPILE_OPTIONS "${_opts}")
|
set_target_properties(siritobj PROPERTIES COMPILE_OPTIONS "${_opts}")
|
||||||
elseif(MSVC AND CXX_CLANG)
|
elseif(MSVC AND CXX_CLANG)
|
||||||
target_compile_options(sirit PRIVATE -Wno-error=unused-command-line-argument)
|
target_compile_options(siritobj PRIVATE -Wno-error=unused-command-line-argument)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# httplib
|
# httplib
|
||||||
|
|
120
externals/cpmfile.json
vendored
120
externals/cpmfile.json
vendored
|
@ -8,12 +8,18 @@
|
||||||
},
|
},
|
||||||
"sirit": {
|
"sirit": {
|
||||||
"repo": "eden-emulator/sirit",
|
"repo": "eden-emulator/sirit",
|
||||||
"sha": "db1f1e8ab5",
|
"version": "1.0.1",
|
||||||
"hash": "73eb3a042848c63a10656545797e85f40d142009dfb7827384548a385e1e28e1ac72f42b25924ce530d58275f8638554281e884d72f9c7aaf4ed08690a414b05",
|
"tag": "v%VERSION%",
|
||||||
"find_args": "CONFIG",
|
"artifact": "sirit-source-%VERSION%.tar.zst",
|
||||||
"options": [
|
"hash_suffix": "sha512sum",
|
||||||
"SIRIT_USE_SYSTEM_SPIRV_HEADERS ON"
|
"find_args": "CONFIG"
|
||||||
]
|
},
|
||||||
|
"sirit-ci": {
|
||||||
|
"ci": true,
|
||||||
|
"package": "sirit",
|
||||||
|
"name": "sirit",
|
||||||
|
"repo": "eden-emulator/sirit",
|
||||||
|
"version": "1.0.0"
|
||||||
},
|
},
|
||||||
"httplib": {
|
"httplib": {
|
||||||
"repo": "yhirose/cpp-httplib",
|
"repo": "yhirose/cpp-httplib",
|
||||||
|
@ -70,5 +76,107 @@
|
||||||
"sha": "73f3cbb237",
|
"sha": "73f3cbb237",
|
||||||
"hash": "c08c03063938339d61392b687562909c1a92615b6ef39ec8df19ea472aa6b6478e70d7d5e33d4a27b5d23f7806daf57fe1bacb8124c8a945c918c7663a9e8532",
|
"hash": "c08c03063938339d61392b687562909c1a92615b6ef39ec8df19ea472aa6b6478e70d7d5e33d4a27b5d23f7806daf57fe1bacb8124c8a945c918c7663a9e8532",
|
||||||
"find_args": "CONFIG"
|
"find_args": "CONFIG"
|
||||||
|
},
|
||||||
|
"mbedtls": {
|
||||||
|
"package": "MbedTLS",
|
||||||
|
"repo": "Mbed-TLS/mbedtls",
|
||||||
|
"tag": "mbedtls-%VERSION%",
|
||||||
|
"hash": "6671fb8fcaa832e5b115dfdce8f78baa6a4aea71f5c89a640583634cdee27aefe3bf4be075744da91f7c3ae5ea4e0c765c8fc3937b5cfd9ea73d87ef496524da",
|
||||||
|
"version": "3",
|
||||||
|
"git_version": "3.6.4",
|
||||||
|
"artifact": "%TAG%.tar.bz2"
|
||||||
|
},
|
||||||
|
"enet": {
|
||||||
|
"repo": "lsalzman/enet",
|
||||||
|
"sha": "2662c0de09",
|
||||||
|
"hash": "3de1beb4fa3d6b1e03eda8dd1e7580694f854af3ed3975dcdabfdcdf76b97f322b9734d35ea7f185855bb490d957842b938b26da4dd2dfded509390f8d2794dd",
|
||||||
|
"version": "1.3",
|
||||||
|
"find_args": "MODULE"
|
||||||
|
},
|
||||||
|
"vulkan-utility-headers": {
|
||||||
|
"package": "VulkanUtilityLibraries",
|
||||||
|
"repo": "scripts/VulkanUtilityHeaders",
|
||||||
|
"tag": "1.4.326",
|
||||||
|
"artifact": "VulkanUtilityHeaders.tar.zst",
|
||||||
|
"git_host": "git.crueter.xyz",
|
||||||
|
"hash": "5924629755cb1605c4aa4eee20ef7957a9dd8d61e4df548be656d98054f2730c4109693c1bd35811f401f4705d2ccff9fc849be32b0d8480bc3f73541a5e0964"
|
||||||
|
},
|
||||||
|
"spirv-tools": {
|
||||||
|
"package": "SPIRV-Tools",
|
||||||
|
"repo": "KhronosGroup/SPIRV-Tools",
|
||||||
|
"sha": "40eb301f32",
|
||||||
|
"hash": "58d0fb1047d69373cf24c73e6f78c73a72a6cca3b4df1d9f083b9dcc0962745ef154abf3dbe9b3623b835be20c6ec769431cf11733349f45e7568b3525f707aa",
|
||||||
|
"find_args": "MODULE",
|
||||||
|
"options": [
|
||||||
|
"SPIRV_SKIP_EXECUTABLES ON"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"spirv-headers": {
|
||||||
|
"package": "SPIRV-Headers",
|
||||||
|
"repo": "KhronosGroup/SPIRV-Headers",
|
||||||
|
"sha": "4e209d3d7e",
|
||||||
|
"hash": "f48bbe18341ed55ea0fe280dbbbc0a44bf222278de6e716e143ca1e95ca320b06d4d23d6583fbf8d03e1428f3dac8fa00e5b82ddcd6b425e6236d85af09550a4",
|
||||||
|
"options": [
|
||||||
|
"SPIRV_WERROR OFF"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"cubeb": {
|
||||||
|
"repo": "mozilla/cubeb",
|
||||||
|
"sha": "fa02160712",
|
||||||
|
"hash": "82d808356752e4064de48c8fecbe7856715ade1e76b53937116bf07129fc1cc5b3de5e4b408de3cd000187ba8dc32ca4109661cb7e0355a52e54bd81b9be1c61",
|
||||||
|
"find_args": "CONFIG",
|
||||||
|
"options": [
|
||||||
|
"USE_SANITIZERS OFF",
|
||||||
|
"BUILD_TESTS OFF",
|
||||||
|
"BUILD_TOOLS OFF",
|
||||||
|
"BUNDLE_SPEEX ON"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"discord-rpc": {
|
||||||
|
"package": "DiscordRPC",
|
||||||
|
"repo": "eden-emulator/discord-rpc",
|
||||||
|
"sha": "1cf7772bb6",
|
||||||
|
"hash": "e9b35e6f2c075823257bcd59f06fe7bb2ccce1976f44818d2e28810435ef79c712a3c4f20f40da41f691342a4058cf86b078eb7f9d9e4dae83c0547c21ec4f97"
|
||||||
|
},
|
||||||
|
"simpleini": {
|
||||||
|
"package": "SimpleIni",
|
||||||
|
"repo": "brofield/simpleini",
|
||||||
|
"sha": "09c21bda1d",
|
||||||
|
"hash": "99779ca9b6e040d36558cadf484f9ffdab5b47bcc8fc72e4d33639d1d60c0ceb4410d335ba445d72a4324e455167fd6769d99b459943aa135bec085dff2d4b7c",
|
||||||
|
"find_args": "MODULE"
|
||||||
|
},
|
||||||
|
"sdl2_generic": {
|
||||||
|
"package": "SDL2",
|
||||||
|
"repo": "libsdl-org/SDL",
|
||||||
|
"sha": "54772f345a",
|
||||||
|
"hash": "2a68a0e01c390043aa9d9df63d8a20a52076c88bb460ac4e0f33194ca7d9bc8fadbbcc04e7506872ac4b6354a73fbc267c036f82200da59465789b87c7d9e3a4",
|
||||||
|
"key": "generic",
|
||||||
|
"bundled": true
|
||||||
|
},
|
||||||
|
"sdl2_steamdeck": {
|
||||||
|
"package": "SDL2",
|
||||||
|
"repo": "libsdl-org/SDL",
|
||||||
|
"sha": "cc016b0046",
|
||||||
|
"hash": "34d5ef58da6a4f9efa6689c82f67badcbd741f5a4f562a9c2c30828fa839830fb07681c5dc6a7851520e261c8405a416ac0a2c2513b51984fb3b4fa4dcb3e20b",
|
||||||
|
"key": "steamdeck",
|
||||||
|
"bundled": true
|
||||||
|
},
|
||||||
|
"sdl2": {
|
||||||
|
"ci": true,
|
||||||
|
"package": "SDL2",
|
||||||
|
"name": "SDL2",
|
||||||
|
"repo": "crueter-ci/SDL2",
|
||||||
|
"version": "2.32.10",
|
||||||
|
"min_version": "2.26.4",
|
||||||
|
"disabled_platforms": [
|
||||||
|
"macos-universal"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"catch2": {
|
||||||
|
"package": "Catch2",
|
||||||
|
"repo": "catchorg/Catch2",
|
||||||
|
"sha": "644821ce28",
|
||||||
|
"hash": "f8795f98acf2c02c0db8e734cc866d5caebab4b4a306e93598b97cb3c0c728dafe8283dce27ffe8d42460e5ae7302f3f32e7e274a7f991b73511ac88eef21b1f",
|
||||||
|
"version": "3.0.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
5
externals/ffmpeg/cpmfile.json
vendored
5
externals/ffmpeg/cpmfile.json
vendored
|
@ -13,8 +13,9 @@
|
||||||
"version": "8.0",
|
"version": "8.0",
|
||||||
"min_version": "4.1",
|
"min_version": "4.1",
|
||||||
"disabled_platforms": [
|
"disabled_platforms": [
|
||||||
"freebsd",
|
"freebsd-amd64",
|
||||||
"solaris"
|
"solaris-amd64",
|
||||||
|
"macos-universal"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -251,12 +251,16 @@
|
||||||
<item>@string/scaling_filter_nearest_neighbor</item>
|
<item>@string/scaling_filter_nearest_neighbor</item>
|
||||||
<item>@string/scaling_filter_bilinear</item>
|
<item>@string/scaling_filter_bilinear</item>
|
||||||
<item>@string/scaling_filter_bicubic</item>
|
<item>@string/scaling_filter_bicubic</item>
|
||||||
|
<item>@string/scaling_filter_zero_tangent</item>
|
||||||
|
<item>@string/scaling_filter_bspline</item>
|
||||||
|
<item>@string/scaling_filter_mitchell</item>
|
||||||
<item>@string/scaling_filter_spline1</item>
|
<item>@string/scaling_filter_spline1</item>
|
||||||
<item>@string/scaling_filter_gaussian</item>
|
<item>@string/scaling_filter_gaussian</item>
|
||||||
<item>@string/scaling_filter_lanczos</item>
|
<item>@string/scaling_filter_lanczos</item>
|
||||||
<item>@string/scaling_filter_scale_force</item>
|
<item>@string/scaling_filter_scale_force</item>
|
||||||
<item>@string/scaling_filter_fsr</item>
|
<item>@string/scaling_filter_fsr</item>
|
||||||
<item>@string/scaling_filter_area</item>
|
<item>@string/scaling_filter_area</item>
|
||||||
|
<item>@string/scaling_filter_mmpx</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<integer-array name="rendererScalingFilterValues">
|
<integer-array name="rendererScalingFilterValues">
|
||||||
|
@ -269,6 +273,10 @@
|
||||||
<item>6</item>
|
<item>6</item>
|
||||||
<item>7</item>
|
<item>7</item>
|
||||||
<item>8</item>
|
<item>8</item>
|
||||||
|
<item>9</item>
|
||||||
|
<item>10</item>
|
||||||
|
<item>11</item>
|
||||||
|
<item>12</item>
|
||||||
</integer-array>
|
</integer-array>
|
||||||
|
|
||||||
<string-array name="rendererAntiAliasingNames">
|
<string-array name="rendererAntiAliasingNames">
|
||||||
|
|
|
@ -1017,6 +1017,10 @@
|
||||||
<string name="scaling_filter_scale_force">ScaleForce</string>
|
<string name="scaling_filter_scale_force">ScaleForce</string>
|
||||||
<string name="scaling_filter_fsr">AMD FidelityFX™ Super Resolution</string>
|
<string name="scaling_filter_fsr">AMD FidelityFX™ Super Resolution</string>
|
||||||
<string name="scaling_filter_area">Area</string>
|
<string name="scaling_filter_area">Area</string>
|
||||||
|
<string name="scaling_filter_zero_tangent">Zero-Tangent</string>
|
||||||
|
<string name="scaling_filter_bspline">B-Spline</string>
|
||||||
|
<string name="scaling_filter_mitchell">Mitchell</string>
|
||||||
|
<string name="scaling_filter_mmpx">MMPX</string>
|
||||||
|
|
||||||
<!-- Anti-Aliasing -->
|
<!-- Anti-Aliasing -->
|
||||||
<string name="anti_aliasing_none">None</string>
|
<string name="anti_aliasing_none">None</string>
|
||||||
|
|
|
@ -320,11 +320,19 @@ struct Values {
|
||||||
linkage, true, "cpuopt_unsafe_ignore_global_monitor", Category::CpuUnsafe};
|
linkage, true, "cpuopt_unsafe_ignore_global_monitor", Category::CpuUnsafe};
|
||||||
|
|
||||||
// Renderer
|
// Renderer
|
||||||
SwitchableSetting<RendererBackend, true> renderer_backend{
|
SwitchableSetting<RendererBackend, true> renderer_backend{linkage,
|
||||||
linkage, RendererBackend::Vulkan,
|
#if defined(__sun__) || defined(__managarm__)
|
||||||
|
RendererBackend::OpenGL,
|
||||||
|
#else
|
||||||
|
RendererBackend::Vulkan,
|
||||||
|
#endif
|
||||||
"backend", Category::Renderer};
|
"backend", Category::Renderer};
|
||||||
SwitchableSetting<ShaderBackend, true> shader_backend{
|
SwitchableSetting<ShaderBackend, true> shader_backend{linkage,
|
||||||
linkage, ShaderBackend::SpirV,
|
#if defined(__sun__) || defined(__managarm__)
|
||||||
|
ShaderBackend::Glsl,
|
||||||
|
#else
|
||||||
|
ShaderBackend::SpirV,
|
||||||
|
#endif
|
||||||
"shader_backend", Category::Renderer, Specialization::RuntimeList};
|
"shader_backend", Category::Renderer, Specialization::RuntimeList};
|
||||||
SwitchableSetting<int> vulkan_device{linkage, 0, "vulkan_device", Category::Renderer,
|
SwitchableSetting<int> vulkan_device{linkage, 0, "vulkan_device", Category::Renderer,
|
||||||
Specialization::RuntimeList};
|
Specialization::RuntimeList};
|
||||||
|
|
|
@ -143,7 +143,7 @@ ENUM(ConfirmStop, Ask_Always, Ask_Based_On_Game, Ask_Never);
|
||||||
ENUM(FullscreenMode, Borderless, Exclusive);
|
ENUM(FullscreenMode, Borderless, Exclusive);
|
||||||
ENUM(NvdecEmulation, Off, Cpu, Gpu);
|
ENUM(NvdecEmulation, Off, Cpu, Gpu);
|
||||||
ENUM(ResolutionSetup, Res1_4X, Res1_2X, Res3_4X, Res1X, Res3_2X, Res2X, Res3X, Res4X, Res5X, Res6X, Res7X, Res8X);
|
ENUM(ResolutionSetup, Res1_4X, Res1_2X, Res3_4X, Res1X, Res3_2X, Res2X, Res3X, Res4X, Res5X, Res6X, Res7X, Res8X);
|
||||||
ENUM(ScalingFilter, NearestNeighbor, Bilinear, Bicubic, Spline1, Gaussian, Lanczos, ScaleForce, Fsr, Area, MaxEnum);
|
ENUM(ScalingFilter, NearestNeighbor, Bilinear, Bicubic, ZeroTangent, BSpline, Mitchell, Spline1, Gaussian, Lanczos, ScaleForce, Fsr, Area, Mmpx, MaxEnum);
|
||||||
ENUM(AntiAliasing, None, Fxaa, Smaa, MaxEnum);
|
ENUM(AntiAliasing, None, Fxaa, Smaa, MaxEnum);
|
||||||
ENUM(AspectRatio, R16_9, R4_3, R21_9, R16_10, Stretch);
|
ENUM(AspectRatio, R16_9, R4_3, R21_9, R16_10, Stretch);
|
||||||
ENUM(ConsoleMode, Handheld, Docked);
|
ENUM(ConsoleMode, Handheld, Docked);
|
||||||
|
|
|
@ -53,6 +53,19 @@ enum class NetDbError : s32 {
|
||||||
NoData = 4,
|
NoData = 4,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const constexpr std::array blockedDomains = {"srv.nintendo.net",
|
||||||
|
"battle.net",
|
||||||
|
"microsoft.com",
|
||||||
|
"mojang.com",
|
||||||
|
"xboxlive.com",
|
||||||
|
"minecraftservices.com"};
|
||||||
|
|
||||||
|
static bool IsBlockedHost(const std::string& host) {
|
||||||
|
return std::any_of(
|
||||||
|
blockedDomains.begin(), blockedDomains.end(),
|
||||||
|
[&host](const std::string& domain) { return host.find(domain) != std::string::npos; });
|
||||||
|
}
|
||||||
|
|
||||||
static NetDbError GetAddrInfoErrorToNetDbError(GetAddrInfoError result) {
|
static NetDbError GetAddrInfoErrorToNetDbError(GetAddrInfoError result) {
|
||||||
// These combinations have been verified on console (but are not
|
// These combinations have been verified on console (but are not
|
||||||
// exhaustive).
|
// exhaustive).
|
||||||
|
@ -154,7 +167,7 @@ static std::pair<u32, GetAddrInfoError> GetHostByNameRequestImpl(HLERequestConte
|
||||||
// For now, ignore options, which are in input buffer 1 for GetHostByNameRequestWithOptions.
|
// For now, ignore options, which are in input buffer 1 for GetHostByNameRequestWithOptions.
|
||||||
|
|
||||||
// Prevent resolution of Nintendo servers
|
// Prevent resolution of Nintendo servers
|
||||||
if (host.find("srv.nintendo.net") != std::string::npos) {
|
if (IsBlockedHost(host)) {
|
||||||
LOG_WARNING(Network, "Resolution of hostname {} requested, returning EAI_AGAIN", host);
|
LOG_WARNING(Network, "Resolution of hostname {} requested, returning EAI_AGAIN", host);
|
||||||
return {0, GetAddrInfoError::AGAIN};
|
return {0, GetAddrInfoError::AGAIN};
|
||||||
}
|
}
|
||||||
|
@ -271,7 +284,7 @@ static std::pair<u32, GetAddrInfoError> GetAddrInfoRequestImpl(HLERequestContext
|
||||||
const std::string host = Common::StringFromBuffer(host_buffer);
|
const std::string host = Common::StringFromBuffer(host_buffer);
|
||||||
|
|
||||||
// Prevent resolution of Nintendo servers
|
// Prevent resolution of Nintendo servers
|
||||||
if (host.find("srv.nintendo.net") != std::string::npos) {
|
if (IsBlockedHost(host)) {
|
||||||
LOG_WARNING(Network, "Resolution of hostname {} requested, returning EAI_AGAIN", host);
|
LOG_WARNING(Network, "Resolution of hostname {} requested, returning EAI_AGAIN", host);
|
||||||
return {0, GetAddrInfoError::AGAIN};
|
return {0, GetAddrInfoError::AGAIN};
|
||||||
}
|
}
|
||||||
|
@ -359,5 +372,4 @@ void SFDNSRES::ResolverSetOptionRequest(HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push<s32>(0); // bsd errno
|
rb.Push<s32>(0); // bsd errno
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Service::Sockets
|
} // namespace Service::Sockets
|
||||||
|
|
|
@ -39,7 +39,7 @@ endif()
|
||||||
|
|
||||||
add_subdirectory(externals)
|
add_subdirectory(externals)
|
||||||
|
|
||||||
target_link_libraries(qt_common PRIVATE core Qt6::Core SimpleIni::SimpleIni QuaZip::QuaZip frozen::frozen)
|
target_link_libraries(qt_common PRIVATE core Qt6::Core SimpleIni::SimpleIni QuaZip::QuaZip)
|
||||||
|
|
||||||
if (NOT APPLE AND ENABLE_OPENGL)
|
if (NOT APPLE AND ENABLE_OPENGL)
|
||||||
target_compile_definitions(qt_common PUBLIC HAS_OPENGL)
|
target_compile_definitions(qt_common PUBLIC HAS_OPENGL)
|
||||||
|
|
2
src/qt_common/externals/CMakeLists.txt
vendored
2
src/qt_common/externals/CMakeLists.txt
vendored
|
@ -17,4 +17,4 @@ AddJsonPackage(quazip)
|
||||||
|
|
||||||
# frozen
|
# frozen
|
||||||
# TODO(crueter): Qt String Lookup
|
# TODO(crueter): Qt String Lookup
|
||||||
AddJsonPackage(frozen)
|
# AddJsonPackage(frozen)
|
||||||
|
|
|
@ -554,12 +554,16 @@ std::unique_ptr<ComboboxTranslationMap> ComboboxEnumeration(QObject* parent)
|
||||||
PAIR(ScalingFilter, NearestNeighbor, tr("Nearest Neighbor")),
|
PAIR(ScalingFilter, NearestNeighbor, tr("Nearest Neighbor")),
|
||||||
PAIR(ScalingFilter, Bilinear, tr("Bilinear")),
|
PAIR(ScalingFilter, Bilinear, tr("Bilinear")),
|
||||||
PAIR(ScalingFilter, Bicubic, tr("Bicubic")),
|
PAIR(ScalingFilter, Bicubic, tr("Bicubic")),
|
||||||
|
PAIR(ScalingFilter, ZeroTangent, tr("Zero-Tangent")),
|
||||||
|
PAIR(ScalingFilter, BSpline, tr("B-Spline")),
|
||||||
|
PAIR(ScalingFilter, Mitchell, tr("Mitchell")),
|
||||||
PAIR(ScalingFilter, Spline1, tr("Spline-1")),
|
PAIR(ScalingFilter, Spline1, tr("Spline-1")),
|
||||||
PAIR(ScalingFilter, Gaussian, tr("Gaussian")),
|
PAIR(ScalingFilter, Gaussian, tr("Gaussian")),
|
||||||
PAIR(ScalingFilter, Lanczos, tr("Lanczos")),
|
PAIR(ScalingFilter, Lanczos, tr("Lanczos")),
|
||||||
PAIR(ScalingFilter, ScaleForce, tr("ScaleForce")),
|
PAIR(ScalingFilter, ScaleForce, tr("ScaleForce")),
|
||||||
PAIR(ScalingFilter, Fsr, tr("AMD FidelityFX™️ Super Resolution")),
|
PAIR(ScalingFilter, Fsr, tr("AMD FidelityFX™️ Super Resolution")),
|
||||||
PAIR(ScalingFilter, Area, tr("Area")),
|
PAIR(ScalingFilter, Area, tr("Area")),
|
||||||
|
PAIR(ScalingFilter, Mmpx, tr("MMPX")),
|
||||||
}});
|
}});
|
||||||
translations->insert({Settings::EnumMetadata<Settings::AntiAliasing>::Index(),
|
translations->insert({Settings::EnumMetadata<Settings::AntiAliasing>::Index(),
|
||||||
{
|
{
|
||||||
|
|
|
@ -38,6 +38,9 @@ static const std::map<Settings::ScalingFilter, QString> scaling_filter_texts_map
|
||||||
{Settings::ScalingFilter::Bilinear,
|
{Settings::ScalingFilter::Bilinear,
|
||||||
QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "Bilinear"))},
|
QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "Bilinear"))},
|
||||||
{Settings::ScalingFilter::Bicubic, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "Bicubic"))},
|
{Settings::ScalingFilter::Bicubic, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "Bicubic"))},
|
||||||
|
{Settings::ScalingFilter::ZeroTangent, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "Zero-Tangent"))},
|
||||||
|
{Settings::ScalingFilter::BSpline, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "B-Spline"))},
|
||||||
|
{Settings::ScalingFilter::Mitchell, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "Mitchell"))},
|
||||||
{Settings::ScalingFilter::Spline1,
|
{Settings::ScalingFilter::Spline1,
|
||||||
QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "Spline-1"))},
|
QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "Spline-1"))},
|
||||||
{Settings::ScalingFilter::Gaussian,
|
{Settings::ScalingFilter::Gaussian,
|
||||||
|
@ -48,6 +51,7 @@ static const std::map<Settings::ScalingFilter, QString> scaling_filter_texts_map
|
||||||
QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "ScaleForce"))},
|
QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "ScaleForce"))},
|
||||||
{Settings::ScalingFilter::Fsr, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "FSR"))},
|
{Settings::ScalingFilter::Fsr, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "FSR"))},
|
||||||
{Settings::ScalingFilter::Area, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "Area"))},
|
{Settings::ScalingFilter::Area, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "Area"))},
|
||||||
|
{Settings::ScalingFilter::Mmpx, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "MMPX"))},
|
||||||
};
|
};
|
||||||
|
|
||||||
static const std::map<Settings::ConsoleMode, QString> use_docked_mode_texts_map = {
|
static const std::map<Settings::ConsoleMode, QString> use_docked_mode_texts_map = {
|
||||||
|
|
|
@ -246,7 +246,7 @@ add_library(shader_recompiler STATIC
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(shader_recompiler PUBLIC common fmt::fmt sirit SPIRV-Tools::SPIRV-Tools)
|
target_link_libraries(shader_recompiler PUBLIC common fmt::fmt sirit::sirit SPIRV-Tools::SPIRV-Tools)
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
target_compile_options(shader_recompiler PRIVATE
|
target_compile_options(shader_recompiler PRIVATE
|
||||||
|
|
|
@ -333,7 +333,7 @@ target_link_options(video_core PRIVATE ${FFmpeg_LDFLAGS})
|
||||||
add_dependencies(video_core host_shaders)
|
add_dependencies(video_core host_shaders)
|
||||||
target_include_directories(video_core PRIVATE ${HOST_SHADERS_INCLUDE})
|
target_include_directories(video_core PRIVATE ${HOST_SHADERS_INCLUDE})
|
||||||
|
|
||||||
target_link_libraries(video_core PRIVATE sirit)
|
target_link_libraries(video_core PRIVATE sirit::sirit)
|
||||||
|
|
||||||
# Header-only stuff needed by all dependent targets
|
# Header-only stuff needed by all dependent targets
|
||||||
target_link_libraries(video_core PUBLIC Vulkan::UtilityHeaders GPUOpen::VulkanMemoryAllocator)
|
target_link_libraries(video_core PUBLIC Vulkan::UtilityHeaders GPUOpen::VulkanMemoryAllocator)
|
||||||
|
|
|
@ -64,7 +64,6 @@ void MaxwellDMA::Launch() {
|
||||||
// TODO(Subv): Perform more research and implement all features of this engine.
|
// TODO(Subv): Perform more research and implement all features of this engine.
|
||||||
const LaunchDMA& launch = regs.launch_dma;
|
const LaunchDMA& launch = regs.launch_dma;
|
||||||
ASSERT(launch.interrupt_type == LaunchDMA::InterruptType::NONE);
|
ASSERT(launch.interrupt_type == LaunchDMA::InterruptType::NONE);
|
||||||
ASSERT(launch.data_transfer_type == LaunchDMA::DataTransferType::NON_PIPELINED);
|
|
||||||
|
|
||||||
if (launch.multi_line_enable) {
|
if (launch.multi_line_enable) {
|
||||||
const bool is_src_pitch = launch.src_memory_layout == LaunchDMA::MemoryLayout::PITCH;
|
const bool is_src_pitch = launch.src_memory_layout == LaunchDMA::MemoryLayout::PITCH;
|
||||||
|
@ -157,8 +156,6 @@ void MaxwellDMA::Launch() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void MaxwellDMA::CopyBlockLinearToPitch() {
|
void MaxwellDMA::CopyBlockLinearToPitch() {
|
||||||
UNIMPLEMENTED_IF(regs.launch_dma.remap_enable != 0);
|
|
||||||
|
|
||||||
u32 bytes_per_pixel = 1;
|
u32 bytes_per_pixel = 1;
|
||||||
DMA::ImageOperand src_operand;
|
DMA::ImageOperand src_operand;
|
||||||
src_operand.bytes_per_pixel = bytes_per_pixel;
|
src_operand.bytes_per_pixel = bytes_per_pixel;
|
||||||
|
|
|
@ -44,9 +44,13 @@ set(SHADER_FILES
|
||||||
pitch_unswizzle.comp
|
pitch_unswizzle.comp
|
||||||
present_area.frag
|
present_area.frag
|
||||||
present_bicubic.frag
|
present_bicubic.frag
|
||||||
|
present_zero_tangent.frag
|
||||||
|
present_bspline.frag
|
||||||
|
present_mitchell.frag
|
||||||
present_gaussian.frag
|
present_gaussian.frag
|
||||||
present_lanczos.frag
|
present_lanczos.frag
|
||||||
present_spline1.frag
|
present_spline1.frag
|
||||||
|
present_mmpx.frag
|
||||||
queries_prefix_scan_sum.comp
|
queries_prefix_scan_sum.comp
|
||||||
queries_prefix_scan_sum_nosubgroups.comp
|
queries_prefix_scan_sum_nosubgroups.comp
|
||||||
resolve_conditional_render.comp
|
resolve_conditional_render.comp
|
||||||
|
|
|
@ -1,56 +1,37 @@
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#version 460 core
|
#version 460 core
|
||||||
|
|
||||||
|
|
||||||
layout (location = 0) in vec2 frag_tex_coord;
|
layout (location = 0) in vec2 frag_tex_coord;
|
||||||
|
|
||||||
layout (location = 0) out vec4 color;
|
layout (location = 0) out vec4 color;
|
||||||
|
|
||||||
layout (binding = 0) uniform sampler2D color_texture;
|
layout (binding = 0) uniform sampler2D color_texture;
|
||||||
|
vec4 cubic(float x) {
|
||||||
vec4 cubic(float v) {
|
float x2 = x * x;
|
||||||
vec4 n = vec4(1.0, 2.0, 3.0, 4.0) - v;
|
float x3 = x2 * x;
|
||||||
vec4 s = n * n * n;
|
return vec4(1.0, x, x2, x3) * transpose(mat4x4(
|
||||||
float x = s.x;
|
0.0, 2.0, 0.0, 0.0,
|
||||||
float y = s.y - 4.0 * s.x;
|
-1.0, 0.0, 1.0, 0.0,
|
||||||
float z = s.z - 4.0 * s.y + 6.0 * s.x;
|
2.0, -5.0, 4.0, -1.0,
|
||||||
float w = 6.0 - x - y - z;
|
-1.0, 3.0, -3.0, 1.0
|
||||||
return vec4(x, y, z, w) * (1.0 / 6.0);
|
) * (1.0 / 2.0));
|
||||||
}
|
}
|
||||||
|
vec4 textureBicubic(sampler2D samp, vec2 uv) {
|
||||||
vec4 textureBicubic( sampler2D textureSampler, vec2 texCoords ) {
|
vec2 tex_size = vec2(textureSize(samp, 0));
|
||||||
|
vec2 cc_tex = uv * tex_size - 0.5f;
|
||||||
vec2 texSize = textureSize(textureSampler, 0);
|
vec2 fex = cc_tex - floor(cc_tex);
|
||||||
vec2 invTexSize = 1.0 / texSize;
|
vec4 xcubic = cubic(fex.x);
|
||||||
|
vec4 ycubic = cubic(fex.y);
|
||||||
texCoords = texCoords * texSize - 0.5;
|
vec4 c = floor(cc_tex).xxyy + vec2(-0.5f, 1.5f).xyxy;
|
||||||
|
vec4 z = vec4(xcubic.yw, ycubic.yw);
|
||||||
vec2 fxy = fract(texCoords);
|
vec4 s = vec4(xcubic.xz, ycubic.xz) + z;
|
||||||
texCoords -= fxy;
|
vec4 offset = (c + z / s) * (1.0f / tex_size).xxyy;
|
||||||
|
vec2 n = vec2(s.x / (s.x + s.y), s.z / (s.z + s.w));
|
||||||
vec4 xcubic = cubic(fxy.x);
|
return mix(
|
||||||
vec4 ycubic = cubic(fxy.y);
|
mix(texture(samp, offset.yw), texture(samp, offset.xw), n.x),
|
||||||
|
mix(texture(samp, offset.yz), texture(samp, offset.xz), n.x),
|
||||||
vec4 c = texCoords.xxyy + vec2(-0.5, +1.5).xyxy;
|
n.y);
|
||||||
|
|
||||||
vec4 s = vec4(xcubic.xz + xcubic.yw, ycubic.xz + ycubic.yw);
|
|
||||||
vec4 offset = c + vec4(xcubic.yw, ycubic.yw) / s;
|
|
||||||
|
|
||||||
offset *= invTexSize.xxyy;
|
|
||||||
|
|
||||||
vec4 sample0 = texture(textureSampler, offset.xz);
|
|
||||||
vec4 sample1 = texture(textureSampler, offset.yz);
|
|
||||||
vec4 sample2 = texture(textureSampler, offset.xw);
|
|
||||||
vec4 sample3 = texture(textureSampler, offset.yw);
|
|
||||||
|
|
||||||
float sx = s.x / (s.x + s.y);
|
|
||||||
float sy = s.z / (s.z + s.w);
|
|
||||||
|
|
||||||
return mix(mix(sample3, sample2, sx), mix(sample1, sample0, sx), sy);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
color = textureBicubic(color_texture, frag_tex_coord);
|
color = textureBicubic(color_texture, frag_tex_coord);
|
||||||
}
|
}
|
||||||
|
|
35
src/video_core/host_shaders/present_bspline.frag
Normal file
35
src/video_core/host_shaders/present_bspline.frag
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#version 460 core
|
||||||
|
layout (location = 0) in vec2 frag_tex_coord;
|
||||||
|
layout (location = 0) out vec4 color;
|
||||||
|
layout (binding = 0) uniform sampler2D color_texture;
|
||||||
|
vec4 cubic(float x) {
|
||||||
|
float x2 = x * x;
|
||||||
|
float x3 = x2 * x;
|
||||||
|
return vec4(1.0, x, x2, x3) * transpose(mat4x4(
|
||||||
|
1.0, 4.0, 1.0, 0.0,
|
||||||
|
-3.0, 0.0, 3.0, 0.0,
|
||||||
|
3.0, -6.0, 3.0, 0.0,
|
||||||
|
-1.0, 3.0, -3.0, 1.0
|
||||||
|
) * (1.0 / 6.0));
|
||||||
|
}
|
||||||
|
vec4 textureBicubic(sampler2D samp, vec2 uv) {
|
||||||
|
vec2 tex_size = vec2(textureSize(samp, 0));
|
||||||
|
vec2 cc_tex = uv * tex_size - 0.5f;
|
||||||
|
vec2 fex = cc_tex - floor(cc_tex);
|
||||||
|
vec4 xcubic = cubic(fex.x);
|
||||||
|
vec4 ycubic = cubic(fex.y);
|
||||||
|
vec4 c = floor(cc_tex).xxyy + vec2(-0.5f, 1.5f).xyxy;
|
||||||
|
vec4 z = vec4(xcubic.yw, ycubic.yw);
|
||||||
|
vec4 s = vec4(xcubic.xz, ycubic.xz) + z;
|
||||||
|
vec4 offset = (c + z / s) * (1.0f / tex_size).xxyy;
|
||||||
|
vec2 n = vec2(s.x / (s.x + s.y), s.z / (s.z + s.w));
|
||||||
|
return mix(
|
||||||
|
mix(texture(samp, offset.yw), texture(samp, offset.xw), n.x),
|
||||||
|
mix(texture(samp, offset.yz), texture(samp, offset.xz), n.x),
|
||||||
|
n.y);
|
||||||
|
}
|
||||||
|
void main() {
|
||||||
|
color = textureBicubic(color_texture, frag_tex_coord);
|
||||||
|
}
|
35
src/video_core/host_shaders/present_mitchell.frag
Normal file
35
src/video_core/host_shaders/present_mitchell.frag
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#version 460 core
|
||||||
|
layout (location = 0) in vec2 frag_tex_coord;
|
||||||
|
layout (location = 0) out vec4 color;
|
||||||
|
layout (binding = 0) uniform sampler2D color_texture;
|
||||||
|
vec4 cubic(float x) {
|
||||||
|
float x2 = x * x;
|
||||||
|
float x3 = x2 * x;
|
||||||
|
return vec4(1.0, x, x2, x3) * transpose(mat4x4(
|
||||||
|
1.0, 16.0, 1.0, 0.0,
|
||||||
|
-9.0, 0.0, 9.0, 0.0,
|
||||||
|
15.0, -36.0, 27.0, -6.0,
|
||||||
|
-7.0, 21.0, -21.0, 7.0
|
||||||
|
) * (1.0 / 18.0));
|
||||||
|
}
|
||||||
|
vec4 textureBicubic(sampler2D samp, vec2 uv) {
|
||||||
|
vec2 tex_size = vec2(textureSize(samp, 0));
|
||||||
|
vec2 cc_tex = uv * tex_size - 0.5f;
|
||||||
|
vec2 fex = cc_tex - floor(cc_tex);
|
||||||
|
vec4 xcubic = cubic(fex.x);
|
||||||
|
vec4 ycubic = cubic(fex.y);
|
||||||
|
vec4 c = floor(cc_tex).xxyy + vec2(-0.5f, 1.5f).xyxy;
|
||||||
|
vec4 z = vec4(xcubic.yw, ycubic.yw);
|
||||||
|
vec4 s = vec4(xcubic.xz, ycubic.xz) + z;
|
||||||
|
vec4 offset = (c + z / s) * (1.0f / tex_size).xxyy;
|
||||||
|
vec2 n = vec2(s.x / (s.x + s.y), s.z / (s.z + s.w));
|
||||||
|
return mix(
|
||||||
|
mix(texture(samp, offset.yw), texture(samp, offset.xw), n.x),
|
||||||
|
mix(texture(samp, offset.yz), texture(samp, offset.xz), n.x),
|
||||||
|
n.y);
|
||||||
|
}
|
||||||
|
void main() {
|
||||||
|
color = textureBicubic(color_texture, frag_tex_coord);
|
||||||
|
}
|
131
src/video_core/host_shaders/present_mmpx.frag
Normal file
131
src/video_core/host_shaders/present_mmpx.frag
Normal file
|
@ -0,0 +1,131 @@
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
// Copyright 2023 Citra Emulator Project
|
||||||
|
// Licensed under GPLv2 or any later version
|
||||||
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#version 460 core
|
||||||
|
layout(location = 0) in vec2 tex_coord;
|
||||||
|
layout(location = 0) out vec4 frag_color;
|
||||||
|
layout(binding = 0) uniform sampler2D tex;
|
||||||
|
|
||||||
|
#define src(x, y) texture(tex, coord + vec2(x, y) * 1.0 / source_size)
|
||||||
|
|
||||||
|
float luma(vec4 col) {
|
||||||
|
return dot(col.rgb, vec3(0.2126, 0.7152, 0.0722)) * (1.0 - col.a);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool same(vec4 B, vec4 A0) {
|
||||||
|
return all(equal(B, A0));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool notsame(vec4 B, vec4 A0) {
|
||||||
|
return any(notEqual(B, A0));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool all_eq2(vec4 B, vec4 A0, vec4 A1) {
|
||||||
|
return (same(B,A0) && same(B,A1));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool all_eq3(vec4 B, vec4 A0, vec4 A1, vec4 A2) {
|
||||||
|
return (same(B,A0) && same(B,A1) && same(B,A2));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool all_eq4(vec4 B, vec4 A0, vec4 A1, vec4 A2, vec4 A3) {
|
||||||
|
return (same(B,A0) && same(B,A1) && same(B,A2) && same(B,A3));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool any_eq3(vec4 B, vec4 A0, vec4 A1, vec4 A2) {
|
||||||
|
return (same(B,A0) || same(B,A1) || same(B,A2));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool none_eq2(vec4 B, vec4 A0, vec4 A1) {
|
||||||
|
return (notsame(B,A0) && notsame(B,A1));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool none_eq4(vec4 B, vec4 A0, vec4 A1, vec4 A2, vec4 A3) {
|
||||||
|
return (notsame(B,A0) && notsame(B,A1) && notsame(B,A2) && notsame(B,A3));
|
||||||
|
}
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec2 source_size = vec2(textureSize(tex, 0));
|
||||||
|
vec2 pos = fract(tex_coord * source_size) - vec2(0.5, 0.5);
|
||||||
|
vec2 coord = tex_coord - pos / source_size;
|
||||||
|
|
||||||
|
vec4 E = src(0.0,0.0);
|
||||||
|
|
||||||
|
vec4 A = src(-1.0,-1.0);
|
||||||
|
vec4 B = src(0.0,-1.0);
|
||||||
|
vec4 C = src(1.0,-1.0);
|
||||||
|
|
||||||
|
vec4 D = src(-1.0,0.0);
|
||||||
|
vec4 F = src(1.0,0.0);
|
||||||
|
|
||||||
|
vec4 G = src(-1.0,1.0);
|
||||||
|
vec4 H = src(0.0,1.0);
|
||||||
|
vec4 I = src(1.0,1.0);
|
||||||
|
|
||||||
|
vec4 J = E;
|
||||||
|
vec4 K = E;
|
||||||
|
vec4 L = E;
|
||||||
|
vec4 M = E;
|
||||||
|
|
||||||
|
frag_color = E;
|
||||||
|
|
||||||
|
if(same(E,A) && same(E,B) && same(E,C) && same(E,D) && same(E,F) && same(E,G) && same(E,H) && same(E,I)) return;
|
||||||
|
|
||||||
|
vec4 P = src(0.0,2.0);
|
||||||
|
vec4 Q = src(-2.0,0.0);
|
||||||
|
vec4 R = src(2.0,0.0);
|
||||||
|
vec4 S = src(0.0,2.0);
|
||||||
|
|
||||||
|
float Bl = luma(B);
|
||||||
|
float Dl = luma(D);
|
||||||
|
float El = luma(E);
|
||||||
|
float Fl = luma(F);
|
||||||
|
float Hl = luma(H);
|
||||||
|
|
||||||
|
if (((same(D,B) && notsame(D,H) && notsame(D,F))) && ((El>=Dl) || same(E,A)) && any_eq3(E,A,C,G) && ((El<Dl) || notsame(A,D) || notsame(E,P) || notsame(E,Q))) J=mix(D, J, 0.5);
|
||||||
|
if (((same(B,F) && notsame(B,D) && notsame(B,H))) && ((El>=Bl) || same(E,C)) && any_eq3(E,A,C,I) && ((El<Bl) || notsame(C,B) || notsame(E,P) || notsame(E,R))) K=mix(B, K, 0.5);
|
||||||
|
if (((same(H,D) && notsame(H,F) && notsame(H,B))) && ((El>=Hl) || same(E,G)) && any_eq3(E,A,G,I) && ((El<Hl) || notsame(G,H) || notsame(E,S) || notsame(E,Q))) L=mix(H, L, 0.5);
|
||||||
|
if (((same(F,H) && notsame(F,B) && notsame(F,D))) && ((El>=Fl) || same(E,I)) && any_eq3(E,C,G,I) && ((El<Fl) || notsame(I,H) || notsame(E,R) || notsame(E,S))) M=mix(F, M, 0.5);
|
||||||
|
|
||||||
|
if ((notsame(E,F) && all_eq4(E,C,I,D,Q) && all_eq2(F,B,H)) && notsame(F,src(3.0,0.0))) {M=mix(M, F, 0.5); K=mix(K, M, 0.5);};
|
||||||
|
if ((notsame(E,D) && all_eq4(E,A,G,F,R) && all_eq2(D,B,H)) && notsame(D,src(-3.0,0.0))) {L=mix(L, D, 0.5); J=mix(J, L, 0.5);};
|
||||||
|
if ((notsame(E,H) && all_eq4(E,G,I,B,P) && all_eq2(H,D,F)) && notsame(H,src(0.0,3.0))) {M=mix(M, H, 0.5); L=mix(L, M, 0.5);};
|
||||||
|
if ((notsame(E,B) && all_eq4(E,A,C,H,S) && all_eq2(B,D,F)) && notsame(B,src(0.0,-3.0))) {K=mix(K, B, 0.5); J=mix(J, K, 0.5);};
|
||||||
|
|
||||||
|
if ((Bl<El) && all_eq4(E,G,H,I,S) && none_eq4(E,A,D,C,F)) {K=mix(K, B, 0.5); J=mix(J, K, 0.5);}
|
||||||
|
if ((Hl<El) && all_eq4(E,A,B,C,P) && none_eq4(E,D,G,I,F)) {M=mix(M, H, 0.5); L=mix(L, M, 0.5);}
|
||||||
|
if ((Fl<El) && all_eq4(E,A,D,G,Q) && none_eq4(E,B,C,I,H)) {M=mix(M, F, 0.5); K=mix(K, M, 0.5);}
|
||||||
|
if ((Dl<El) && all_eq4(E,C,F,I,R) && none_eq4(E,B,A,G,H)) {L=mix(L, D, 0.5); J=mix(J, L, 0.5);}
|
||||||
|
|
||||||
|
if (notsame(H,B)) {
|
||||||
|
if (notsame(H,A) && notsame(H,E) && notsame(H,C)) {
|
||||||
|
if (all_eq3(H,G,F,R) && none_eq2(H,D,src(2.0,-1.0))) L=mix(M, L, 0.5);
|
||||||
|
if (all_eq3(H,I,D,Q) && none_eq2(H,F,src(-2.0,-1.0))) M=mix(L, M, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (notsame(B,I) && notsame(B,G) && notsame(B,E)) {
|
||||||
|
if (all_eq3(B,A,F,R) && none_eq2(B,D,src(2.0,1.0))) J=mix(K, L, 0.5);
|
||||||
|
if (all_eq3(B,C,D,Q) && none_eq2(B,F,src(-2.0,1.0))) K=mix(J, K, 0.5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (notsame(F,D)) {
|
||||||
|
if (notsame(D,I) && notsame(D,E) && notsame(D,C)) {
|
||||||
|
if (all_eq3(D,A,H,S) && none_eq2(D,B,src(1.0,2.0))) J=mix(L, J, 0.5);
|
||||||
|
if (all_eq3(D,G,B,P) && none_eq2(D,H,src(1.0,2.0))) L=mix(J, L, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (notsame(F,E) && notsame(F,A) && notsame(F,G)) {
|
||||||
|
if (all_eq3(F,C,H,S) && none_eq2(F,B,src(-1.0,2.0))) K=mix(M, K, 0.5);
|
||||||
|
if (all_eq3(F,I,B,P) && none_eq2(F,H,src(-1.0,-2.0))) M=mix(K, M, 0.5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
vec2 a = fract(tex_coord * source_size);
|
||||||
|
vec4 colour = (a.x < 0.5) ? (a.y < 0.5 ? J : L) : (a.y < 0.5 ? K : M);
|
||||||
|
frag_color = colour;
|
||||||
|
}
|
35
src/video_core/host_shaders/present_zero_tangent.frag
Normal file
35
src/video_core/host_shaders/present_zero_tangent.frag
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#version 460 core
|
||||||
|
layout (location = 0) in vec2 frag_tex_coord;
|
||||||
|
layout (location = 0) out vec4 color;
|
||||||
|
layout (binding = 0) uniform sampler2D color_texture;
|
||||||
|
vec4 cubic(float x) {
|
||||||
|
float x2 = x * x;
|
||||||
|
float x3 = x2 * x;
|
||||||
|
return vec4(1.0, x, x2, x3) * transpose(mat4x4(
|
||||||
|
0.0, 2.0, 0.0, 0.0,
|
||||||
|
-2.0, 0.0, 2.0, 0.0,
|
||||||
|
4.0, -4.0, 2.0, -2.0,
|
||||||
|
-2.0, 2.0, -2.0, 1.0
|
||||||
|
) * (1.0 / 2.0));
|
||||||
|
}
|
||||||
|
vec4 textureBicubic(sampler2D samp, vec2 uv) {
|
||||||
|
vec2 tex_size = vec2(textureSize(samp, 0));
|
||||||
|
vec2 cc_tex = uv * tex_size - 0.5f;
|
||||||
|
vec2 fex = cc_tex - floor(cc_tex);
|
||||||
|
vec4 xcubic = cubic(fex.x);
|
||||||
|
vec4 ycubic = cubic(fex.y);
|
||||||
|
vec4 c = floor(cc_tex).xxyy + vec2(-0.5f, 1.5f).xyxy;
|
||||||
|
vec4 z = vec4(xcubic.yw, ycubic.yw);
|
||||||
|
vec4 s = vec4(xcubic.xz, ycubic.xz) + z;
|
||||||
|
vec4 offset = (c + z / s) * (1.0f / tex_size).xxyy;
|
||||||
|
vec2 n = vec2(s.x / (s.x + s.y), s.z / (s.z + s.w));
|
||||||
|
return mix(
|
||||||
|
mix(texture(samp, offset.yw), texture(samp, offset.xw), n.x),
|
||||||
|
mix(texture(samp, offset.yz), texture(samp, offset.xz), n.x),
|
||||||
|
n.y);
|
||||||
|
}
|
||||||
|
void main() {
|
||||||
|
color = textureBicubic(color_texture, frag_tex_coord);
|
||||||
|
}
|
|
@ -8,6 +8,7 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include "common/settings.h"
|
#include "common/settings.h"
|
||||||
|
#include "common/settings_enums.h"
|
||||||
#include "video_core/present.h"
|
#include "video_core/present.h"
|
||||||
#include "video_core/renderer_opengl/gl_blit_screen.h"
|
#include "video_core/renderer_opengl/gl_blit_screen.h"
|
||||||
#include "video_core/renderer_opengl/gl_state_tracker.h"
|
#include "video_core/renderer_opengl/gl_state_tracker.h"
|
||||||
|
@ -86,6 +87,15 @@ void BlitScreen::CreateWindowAdapt() {
|
||||||
case Settings::ScalingFilter::Bicubic:
|
case Settings::ScalingFilter::Bicubic:
|
||||||
window_adapt = MakeBicubic(device);
|
window_adapt = MakeBicubic(device);
|
||||||
break;
|
break;
|
||||||
|
case Settings::ScalingFilter::ZeroTangent:
|
||||||
|
window_adapt = MakeZeroTangent(device);
|
||||||
|
break;
|
||||||
|
case Settings::ScalingFilter::BSpline:
|
||||||
|
window_adapt = MakeBSpline(device);
|
||||||
|
break;
|
||||||
|
case Settings::ScalingFilter::Mitchell:
|
||||||
|
window_adapt = MakeMitchell(device);
|
||||||
|
break;
|
||||||
case Settings::ScalingFilter::Gaussian:
|
case Settings::ScalingFilter::Gaussian:
|
||||||
window_adapt = MakeGaussian(device);
|
window_adapt = MakeGaussian(device);
|
||||||
break;
|
break;
|
||||||
|
@ -101,6 +111,9 @@ void BlitScreen::CreateWindowAdapt() {
|
||||||
case Settings::ScalingFilter::Area:
|
case Settings::ScalingFilter::Area:
|
||||||
window_adapt = MakeArea(device);
|
window_adapt = MakeArea(device);
|
||||||
break;
|
break;
|
||||||
|
case Settings::ScalingFilter::Mmpx:
|
||||||
|
window_adapt = MakeMmpx(device);
|
||||||
|
break;
|
||||||
case Settings::ScalingFilter::Fsr:
|
case Settings::ScalingFilter::Fsr:
|
||||||
case Settings::ScalingFilter::Bilinear:
|
case Settings::ScalingFilter::Bilinear:
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -14,6 +14,10 @@
|
||||||
#include "video_core/host_shaders/present_gaussian_frag.h"
|
#include "video_core/host_shaders/present_gaussian_frag.h"
|
||||||
#include "video_core/host_shaders/present_lanczos_frag.h"
|
#include "video_core/host_shaders/present_lanczos_frag.h"
|
||||||
#include "video_core/host_shaders/present_spline1_frag.h"
|
#include "video_core/host_shaders/present_spline1_frag.h"
|
||||||
|
#include "video_core/host_shaders/present_mitchell_frag.h"
|
||||||
|
#include "video_core/host_shaders/present_bspline_frag.h"
|
||||||
|
#include "video_core/host_shaders/present_zero_tangent_frag.h"
|
||||||
|
#include "video_core/host_shaders/present_mmpx_frag.h"
|
||||||
#include "video_core/renderer_opengl/present/filters.h"
|
#include "video_core/renderer_opengl/present/filters.h"
|
||||||
#include "video_core/renderer_opengl/present/util.h"
|
#include "video_core/renderer_opengl/present/util.h"
|
||||||
|
|
||||||
|
@ -39,6 +43,21 @@ std::unique_ptr<WindowAdaptPass> MakeBicubic(const Device& device) {
|
||||||
HostShaders::PRESENT_BICUBIC_FRAG);
|
HostShaders::PRESENT_BICUBIC_FRAG);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::unique_ptr<WindowAdaptPass> MakeMitchell(const Device& device) {
|
||||||
|
return std::make_unique<WindowAdaptPass>(device, CreateBilinearSampler(),
|
||||||
|
HostShaders::PRESENT_MITCHELL_FRAG);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::unique_ptr<WindowAdaptPass> MakeZeroTangent(const Device& device) {
|
||||||
|
return std::make_unique<WindowAdaptPass>(device, CreateBilinearSampler(),
|
||||||
|
HostShaders::PRESENT_ZERO_TANGENT_FRAG);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::unique_ptr<WindowAdaptPass> MakeBSpline(const Device& device) {
|
||||||
|
return std::make_unique<WindowAdaptPass>(device, CreateBilinearSampler(),
|
||||||
|
HostShaders::PRESENT_BSPLINE_FRAG);
|
||||||
|
}
|
||||||
|
|
||||||
std::unique_ptr<WindowAdaptPass> MakeGaussian(const Device& device) {
|
std::unique_ptr<WindowAdaptPass> MakeGaussian(const Device& device) {
|
||||||
return std::make_unique<WindowAdaptPass>(device, CreateBilinearSampler(),
|
return std::make_unique<WindowAdaptPass>(device, CreateBilinearSampler(),
|
||||||
HostShaders::PRESENT_GAUSSIAN_FRAG);
|
HostShaders::PRESENT_GAUSSIAN_FRAG);
|
||||||
|
@ -60,4 +79,9 @@ std::unique_ptr<WindowAdaptPass> MakeArea(const Device& device) {
|
||||||
HostShaders::PRESENT_AREA_FRAG);
|
HostShaders::PRESENT_AREA_FRAG);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::unique_ptr<WindowAdaptPass> MakeMmpx(const Device& device) {
|
||||||
|
return std::make_unique<WindowAdaptPass>(device, CreateNearestNeighborSampler(),
|
||||||
|
HostShaders::PRESENT_MMPX_FRAG);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace OpenGL
|
} // namespace OpenGL
|
||||||
|
|
|
@ -17,10 +17,14 @@ namespace OpenGL {
|
||||||
std::unique_ptr<WindowAdaptPass> MakeNearestNeighbor(const Device& device);
|
std::unique_ptr<WindowAdaptPass> MakeNearestNeighbor(const Device& device);
|
||||||
std::unique_ptr<WindowAdaptPass> MakeBilinear(const Device& device);
|
std::unique_ptr<WindowAdaptPass> MakeBilinear(const Device& device);
|
||||||
std::unique_ptr<WindowAdaptPass> MakeBicubic(const Device& device);
|
std::unique_ptr<WindowAdaptPass> MakeBicubic(const Device& device);
|
||||||
|
std::unique_ptr<WindowAdaptPass> MakeZeroTangent(const Device& device);
|
||||||
|
std::unique_ptr<WindowAdaptPass> MakeMitchell(const Device& device);
|
||||||
|
std::unique_ptr<WindowAdaptPass> MakeBSpline(const Device& device);
|
||||||
std::unique_ptr<WindowAdaptPass> MakeGaussian(const Device& device);
|
std::unique_ptr<WindowAdaptPass> MakeGaussian(const Device& device);
|
||||||
std::unique_ptr<WindowAdaptPass> MakeSpline1(const Device& device);
|
std::unique_ptr<WindowAdaptPass> MakeSpline1(const Device& device);
|
||||||
std::unique_ptr<WindowAdaptPass> MakeLanczos(const Device& device);
|
std::unique_ptr<WindowAdaptPass> MakeLanczos(const Device& device);
|
||||||
std::unique_ptr<WindowAdaptPass> MakeScaleForce(const Device& device);
|
std::unique_ptr<WindowAdaptPass> MakeScaleForce(const Device& device);
|
||||||
std::unique_ptr<WindowAdaptPass> MakeArea(const Device& device);
|
std::unique_ptr<WindowAdaptPass> MakeArea(const Device& device);
|
||||||
|
std::unique_ptr<WindowAdaptPass> MakeMmpx(const Device& device);
|
||||||
|
|
||||||
} // namespace OpenGL
|
} // namespace OpenGL
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#include <vulkan/vulkan_core.h>
|
||||||
|
#include "common/assert.h"
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
|
|
||||||
#include "video_core/host_shaders/present_area_frag_spv.h"
|
#include "video_core/host_shaders/present_area_frag_spv.h"
|
||||||
|
@ -14,6 +16,10 @@
|
||||||
#include "video_core/host_shaders/present_gaussian_frag_spv.h"
|
#include "video_core/host_shaders/present_gaussian_frag_spv.h"
|
||||||
#include "video_core/host_shaders/present_lanczos_frag_spv.h"
|
#include "video_core/host_shaders/present_lanczos_frag_spv.h"
|
||||||
#include "video_core/host_shaders/present_spline1_frag_spv.h"
|
#include "video_core/host_shaders/present_spline1_frag_spv.h"
|
||||||
|
#include "video_core/host_shaders/present_mitchell_frag_spv.h"
|
||||||
|
#include "video_core/host_shaders/present_bspline_frag_spv.h"
|
||||||
|
#include "video_core/host_shaders/present_zero_tangent_frag_spv.h"
|
||||||
|
#include "video_core/host_shaders/present_mmpx_frag_spv.h"
|
||||||
#include "video_core/host_shaders/vulkan_present_frag_spv.h"
|
#include "video_core/host_shaders/vulkan_present_frag_spv.h"
|
||||||
#include "video_core/host_shaders/vulkan_present_scaleforce_fp16_frag_spv.h"
|
#include "video_core/host_shaders/vulkan_present_scaleforce_fp16_frag_spv.h"
|
||||||
#include "video_core/host_shaders/vulkan_present_scaleforce_fp32_frag_spv.h"
|
#include "video_core/host_shaders/vulkan_present_scaleforce_fp32_frag_spv.h"
|
||||||
|
@ -52,13 +58,28 @@ std::unique_ptr<WindowAdaptPass> MakeSpline1(const Device& device, VkFormat fram
|
||||||
BuildShader(device, PRESENT_SPLINE1_FRAG_SPV));
|
BuildShader(device, PRESENT_SPLINE1_FRAG_SPV));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<WindowAdaptPass> MakeBicubic(const Device& device, VkFormat frame_format) {
|
std::unique_ptr<WindowAdaptPass> MakeBicubic(const Device& device, VkFormat frame_format, VkCubicFilterWeightsQCOM qcom_weights) {
|
||||||
// No need for handrolled shader -- if the VK impl can do it for us ;)
|
// No need for handrolled shader -- if the VK impl can do it for us ;)
|
||||||
if (device.IsExtFilterCubicSupported())
|
// Catmull-Rom is default bicubic for all implementations...
|
||||||
return std::make_unique<WindowAdaptPass>(device, frame_format, CreateCubicSampler(device),
|
if (device.IsExtFilterCubicSupported() && (device.IsQcomFilterCubicWeightsSupported() || qcom_weights == VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM)) {
|
||||||
BuildShader(device, VULKAN_PRESENT_FRAG_SPV));
|
return std::make_unique<WindowAdaptPass>(device, frame_format, CreateCubicSampler(device,
|
||||||
return std::make_unique<WindowAdaptPass>(device, frame_format, CreateBilinearSampler(device),
|
qcom_weights), BuildShader(device, VULKAN_PRESENT_FRAG_SPV));
|
||||||
BuildShader(device, PRESENT_BICUBIC_FRAG_SPV));
|
} else {
|
||||||
|
return std::make_unique<WindowAdaptPass>(device, frame_format, CreateBilinearSampler(device), [&](){
|
||||||
|
switch (qcom_weights) {
|
||||||
|
case VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM:
|
||||||
|
return BuildShader(device, PRESENT_BICUBIC_FRAG_SPV);
|
||||||
|
case VK_CUBIC_FILTER_WEIGHTS_ZERO_TANGENT_CARDINAL_QCOM:
|
||||||
|
return BuildShader(device, PRESENT_ZERO_TANGENT_FRAG_SPV);
|
||||||
|
case VK_CUBIC_FILTER_WEIGHTS_B_SPLINE_QCOM:
|
||||||
|
return BuildShader(device, PRESENT_BSPLINE_FRAG_SPV);
|
||||||
|
case VK_CUBIC_FILTER_WEIGHTS_MITCHELL_NETRAVALI_QCOM:
|
||||||
|
return BuildShader(device, PRESENT_MITCHELL_FRAG_SPV);
|
||||||
|
default:
|
||||||
|
UNREACHABLE();
|
||||||
|
}
|
||||||
|
}());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<WindowAdaptPass> MakeGaussian(const Device& device, VkFormat frame_format) {
|
std::unique_ptr<WindowAdaptPass> MakeGaussian(const Device& device, VkFormat frame_format) {
|
||||||
|
@ -81,4 +102,9 @@ std::unique_ptr<WindowAdaptPass> MakeArea(const Device& device, VkFormat frame_f
|
||||||
BuildShader(device, PRESENT_AREA_FRAG_SPV));
|
BuildShader(device, PRESENT_AREA_FRAG_SPV));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::unique_ptr<WindowAdaptPass> MakeMmpx(const Device& device, VkFormat frame_format) {
|
||||||
|
return std::make_unique<WindowAdaptPass>(device, frame_format, CreateNearestNeighborSampler(device),
|
||||||
|
BuildShader(device, PRESENT_MMPX_FRAG_SPV));
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Vulkan
|
} // namespace Vulkan
|
||||||
|
|
|
@ -17,11 +17,12 @@ class MemoryAllocator;
|
||||||
|
|
||||||
std::unique_ptr<WindowAdaptPass> MakeNearestNeighbor(const Device& device, VkFormat frame_format);
|
std::unique_ptr<WindowAdaptPass> MakeNearestNeighbor(const Device& device, VkFormat frame_format);
|
||||||
std::unique_ptr<WindowAdaptPass> MakeBilinear(const Device& device, VkFormat frame_format);
|
std::unique_ptr<WindowAdaptPass> MakeBilinear(const Device& device, VkFormat frame_format);
|
||||||
std::unique_ptr<WindowAdaptPass> MakeBicubic(const Device& device, VkFormat frame_format);
|
std::unique_ptr<WindowAdaptPass> MakeBicubic(const Device& device, VkFormat frame_format, VkCubicFilterWeightsQCOM qcom_weights);
|
||||||
std::unique_ptr<WindowAdaptPass> MakeSpline1(const Device& device, VkFormat frame_format);
|
std::unique_ptr<WindowAdaptPass> MakeSpline1(const Device& device, VkFormat frame_format);
|
||||||
std::unique_ptr<WindowAdaptPass> MakeGaussian(const Device& device, VkFormat frame_format);
|
std::unique_ptr<WindowAdaptPass> MakeGaussian(const Device& device, VkFormat frame_format);
|
||||||
std::unique_ptr<WindowAdaptPass> MakeLanczos(const Device& device, VkFormat frame_format);
|
std::unique_ptr<WindowAdaptPass> MakeLanczos(const Device& device, VkFormat frame_format);
|
||||||
std::unique_ptr<WindowAdaptPass> MakeScaleForce(const Device& device, VkFormat frame_format);
|
std::unique_ptr<WindowAdaptPass> MakeScaleForce(const Device& device, VkFormat frame_format);
|
||||||
std::unique_ptr<WindowAdaptPass> MakeArea(const Device& device, VkFormat frame_format);
|
std::unique_ptr<WindowAdaptPass> MakeArea(const Device& device, VkFormat frame_format);
|
||||||
|
std::unique_ptr<WindowAdaptPass> MakeMmpx(const Device& device, VkFormat frame_format);
|
||||||
|
|
||||||
} // namespace Vulkan
|
} // namespace Vulkan
|
||||||
|
|
|
@ -624,8 +624,8 @@ vk::Sampler CreateNearestNeighborSampler(const Device& device) {
|
||||||
return device.GetLogical().CreateSampler(ci_nn);
|
return device.GetLogical().CreateSampler(ci_nn);
|
||||||
}
|
}
|
||||||
|
|
||||||
vk::Sampler CreateCubicSampler(const Device& device) {
|
vk::Sampler CreateCubicSampler(const Device& device, VkCubicFilterWeightsQCOM qcom_weights) {
|
||||||
const VkSamplerCreateInfo ci_nn{
|
VkSamplerCreateInfo ci_nn{
|
||||||
.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO,
|
.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO,
|
||||||
.pNext = nullptr,
|
.pNext = nullptr,
|
||||||
.flags = 0,
|
.flags = 0,
|
||||||
|
@ -645,7 +645,14 @@ vk::Sampler CreateCubicSampler(const Device& device) {
|
||||||
.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK,
|
.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK,
|
||||||
.unnormalizedCoordinates = VK_FALSE,
|
.unnormalizedCoordinates = VK_FALSE,
|
||||||
};
|
};
|
||||||
|
const VkSamplerCubicWeightsCreateInfoQCOM ci_qcom_nn{
|
||||||
|
.sType = VK_STRUCTURE_TYPE_SAMPLER_CUBIC_WEIGHTS_CREATE_INFO_QCOM,
|
||||||
|
.pNext = nullptr,
|
||||||
|
.cubicWeights = qcom_weights
|
||||||
|
};
|
||||||
|
// If not specified, assume Catmull-Rom
|
||||||
|
if (qcom_weights != VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM)
|
||||||
|
ci_nn.pNext = &ci_qcom_nn;
|
||||||
return device.GetLogical().CreateSampler(ci_nn);
|
return device.GetLogical().CreateSampler(ci_nn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ VkWriteDescriptorSet CreateWriteDescriptorSet(std::vector<VkDescriptorImageInfo>
|
||||||
VkDescriptorSet set, u32 binding);
|
VkDescriptorSet set, u32 binding);
|
||||||
vk::Sampler CreateBilinearSampler(const Device& device);
|
vk::Sampler CreateBilinearSampler(const Device& device);
|
||||||
vk::Sampler CreateNearestNeighborSampler(const Device& device);
|
vk::Sampler CreateNearestNeighborSampler(const Device& device);
|
||||||
vk::Sampler CreateCubicSampler(const Device& device);
|
vk::Sampler CreateCubicSampler(const Device& device, VkCubicFilterWeightsQCOM qcom_weights);
|
||||||
|
|
||||||
void BeginRenderPass(vk::CommandBuffer& cmdbuf, VkRenderPass render_pass, VkFramebuffer framebuffer,
|
void BeginRenderPass(vk::CommandBuffer& cmdbuf, VkRenderPass render_pass, VkFramebuffer framebuffer,
|
||||||
VkExtent2D extent);
|
VkExtent2D extent);
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#include <vulkan/vulkan_core.h>
|
||||||
#include "video_core/framebuffer_config.h"
|
#include "video_core/framebuffer_config.h"
|
||||||
#include "video_core/present.h"
|
#include "video_core/present.h"
|
||||||
#include "video_core/renderer_vulkan/present/filters.h"
|
#include "video_core/renderer_vulkan/present/filters.h"
|
||||||
|
@ -41,7 +42,16 @@ void BlitScreen::SetWindowAdaptPass() {
|
||||||
window_adapt = MakeNearestNeighbor(device, swapchain_view_format);
|
window_adapt = MakeNearestNeighbor(device, swapchain_view_format);
|
||||||
break;
|
break;
|
||||||
case Settings::ScalingFilter::Bicubic:
|
case Settings::ScalingFilter::Bicubic:
|
||||||
window_adapt = MakeBicubic(device, swapchain_view_format);
|
window_adapt = MakeBicubic(device, swapchain_view_format, VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM);
|
||||||
|
break;
|
||||||
|
case Settings::ScalingFilter::ZeroTangent:
|
||||||
|
window_adapt = MakeBicubic(device, swapchain_view_format, VK_CUBIC_FILTER_WEIGHTS_ZERO_TANGENT_CARDINAL_QCOM);
|
||||||
|
break;
|
||||||
|
case Settings::ScalingFilter::BSpline:
|
||||||
|
window_adapt = MakeBicubic(device, swapchain_view_format, VK_CUBIC_FILTER_WEIGHTS_B_SPLINE_QCOM);
|
||||||
|
break;
|
||||||
|
case Settings::ScalingFilter::Mitchell:
|
||||||
|
window_adapt = MakeBicubic(device, swapchain_view_format, VK_CUBIC_FILTER_WEIGHTS_MITCHELL_NETRAVALI_QCOM);
|
||||||
break;
|
break;
|
||||||
case Settings::ScalingFilter::Spline1:
|
case Settings::ScalingFilter::Spline1:
|
||||||
window_adapt = MakeSpline1(device, swapchain_view_format);
|
window_adapt = MakeSpline1(device, swapchain_view_format);
|
||||||
|
@ -58,6 +68,9 @@ void BlitScreen::SetWindowAdaptPass() {
|
||||||
case Settings::ScalingFilter::Area:
|
case Settings::ScalingFilter::Area:
|
||||||
window_adapt = MakeArea(device, swapchain_view_format);
|
window_adapt = MakeArea(device, swapchain_view_format);
|
||||||
break;
|
break;
|
||||||
|
case Settings::ScalingFilter::Mmpx:
|
||||||
|
window_adapt = MakeMmpx(device, swapchain_view_format);
|
||||||
|
break;
|
||||||
case Settings::ScalingFilter::Fsr:
|
case Settings::ScalingFilter::Fsr:
|
||||||
case Settings::ScalingFilter::Bilinear:
|
case Settings::ScalingFilter::Bilinear:
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -89,7 +89,8 @@ VK_DEFINE_HANDLE(VmaAllocator)
|
||||||
EXTENSION(NV, VIEWPORT_ARRAY2, viewport_array2) \
|
EXTENSION(NV, VIEWPORT_ARRAY2, viewport_array2) \
|
||||||
EXTENSION(NV, VIEWPORT_SWIZZLE, viewport_swizzle) \
|
EXTENSION(NV, VIEWPORT_SWIZZLE, viewport_swizzle) \
|
||||||
EXTENSION(EXT, DESCRIPTOR_INDEXING, descriptor_indexing) \
|
EXTENSION(EXT, DESCRIPTOR_INDEXING, descriptor_indexing) \
|
||||||
EXTENSION(EXT, FILTER_CUBIC, filter_cubic)
|
EXTENSION(EXT, FILTER_CUBIC, filter_cubic) \
|
||||||
|
EXTENSION(QCOM, FILTER_CUBIC_WEIGHTS, filter_cubic_weights)
|
||||||
|
|
||||||
// Define extensions which must be supported.
|
// Define extensions which must be supported.
|
||||||
#define FOR_EACH_VK_MANDATORY_EXTENSION(EXTENSION_NAME) \
|
#define FOR_EACH_VK_MANDATORY_EXTENSION(EXTENSION_NAME) \
|
||||||
|
@ -558,6 +559,11 @@ public:
|
||||||
return extensions.filter_cubic;
|
return extensions.filter_cubic;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns true if the device supports VK_QCOM_filter_cubic_weights
|
||||||
|
bool IsQcomFilterCubicWeightsSupported() const {
|
||||||
|
return extensions.filter_cubic_weights;
|
||||||
|
}
|
||||||
|
|
||||||
/// Returns true if the device supports VK_EXT_line_rasterization.
|
/// Returns true if the device supports VK_EXT_line_rasterization.
|
||||||
bool IsExtLineRasterizationSupported() const {
|
bool IsExtLineRasterizationSupported() const {
|
||||||
return extensions.line_rasterization;
|
return extensions.line_rasterization;
|
||||||
|
|
|
@ -397,8 +397,6 @@ if (NOT WIN32)
|
||||||
target_include_directories(yuzu PRIVATE ${Qt6Gui_PRIVATE_INCLUDE_DIRS})
|
target_include_directories(yuzu PRIVATE ${Qt6Gui_PRIVATE_INCLUDE_DIRS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(yuzu PRIVATE Vulkan::Headers)
|
|
||||||
|
|
||||||
if (UNIX AND NOT APPLE)
|
if (UNIX AND NOT APPLE)
|
||||||
target_link_libraries(yuzu PRIVATE Qt6::DBus)
|
target_link_libraries(yuzu PRIVATE Qt6::DBus)
|
||||||
|
|
||||||
|
|
|
@ -1770,16 +1770,25 @@ void GMainWindow::OnDisplayTitleBars(bool show) {
|
||||||
|
|
||||||
void GMainWindow::SetupPrepareForSleep() {
|
void GMainWindow::SetupPrepareForSleep() {
|
||||||
#ifdef __unix__
|
#ifdef __unix__
|
||||||
auto bus = QDBusConnection::systemBus();
|
if (auto bus = QDBusConnection::systemBus(); bus.isConnected()) {
|
||||||
if (bus.isConnected()) {
|
// See https://github.com/ConsoleKit2/ConsoleKit2/issues/150
|
||||||
|
#ifdef __linux__
|
||||||
|
const auto dbus_logind_service = QStringLiteral("org.freedesktop.login1");
|
||||||
|
const auto dbus_logind_path = QStringLiteral("/org/freedesktop/login1");
|
||||||
|
const auto dbus_logind_manager_if = QStringLiteral("org.freedesktop.login1.Manager");
|
||||||
|
//const auto dbus_logind_session_if = QStringLiteral("org.freedesktop.login1.Session");
|
||||||
|
#else
|
||||||
|
const auto dbus_logind_service = QStringLiteral("org.freedesktop.ConsoleKit");
|
||||||
|
const auto dbus_logind_path = QStringLiteral("/org/freedesktop/ConsoleKit/Manager");
|
||||||
|
const auto dbus_logind_manager_if = QStringLiteral("org.freedesktop.ConsoleKit.Manager");
|
||||||
|
//const auto dbus_logind_session_if = QStringLiteral("org.freedesktop.ConsoleKit.Session");
|
||||||
|
#endif
|
||||||
const bool success = bus.connect(
|
const bool success = bus.connect(
|
||||||
QStringLiteral("org.freedesktop.login1"), QStringLiteral("/org/freedesktop/login1"),
|
dbus_logind_service, dbus_logind_path,
|
||||||
QStringLiteral("org.freedesktop.login1.Manager"), QStringLiteral("PrepareForSleep"),
|
dbus_logind_manager_if, QStringLiteral("PrepareForSleep"),
|
||||||
QStringLiteral("b"), this, SLOT(OnPrepareForSleep(bool)));
|
QStringLiteral("b"), this, SLOT(OnPrepareForSleep(bool)));
|
||||||
|
if (!success)
|
||||||
if (!success) {
|
|
||||||
LOG_WARNING(Frontend, "Couldn't register PrepareForSleep signal");
|
LOG_WARNING(Frontend, "Couldn't register PrepareForSleep signal");
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
LOG_WARNING(Frontend, "QDBusConnection system bus is not connected");
|
LOG_WARNING(Frontend, "QDBusConnection system bus is not connected");
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,7 +84,7 @@ ci_package() {
|
||||||
|
|
||||||
echo "-- CI package $PACKAGE"
|
echo "-- CI package $PACKAGE"
|
||||||
|
|
||||||
for platform in windows-amd64 windows-arm64 android solaris freebsd linux linux-aarch64; do
|
for platform in windows-amd64 windows-arm64 android solaris-amd64 freebsd-amd64 linux-amd64 linux-aarch64 macos-universal; do
|
||||||
echo "-- * platform $platform"
|
echo "-- * platform $platform"
|
||||||
|
|
||||||
case $DISABLED in
|
case $DISABLED in
|
||||||
|
@ -227,7 +227,7 @@ do
|
||||||
HASH_URL="${DOWNLOAD}.${HASH_SUFFIX}"
|
HASH_URL="${DOWNLOAD}.${HASH_SUFFIX}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
HASH=$(curl "$HASH_URL" -L -o -)
|
HASH=$(curl "$HASH_URL" -sS -L -o -)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
download_package
|
download_package
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue