forked from suyu/suyu
Compare commits
55 commits
mk8-contro
...
dev
Author | SHA1 | Date | |
---|---|---|---|
b911ac8516 | |||
715a3fc83b | |||
8032d67619 | |||
1d4f0a78f6 | |||
242114d862 | |||
a3c8b29607 | |||
4015b1d397 | |||
|
d3f67d1e9c | ||
c25bcb6083 | |||
7215ac9543 | |||
39eea71e62 | |||
48e86d6e84 | |||
ba3539c517 | |||
66cf0c1b0c | |||
444a200eef | |||
2a672fac30 | |||
9e223759e0 | |||
b5c02fe14a | |||
36ede797f3 | |||
ce8f3e802e | |||
|
040893da00 | ||
|
876d7f90b6 | ||
db647d915d | |||
b3e989343d | |||
|
09578d522b | ||
|
9b77efe2b4 | ||
|
224cac988e | ||
|
43c1a4c643 | ||
77e9b7b59b | |||
fd1ec51496 | |||
eb306775c6 | |||
925ce2fad3 | |||
068052078f | |||
177bb48d6c | |||
1f2bbfdf6d | |||
9b3fa0d3da | |||
77042ae6f7 | |||
dbee1677c4 | |||
4b06697954 | |||
d4375a21ef | |||
0c2bdc6f61 | |||
f033d7e1e9 | |||
ba411a17e0 | |||
bbe9f86554 | |||
201bff1731 | |||
907f9aa6f2 | |||
2857540817 | |||
ee2caf179e | |||
f9f4622b28 | |||
ede4f2d8f4 | |||
cb9f9da7b6 | |||
bce23c24e0 | |||
caa93cda48 | |||
f9c3b8dc75 | |||
1ed34b1e47 |
46 changed files with 845 additions and 274 deletions
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/bash -ex
|
#!/bin/bash -ex
|
||||||
|
|
||||||
# SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
# SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||||
|
# SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
export NDK_CCACHE="$(which ccache)"
|
export NDK_CCACHE="$(which ccache)"
|
||||||
|
@ -9,7 +10,7 @@ ccache -s
|
||||||
BUILD_FLAVOR="mainline"
|
BUILD_FLAVOR="mainline"
|
||||||
|
|
||||||
BUILD_TYPE="release"
|
BUILD_TYPE="release"
|
||||||
if [ "${GITHUB_REPOSITORY}" == "suyu-emu/suyu" ]; then
|
if [ "${GITHUB_REPOSITORY}" == "suyu/suyu" ]; then
|
||||||
BUILD_TYPE="relWithDebInfo"
|
BUILD_TYPE="relWithDebInfo"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ BUILD_FLAVOR="mainline"
|
||||||
|
|
||||||
BUILD_TYPE_LOWER="release"
|
BUILD_TYPE_LOWER="release"
|
||||||
BUILD_TYPE_UPPER="Release"
|
BUILD_TYPE_UPPER="Release"
|
||||||
if [ "${GITHUB_REPOSITORY}" == "suyu-emu/suyu" ]; then
|
if [ "${GITHUB_REPOSITORY}" == "suyu/suyu" ]; then
|
||||||
BUILD_TYPE_LOWER="relWithDebInfo"
|
BUILD_TYPE_LOWER="relWithDebInfo"
|
||||||
BUILD_TYPE_UPPER="RelWithDebInfo"
|
BUILD_TYPE_UPPER="RelWithDebInfo"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,19 +1,22 @@
|
||||||
#!/bin/bash -ex
|
#!/bin/bash -ex
|
||||||
|
|
||||||
# SPDX-FileCopyrightText: 2021 yuzu Emulator Project
|
# SPDX-FileCopyrightText: 2021 yuzu Emulator Project
|
||||||
|
# SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
# Exit on error, rather than continuing with the rest of the script.
|
# Exit on error, rather than continuing with the rest of the script.
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
ccache -s
|
ccache -sv
|
||||||
|
|
||||||
mkdir build || true && cd build
|
mkdir build || true && cd build
|
||||||
cmake .. \
|
cmake .. \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DSUYU_USE_PRECOMPILED_HEADERS=OFF \
|
||||||
|
-DDYNARMIC_USE_PRECOMPILED_HEADERS=OFF \
|
||||||
-DCMAKE_CXX_FLAGS="-march=x86-64-v2" \
|
-DCMAKE_CXX_FLAGS="-march=x86-64-v2" \
|
||||||
-DCMAKE_CXX_COMPILER=/usr/lib/ccache/clang++ \
|
-DCMAKE_CXX_COMPILER=/usr/bin/clang++ \
|
||||||
-DCMAKE_C_COMPILER=/usr/lib/ccache/clang \
|
-DCMAKE_C_COMPILER=/usr/bin/clang \
|
||||||
-DCMAKE_INSTALL_PREFIX="/usr" \
|
-DCMAKE_INSTALL_PREFIX="/usr" \
|
||||||
-DDISPLAY_VERSION=$1 \
|
-DDISPLAY_VERSION=$1 \
|
||||||
-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON \
|
-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON \
|
||||||
|
@ -22,11 +25,12 @@ cmake .. \
|
||||||
-DSUYU_CRASH_DUMPS=ON \
|
-DSUYU_CRASH_DUMPS=ON \
|
||||||
-DSUYU_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} \
|
-DSUYU_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} \
|
||||||
-DSUYU_USE_BUNDLED_FFMPEG=ON \
|
-DSUYU_USE_BUNDLED_FFMPEG=ON \
|
||||||
|
-DSUYU_USE_FASTER_LD=ON \
|
||||||
-GNinja
|
-GNinja
|
||||||
|
|
||||||
ninja
|
ninja
|
||||||
|
|
||||||
ccache -s
|
ccache -sv
|
||||||
|
|
||||||
ctest -VV -C Release
|
ctest -VV -C Release
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
# Exit on error, rather than continuing with the rest of the script.
|
# Exit on error, rather than continuing with the rest of the script.
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
ccache -s
|
ccache -sv
|
||||||
|
|
||||||
mkdir build || true && cd build
|
mkdir build || true && cd build
|
||||||
cmake .. \
|
cmake .. \
|
||||||
|
@ -15,8 +15,8 @@ cmake .. \
|
||||||
-DSUYU_USE_PRECOMPILED_HEADERS=OFF \
|
-DSUYU_USE_PRECOMPILED_HEADERS=OFF \
|
||||||
-DDYNARMIC_USE_PRECOMPILED_HEADERS=OFF \
|
-DDYNARMIC_USE_PRECOMPILED_HEADERS=OFF \
|
||||||
-DCMAKE_CXX_FLAGS="-march=x86-64-v2" \
|
-DCMAKE_CXX_FLAGS="-march=x86-64-v2" \
|
||||||
-DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ \
|
-DCMAKE_CXX_COMPILER=/usr/local/bin/g++ \
|
||||||
-DCMAKE_C_COMPILER=/usr/lib/ccache/gcc \
|
-DCMAKE_C_COMPILER=/usr/local/bin/gcc \
|
||||||
-DCMAKE_INSTALL_PREFIX="/usr" \
|
-DCMAKE_INSTALL_PREFIX="/usr" \
|
||||||
-DDISPLAY_VERSION=$1 \
|
-DDISPLAY_VERSION=$1 \
|
||||||
-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=OFF \
|
-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=OFF \
|
||||||
|
@ -24,14 +24,14 @@ cmake .. \
|
||||||
-DUSE_DISCORD_PRESENCE=ON \
|
-DUSE_DISCORD_PRESENCE=ON \
|
||||||
-DSUYU_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} \
|
-DSUYU_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} \
|
||||||
-DSUYU_USE_BUNDLED_FFMPEG=ON \
|
-DSUYU_USE_BUNDLED_FFMPEG=ON \
|
||||||
-DSUYU_ENABLE_LTO=ON \
|
-DSUYU_ENABLE_LTO=OFF \
|
||||||
-DSUYU_CRASH_DUMPS=ON \
|
-DSUYU_CRASH_DUMPS=ON \
|
||||||
-DSUYU_USE_FASTER_LD=ON \
|
-DSUYU_USE_FASTER_LD=ON \
|
||||||
-GNinja
|
-GNinja
|
||||||
|
|
||||||
ninja
|
ninja
|
||||||
|
|
||||||
ccache -s
|
ccache -sv
|
||||||
|
|
||||||
ctest -VV -C Release
|
ctest -VV -C Release
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,10 @@ on:
|
||||||
- 'CMakeModules/**'
|
- 'CMakeModules/**'
|
||||||
- 'dist/**'
|
- 'dist/**'
|
||||||
- 'externals/**'
|
- 'externals/**'
|
||||||
|
- 'CMakeLists.txt'
|
||||||
- 'vcpkg.json'
|
- 'vcpkg.json'
|
||||||
paths-ignore:
|
# paths-ignore:
|
||||||
- 'src/android/**'
|
# - 'src/android/**'
|
||||||
push:
|
push:
|
||||||
branches: [ "dev" ]
|
branches: [ "dev" ]
|
||||||
paths:
|
paths:
|
||||||
|
@ -24,13 +25,15 @@ on:
|
||||||
- 'CMakeModules/**'
|
- 'CMakeModules/**'
|
||||||
- 'dist/**'
|
- 'dist/**'
|
||||||
- 'externals/**'
|
- 'externals/**'
|
||||||
|
- 'CMakeLists.txt'
|
||||||
- 'vcpkg.json'
|
- 'vcpkg.json'
|
||||||
paths-ignore:
|
- '.forgejo/workflows/verify.yml'
|
||||||
- 'src/android/**'
|
- '.ci/**'
|
||||||
|
# paths-ignore:
|
||||||
|
# - 'src/android/**'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
PR_NUMBER: pr${{ github.event.number }}
|
PR_NUMBER: pr${{ github.event.number }}
|
||||||
CCACHE_DIR: '.ccache'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
format:
|
format:
|
||||||
|
@ -60,8 +63,8 @@ jobs:
|
||||||
image: linux-fresh
|
image: linux-fresh
|
||||||
- type: linux
|
- type: linux
|
||||||
image: linux-fresh
|
image: linux-fresh
|
||||||
- type: windows
|
# - type: windows
|
||||||
image: linux-mingw
|
# image: linux-mingw
|
||||||
container: fijxu/build-environments:${{ matrix.image }}
|
container: fijxu/build-environments:${{ matrix.image }}
|
||||||
# User 1001 doesn't exists on the images.
|
# User 1001 doesn't exists on the images.
|
||||||
# options: -u 1001
|
# options: -u 1001
|
||||||
|
@ -74,13 +77,13 @@ jobs:
|
||||||
uses: https://code.forgejo.org/actions/cache@v3
|
uses: https://code.forgejo.org/actions/cache@v3
|
||||||
id: ccache-restore
|
id: ccache-restore
|
||||||
with:
|
with:
|
||||||
path: .ccache
|
path: ~/.ccache
|
||||||
key: ${{ runner.os }}-${{ matrix.type }}-${{ github.sha }}
|
key: ${{ runner.os }}-${{ matrix.type }}-${{ github.sha }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-${{ matrix.type }}-
|
${{ runner.os }}-${{ matrix.type }}-
|
||||||
- name: Create ccache directory
|
- name: Create ccache directory
|
||||||
if: steps.ccache-restore.outputs.cache-hit != 'true'
|
if: steps.ccache-restore.outputs.cache-hit != 'true'
|
||||||
run: mkdir -p .ccache
|
run: mkdir -p ~/.ccache
|
||||||
- name: Build
|
- name: Build
|
||||||
run: ./.ci/scripts/${{ matrix.type }}/docker.sh
|
run: ./.ci/scripts/${{ matrix.type }}/docker.sh
|
||||||
env:
|
env:
|
||||||
|
@ -173,6 +176,7 @@ jobs:
|
||||||
# path: ${{ env.INDIVIDUAL_EXE }}
|
# path: ${{ env.INDIVIDUAL_EXE }}
|
||||||
android:
|
android:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
container: fijxu/build-environments:android
|
||||||
needs: format
|
needs: format
|
||||||
steps:
|
steps:
|
||||||
- uses: https://code.forgejo.org/actions/checkout@v3
|
- uses: https://code.forgejo.org/actions/checkout@v3
|
||||||
|
@ -190,17 +194,13 @@ jobs:
|
||||||
path: |
|
path: |
|
||||||
~/.gradle/caches
|
~/.gradle/caches
|
||||||
~/.gradle/wrapper
|
~/.gradle/wrapper
|
||||||
.ccache
|
~/.ccache
|
||||||
key: ${{ runner.os }}-android-${{ github.sha }}
|
key: ${{ runner.os }}-android-${{ github.sha }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-android-
|
${{ runner.os }}-android-
|
||||||
- name: Query tag name
|
- name: Query tag name
|
||||||
uses: https://github.com/olegtarasov/get-tag@v2.1.2
|
uses: https://github.com/olegtarasov/get-tag@v2.1.2
|
||||||
id: tagName
|
id: tagName
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y ccache apksigner glslang-dev glslang-tools
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: ./.ci/scripts/android/build.sh
|
run: ./.ci/scripts/android/build.sh
|
||||||
- name: Copy and sign artifacts
|
- name: Copy and sign artifacts
|
||||||
|
|
27
.reuse/dep5
27
.reuse/dep5
|
@ -9,7 +9,8 @@ Files: dist/english_plurals/*
|
||||||
dist/qt_themes/*/icons/48x48/sd_card.png
|
dist/qt_themes/*/icons/48x48/sd_card.png
|
||||||
dist/qt_themes/*/icons/index.theme
|
dist/qt_themes/*/icons/index.theme
|
||||||
dist/qt_themes/default/style.qss
|
dist/qt_themes/default/style.qss
|
||||||
Copyright: suyu Emulator Project
|
Copyright: yuzu Emulator Project
|
||||||
|
suyu Emulator Project
|
||||||
License: GPL-2.0-or-later
|
License: GPL-2.0-or-later
|
||||||
|
|
||||||
Files: dist/qt_themes/default/icons/256x256/suyu.png
|
Files: dist/qt_themes/default/icons/256x256/suyu.png
|
||||||
|
@ -159,3 +160,27 @@ License: BSD-3-Clause
|
||||||
Files: src/android/app/debug.keystore
|
Files: src/android/app/debug.keystore
|
||||||
Copyright: 2023 yuzu Emulator Project
|
Copyright: 2023 yuzu Emulator Project
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
|
|
||||||
|
Files: .github-archive/ISSUE_TEMPLATE/*
|
||||||
|
Copyright: 2022 yuzu Emulator Project
|
||||||
|
License: GPL-2.0-or-later
|
||||||
|
|
||||||
|
Files: .forgejo/ISSUE_TEMPLATE/*
|
||||||
|
Copyright: 2024 suyu Emulator Project
|
||||||
|
License: GPL-3.0-or-later
|
||||||
|
|
||||||
|
Files: .gitea/ISSUE_TEMPLATE/*
|
||||||
|
Copyright: 2024 suyu Emulator Project
|
||||||
|
License: GPL-3.0-or-later
|
||||||
|
|
||||||
|
Files: .gitlab-ci.yml
|
||||||
|
Copyright: 2024 suyu Emulator Project
|
||||||
|
License: GPL-3.0-or-later
|
||||||
|
|
||||||
|
Files: dist/icns_generator.sh
|
||||||
|
Copyright: 2024 suyu Emulator Project
|
||||||
|
License: GPL-3.0-or-later
|
||||||
|
|
||||||
|
Files: img/*
|
||||||
|
Copyright: 2024 suyu Emulator Project
|
||||||
|
License: CC0-1.0
|
||||||
|
|
131
CMakeLists.txt
131
CMakeLists.txt
|
@ -132,7 +132,7 @@ if (SUYU_USE_BUNDLED_VCPKG)
|
||||||
set(VCPKG_DOWNLOADS_PATH ${PROJECT_SOURCE_DIR}/externals/vcpkg/downloads)
|
set(VCPKG_DOWNLOADS_PATH ${PROJECT_SOURCE_DIR}/externals/vcpkg/downloads)
|
||||||
set(NASM_VERSION "2.16.01")
|
set(NASM_VERSION "2.16.01")
|
||||||
set(NASM_DESTINATION_PATH ${VCPKG_DOWNLOADS_PATH}/nasm-${NASM_VERSION}-win64.zip)
|
set(NASM_DESTINATION_PATH ${VCPKG_DOWNLOADS_PATH}/nasm-${NASM_VERSION}-win64.zip)
|
||||||
set(NASM_DOWNLOAD_URL "https://gitlab.com/suyu-emu/ext-windows-bin/raw/master/nasm/nasm-${NASM_VERSION}-win64.zip")
|
set(NASM_DOWNLOAD_URL "https://git.suyu.dev/suyu/ext-windows-bin/raw/branch/master/nasm/nasm-${NASM_VERSION}-win64.zip")
|
||||||
|
|
||||||
if (NOT EXISTS ${NASM_DESTINATION_PATH})
|
if (NOT EXISTS ${NASM_DESTINATION_PATH})
|
||||||
file(DOWNLOAD ${NASM_DOWNLOAD_URL} ${NASM_DESTINATION_PATH} SHOW_PROGRESS STATUS NASM_STATUS)
|
file(DOWNLOAD ${NASM_DOWNLOAD_URL} ${NASM_DESTINATION_PATH} SHOW_PROGRESS STATUS NASM_STATUS)
|
||||||
|
@ -374,8 +374,6 @@ if(ENABLE_QT6 AND Qt6_LOCATION)
|
||||||
list(APPEND CMAKE_PREFIX_PATH "${Qt6_LOCATION}")
|
list(APPEND CMAKE_PREFIX_PATH "${Qt6_LOCATION}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# QT6 searches for Vulkan::Headers, too, so we have to define it before QT6 has a chance to do it.
|
|
||||||
add_subdirectory(externals)
|
|
||||||
|
|
||||||
function(set_suyu_qt_components)
|
function(set_suyu_qt_components)
|
||||||
# Best practice is to ask for all components at once, so they are from the same version
|
# Best practice is to ask for all components at once, so they are from the same version
|
||||||
|
@ -398,7 +396,71 @@ function(set_suyu_qt_components)
|
||||||
set(SUYU_QT_COMPONENTS ${SUYU_QT_COMPONENTS2} PARENT_SCOPE)
|
set(SUYU_QT_COMPONENTS ${SUYU_QT_COMPONENTS2} PARENT_SCOPE)
|
||||||
endfunction(set_suyu_qt_components)
|
endfunction(set_suyu_qt_components)
|
||||||
|
|
||||||
|
# find SDL2 exports a bunch of variables that are needed, so its easier to do this outside of the suyu_find_package
|
||||||
|
if (ENABLE_SDL2)
|
||||||
|
if (SUYU_USE_BUNDLED_SDL2)
|
||||||
|
# Detect toolchain and platform
|
||||||
|
if ((MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS 1940) AND ARCHITECTURE_x86_64)
|
||||||
|
set(SDL2_VER "SDL2-2.28.2")
|
||||||
|
else()
|
||||||
|
message(FATAL_ERROR "No bundled SDL2 binaries for your toolchain. Disable SUYU_USE_BUNDLED_SDL2 and provide your own.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (DEFINED SDL2_VER)
|
||||||
|
download_bundled_external("sdl2/" ${SDL2_VER} SDL2_PREFIX)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(SDL2_FOUND YES)
|
||||||
|
set(SDL2_INCLUDE_DIR "${SDL2_PREFIX}/include" CACHE PATH "Path to SDL2 headers")
|
||||||
|
set(SDL2_LIBRARY "${SDL2_PREFIX}/lib/x64/SDL2.lib" CACHE PATH "Path to SDL2 library")
|
||||||
|
set(SDL2_DLL_DIR "${SDL2_PREFIX}/lib/x64/" CACHE PATH "Path to SDL2.dll")
|
||||||
|
|
||||||
|
add_library(SDL2::SDL2 INTERFACE IMPORTED)
|
||||||
|
target_link_libraries(SDL2::SDL2 INTERFACE "${SDL2_LIBRARY}")
|
||||||
|
target_include_directories(SDL2::SDL2 INTERFACE "${SDL2_INCLUDE_DIR}")
|
||||||
|
elseif (SUYU_USE_EXTERNAL_SDL2)
|
||||||
|
message(STATUS "Using SDL2 from externals.")
|
||||||
|
else()
|
||||||
|
find_package(SDL2 2.26.4 REQUIRED)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# List of all FFmpeg components required
|
||||||
|
set(FFmpeg_COMPONENTS
|
||||||
|
avcodec
|
||||||
|
avfilter
|
||||||
|
avutil
|
||||||
|
swscale)
|
||||||
|
|
||||||
|
if (UNIX AND NOT APPLE AND NOT ANDROID)
|
||||||
|
find_package(PkgConfig REQUIRED)
|
||||||
|
pkg_check_modules(LIBVA libva)
|
||||||
|
endif()
|
||||||
|
if (NOT SUYU_USE_BUNDLED_FFMPEG)
|
||||||
|
# Use system installed FFmpeg
|
||||||
|
find_package(FFmpeg 4.3 REQUIRED QUIET COMPONENTS ${FFmpeg_COMPONENTS})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (WIN32 AND SUYU_CRASH_DUMPS)
|
||||||
|
set(BREAKPAD_VER "breakpad-c89f9dd")
|
||||||
|
download_bundled_external("breakpad/" ${BREAKPAD_VER} BREAKPAD_PREFIX)
|
||||||
|
|
||||||
|
set(BREAKPAD_CLIENT_INCLUDE_DIR "${BREAKPAD_PREFIX}/include")
|
||||||
|
set(BREAKPAD_CLIENT_LIBRARY "${BREAKPAD_PREFIX}/lib/libbreakpad_client.lib")
|
||||||
|
|
||||||
|
add_library(libbreakpad_client INTERFACE IMPORTED)
|
||||||
|
target_link_libraries(libbreakpad_client INTERFACE "${BREAKPAD_CLIENT_LIBRARY}")
|
||||||
|
target_include_directories(libbreakpad_client INTERFACE "${BREAKPAD_CLIENT_INCLUDE_DIR}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Prefer the -pthread flag on Linux.
|
||||||
|
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||||
|
find_package(Threads REQUIRED)
|
||||||
|
|
||||||
|
add_subdirectory(externals)
|
||||||
|
|
||||||
# Qt5 requires that we find components, so it doesn't fit our pretty little find package function
|
# Qt5 requires that we find components, so it doesn't fit our pretty little find package function
|
||||||
|
# Qt6 sets Vulkan::Headers, so Qt search has to come after externals, so it doesn't get to do it.
|
||||||
if(ENABLE_QT)
|
if(ENABLE_QT)
|
||||||
set(QT_VERSION 5.15)
|
set(QT_VERSION 5.15)
|
||||||
# These are used to specify minimum versions
|
# These are used to specify minimum versions
|
||||||
|
@ -537,67 +599,6 @@ if(ENABLE_QT)
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# find SDL2 exports a bunch of variables that are needed, so its easier to do this outside of the suyu_find_package
|
|
||||||
if (ENABLE_SDL2)
|
|
||||||
if (SUYU_USE_BUNDLED_SDL2)
|
|
||||||
# Detect toolchain and platform
|
|
||||||
if ((MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS 1940) AND ARCHITECTURE_x86_64)
|
|
||||||
set(SDL2_VER "SDL2-2.28.2")
|
|
||||||
else()
|
|
||||||
message(FATAL_ERROR "No bundled SDL2 binaries for your toolchain. Disable SUYU_USE_BUNDLED_SDL2 and provide your own.")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (DEFINED SDL2_VER)
|
|
||||||
download_bundled_external("sdl2/" ${SDL2_VER} SDL2_PREFIX)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(SDL2_FOUND YES)
|
|
||||||
set(SDL2_INCLUDE_DIR "${SDL2_PREFIX}/include" CACHE PATH "Path to SDL2 headers")
|
|
||||||
set(SDL2_LIBRARY "${SDL2_PREFIX}/lib/x64/SDL2.lib" CACHE PATH "Path to SDL2 library")
|
|
||||||
set(SDL2_DLL_DIR "${SDL2_PREFIX}/lib/x64/" CACHE PATH "Path to SDL2.dll")
|
|
||||||
|
|
||||||
add_library(SDL2::SDL2 INTERFACE IMPORTED)
|
|
||||||
target_link_libraries(SDL2::SDL2 INTERFACE "${SDL2_LIBRARY}")
|
|
||||||
target_include_directories(SDL2::SDL2 INTERFACE "${SDL2_INCLUDE_DIR}")
|
|
||||||
elseif (SUYU_USE_EXTERNAL_SDL2)
|
|
||||||
message(STATUS "Using SDL2 from externals.")
|
|
||||||
else()
|
|
||||||
find_package(SDL2 2.26.4 REQUIRED)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# List of all FFmpeg components required
|
|
||||||
set(FFmpeg_COMPONENTS
|
|
||||||
avcodec
|
|
||||||
avfilter
|
|
||||||
avutil
|
|
||||||
swscale)
|
|
||||||
|
|
||||||
if (UNIX AND NOT APPLE AND NOT ANDROID)
|
|
||||||
find_package(PkgConfig REQUIRED)
|
|
||||||
pkg_check_modules(LIBVA libva)
|
|
||||||
endif()
|
|
||||||
if (NOT SUYU_USE_BUNDLED_FFMPEG)
|
|
||||||
# Use system installed FFmpeg
|
|
||||||
find_package(FFmpeg 4.3 REQUIRED QUIET COMPONENTS ${FFmpeg_COMPONENTS})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (WIN32 AND SUYU_CRASH_DUMPS)
|
|
||||||
set(BREAKPAD_VER "breakpad-c89f9dd")
|
|
||||||
download_bundled_external("breakpad/" ${BREAKPAD_VER} BREAKPAD_PREFIX)
|
|
||||||
|
|
||||||
set(BREAKPAD_CLIENT_INCLUDE_DIR "${BREAKPAD_PREFIX}/include")
|
|
||||||
set(BREAKPAD_CLIENT_LIBRARY "${BREAKPAD_PREFIX}/lib/libbreakpad_client.lib")
|
|
||||||
|
|
||||||
add_library(libbreakpad_client INTERFACE IMPORTED)
|
|
||||||
target_link_libraries(libbreakpad_client INTERFACE "${BREAKPAD_CLIENT_LIBRARY}")
|
|
||||||
target_include_directories(libbreakpad_client INTERFACE "${BREAKPAD_CLIENT_INCLUDE_DIR}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Prefer the -pthread flag on Linux.
|
|
||||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
|
||||||
find_package(Threads REQUIRED)
|
|
||||||
|
|
||||||
# Platform-specific library requirements
|
# Platform-specific library requirements
|
||||||
# ======================================
|
# ======================================
|
||||||
|
|
||||||
|
@ -632,7 +633,7 @@ if (NOT CLANG_FORMAT)
|
||||||
message(STATUS "Clang format not found! Downloading...")
|
message(STATUS "Clang format not found! Downloading...")
|
||||||
set(CLANG_FORMAT "${PROJECT_BINARY_DIR}/externals/clang-format${CLANG_FORMAT_POSTFIX}.exe")
|
set(CLANG_FORMAT "${PROJECT_BINARY_DIR}/externals/clang-format${CLANG_FORMAT_POSTFIX}.exe")
|
||||||
file(DOWNLOAD
|
file(DOWNLOAD
|
||||||
https://gitlab.com/suyu-emu/ext-windows-bin/raw/master/clang-format${CLANG_FORMAT_POSTFIX}.exe
|
https://git.suyu.dev/suyu/ext-windows-bin/raw/branch/master/clang-format${CLANG_FORMAT_POSTFIX}.exe
|
||||||
"${CLANG_FORMAT}" SHOW_PROGRESS
|
"${CLANG_FORMAT}" SHOW_PROGRESS
|
||||||
STATUS DOWNLOAD_SUCCESS)
|
STATUS DOWNLOAD_SUCCESS)
|
||||||
if (NOT DOWNLOAD_SUCCESS EQUAL 0)
|
if (NOT DOWNLOAD_SUCCESS EQUAL 0)
|
||||||
|
|
|
@ -7,21 +7,21 @@
|
||||||
# prefix_var: name of a variable which will be set with the path to the extracted contents
|
# prefix_var: name of a variable which will be set with the path to the extracted contents
|
||||||
function(download_bundled_external remote_path lib_name prefix_var)
|
function(download_bundled_external remote_path lib_name prefix_var)
|
||||||
|
|
||||||
set(package_base_url "https://git.suyu.dev/suyu")
|
set(package_base_url "https://git.suyu.dev/suyu/")
|
||||||
set(package_repo "no_platform")
|
set(package_repo "no_platform")
|
||||||
set(package_extension "no_platform")
|
set(package_extension "no_platform")
|
||||||
set(package_head "?ref_type=heads")
|
set(package_head "?ref_type=heads")
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
set(package_repo "ext-windows-bin/-/raw/master/")
|
set(package_repo "ext-windows-bin/raw/branch/master/")
|
||||||
set(package_extension ".7z")
|
set(package_extension ".7z")
|
||||||
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||||
set(package_repo "ext-linux-bin/-/raw/main/")
|
set(package_repo "ext-linux-bin/raw/branch/main/")
|
||||||
set(package_extension ".tar.xz")
|
set(package_extension ".tar.xz")
|
||||||
# elseif (APPLE)
|
# elseif (APPLE)
|
||||||
# set(package_repo "ext-osx-bin/-/raw/main/")
|
# set(package_repo "ext-osx-bin/-/raw/main/")
|
||||||
# set(package_extension ".dmg")
|
# set(package_extension ".dmg")
|
||||||
elseif (ANDROID)
|
elseif (ANDROID)
|
||||||
set(package_repo "ext-android-bin/-/raw/main/")
|
set(package_repo "ext-android-bin/raw/branch/main/")
|
||||||
set(package_extension ".tar.xz")
|
set(package_extension ".tar.xz")
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "No package available for this platform")
|
message(FATAL_ERROR "No package available for this platform")
|
||||||
|
|
438
LICENSES/CC-BY-NC-SA-4.0.txt
Normal file
438
LICENSES/CC-BY-NC-SA-4.0.txt
Normal file
|
@ -0,0 +1,438 @@
|
||||||
|
Attribution-NonCommercial-ShareAlike 4.0 International
|
||||||
|
|
||||||
|
=======================================================================
|
||||||
|
|
||||||
|
Creative Commons Corporation ("Creative Commons") is not a law firm and
|
||||||
|
does not provide legal services or legal advice. Distribution of
|
||||||
|
Creative Commons public licenses does not create a lawyer-client or
|
||||||
|
other relationship. Creative Commons makes its licenses and related
|
||||||
|
information available on an "as-is" basis. Creative Commons gives no
|
||||||
|
warranties regarding its licenses, any material licensed under their
|
||||||
|
terms and conditions, or any related information. Creative Commons
|
||||||
|
disclaims all liability for damages resulting from their use to the
|
||||||
|
fullest extent possible.
|
||||||
|
|
||||||
|
Using Creative Commons Public Licenses
|
||||||
|
|
||||||
|
Creative Commons public licenses provide a standard set of terms and
|
||||||
|
conditions that creators and other rights holders may use to share
|
||||||
|
original works of authorship and other material subject to copyright
|
||||||
|
and certain other rights specified in the public license below. The
|
||||||
|
following considerations are for informational purposes only, are not
|
||||||
|
exhaustive, and do not form part of our licenses.
|
||||||
|
|
||||||
|
Considerations for licensors: Our public licenses are
|
||||||
|
intended for use by those authorized to give the public
|
||||||
|
permission to use material in ways otherwise restricted by
|
||||||
|
copyright and certain other rights. Our licenses are
|
||||||
|
irrevocable. Licensors should read and understand the terms
|
||||||
|
and conditions of the license they choose before applying it.
|
||||||
|
Licensors should also secure all rights necessary before
|
||||||
|
applying our licenses so that the public can reuse the
|
||||||
|
material as expected. Licensors should clearly mark any
|
||||||
|
material not subject to the license. This includes other CC-
|
||||||
|
licensed material, or material used under an exception or
|
||||||
|
limitation to copyright. More considerations for licensors:
|
||||||
|
wiki.creativecommons.org/Considerations_for_licensors
|
||||||
|
|
||||||
|
Considerations for the public: By using one of our public
|
||||||
|
licenses, a licensor grants the public permission to use the
|
||||||
|
licensed material under specified terms and conditions. If
|
||||||
|
the licensor's permission is not necessary for any reason--for
|
||||||
|
example, because of any applicable exception or limitation to
|
||||||
|
copyright--then that use is not regulated by the license. Our
|
||||||
|
licenses grant only permissions under copyright and certain
|
||||||
|
other rights that a licensor has authority to grant. Use of
|
||||||
|
the licensed material may still be restricted for other
|
||||||
|
reasons, including because others have copyright or other
|
||||||
|
rights in the material. A licensor may make special requests,
|
||||||
|
such as asking that all changes be marked or described.
|
||||||
|
Although not required by our licenses, you are encouraged to
|
||||||
|
respect those requests where reasonable. More considerations
|
||||||
|
for the public:
|
||||||
|
wiki.creativecommons.org/Considerations_for_licensees
|
||||||
|
|
||||||
|
=======================================================================
|
||||||
|
|
||||||
|
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
|
||||||
|
Public License
|
||||||
|
|
||||||
|
By exercising the Licensed Rights (defined below), You accept and agree
|
||||||
|
to be bound by the terms and conditions of this Creative Commons
|
||||||
|
Attribution-NonCommercial-ShareAlike 4.0 International Public License
|
||||||
|
("Public License"). To the extent this Public License may be
|
||||||
|
interpreted as a contract, You are granted the Licensed Rights in
|
||||||
|
consideration of Your acceptance of these terms and conditions, and the
|
||||||
|
Licensor grants You such rights in consideration of benefits the
|
||||||
|
Licensor receives from making the Licensed Material available under
|
||||||
|
these terms and conditions.
|
||||||
|
|
||||||
|
|
||||||
|
Section 1 -- Definitions.
|
||||||
|
|
||||||
|
a. Adapted Material means material subject to Copyright and Similar
|
||||||
|
Rights that is derived from or based upon the Licensed Material
|
||||||
|
and in which the Licensed Material is translated, altered,
|
||||||
|
arranged, transformed, or otherwise modified in a manner requiring
|
||||||
|
permission under the Copyright and Similar Rights held by the
|
||||||
|
Licensor. For purposes of this Public License, where the Licensed
|
||||||
|
Material is a musical work, performance, or sound recording,
|
||||||
|
Adapted Material is always produced where the Licensed Material is
|
||||||
|
synched in timed relation with a moving image.
|
||||||
|
|
||||||
|
b. Adapter's License means the license You apply to Your Copyright
|
||||||
|
and Similar Rights in Your contributions to Adapted Material in
|
||||||
|
accordance with the terms and conditions of this Public License.
|
||||||
|
|
||||||
|
c. BY-NC-SA Compatible License means a license listed at
|
||||||
|
creativecommons.org/compatiblelicenses, approved by Creative
|
||||||
|
Commons as essentially the equivalent of this Public License.
|
||||||
|
|
||||||
|
d. Copyright and Similar Rights means copyright and/or similar rights
|
||||||
|
closely related to copyright including, without limitation,
|
||||||
|
performance, broadcast, sound recording, and Sui Generis Database
|
||||||
|
Rights, without regard to how the rights are labeled or
|
||||||
|
categorized. For purposes of this Public License, the rights
|
||||||
|
specified in Section 2(b)(1)-(2) are not Copyright and Similar
|
||||||
|
Rights.
|
||||||
|
|
||||||
|
e. Effective Technological Measures means those measures that, in the
|
||||||
|
absence of proper authority, may not be circumvented under laws
|
||||||
|
fulfilling obligations under Article 11 of the WIPO Copyright
|
||||||
|
Treaty adopted on December 20, 1996, and/or similar international
|
||||||
|
agreements.
|
||||||
|
|
||||||
|
f. Exceptions and Limitations means fair use, fair dealing, and/or
|
||||||
|
any other exception or limitation to Copyright and Similar Rights
|
||||||
|
that applies to Your use of the Licensed Material.
|
||||||
|
|
||||||
|
g. License Elements means the license attributes listed in the name
|
||||||
|
of a Creative Commons Public License. The License Elements of this
|
||||||
|
Public License are Attribution, NonCommercial, and ShareAlike.
|
||||||
|
|
||||||
|
h. Licensed Material means the artistic or literary work, database,
|
||||||
|
or other material to which the Licensor applied this Public
|
||||||
|
License.
|
||||||
|
|
||||||
|
i. Licensed Rights means the rights granted to You subject to the
|
||||||
|
terms and conditions of this Public License, which are limited to
|
||||||
|
all Copyright and Similar Rights that apply to Your use of the
|
||||||
|
Licensed Material and that the Licensor has authority to license.
|
||||||
|
|
||||||
|
j. Licensor means the individual(s) or entity(ies) granting rights
|
||||||
|
under this Public License.
|
||||||
|
|
||||||
|
k. NonCommercial means not primarily intended for or directed towards
|
||||||
|
commercial advantage or monetary compensation. For purposes of
|
||||||
|
this Public License, the exchange of the Licensed Material for
|
||||||
|
other material subject to Copyright and Similar Rights by digital
|
||||||
|
file-sharing or similar means is NonCommercial provided there is
|
||||||
|
no payment of monetary compensation in connection with the
|
||||||
|
exchange.
|
||||||
|
|
||||||
|
l. Share means to provide material to the public by any means or
|
||||||
|
process that requires permission under the Licensed Rights, such
|
||||||
|
as reproduction, public display, public performance, distribution,
|
||||||
|
dissemination, communication, or importation, and to make material
|
||||||
|
available to the public including in ways that members of the
|
||||||
|
public may access the material from a place and at a time
|
||||||
|
individually chosen by them.
|
||||||
|
|
||||||
|
m. Sui Generis Database Rights means rights other than copyright
|
||||||
|
resulting from Directive 96/9/EC of the European Parliament and of
|
||||||
|
the Council of 11 March 1996 on the legal protection of databases,
|
||||||
|
as amended and/or succeeded, as well as other essentially
|
||||||
|
equivalent rights anywhere in the world.
|
||||||
|
|
||||||
|
n. You means the individual or entity exercising the Licensed Rights
|
||||||
|
under this Public License. Your has a corresponding meaning.
|
||||||
|
|
||||||
|
|
||||||
|
Section 2 -- Scope.
|
||||||
|
|
||||||
|
a. License grant.
|
||||||
|
|
||||||
|
1. Subject to the terms and conditions of this Public License,
|
||||||
|
the Licensor hereby grants You a worldwide, royalty-free,
|
||||||
|
non-sublicensable, non-exclusive, irrevocable license to
|
||||||
|
exercise the Licensed Rights in the Licensed Material to:
|
||||||
|
|
||||||
|
a. reproduce and Share the Licensed Material, in whole or
|
||||||
|
in part, for NonCommercial purposes only; and
|
||||||
|
|
||||||
|
b. produce, reproduce, and Share Adapted Material for
|
||||||
|
NonCommercial purposes only.
|
||||||
|
|
||||||
|
2. Exceptions and Limitations. For the avoidance of doubt, where
|
||||||
|
Exceptions and Limitations apply to Your use, this Public
|
||||||
|
License does not apply, and You do not need to comply with
|
||||||
|
its terms and conditions.
|
||||||
|
|
||||||
|
3. Term. The term of this Public License is specified in Section
|
||||||
|
6(a).
|
||||||
|
|
||||||
|
4. Media and formats; technical modifications allowed. The
|
||||||
|
Licensor authorizes You to exercise the Licensed Rights in
|
||||||
|
all media and formats whether now known or hereafter created,
|
||||||
|
and to make technical modifications necessary to do so. The
|
||||||
|
Licensor waives and/or agrees not to assert any right or
|
||||||
|
authority to forbid You from making technical modifications
|
||||||
|
necessary to exercise the Licensed Rights, including
|
||||||
|
technical modifications necessary to circumvent Effective
|
||||||
|
Technological Measures. For purposes of this Public License,
|
||||||
|
simply making modifications authorized by this Section 2(a)
|
||||||
|
(4) never produces Adapted Material.
|
||||||
|
|
||||||
|
5. Downstream recipients.
|
||||||
|
|
||||||
|
a. Offer from the Licensor -- Licensed Material. Every
|
||||||
|
recipient of the Licensed Material automatically
|
||||||
|
receives an offer from the Licensor to exercise the
|
||||||
|
Licensed Rights under the terms and conditions of this
|
||||||
|
Public License.
|
||||||
|
|
||||||
|
b. Additional offer from the Licensor -- Adapted Material.
|
||||||
|
Every recipient of Adapted Material from You
|
||||||
|
automatically receives an offer from the Licensor to
|
||||||
|
exercise the Licensed Rights in the Adapted Material
|
||||||
|
under the conditions of the Adapter's License You apply.
|
||||||
|
|
||||||
|
c. No downstream restrictions. You may not offer or impose
|
||||||
|
any additional or different terms or conditions on, or
|
||||||
|
apply any Effective Technological Measures to, the
|
||||||
|
Licensed Material if doing so restricts exercise of the
|
||||||
|
Licensed Rights by any recipient of the Licensed
|
||||||
|
Material.
|
||||||
|
|
||||||
|
6. No endorsement. Nothing in this Public License constitutes or
|
||||||
|
may be construed as permission to assert or imply that You
|
||||||
|
are, or that Your use of the Licensed Material is, connected
|
||||||
|
with, or sponsored, endorsed, or granted official status by,
|
||||||
|
the Licensor or others designated to receive attribution as
|
||||||
|
provided in Section 3(a)(1)(A)(i).
|
||||||
|
|
||||||
|
b. Other rights.
|
||||||
|
|
||||||
|
1. Moral rights, such as the right of integrity, are not
|
||||||
|
licensed under this Public License, nor are publicity,
|
||||||
|
privacy, and/or other similar personality rights; however, to
|
||||||
|
the extent possible, the Licensor waives and/or agrees not to
|
||||||
|
assert any such rights held by the Licensor to the limited
|
||||||
|
extent necessary to allow You to exercise the Licensed
|
||||||
|
Rights, but not otherwise.
|
||||||
|
|
||||||
|
2. Patent and trademark rights are not licensed under this
|
||||||
|
Public License.
|
||||||
|
|
||||||
|
3. To the extent possible, the Licensor waives any right to
|
||||||
|
collect royalties from You for the exercise of the Licensed
|
||||||
|
Rights, whether directly or through a collecting society
|
||||||
|
under any voluntary or waivable statutory or compulsory
|
||||||
|
licensing scheme. In all other cases the Licensor expressly
|
||||||
|
reserves any right to collect such royalties, including when
|
||||||
|
the Licensed Material is used other than for NonCommercial
|
||||||
|
purposes.
|
||||||
|
|
||||||
|
|
||||||
|
Section 3 -- License Conditions.
|
||||||
|
|
||||||
|
Your exercise of the Licensed Rights is expressly made subject to the
|
||||||
|
following conditions.
|
||||||
|
|
||||||
|
a. Attribution.
|
||||||
|
|
||||||
|
1. If You Share the Licensed Material (including in modified
|
||||||
|
form), You must:
|
||||||
|
|
||||||
|
a. retain the following if it is supplied by the Licensor
|
||||||
|
with the Licensed Material:
|
||||||
|
|
||||||
|
i. identification of the creator(s) of the Licensed
|
||||||
|
Material and any others designated to receive
|
||||||
|
attribution, in any reasonable manner requested by
|
||||||
|
the Licensor (including by pseudonym if
|
||||||
|
designated);
|
||||||
|
|
||||||
|
ii. a copyright notice;
|
||||||
|
|
||||||
|
iii. a notice that refers to this Public License;
|
||||||
|
|
||||||
|
iv. a notice that refers to the disclaimer of
|
||||||
|
warranties;
|
||||||
|
|
||||||
|
v. a URI or hyperlink to the Licensed Material to the
|
||||||
|
extent reasonably practicable;
|
||||||
|
|
||||||
|
b. indicate if You modified the Licensed Material and
|
||||||
|
retain an indication of any previous modifications; and
|
||||||
|
|
||||||
|
c. indicate the Licensed Material is licensed under this
|
||||||
|
Public License, and include the text of, or the URI or
|
||||||
|
hyperlink to, this Public License.
|
||||||
|
|
||||||
|
2. You may satisfy the conditions in Section 3(a)(1) in any
|
||||||
|
reasonable manner based on the medium, means, and context in
|
||||||
|
which You Share the Licensed Material. For example, it may be
|
||||||
|
reasonable to satisfy the conditions by providing a URI or
|
||||||
|
hyperlink to a resource that includes the required
|
||||||
|
information.
|
||||||
|
3. If requested by the Licensor, You must remove any of the
|
||||||
|
information required by Section 3(a)(1)(A) to the extent
|
||||||
|
reasonably practicable.
|
||||||
|
|
||||||
|
b. ShareAlike.
|
||||||
|
|
||||||
|
In addition to the conditions in Section 3(a), if You Share
|
||||||
|
Adapted Material You produce, the following conditions also apply.
|
||||||
|
|
||||||
|
1. The Adapter's License You apply must be a Creative Commons
|
||||||
|
license with the same License Elements, this version or
|
||||||
|
later, or a BY-NC-SA Compatible License.
|
||||||
|
|
||||||
|
2. You must include the text of, or the URI or hyperlink to, the
|
||||||
|
Adapter's License You apply. You may satisfy this condition
|
||||||
|
in any reasonable manner based on the medium, means, and
|
||||||
|
context in which You Share Adapted Material.
|
||||||
|
|
||||||
|
3. You may not offer or impose any additional or different terms
|
||||||
|
or conditions on, or apply any Effective Technological
|
||||||
|
Measures to, Adapted Material that restrict exercise of the
|
||||||
|
rights granted under the Adapter's License You apply.
|
||||||
|
|
||||||
|
|
||||||
|
Section 4 -- Sui Generis Database Rights.
|
||||||
|
|
||||||
|
Where the Licensed Rights include Sui Generis Database Rights that
|
||||||
|
apply to Your use of the Licensed Material:
|
||||||
|
|
||||||
|
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
|
||||||
|
to extract, reuse, reproduce, and Share all or a substantial
|
||||||
|
portion of the contents of the database for NonCommercial purposes
|
||||||
|
only;
|
||||||
|
|
||||||
|
b. if You include all or a substantial portion of the database
|
||||||
|
contents in a database in which You have Sui Generis Database
|
||||||
|
Rights, then the database in which You have Sui Generis Database
|
||||||
|
Rights (but not its individual contents) is Adapted Material,
|
||||||
|
including for purposes of Section 3(b); and
|
||||||
|
|
||||||
|
c. You must comply with the conditions in Section 3(a) if You Share
|
||||||
|
all or a substantial portion of the contents of the database.
|
||||||
|
|
||||||
|
For the avoidance of doubt, this Section 4 supplements and does not
|
||||||
|
replace Your obligations under this Public License where the Licensed
|
||||||
|
Rights include other Copyright and Similar Rights.
|
||||||
|
|
||||||
|
|
||||||
|
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
|
||||||
|
|
||||||
|
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
|
||||||
|
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
|
||||||
|
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
|
||||||
|
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
|
||||||
|
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
|
||||||
|
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
|
||||||
|
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
|
||||||
|
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
|
||||||
|
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
|
||||||
|
|
||||||
|
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
|
||||||
|
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
|
||||||
|
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
|
||||||
|
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
|
||||||
|
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
|
||||||
|
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
|
||||||
|
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
|
||||||
|
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
|
||||||
|
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
|
||||||
|
|
||||||
|
c. The disclaimer of warranties and limitation of liability provided
|
||||||
|
above shall be interpreted in a manner that, to the extent
|
||||||
|
possible, most closely approximates an absolute disclaimer and
|
||||||
|
waiver of all liability.
|
||||||
|
|
||||||
|
|
||||||
|
Section 6 -- Term and Termination.
|
||||||
|
|
||||||
|
a. This Public License applies for the term of the Copyright and
|
||||||
|
Similar Rights licensed here. However, if You fail to comply with
|
||||||
|
this Public License, then Your rights under this Public License
|
||||||
|
terminate automatically.
|
||||||
|
|
||||||
|
b. Where Your right to use the Licensed Material has terminated under
|
||||||
|
Section 6(a), it reinstates:
|
||||||
|
|
||||||
|
1. automatically as of the date the violation is cured, provided
|
||||||
|
it is cured within 30 days of Your discovery of the
|
||||||
|
violation; or
|
||||||
|
|
||||||
|
2. upon express reinstatement by the Licensor.
|
||||||
|
|
||||||
|
For the avoidance of doubt, this Section 6(b) does not affect any
|
||||||
|
right the Licensor may have to seek remedies for Your violations
|
||||||
|
of this Public License.
|
||||||
|
|
||||||
|
c. For the avoidance of doubt, the Licensor may also offer the
|
||||||
|
Licensed Material under separate terms or conditions or stop
|
||||||
|
distributing the Licensed Material at any time; however, doing so
|
||||||
|
will not terminate this Public License.
|
||||||
|
|
||||||
|
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
|
||||||
|
License.
|
||||||
|
|
||||||
|
|
||||||
|
Section 7 -- Other Terms and Conditions.
|
||||||
|
|
||||||
|
a. The Licensor shall not be bound by any additional or different
|
||||||
|
terms or conditions communicated by You unless expressly agreed.
|
||||||
|
|
||||||
|
b. Any arrangements, understandings, or agreements regarding the
|
||||||
|
Licensed Material not stated herein are separate from and
|
||||||
|
independent of the terms and conditions of this Public License.
|
||||||
|
|
||||||
|
|
||||||
|
Section 8 -- Interpretation.
|
||||||
|
|
||||||
|
a. For the avoidance of doubt, this Public License does not, and
|
||||||
|
shall not be interpreted to, reduce, limit, restrict, or impose
|
||||||
|
conditions on any use of the Licensed Material that could lawfully
|
||||||
|
be made without permission under this Public License.
|
||||||
|
|
||||||
|
b. To the extent possible, if any provision of this Public License is
|
||||||
|
deemed unenforceable, it shall be automatically reformed to the
|
||||||
|
minimum extent necessary to make it enforceable. If the provision
|
||||||
|
cannot be reformed, it shall be severed from this Public License
|
||||||
|
without affecting the enforceability of the remaining terms and
|
||||||
|
conditions.
|
||||||
|
|
||||||
|
c. No term or condition of this Public License will be waived and no
|
||||||
|
failure to comply consented to unless expressly agreed to by the
|
||||||
|
Licensor.
|
||||||
|
|
||||||
|
d. Nothing in this Public License constitutes or may be interpreted
|
||||||
|
as a limitation upon, or waiver of, any privileges and immunities
|
||||||
|
that apply to the Licensor or You, including from the legal
|
||||||
|
processes of any jurisdiction or authority.
|
||||||
|
|
||||||
|
=======================================================================
|
||||||
|
|
||||||
|
Creative Commons is not a party to its public
|
||||||
|
licenses. Notwithstanding, Creative Commons may elect to apply one of
|
||||||
|
its public licenses to material it publishes and in those instances
|
||||||
|
will be considered the “Licensor.” The text of the Creative Commons
|
||||||
|
public licenses is dedicated to the public domain under the CC0 Public
|
||||||
|
Domain Dedication. Except for the limited purpose of indicating that
|
||||||
|
material is shared under a Creative Commons public license or as
|
||||||
|
otherwise permitted by the Creative Commons policies published at
|
||||||
|
creativecommons.org/policies, Creative Commons does not authorize the
|
||||||
|
use of the trademark "Creative Commons" or any other trademark or logo
|
||||||
|
of Creative Commons without its prior written consent including,
|
||||||
|
without limitation, in connection with any unauthorized modifications
|
||||||
|
to any of its public licenses or any other arrangements,
|
||||||
|
understandings, or agreements concerning use of licensed material. For
|
||||||
|
the avoidance of doubt, this paragraph does not form part of the
|
||||||
|
public licenses.
|
||||||
|
|
||||||
|
Creative Commons may be contacted at creativecommons.org.
|
||||||
|
|
|
@ -35,9 +35,12 @@ It is written in C++ with portability in mind, and we're actively working on bui
|
||||||
<a href="https://git.suyu.dev/suyu/suyu/actions">Pipelines</a>
|
<a href="https://git.suyu.dev/suyu/suyu/actions">Pipelines</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
## Hardware Requirements
|
||||||
|
[Click here to see the Hardware Requirements](https://git.suyu.dev/suyu/suyu/wiki/Hardware-Requirements)
|
||||||
|
|
||||||
## Status
|
## Status
|
||||||
|
|
||||||
Although we're able to make builds, we don't have a version ready for distribution yet. But we can always use more help! You can make a merge request if you'd like to see something changed, or you can [chat with other developers to find out what needs work](https://discord.gg/suyu).
|
We currently have builds over at the [Releases](https://git.suyu.dev/suyu/suyu/releases) page.
|
||||||
|
|
||||||
**Note**: We try to update this README whenever we can, but some links might be broken, and some information may be outdated or irrelevant.
|
**Note**: We try to update this README whenever we can, but some links might be broken, and some information may be outdated or irrelevant.
|
||||||
|
|
||||||
|
@ -57,6 +60,10 @@ You can also contact any of the developers on Discord to learn more about the cu
|
||||||
* __macOS__: [Releases](https://git.suyu.dev/suyu/suyu/releases)
|
* __macOS__: [Releases](https://git.suyu.dev/suyu/suyu/releases)
|
||||||
* __Android__: [Releases](https://git.suyu.dev/suyu/suyu/releases)
|
* __Android__: [Releases](https://git.suyu.dev/suyu/suyu/releases)
|
||||||
|
|
||||||
|
If you want daily builds then [Click here](https://git.suyu.dev/suyu/suyu/actions)
|
||||||
|
If you don't know how to download the daily builds then [Click here](https://git.suyu.dev/suyu/suyu/raw/branch/dev/img/daily-builds.png)
|
||||||
|
Right now we only have daily builds for Linux and Android.
|
||||||
|
|
||||||
We have official builds [here.](https://git.suyu.dev/suyu/suyu/releases) If any website or person is claiming to have a build for suyu, take that with a grain of salt.
|
We have official builds [here.](https://git.suyu.dev/suyu/suyu/releases) If any website or person is claiming to have a build for suyu, take that with a grain of salt.
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
5
dist/readme/suyu__Logo-Pill.svg
vendored
5
dist/readme/suyu__Logo-Pill.svg
vendored
|
@ -1,3 +1,8 @@
|
||||||
|
<!--
|
||||||
|
SPDX-FileCopyrightText: © 2024 Realmy
|
||||||
|
SPDX-License-Identifier: CC-BY-NC-SA-4.0
|
||||||
|
-->
|
||||||
|
|
||||||
<svg width="2421" height="912" viewBox="0 0 2421 912" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg width="2421" height="912" viewBox="0 0 2421 912" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<rect width="2421" height="912" rx="456" fill="black"/>
|
<rect width="2421" height="912" rx="456" fill="black"/>
|
||||||
<path d="M1981.76 562.559C2048.26 562.559 2085.29 540.974 2097.74 494.87H2098.58C2098.58 516.024 2097.74 543.446 2096.9 558.402H2150.07V353.155H2096.9V437.082C2096.9 489.051 2052 518.972 1999.23 518.972C1940.61 518.972 1921.48 495.702 1921.48 457.882V353.155H1868.34V469.104C1868.34 518.559 1901.97 562.559 1981.76 562.559Z" fill="white"/>
|
<path d="M1981.76 562.559C2048.26 562.559 2085.29 540.974 2097.74 494.87H2098.58C2098.58 516.024 2097.74 543.446 2096.9 558.402H2150.07V353.155H2096.9V437.082C2096.9 489.051 2052 518.972 1999.23 518.972C1940.61 518.972 1921.48 495.702 1921.48 457.882V353.155H1868.34V469.104C1868.34 518.559 1901.97 562.559 1981.76 562.559Z" fill="white"/>
|
||||||
|
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.2 KiB |
BIN
img/daily-builds.png
Normal file
BIN
img/daily-builds.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 135 KiB |
BIN
img/maximum-clocks.png
Normal file
BIN
img/maximum-clocks.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
|
@ -241,6 +241,8 @@ abstract class SettingsItem(
|
||||||
IntSetting.FSR_SHARPENING_SLIDER,
|
IntSetting.FSR_SHARPENING_SLIDER,
|
||||||
titleId = R.string.fsr_sharpness,
|
titleId = R.string.fsr_sharpness,
|
||||||
descriptionId = R.string.fsr_sharpness_description,
|
descriptionId = R.string.fsr_sharpness_description,
|
||||||
|
min = 0,
|
||||||
|
max = 200,
|
||||||
units = "%"
|
units = "%"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -327,6 +329,8 @@ abstract class SettingsItem(
|
||||||
ByteSetting.AUDIO_VOLUME,
|
ByteSetting.AUDIO_VOLUME,
|
||||||
titleId = R.string.audio_volume,
|
titleId = R.string.audio_volume,
|
||||||
descriptionId = R.string.audio_volume_description,
|
descriptionId = R.string.audio_volume_description,
|
||||||
|
min = 0,
|
||||||
|
max = 120,
|
||||||
units = "%"
|
units = "%"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
@ -142,6 +142,7 @@
|
||||||
<item>@string/ratio_force_four_three</item>
|
<item>@string/ratio_force_four_three</item>
|
||||||
<item>@string/ratio_force_twenty_one_nine</item>
|
<item>@string/ratio_force_twenty_one_nine</item>
|
||||||
<item>@string/ratio_force_sixteen_ten</item>
|
<item>@string/ratio_force_sixteen_ten</item>
|
||||||
|
<item>@string/ratio_force_thirty_two_nine</item>
|
||||||
<item>@string/ratio_stretch</item>
|
<item>@string/ratio_stretch</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
|
@ -151,6 +152,7 @@
|
||||||
<item>2</item>
|
<item>2</item>
|
||||||
<item>3</item>
|
<item>3</item>
|
||||||
<item>4</item>
|
<item>4</item>
|
||||||
|
<item>5</item>
|
||||||
</integer-array>
|
</integer-array>
|
||||||
|
|
||||||
<string-array name="rendererScalingFilterNames">
|
<string-array name="rendererScalingFilterNames">
|
||||||
|
|
|
@ -601,6 +601,7 @@
|
||||||
<string name="ratio_force_four_three">Force 4:3</string>
|
<string name="ratio_force_four_three">Force 4:3</string>
|
||||||
<string name="ratio_force_twenty_one_nine">Force 21:9</string>
|
<string name="ratio_force_twenty_one_nine">Force 21:9</string>
|
||||||
<string name="ratio_force_sixteen_ten">Force 16:10</string>
|
<string name="ratio_force_sixteen_ten">Force 16:10</string>
|
||||||
|
<string name="ratio_force_thirty_two_nine">Force 32:9</string>
|
||||||
<string name="ratio_stretch">Stretch to window</string>
|
<string name="ratio_stretch">Stretch to window</string>
|
||||||
|
|
||||||
<!-- CPU Backend -->
|
<!-- CPU Backend -->
|
||||||
|
|
65
src/android/gradlew
vendored
65
src/android/gradlew
vendored
|
@ -1,65 +1,12 @@
|
||||||
#!/bin/sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
#
|
# SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||||
# Copyright © 2015-2021 the original authors.
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
#
|
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
##
|
||||||
# Gradle start up script for POSIX generated by Gradle.
|
## Gradle start up script for UN*X
|
||||||
#
|
##
|
||||||
# Important for running:
|
|
||||||
#
|
|
||||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
|
||||||
# noncompliant, but you have some other compliant shell such as ksh or
|
|
||||||
# bash, then to run this script, type that shell name before the whole
|
|
||||||
# command line, like:
|
|
||||||
#
|
|
||||||
# ksh Gradle
|
|
||||||
#
|
|
||||||
# Busybox and similar reduced shells will NOT work, because this script
|
|
||||||
# requires all of these POSIX shell features:
|
|
||||||
# * functions;
|
|
||||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
|
||||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
|
||||||
# * compound commands having a testable exit status, especially «case»;
|
|
||||||
# * various built-in commands including «command», «set», and «ulimit».
|
|
||||||
#
|
|
||||||
# Important for patching:
|
|
||||||
#
|
|
||||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
|
||||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
|
||||||
#
|
|
||||||
# The "traditional" practice of packing multiple parameters into a
|
|
||||||
# space-separated string is a well documented source of bugs and security
|
|
||||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
|
||||||
# options in "$@", and eventually passing that to Java.
|
|
||||||
#
|
|
||||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
|
||||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
|
||||||
# see the in-line comments for details.
|
|
||||||
#
|
|
||||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
|
||||||
# Darwin, MinGW, and NonStop.
|
|
||||||
#
|
|
||||||
# (3) This script is generated from the Groovy template
|
|
||||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
|
||||||
# within the Gradle project.
|
|
||||||
#
|
|
||||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
|
||||||
#
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
# Attempt to set APP_HOME
|
# Attempt to set APP_HOME
|
||||||
|
|
19
src/android/gradlew.bat
vendored
19
src/android/gradlew.bat
vendored
|
@ -1,20 +1,7 @@
|
||||||
@rem
|
@rem SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||||
@rem Copyright 2015 the original author or authors.
|
@rem SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
@rem
|
|
||||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
@rem you may not use this file except in compliance with the License.
|
|
||||||
@rem You may obtain a copy of the License at
|
|
||||||
@rem
|
|
||||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
@rem
|
|
||||||
@rem Unless required by applicable law or agreed to in writing, software
|
|
||||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
@rem See the License for the specific language governing permissions and
|
|
||||||
@rem limitations under the License.
|
|
||||||
@rem
|
|
||||||
|
|
||||||
@if "%DEBUG%"=="" @echo off
|
@if "%DEBUG%" == "" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
@rem
|
@rem
|
||||||
@rem Gradle startup script for Windows
|
@rem Gradle startup script for Windows
|
||||||
|
|
|
@ -240,6 +240,15 @@ if (MSVC)
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
set_source_files_properties(stb.cpp PROPERTIES COMPILE_OPTIONS "-Wno-implicit-fallthrough;-Wno-missing-declarations;-Wno-missing-field-initializers")
|
set_source_files_properties(stb.cpp PROPERTIES COMPILE_OPTIONS "-Wno-implicit-fallthrough;-Wno-missing-declarations;-Wno-missing-field-initializers")
|
||||||
|
|
||||||
|
# Get around GCC failing with intrinsics in Debug
|
||||||
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||||
|
set_property(
|
||||||
|
SOURCE stb.cpp
|
||||||
|
APPEND
|
||||||
|
PROPERTY COMPILE_OPTIONS ";-O2"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <climits>
|
#include <climits>
|
||||||
|
#include <mutex>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
|
||||||
#include <fmt/format.h>
|
#include <fmt/format.h>
|
||||||
|
@ -231,8 +232,15 @@ public:
|
||||||
if (!filter.CheckMessage(log_class, log_level)) {
|
if (!filter.CheckMessage(log_class, log_level)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
message_queue.EmplaceWait(
|
|
||||||
CreateEntry(log_class, log_level, filename, line_num, function, std::move(message)));
|
auto entry =
|
||||||
|
CreateEntry(log_class, log_level, filename, line_num, function, std::move(message));
|
||||||
|
if (Settings::values.log_async) {
|
||||||
|
message_queue.EmplaceWait(entry);
|
||||||
|
} else {
|
||||||
|
std::scoped_lock l{sync_mutex};
|
||||||
|
ForEachBackend([&entry](Backend& backend) { backend.Write(entry); });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -313,6 +321,7 @@ private:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
MPSCQueue<Entry> message_queue{};
|
MPSCQueue<Entry> message_queue{};
|
||||||
|
std::mutex sync_mutex;
|
||||||
std::chrono::steady_clock::time_point time_origin{std::chrono::steady_clock::now()};
|
std::chrono::steady_clock::time_point time_origin{std::chrono::steady_clock::now()};
|
||||||
std::jthread backend_thread;
|
std::jthread backend_thread;
|
||||||
};
|
};
|
||||||
|
@ -345,9 +354,11 @@ void SetColorConsoleBackendEnabled(bool enabled) {
|
||||||
void FmtLogMessageImpl(Class log_class, Level log_level, const char* filename,
|
void FmtLogMessageImpl(Class log_class, Level log_level, const char* filename,
|
||||||
unsigned int line_num, const char* function, fmt::string_view format,
|
unsigned int line_num, const char* function, fmt::string_view format,
|
||||||
const fmt::format_args& args) {
|
const fmt::format_args& args) {
|
||||||
if (!initialization_in_progress_suppress_logging) {
|
if (initialization_in_progress_suppress_logging) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Impl::Instance().PushEntry(log_class, log_level, filename, line_num, function,
|
Impl::Instance().PushEntry(log_class, log_level, filename, line_num, function,
|
||||||
fmt::vformat(format, args));
|
fmt::vformat(format, args));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} // namespace Common::Log
|
} // namespace Common::Log
|
||||||
|
|
|
@ -171,6 +171,7 @@ const char* GetLogClassName(Class log_class) {
|
||||||
#define SUB(x, y) \
|
#define SUB(x, y) \
|
||||||
case Class::x##_##y: \
|
case Class::x##_##y: \
|
||||||
return #x "." #y;
|
return #x "." #y;
|
||||||
|
// return #x "_" #y;
|
||||||
ALL_LOG_CLASSES()
|
ALL_LOG_CLASSES()
|
||||||
#undef CLS
|
#undef CLS
|
||||||
#undef SUB
|
#undef SUB
|
||||||
|
|
|
@ -604,6 +604,7 @@ struct Values {
|
||||||
|
|
||||||
// Miscellaneous
|
// Miscellaneous
|
||||||
Setting<std::string> log_filter{linkage, "*:Info", "log_filter", Category::Miscellaneous};
|
Setting<std::string> log_filter{linkage, "*:Info", "log_filter", Category::Miscellaneous};
|
||||||
|
Setting<bool> log_async{linkage, true, "log_async", Category::Miscellaneous};
|
||||||
Setting<bool> use_dev_keys{linkage, false, "use_dev_keys", Category::Miscellaneous};
|
Setting<bool> use_dev_keys{linkage, false, "use_dev_keys", Category::Miscellaneous};
|
||||||
|
|
||||||
// Network
|
// Network
|
||||||
|
|
|
@ -31,7 +31,6 @@ enum GuestMemoryFlags : u32 {
|
||||||
UnsafeReadCachedWrite = UnsafeReadWrite | Cached,
|
UnsafeReadCachedWrite = UnsafeReadWrite | Cached,
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace {
|
|
||||||
template <typename M, typename T, GuestMemoryFlags FLAGS>
|
template <typename M, typename T, GuestMemoryFlags FLAGS>
|
||||||
class GuestMemory {
|
class GuestMemory {
|
||||||
using iterator = T*;
|
using iterator = T*;
|
||||||
|
@ -219,6 +218,5 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
} // namespace
|
|
||||||
|
|
||||||
} // namespace Core::Memory
|
} // namespace Core::Memory
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
||||||
// SPDX-FileCopyrightText: Copyright 2024 suyu Emulator Project
|
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include "common/settings.h"
|
#include "common/settings.h"
|
||||||
|
@ -336,9 +335,4 @@ void AppletManager::SetWindowSystem(WindowSystem* window_system) {
|
||||||
applet->process->Run();
|
applet->process->Run();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppletManager::TrackApplet(std::shared_ptr<Applet> applet, bool is_application) {
|
|
||||||
m_window_system->TrackApplet(applet, false);
|
|
||||||
m_window_system->RequestApplicationToGetForeground();
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace Service::AM
|
} // namespace Service::AM
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
||||||
// SPDX-FileCopyrightText: Copyright 2024 suyu Emulator Project
|
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
@ -47,7 +46,6 @@ public:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void SetWindowSystem(WindowSystem* window_system);
|
void SetWindowSystem(WindowSystem* window_system);
|
||||||
void TrackApplet(std::shared_ptr<Applet> applet, bool is_application);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Core::System& m_system;
|
Core::System& m_system;
|
||||||
|
|
|
@ -106,6 +106,7 @@ std::unique_ptr<Process> CreateApplicationProcess(std::vector<u8>& out_control,
|
||||||
out_control = nacp.GetRawBytes();
|
out_control = nacp.GetRawBytes();
|
||||||
} else {
|
} else {
|
||||||
out_control.resize(sizeof(FileSys::RawNACP));
|
out_control.resize(sizeof(FileSys::RawNACP));
|
||||||
|
memset(out_control.data(), 0, sizeof(u8) * out_control.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
auto& storage = system.GetContentProviderUnion();
|
auto& storage = system.GetContentProviderUnion();
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2024 suyu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include "core/hle/service/am/applet_data_broker.h"
|
#include "core/hle/service/am/applet_data_broker.h"
|
||||||
|
@ -101,6 +102,22 @@ Result ILibraryAppletAccessor::PushInData(SharedPointer<IStorage> storage) {
|
||||||
|
|
||||||
Result ILibraryAppletAccessor::PopOutData(Out<SharedPointer<IStorage>> out_storage) {
|
Result ILibraryAppletAccessor::PopOutData(Out<SharedPointer<IStorage>> out_storage) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
// suyu todo: move library applet fix to another function
|
||||||
|
// since this function is only called for applets that give a result,
|
||||||
|
// applets that don't (e.g. info applets in 1st party games) simply freeze
|
||||||
|
if (auto caller = m_applet->caller_applet.lock(); caller != nullptr) {
|
||||||
|
caller->SetInteractibleLocked(true);
|
||||||
|
|
||||||
|
caller->lifecycle_manager.SetFocusState(FocusState::InFocus);
|
||||||
|
caller->lifecycle_manager.UpdateRequestedFocusState();
|
||||||
|
|
||||||
|
caller->lifecycle_manager.SetResumeNotificationEnabled(true);
|
||||||
|
caller->lifecycle_manager.RequestResumeNotification();
|
||||||
|
caller->UpdateSuspensionStateLocked(true);
|
||||||
|
} else {
|
||||||
|
LOG_CRITICAL(Service_AM, "Caller applet pointer is invalid.");
|
||||||
|
LOG_CRITICAL(Service_AM, "The emulator will freeze!");
|
||||||
|
}
|
||||||
R_RETURN(m_broker->GetOutData().Pop(out_storage.Get()));
|
R_RETURN(m_broker->GetOutData().Pop(out_storage.Get()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,53 +47,6 @@ bool ShouldCreateGuestApplet(AppletId applet_id) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
AppletProgramId AppletIdToProgramId(AppletId applet_id) {
|
|
||||||
switch (applet_id) {
|
|
||||||
case AppletId::OverlayDisplay:
|
|
||||||
return AppletProgramId::OverlayDisplay;
|
|
||||||
case AppletId::QLaunch:
|
|
||||||
return AppletProgramId::QLaunch;
|
|
||||||
case AppletId::Starter:
|
|
||||||
return AppletProgramId::Starter;
|
|
||||||
case AppletId::Auth:
|
|
||||||
return AppletProgramId::Auth;
|
|
||||||
case AppletId::Cabinet:
|
|
||||||
return AppletProgramId::Cabinet;
|
|
||||||
case AppletId::Controller:
|
|
||||||
return AppletProgramId::Controller;
|
|
||||||
case AppletId::DataErase:
|
|
||||||
return AppletProgramId::DataErase;
|
|
||||||
case AppletId::Error:
|
|
||||||
return AppletProgramId::Error;
|
|
||||||
case AppletId::NetConnect:
|
|
||||||
return AppletProgramId::NetConnect;
|
|
||||||
case AppletId::ProfileSelect:
|
|
||||||
return AppletProgramId::ProfileSelect;
|
|
||||||
case AppletId::SoftwareKeyboard:
|
|
||||||
return AppletProgramId::SoftwareKeyboard;
|
|
||||||
case AppletId::MiiEdit:
|
|
||||||
return AppletProgramId::MiiEdit;
|
|
||||||
case AppletId::Web:
|
|
||||||
return AppletProgramId::Web;
|
|
||||||
case AppletId::Shop:
|
|
||||||
return AppletProgramId::Shop;
|
|
||||||
case AppletId::PhotoViewer:
|
|
||||||
return AppletProgramId::PhotoViewer;
|
|
||||||
case AppletId::Settings:
|
|
||||||
return AppletProgramId::Settings;
|
|
||||||
case AppletId::OfflineWeb:
|
|
||||||
return AppletProgramId::OfflineWeb;
|
|
||||||
case AppletId::LoginShare:
|
|
||||||
return AppletProgramId::LoginShare;
|
|
||||||
case AppletId::WebAuth:
|
|
||||||
return AppletProgramId::WebAuth;
|
|
||||||
case AppletId::MyPage:
|
|
||||||
return AppletProgramId::MyPage;
|
|
||||||
default:
|
|
||||||
return static_cast<AppletProgramId>(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
std::shared_ptr<ILibraryAppletAccessor> CreateGuestApplet(Core::System& system,
|
std::shared_ptr<ILibraryAppletAccessor> CreateGuestApplet(Core::System& system,
|
||||||
WindowSystem& window_system,
|
WindowSystem& window_system,
|
||||||
std::shared_ptr<Applet> caller_applet,
|
std::shared_ptr<Applet> caller_applet,
|
||||||
|
@ -163,6 +116,53 @@ std::shared_ptr<ILibraryAppletAccessor> CreateFrontendApplet(Core::System& syste
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
AppletProgramId AppletIdToProgramId(AppletId applet_id) {
|
||||||
|
switch (applet_id) {
|
||||||
|
case AppletId::OverlayDisplay:
|
||||||
|
return AppletProgramId::OverlayDisplay;
|
||||||
|
case AppletId::QLaunch:
|
||||||
|
return AppletProgramId::QLaunch;
|
||||||
|
case AppletId::Starter:
|
||||||
|
return AppletProgramId::Starter;
|
||||||
|
case AppletId::Auth:
|
||||||
|
return AppletProgramId::Auth;
|
||||||
|
case AppletId::Cabinet:
|
||||||
|
return AppletProgramId::Cabinet;
|
||||||
|
case AppletId::Controller:
|
||||||
|
return AppletProgramId::Controller;
|
||||||
|
case AppletId::DataErase:
|
||||||
|
return AppletProgramId::DataErase;
|
||||||
|
case AppletId::Error:
|
||||||
|
return AppletProgramId::Error;
|
||||||
|
case AppletId::NetConnect:
|
||||||
|
return AppletProgramId::NetConnect;
|
||||||
|
case AppletId::ProfileSelect:
|
||||||
|
return AppletProgramId::ProfileSelect;
|
||||||
|
case AppletId::SoftwareKeyboard:
|
||||||
|
return AppletProgramId::SoftwareKeyboard;
|
||||||
|
case AppletId::MiiEdit:
|
||||||
|
return AppletProgramId::MiiEdit;
|
||||||
|
case AppletId::Web:
|
||||||
|
return AppletProgramId::Web;
|
||||||
|
case AppletId::Shop:
|
||||||
|
return AppletProgramId::Shop;
|
||||||
|
case AppletId::PhotoViewer:
|
||||||
|
return AppletProgramId::PhotoViewer;
|
||||||
|
case AppletId::Settings:
|
||||||
|
return AppletProgramId::Settings;
|
||||||
|
case AppletId::OfflineWeb:
|
||||||
|
return AppletProgramId::OfflineWeb;
|
||||||
|
case AppletId::LoginShare:
|
||||||
|
return AppletProgramId::LoginShare;
|
||||||
|
case AppletId::WebAuth:
|
||||||
|
return AppletProgramId::WebAuth;
|
||||||
|
case AppletId::MyPage:
|
||||||
|
return AppletProgramId::MyPage;
|
||||||
|
default:
|
||||||
|
return static_cast<AppletProgramId>(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ILibraryAppletCreator::ILibraryAppletCreator(Core::System& system_, std::shared_ptr<Applet> applet,
|
ILibraryAppletCreator::ILibraryAppletCreator(Core::System& system_, std::shared_ptr<Applet> applet,
|
||||||
WindowSystem& window_system)
|
WindowSystem& window_system)
|
||||||
: ServiceFramework{system_, "ILibraryAppletCreator"},
|
: ServiceFramework{system_, "ILibraryAppletCreator"},
|
||||||
|
|
|
@ -35,4 +35,6 @@ private:
|
||||||
const std::shared_ptr<Applet> m_applet;
|
const std::shared_ptr<Applet> m_applet;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
AppletProgramId AppletIdToProgramId(AppletId applet_id);
|
||||||
|
|
||||||
} // namespace Service::AM
|
} // namespace Service::AM
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
||||||
// SPDX-FileCopyrightText: Copyright 2024 suyu Emulator Project
|
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include "core/core_timing.h"
|
#include "core/core_timing.h"
|
||||||
|
@ -178,14 +177,6 @@ Result ILibraryAppletSelfAccessor::GetMainAppletStorageId(Out<FileSys::StorageId
|
||||||
Result ILibraryAppletSelfAccessor::ExitProcessAndReturn() {
|
Result ILibraryAppletSelfAccessor::ExitProcessAndReturn() {
|
||||||
LOG_INFO(Service_AM, "called");
|
LOG_INFO(Service_AM, "called");
|
||||||
m_applet->process->Terminate();
|
m_applet->process->Terminate();
|
||||||
if(!m_applet->caller_applet.expired()) {
|
|
||||||
std::shared_ptr<Applet> applet = m_applet->caller_applet.lock();
|
|
||||||
if(applet == nullptr) R_SUCCEED();
|
|
||||||
LOG_INFO(Service_AM, "tracking caller applet");
|
|
||||||
// todo: is_application is set to false as window_system doesn't allow re-tracking without replacing the application
|
|
||||||
system.GetAppletManager().TrackApplet(applet, false);
|
|
||||||
applet->lifecycle_manager.SetFocusState(FocusState::InFocus);
|
|
||||||
}
|
|
||||||
R_SUCCEED();
|
R_SUCCEED();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
||||||
|
// SPDX-FileCopyrightText: 2024 sudachi Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
|
@ -7,6 +8,7 @@
|
||||||
#include "shader_recompiler/backend/glasm/glasm_emit_context.h"
|
#include "shader_recompiler/backend/glasm/glasm_emit_context.h"
|
||||||
#include "shader_recompiler/frontend/ir/value.h"
|
#include "shader_recompiler/frontend/ir/value.h"
|
||||||
#include "shader_recompiler/profile.h"
|
#include "shader_recompiler/profile.h"
|
||||||
|
#include "shader_recompiler/runtime_info.h"
|
||||||
#include "shader_recompiler/shader_info.h"
|
#include "shader_recompiler/shader_info.h"
|
||||||
|
|
||||||
namespace Shader::Backend::GLASM {
|
namespace Shader::Backend::GLASM {
|
||||||
|
@ -406,6 +408,10 @@ void EmitInvocationInfo(EmitContext& ctx, IR::Inst& inst) {
|
||||||
case Stage::TessellationEval:
|
case Stage::TessellationEval:
|
||||||
ctx.Add("SHL.U {}.x,primitive.vertexcount,16;", inst);
|
ctx.Add("SHL.U {}.x,primitive.vertexcount,16;", inst);
|
||||||
break;
|
break;
|
||||||
|
case Stage::Geometry:
|
||||||
|
ctx.Add("SHL.U {}.x,{},16;", inst,
|
||||||
|
InputTopologyVertices::vertices(ctx.runtime_info.input_topology));
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
LOG_WARNING(Shader, "(STUBBED) called");
|
LOG_WARNING(Shader, "(STUBBED) called");
|
||||||
ctx.Add("MOV.S {}.x,0x00ff0000;", inst);
|
ctx.Add("MOV.S {}.x,0x00ff0000;", inst);
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
||||||
|
// SPDX-FileCopyrightText: 2024 sudachi Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
|
@ -426,6 +427,10 @@ void EmitInvocationInfo(EmitContext& ctx, IR::Inst& inst) {
|
||||||
case Stage::TessellationEval:
|
case Stage::TessellationEval:
|
||||||
ctx.AddU32("{}=uint(gl_PatchVerticesIn)<<16;", inst);
|
ctx.AddU32("{}=uint(gl_PatchVerticesIn)<<16;", inst);
|
||||||
break;
|
break;
|
||||||
|
case Stage::Geometry:
|
||||||
|
ctx.AddU32("{}=uint({}<<16);", inst,
|
||||||
|
InputTopologyVertices::vertices(ctx.runtime_info.input_topology));
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
LOG_WARNING(Shader, "(STUBBED) called");
|
LOG_WARNING(Shader, "(STUBBED) called");
|
||||||
ctx.AddU32("{}=uint(0x00ff0000);", inst);
|
ctx.AddU32("{}=uint(0x00ff0000);", inst);
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
||||||
|
// SPDX-FileCopyrightText: 2024 sudachi Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include <bit>
|
#include <bit>
|
||||||
|
@ -549,6 +550,8 @@ Id EmitInvocationInfo(EmitContext& ctx) {
|
||||||
case Stage::TessellationEval:
|
case Stage::TessellationEval:
|
||||||
return ctx.OpShiftLeftLogical(ctx.U32[1], ctx.OpLoad(ctx.U32[1], ctx.patch_vertices_in),
|
return ctx.OpShiftLeftLogical(ctx.U32[1], ctx.OpLoad(ctx.U32[1], ctx.patch_vertices_in),
|
||||||
ctx.Const(16u));
|
ctx.Const(16u));
|
||||||
|
case Stage::Geometry:
|
||||||
|
return ctx.Const(InputTopologyVertices::vertices(ctx.runtime_info.input_topology) << 16);
|
||||||
default:
|
default:
|
||||||
LOG_WARNING(Shader, "(STUBBED) called");
|
LOG_WARNING(Shader, "(STUBBED) called");
|
||||||
return ctx.Const(0x00ff0000u);
|
return ctx.Const(0x00ff0000u);
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
||||||
|
// SPDX-FileCopyrightText: 2024 sudachi Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
@ -30,6 +31,24 @@ enum class InputTopology {
|
||||||
TrianglesAdjacency,
|
TrianglesAdjacency,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct InputTopologyVertices {
|
||||||
|
static u32 vertices(InputTopology input_topology) {
|
||||||
|
switch (input_topology) {
|
||||||
|
case InputTopology::Lines:
|
||||||
|
return 2;
|
||||||
|
case InputTopology::LinesAdjacency:
|
||||||
|
return 4;
|
||||||
|
case InputTopology::Triangles:
|
||||||
|
return 3;
|
||||||
|
case InputTopology::TrianglesAdjacency:
|
||||||
|
return 6;
|
||||||
|
case InputTopology::Points:
|
||||||
|
default:
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
enum class CompareFunction {
|
enum class CompareFunction {
|
||||||
Never,
|
Never,
|
||||||
Less,
|
Less,
|
||||||
|
|
|
@ -127,7 +127,7 @@ p, li { white-space: pre-wrap; }
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="labelLinks">
|
<widget class="QLabel" name="labelLinks">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><html><head/><body><p><a href="https://gitlab.com/suyu-emu/suyu"><span style=" text-decoration: underline; color:#039be5;">Website</span></a> | <a href="https://discord.com/invite/2gQRBp44KT"><span style=" text-decoration: underline; color:#039be5;">Discord</span></a> | <a href="https://gitlab.com/suyu-emu/suyu"><span style=" text-decoration: underline; color:#039be5;">Source Code</span></a> | <a href="https://gitlab.com/suyu-emu/suyu/-/graphs/master"><span style=" text-decoration: underline; color:#039be5;">Contributors</span></a> | <a href="https://gitlab.com/suyu-emu/suyu/-/blob/master/LICENSE.txt"><span style=" text-decoration: underline; color:#039be5;">License</span></a></p></body></html></string>
|
<string><html><head/><body><p><a href="https://suyu.dev"><span style=" text-decoration: underline; color:#039be5;">Website</span></a> | <a href="https://discord.com/invite/2gQRBp44KT"><span style=" text-decoration: underline; color:#039be5;">Discord</span></a> | <a href="https://git.suyu.dev/suyu/suyu"><span style=" text-decoration: underline; color:#039be5;">Source Code</span></a> | <a href="https://git.suyu.dev/suyu/suyu/activity"><span style=" text-decoration: underline; color:#039be5;">Contributors</span></a> | <a href="https://git.suyu.dev/suyu/suyu/src/branch/dev/LICENSE.txt"><span style=" text-decoration: underline; color:#039be5;">License</span></a></p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="openExternalLinks">
|
<property name="openExternalLinks">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
|
|
@ -73,6 +73,7 @@ void ConfigureDebug::SetConfiguration() {
|
||||||
ui->disable_loop_safety_checks->setChecked(
|
ui->disable_loop_safety_checks->setChecked(
|
||||||
Settings::values.disable_shader_loop_safety_checks.GetValue());
|
Settings::values.disable_shader_loop_safety_checks.GetValue());
|
||||||
ui->extended_logging->setChecked(Settings::values.extended_logging.GetValue());
|
ui->extended_logging->setChecked(Settings::values.extended_logging.GetValue());
|
||||||
|
ui->log_async->setChecked(Settings::values.log_async.GetValue());
|
||||||
ui->perform_vulkan_check->setChecked(Settings::values.perform_vulkan_check.GetValue());
|
ui->perform_vulkan_check->setChecked(Settings::values.perform_vulkan_check.GetValue());
|
||||||
|
|
||||||
#ifdef SUYU_USE_QT_WEB_ENGINE
|
#ifdef SUYU_USE_QT_WEB_ENGINE
|
||||||
|
@ -115,6 +116,7 @@ void ConfigureDebug::ApplyConfiguration() {
|
||||||
Common::Log::Filter filter;
|
Common::Log::Filter filter;
|
||||||
filter.ParseFilterString(Settings::values.log_filter.GetValue());
|
filter.ParseFilterString(Settings::values.log_filter.GetValue());
|
||||||
Common::Log::SetGlobalFilter(filter);
|
Common::Log::SetGlobalFilter(filter);
|
||||||
|
Settings::values.log_async = ui->log_async->isChecked();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigureDebug::changeEvent(QEvent* event) {
|
void ConfigureDebug::changeEvent(QEvent* event) {
|
||||||
|
|
|
@ -164,6 +164,20 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QCheckBox" name="log_async">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>When checked, logging will run asynchronously. This may cut the log on crashes.
|
||||||
|
When unchecked, logging will run synchronously. This will slow down the emulator, but allow all logs to be written. Useful for debugging.</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Log asynchronously</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="0" column="0" colspan="2">
|
<item row="0" column="0" colspan="2">
|
||||||
<widget class="QWidget" name="logging_widget" native="true">
|
<widget class="QWidget" name="logging_widget" native="true">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
|
@ -199,7 +213,14 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="log_filter_edit"/>
|
<widget class="QLineEdit" name="log_filter_edit">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Log filter in the form <class>:<level>.
|
||||||
|
Separate multiple filters with a space.
|
||||||
|
Levels: Trace, Debug, Info, Warning, Error, Critical
|
||||||
|
Classes: See Common/logging/types.h</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
|
@ -24,7 +24,8 @@ DiscordImpl::DiscordImpl(Core::System& system_) : system{system_} {
|
||||||
DiscordEventHandlers handlers{};
|
DiscordEventHandlers handlers{};
|
||||||
// The number is the client ID for suyu, it's used for images and the
|
// The number is the client ID for suyu, it's used for images and the
|
||||||
// application name
|
// application name
|
||||||
Discord_Initialize("712465656758665259", &handlers, 1, nullptr);
|
// NOTE: This application is owned by million1156 (million@alyocord.com)
|
||||||
|
Discord_Initialize("1221314350216646828", &handlers, 1, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
DiscordImpl::~DiscordImpl() {
|
DiscordImpl::~DiscordImpl() {
|
||||||
|
|
|
@ -1756,11 +1756,10 @@ bool GMainWindow::LoadROM(const QString& filename, Service::AM::FrontendAppletPa
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ContentManager::AreKeysPresent()) {
|
if (!ContentManager::AreKeysPresent()) {
|
||||||
QMessageBox::warning(this, tr("Derivation Components Missing"),
|
QMessageBox::warning(
|
||||||
tr("Encryption keys are missing. "
|
this, tr("Encryption Keys Missing"),
|
||||||
"In order to use this emulator, "
|
tr("In order to use suyu you need to provide your own encryption keys. "
|
||||||
"you need to provide your own encryption keys "
|
"You can install them by going to Tools -> Install encryption keys."));
|
||||||
"in order to play them."));
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <regex>
|
#include <regex>
|
||||||
|
#include <sstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
|
||||||
|
@ -23,9 +24,12 @@
|
||||||
#include "core/core_timing.h"
|
#include "core/core_timing.h"
|
||||||
#include "core/cpu_manager.h"
|
#include "core/cpu_manager.h"
|
||||||
#include "core/crypto/key_manager.h"
|
#include "core/crypto/key_manager.h"
|
||||||
|
#include "core/file_sys/content_archive.h"
|
||||||
|
#include "core/file_sys/nca_metadata.h"
|
||||||
#include "core/file_sys/registered_cache.h"
|
#include "core/file_sys/registered_cache.h"
|
||||||
#include "core/file_sys/vfs/vfs_real.h"
|
#include "core/file_sys/vfs/vfs_real.h"
|
||||||
#include "core/hle/service/am/applet_manager.h"
|
#include "core/hle/service/am/applet_manager.h"
|
||||||
|
#include "core/hle/service/am/service/library_applet_creator.h"
|
||||||
#include "core/hle/service/filesystem/filesystem.h"
|
#include "core/hle/service/filesystem/filesystem.h"
|
||||||
#include "core/loader/loader.h"
|
#include "core/loader/loader.h"
|
||||||
#include "frontend_common/config.h"
|
#include "frontend_common/config.h"
|
||||||
|
@ -68,7 +72,7 @@ __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
|
||||||
|
|
||||||
static void PrintHelp(const char* argv0) {
|
static void PrintHelp(const char* argv0) {
|
||||||
std::cout << "Usage: " << argv0
|
std::cout << "Usage: " << argv0
|
||||||
<< " [options] <filename>\n"
|
<< " [options]\n"
|
||||||
"-c, --config Load the specified configuration file\n"
|
"-c, --config Load the specified configuration file\n"
|
||||||
"-f, --fullscreen Start in fullscreen mode\n"
|
"-f, --fullscreen Start in fullscreen mode\n"
|
||||||
"-g, --game File path of the game to load\n"
|
"-g, --game File path of the game to load\n"
|
||||||
|
@ -77,7 +81,13 @@ static void PrintHelp(const char* argv0) {
|
||||||
" Nickname, password, address and port for multiplayer\n"
|
" Nickname, password, address and port for multiplayer\n"
|
||||||
"-p, --program Pass following string as arguments to executable\n"
|
"-p, --program Pass following string as arguments to executable\n"
|
||||||
"-u, --user Select a specific user profile from 0 to 7\n"
|
"-u, --user Select a specific user profile from 0 to 7\n"
|
||||||
"-v, --version Output version information and exit\n";
|
"-v, --version Output version information and exit\n"
|
||||||
|
"-l, "
|
||||||
|
"--applet-params="
|
||||||
|
"\"program_id,applet_id,applet_type,launch_type,prog_index,prev_prog_index\"\n"
|
||||||
|
" Numerical parameters for launching an applet. If no\n"
|
||||||
|
" game is provided, then the applet will launch off of\n"
|
||||||
|
" the applet_id.\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PrintVersion() {
|
static void PrintVersion() {
|
||||||
|
@ -212,6 +222,7 @@ int main(int argc, char** argv) {
|
||||||
|
|
||||||
bool use_multiplayer = false;
|
bool use_multiplayer = false;
|
||||||
bool fullscreen = false;
|
bool fullscreen = false;
|
||||||
|
Service::AM::FrontendAppletParameters load_parameters{};
|
||||||
std::string nickname{};
|
std::string nickname{};
|
||||||
std::string password{};
|
std::string password{};
|
||||||
std::string address{};
|
std::string address{};
|
||||||
|
@ -223,6 +234,7 @@ int main(int argc, char** argv) {
|
||||||
{"fullscreen", no_argument, 0, 'f'},
|
{"fullscreen", no_argument, 0, 'f'},
|
||||||
{"help", no_argument, 0, 'h'},
|
{"help", no_argument, 0, 'h'},
|
||||||
{"game", required_argument, 0, 'g'},
|
{"game", required_argument, 0, 'g'},
|
||||||
|
{"applet-params", optional_argument, 0, 'l'},
|
||||||
{"multiplayer", required_argument, 0, 'm'},
|
{"multiplayer", required_argument, 0, 'm'},
|
||||||
{"program", optional_argument, 0, 'p'},
|
{"program", optional_argument, 0, 'p'},
|
||||||
{"user", required_argument, 0, 'u'},
|
{"user", required_argument, 0, 'u'},
|
||||||
|
@ -232,7 +244,7 @@ int main(int argc, char** argv) {
|
||||||
};
|
};
|
||||||
|
|
||||||
while (optind < argc) {
|
while (optind < argc) {
|
||||||
int arg = getopt_long(argc, argv, "g:fhvp::c:u:", long_options, &option_index);
|
int arg = getopt_long(argc, argv, "g:fhvp::c:u:l::", long_options, &option_index);
|
||||||
if (arg != -1) {
|
if (arg != -1) {
|
||||||
switch (static_cast<char>(arg)) {
|
switch (static_cast<char>(arg)) {
|
||||||
case 'c':
|
case 'c':
|
||||||
|
@ -250,6 +262,27 @@ int main(int argc, char** argv) {
|
||||||
filepath = str_arg;
|
filepath = str_arg;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 'l': {
|
||||||
|
std::string str_arg(argv[optind++]);
|
||||||
|
str_arg.append(",0"); // FALLBACK: if string is partially completed ("1234,3")
|
||||||
|
// this will set all those unset to 0. otherwise we get
|
||||||
|
// all 3s.
|
||||||
|
std::stringstream stream(str_arg);
|
||||||
|
std::string sub;
|
||||||
|
std::getline(stream, sub, ',');
|
||||||
|
load_parameters.program_id = std::stoull(sub);
|
||||||
|
std::getline(stream, sub, ',');
|
||||||
|
load_parameters.applet_id = static_cast<Service::AM::AppletId>(std::stoul(sub));
|
||||||
|
std::getline(stream, sub, ',');
|
||||||
|
load_parameters.applet_type = static_cast<Service::AM::AppletType>(std::stoi(sub));
|
||||||
|
std::getline(stream, sub, ',');
|
||||||
|
load_parameters.launch_type = static_cast<Service::AM::LaunchType>(std::stoi(sub));
|
||||||
|
std::getline(stream, sub, ',');
|
||||||
|
load_parameters.program_index = std::stoi(sub);
|
||||||
|
std::getline(stream, sub, ',');
|
||||||
|
load_parameters.previous_program_index = std::stoi(sub);
|
||||||
|
break;
|
||||||
|
}
|
||||||
case 'm': {
|
case 'm': {
|
||||||
use_multiplayer = true;
|
use_multiplayer = true;
|
||||||
const std::string str_arg(optarg);
|
const std::string str_arg(optarg);
|
||||||
|
@ -331,7 +364,7 @@ int main(int argc, char** argv) {
|
||||||
|
|
||||||
Common::ConfigureNvidiaEnvironmentFlags();
|
Common::ConfigureNvidiaEnvironmentFlags();
|
||||||
|
|
||||||
if (filepath.empty()) {
|
if (filepath.empty() && !static_cast<u32>(load_parameters.applet_id)) {
|
||||||
LOG_CRITICAL(Frontend, "Failed to load ROM: No ROM specified");
|
LOG_CRITICAL(Frontend, "Failed to load ROM: No ROM specified");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -367,9 +400,27 @@ int main(int argc, char** argv) {
|
||||||
system.GetFileSystemController().CreateFactories(*system.GetFilesystem());
|
system.GetFileSystemController().CreateFactories(*system.GetFilesystem());
|
||||||
system.GetUserChannel().clear();
|
system.GetUserChannel().clear();
|
||||||
|
|
||||||
Service::AM::FrontendAppletParameters load_parameters{
|
if (static_cast<u32>(load_parameters.applet_id)) {
|
||||||
.applet_id = Service::AM::AppletId::Application,
|
// code below based off of suyu/main.cpp : GMainWindow::OnHomeMenu()
|
||||||
};
|
Service::AM::AppletProgramId applet_prog_id =
|
||||||
|
Service::AM::AppletIdToProgramId(load_parameters.applet_id);
|
||||||
|
auto sysnand = system.GetFileSystemController().GetSystemNANDContents();
|
||||||
|
if (!sysnand) {
|
||||||
|
LOG_CRITICAL(Frontend, "Failed to load applet: Firmware not installed.");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto user_applet_nca = sysnand->GetEntry(static_cast<u64>(applet_prog_id),
|
||||||
|
FileSys::ContentRecordType::Program);
|
||||||
|
if (!user_applet_nca) {
|
||||||
|
LOG_CRITICAL(Frontend, "Failed to load applet: applet cannot be found.");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (filepath.empty())
|
||||||
|
filepath = user_applet_nca->GetFullPath();
|
||||||
|
} else {
|
||||||
|
load_parameters.applet_id = Service::AM::AppletId::Application;
|
||||||
|
}
|
||||||
const Core::SystemResultStatus load_result{system.Load(*emu_window, filepath, load_parameters)};
|
const Core::SystemResultStatus load_result{system.Load(*emu_window, filepath, load_parameters)};
|
||||||
|
|
||||||
switch (load_result) {
|
switch (load_result) {
|
||||||
|
|
|
@ -425,6 +425,11 @@ else()
|
||||||
|
|
||||||
# VMA
|
# VMA
|
||||||
set_source_files_properties(vulkan_common/vma.cpp PROPERTIES COMPILE_OPTIONS "-Wno-conversion;-Wno-unused-variable;-Wno-unused-parameter;-Wno-missing-field-initializers")
|
set_source_files_properties(vulkan_common/vma.cpp PROPERTIES COMPILE_OPTIONS "-Wno-conversion;-Wno-unused-variable;-Wno-unused-parameter;-Wno-missing-field-initializers")
|
||||||
|
|
||||||
|
# Get around GCC failing with intrinsics in Debug
|
||||||
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||||
|
set_source_files_properties(host1x/vic.cpp PROPERTIES COMPILE_OPTIONS "-O2")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (ARCHITECTURE_x86_64)
|
if (ARCHITECTURE_x86_64)
|
||||||
|
|
|
@ -1406,7 +1406,7 @@ Image::Image(TextureCacheRuntime& runtime_, const ImageInfo& info_, GPUVAddr gpu
|
||||||
if (runtime->device.HasDebuggingToolAttached()) {
|
if (runtime->device.HasDebuggingToolAttached()) {
|
||||||
original_image.SetObjectNameEXT(VideoCommon::Name(*this).c_str());
|
original_image.SetObjectNameEXT(VideoCommon::Name(*this).c_str());
|
||||||
}
|
}
|
||||||
current_image = *original_image;
|
current_image = &Image::original_image;
|
||||||
storage_image_views.resize(info.resources.levels);
|
storage_image_views.resize(info.resources.levels);
|
||||||
if (IsPixelFormatASTC(info.format) && !runtime->device.IsOptimalAstcSupported() &&
|
if (IsPixelFormatASTC(info.format) && !runtime->device.IsOptimalAstcSupported() &&
|
||||||
Settings::values.astc_recompression.GetValue() ==
|
Settings::values.astc_recompression.GetValue() ==
|
||||||
|
@ -1550,8 +1550,8 @@ VkImageView Image::StorageImageView(s32 level) noexcept {
|
||||||
if (!view) {
|
if (!view) {
|
||||||
const auto format_info =
|
const auto format_info =
|
||||||
MaxwellToVK::SurfaceFormat(runtime->device, FormatType::Optimal, true, info.format);
|
MaxwellToVK::SurfaceFormat(runtime->device, FormatType::Optimal, true, info.format);
|
||||||
view =
|
view = MakeStorageView(runtime->device.GetLogical(), level, *(this->*current_image),
|
||||||
MakeStorageView(runtime->device.GetLogical(), level, current_image, format_info.format);
|
format_info.format);
|
||||||
}
|
}
|
||||||
return *view;
|
return *view;
|
||||||
}
|
}
|
||||||
|
@ -1582,7 +1582,7 @@ bool Image::ScaleUp(bool ignore) {
|
||||||
runtime->ViewFormats(info.format));
|
runtime->ViewFormats(info.format));
|
||||||
ignore = false;
|
ignore = false;
|
||||||
}
|
}
|
||||||
current_image = *scaled_image;
|
current_image = &Image::scaled_image;
|
||||||
if (ignore) {
|
if (ignore) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1607,7 +1607,7 @@ bool Image::ScaleDown(bool ignore) {
|
||||||
}
|
}
|
||||||
ASSERT(info.type != ImageType::Linear);
|
ASSERT(info.type != ImageType::Linear);
|
||||||
flags &= ~ImageFlagBits::Rescaled;
|
flags &= ~ImageFlagBits::Rescaled;
|
||||||
current_image = *original_image;
|
current_image = &Image::original_image;
|
||||||
if (ignore) {
|
if (ignore) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1726,7 +1726,7 @@ ImageView::ImageView(TextureCacheRuntime& runtime, const VideoCommon::ImageViewI
|
||||||
const VkImageViewUsageCreateInfo image_view_usage{
|
const VkImageViewUsageCreateInfo image_view_usage{
|
||||||
.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO,
|
.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO,
|
||||||
.pNext = nullptr,
|
.pNext = nullptr,
|
||||||
.usage = ImageUsageFlags(format_info, format),
|
.usage = image.UsageFlags(),
|
||||||
};
|
};
|
||||||
const VkImageViewCreateInfo create_info{
|
const VkImageViewCreateInfo create_info{
|
||||||
.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,
|
.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,
|
||||||
|
|
|
@ -24,7 +24,6 @@ using Common::SlotVector;
|
||||||
using VideoCommon::ImageId;
|
using VideoCommon::ImageId;
|
||||||
using VideoCommon::NUM_RT;
|
using VideoCommon::NUM_RT;
|
||||||
using VideoCommon::Region2D;
|
using VideoCommon::Region2D;
|
||||||
using VideoCommon::RenderTargets;
|
|
||||||
using VideoCore::Surface::PixelFormat;
|
using VideoCore::Surface::PixelFormat;
|
||||||
|
|
||||||
class BlitImageHelper;
|
class BlitImageHelper;
|
||||||
|
@ -157,13 +156,17 @@ public:
|
||||||
std::span<const VideoCommon::BufferImageCopy> copies);
|
std::span<const VideoCommon::BufferImageCopy> copies);
|
||||||
|
|
||||||
[[nodiscard]] VkImage Handle() const noexcept {
|
[[nodiscard]] VkImage Handle() const noexcept {
|
||||||
return current_image;
|
return *(this->*current_image);
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] VkImageAspectFlags AspectMask() const noexcept {
|
[[nodiscard]] VkImageAspectFlags AspectMask() const noexcept {
|
||||||
return aspect_mask;
|
return aspect_mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[[nodiscard]] VkImageUsageFlags UsageFlags() const noexcept {
|
||||||
|
return (this->*current_image).UsageFlags();
|
||||||
|
}
|
||||||
|
|
||||||
/// Returns true when the image is already initialized and mark it as initialized
|
/// Returns true when the image is already initialized and mark it as initialized
|
||||||
[[nodiscard]] bool ExchangeInitialization() noexcept {
|
[[nodiscard]] bool ExchangeInitialization() noexcept {
|
||||||
return std::exchange(initialized, true);
|
return std::exchange(initialized, true);
|
||||||
|
@ -186,11 +189,15 @@ private:
|
||||||
TextureCacheRuntime* runtime{};
|
TextureCacheRuntime* runtime{};
|
||||||
|
|
||||||
vk::Image original_image;
|
vk::Image original_image;
|
||||||
|
vk::Image scaled_image;
|
||||||
|
|
||||||
|
// Use a pointer to field because it is relative, so that the object can be
|
||||||
|
// moved without breaking the reference.
|
||||||
|
vk::Image Image::*current_image{};
|
||||||
|
|
||||||
std::vector<vk::ImageView> storage_image_views;
|
std::vector<vk::ImageView> storage_image_views;
|
||||||
VkImageAspectFlags aspect_mask = 0;
|
VkImageAspectFlags aspect_mask = 0;
|
||||||
bool initialized = false;
|
bool initialized = false;
|
||||||
vk::Image scaled_image{};
|
|
||||||
VkImage current_image{};
|
|
||||||
|
|
||||||
std::unique_ptr<Framebuffer> scale_framebuffer;
|
std::unique_ptr<Framebuffer> scale_framebuffer;
|
||||||
std::unique_ptr<ImageView> scale_view;
|
std::unique_ptr<ImageView> scale_view;
|
||||||
|
|
|
@ -247,7 +247,7 @@ vk::Image MemoryAllocator::CreateImage(const VkImageCreateInfo& ci) const {
|
||||||
|
|
||||||
vk::Check(vmaCreateImage(allocator, &ci, &alloc_ci, &handle, &allocation, nullptr));
|
vk::Check(vmaCreateImage(allocator, &ci, &alloc_ci, &handle, &allocation, nullptr));
|
||||||
|
|
||||||
return vk::Image(handle, *device.GetLogical(), allocator, allocation,
|
return vk::Image(handle, ci.usage, *device.GetLogical(), allocator, allocation,
|
||||||
device.GetDispatchLoader());
|
device.GetDispatchLoader());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -623,9 +623,10 @@ public:
|
||||||
|
|
||||||
class Image {
|
class Image {
|
||||||
public:
|
public:
|
||||||
explicit Image(VkImage handle_, VkDevice owner_, VmaAllocator allocator_,
|
explicit Image(VkImage handle_, VkImageUsageFlags usage_, VkDevice owner_,
|
||||||
VmaAllocation allocation_, const DeviceDispatch& dld_) noexcept
|
VmaAllocator allocator_, VmaAllocation allocation_,
|
||||||
: handle{handle_}, owner{owner_}, allocator{allocator_},
|
const DeviceDispatch& dld_) noexcept
|
||||||
|
: handle{handle_}, usage{usage_}, owner{owner_}, allocator{allocator_},
|
||||||
allocation{allocation_}, dld{&dld_} {}
|
allocation{allocation_}, dld{&dld_} {}
|
||||||
Image() = default;
|
Image() = default;
|
||||||
|
|
||||||
|
@ -633,12 +634,13 @@ public:
|
||||||
Image& operator=(const Image&) = delete;
|
Image& operator=(const Image&) = delete;
|
||||||
|
|
||||||
Image(Image&& rhs) noexcept
|
Image(Image&& rhs) noexcept
|
||||||
: handle{std::exchange(rhs.handle, nullptr)}, owner{rhs.owner}, allocator{rhs.allocator},
|
: handle{std::exchange(rhs.handle, nullptr)}, usage{rhs.usage}, owner{rhs.owner},
|
||||||
allocation{rhs.allocation}, dld{rhs.dld} {}
|
allocator{rhs.allocator}, allocation{rhs.allocation}, dld{rhs.dld} {}
|
||||||
|
|
||||||
Image& operator=(Image&& rhs) noexcept {
|
Image& operator=(Image&& rhs) noexcept {
|
||||||
Release();
|
Release();
|
||||||
handle = std::exchange(rhs.handle, nullptr);
|
handle = std::exchange(rhs.handle, nullptr);
|
||||||
|
usage = rhs.usage;
|
||||||
owner = rhs.owner;
|
owner = rhs.owner;
|
||||||
allocator = rhs.allocator;
|
allocator = rhs.allocator;
|
||||||
allocation = rhs.allocation;
|
allocation = rhs.allocation;
|
||||||
|
@ -665,10 +667,15 @@ public:
|
||||||
|
|
||||||
void SetObjectNameEXT(const char* name) const;
|
void SetObjectNameEXT(const char* name) const;
|
||||||
|
|
||||||
|
[[nodiscard]] VkImageUsageFlags UsageFlags() const noexcept {
|
||||||
|
return usage;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Release() const noexcept;
|
void Release() const noexcept;
|
||||||
|
|
||||||
VkImage handle = nullptr;
|
VkImage handle = nullptr;
|
||||||
|
VkImageUsageFlags usage{};
|
||||||
VkDevice owner = nullptr;
|
VkDevice owner = nullptr;
|
||||||
VmaAllocator allocator = nullptr;
|
VmaAllocator allocator = nullptr;
|
||||||
VmaAllocation allocation = nullptr;
|
VmaAllocation allocation = nullptr;
|
||||||
|
|
Loading…
Reference in a new issue