Merge branch 'master' into patch-3
|
|
@ -13,15 +13,16 @@ export HOMEBREW_NO_AUTO_UPDATE=1
|
|||
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
|
||||
export HOMEBREW_NO_ENV_HINTS=1
|
||||
export HOMEBREW_NO_INSTALL_CLEANUP=1
|
||||
brew update
|
||||
brew install -f --overwrite --quiet ccache "llvm@$LLVM_COMPILER_VER"
|
||||
brew link -f --overwrite --quiet "llvm@$LLVM_COMPILER_VER"
|
||||
if [ "$AARCH64" -eq 1 ]; then
|
||||
brew install -f --overwrite --quiet googletest opencv@4 sdl3 vulkan-headers vulkan-loader molten-vk
|
||||
brew unlink --quiet ffmpeg fmt qtbase qtsvg qtdeclarative protobuf
|
||||
brew install -f --overwrite --quiet googletest opencv@4 sdl3 vulkan-headers vulkan-loader molten-vk
|
||||
brew unlink --quiet ffmpeg fmt qtbase qtsvg qtdeclarative protobuf || true
|
||||
else
|
||||
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
arch -x86_64 /usr/local/bin/brew install -f --overwrite --quiet python@3.14 opencv@4 "llvm@$LLVM_COMPILER_VER" sdl3 vulkan-headers vulkan-loader molten-vk
|
||||
arch -x86_64 /usr/local/bin/brew unlink --quiet ffmpeg qtbase qtsvg qtdeclarative
|
||||
arch -x86_64 /usr/local/bin/brew unlink --quiet ffmpeg qtbase qtsvg qtdeclarative protobuf || true
|
||||
fi
|
||||
|
||||
export CXX=clang++
|
||||
|
|
|
|||
|
|
@ -4,11 +4,15 @@
|
|||
cd build || exit 1
|
||||
|
||||
cd bin
|
||||
git clone --revision=32dceb35e2c95b46cec501033cbc3a1ddf32d6e8 https://github.com/KhronosGroup/MoltenVK.git
|
||||
cd MoltenVK
|
||||
./fetchDependencies --macos
|
||||
make macos MVK_USE_METAL_PRIVATE_API=1
|
||||
cd ../
|
||||
|
||||
mkdir -p "rpcs3.app/Contents/Resources/vulkan/icd.d" || true
|
||||
wget https://github.com/KhronosGroup/MoltenVK/releases/download/v1.4.1/MoltenVK-macos-privateapi.tar
|
||||
tar -xvf MoltenVK-macos-privateapi.tar
|
||||
cp "MoltenVK/MoltenVK/dynamic/dylib/macOS/libMoltenVK.dylib" "rpcs3.app/Contents/Frameworks/libMoltenVK.dylib"
|
||||
cp "MoltenVK/MoltenVK/dynamic/dylib/macOS/MoltenVK_icd.json" "rpcs3.app/Contents/Resources/vulkan/icd.d/MoltenVK_icd.json"
|
||||
cp "MoltenVK/Package/Latest/MoltenVK/dynamic/dylib/macOS/libMoltenVK.dylib" "rpcs3.app/Contents/Frameworks/libMoltenVK.dylib"
|
||||
cp "MoltenVK/Package/Latest/MoltenVK/dynamic/dylib/macOS/MoltenVK_icd.json" "rpcs3.app/Contents/Resources/vulkan/icd.d/MoltenVK_icd.json"
|
||||
sed -i '' "s/.\//..\/..\/..\/Frameworks\//g" "rpcs3.app/Contents/Resources/vulkan/icd.d/MoltenVK_icd.json"
|
||||
|
||||
cp "$(realpath $BREW_PATH/opt/llvm@$LLVM_COMPILER_VER/lib/c++/libc++abi.1.0.dylib)" "rpcs3.app/Contents/Frameworks/libc++abi.1.dylib"
|
||||
|
|
@ -21,7 +25,7 @@ rm -rf "rpcs3.app/Contents/Frameworks/QtPdf.framework" \
|
|||
"rpcs3.app/Contents/Frameworks/QtVirtualKeyboard.framework" \
|
||||
"rpcs3.app/Contents/Plugins/platforminputcontexts" \
|
||||
"rpcs3.app/Contents/Plugins/virtualkeyboard" \
|
||||
"rpcs3.app/Contents/Resources/git"
|
||||
"rpcs3.app/Contents/Resources/git" || true
|
||||
|
||||
../../.ci/optimize-mac.sh rpcs3.app
|
||||
|
||||
|
|
@ -49,7 +53,7 @@ QT_TRANS="$WORKDIR/qt-downloader/$QT_VER/clang_64/translations"
|
|||
cp $QT_TRANS/qt_*.qm rpcs3.app/Contents/translations
|
||||
cp $QT_TRANS/qtbase_*.qm rpcs3.app/Contents/translations
|
||||
cp $QT_TRANS/qtmultimedia_*.qm rpcs3.app/Contents/translations
|
||||
rm -f rpcs3.app/Contents/translations/qt_help_*.qm
|
||||
rm -f rpcs3.app/Contents/translations/qt_help_*.qm || true
|
||||
|
||||
# Need to do this rename hack due to case insensitive filesystem
|
||||
mv rpcs3.app RPCS3_.app
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ mkdir ./bin/config
|
|||
mkdir ./bin/config/input_configs
|
||||
curl -fsSL 'https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt' 1> ./bin/config/input_configs/gamecontrollerdb.txt
|
||||
curl -fsSL 'https://rpcs3.net/compatibility?api=v1&export' | iconv -f ISO-8859-1 -t UTF-8 1> ./bin/GuiConfigs/compat_database.dat
|
||||
curl -fsSL 'https://api.rpcs3.net/config/?api=v1' | iconv -f ISO-8859-1 -t UTF-8 1> ./bin/GuiConfigs/config_database.dat
|
||||
|
||||
# Download translations
|
||||
mkdir -p ./bin/share/qt6/translations
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ mkdir ./bin/config
|
|||
mkdir ./bin/config/input_configs
|
||||
curl -fsSL 'https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt' 1> ./bin/config/input_configs/gamecontrollerdb.txt
|
||||
curl -fsSL 'https://rpcs3.net/compatibility?api=v1&export' | iconv -t UTF-8 1> ./bin/GuiConfigs/compat_database.dat
|
||||
curl -fsSL 'https://api.rpcs3.net/config/?api=v1' | iconv -t UTF-8 1> ./bin/GuiConfigs/config_database.dat
|
||||
|
||||
# Download translations
|
||||
mkdir -p ./bin/qt6/translations
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh -ex
|
||||
|
||||
# Resource/dependency URLs
|
||||
CCACHE_URL="https://github.com/ccache/ccache/releases/download/v4.11.2/ccache-4.11.2-windows-x86_64.zip"
|
||||
CCACHE_URL="https://github.com/ccache/ccache/releases/download/v4.12.3/ccache-4.12.3-windows-x86_64.zip"
|
||||
|
||||
DEP_URLS=" \
|
||||
$CCACHE_URL"
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
QT_HOST="http://qt.mirror.constant.com/"
|
||||
QT_URL_VER=$(echo "$QT_VER" | sed "s/\.//g")
|
||||
QT_VER_MSVC_UP=$(echo "${QT_VER_MSVC}" | tr '[:lower:]' '[:upper:]')
|
||||
QT_PREFIX="online/qtsdkrepository/windows_x86/desktop/qt${QT_VER_MAIN}_${QT_URL_VER}/qt${QT_VER_MAIN}_${QT_URL_VER}/qt.qt${QT_VER_MAIN}.${QT_URL_VER}."
|
||||
QT_PREFIX="online/qtsdkrepository/windows_x86/desktop/qt${QT_VER_MAIN}_${QT_URL_VER}/qt${QT_VER_MAIN}_${QT_URL_VER}_${QT_VER_MSVC}_64/qt.qt${QT_VER_MAIN}.${QT_URL_VER}."
|
||||
QT_PREFIX_2="win64_${QT_VER_MSVC}_64/${QT_VER}-0-${QT_DATE}"
|
||||
QT_SUFFIX="-Windows-Windows_11_24H2-${QT_VER_MSVC_UP}-Windows-Windows_11_24H2-X86_64.7z"
|
||||
QT_BASE_URL="${QT_HOST}${QT_PREFIX}${QT_PREFIX_2}qtbase${QT_SUFFIX}"
|
||||
|
|
@ -17,7 +17,7 @@ QT_SVG_URL="${QT_HOST}${QT_PREFIX}${QT_PREFIX_2}qtsvg${QT_SUFFIX}"
|
|||
QT_TRANSLATIONS_URL="${QT_HOST}${QT_PREFIX}${QT_PREFIX_2}qttranslations${QT_SUFFIX}"
|
||||
LLVMLIBS_URL="https://github.com/RPCS3/llvm-mirror/releases/download/custom-build-win-${LLVM_VER}/llvmlibs_mt.7z"
|
||||
VULKAN_SDK_URL="https://www.dropbox.com/scl/fi/sjjh0fc4ld281pjbl2xzu/VulkanSDK-${VULKAN_VER}-Installer.exe?rlkey=f6wzc0lvms5vwkt2z3qabfv9d&dl=1"
|
||||
CCACHE_URL="https://github.com/ccache/ccache/releases/download/v4.11.2/ccache-4.11.2-windows-x86_64.zip"
|
||||
CCACHE_URL="https://github.com/ccache/ccache/releases/download/v4.12.3/ccache-4.12.3-windows-x86_64.zip"
|
||||
|
||||
DEP_URLS=" \
|
||||
$QT_BASE_URL \
|
||||
|
|
|
|||
2
.github/workflows/llvm.yml
vendored
|
|
@ -20,7 +20,7 @@ jobs:
|
|||
runs-on: windows-2025
|
||||
env:
|
||||
COMPILER: msvc
|
||||
CCACHE_SHA: '1f39f3ad5aae3fe915e99ad1302633bc8f6718e58fa7c0de2b0ba7e080f0f08c'
|
||||
CCACHE_SHA: '859141059ac950e1e8cd042c66f842f26b9e3a62a1669a69fe6ba180cb58bbdf'
|
||||
CCACHE_BIN_DIR: 'C:\ccache_bin'
|
||||
CCACHE_DIR: 'C:\ccache'
|
||||
CCACHE_INODECACHE: 'true'
|
||||
|
|
|
|||
16
.github/workflows/rpcs3.yml
vendored
|
|
@ -30,23 +30,23 @@ jobs:
|
|||
matrix:
|
||||
include:
|
||||
- os: ubuntu-24.04
|
||||
docker_img: "rpcs3/rpcs3-ci-jammy:1.7"
|
||||
docker_img: "rpcs3/rpcs3-ci-jammy:1.11"
|
||||
build_sh: "/rpcs3/.ci/build-linux.sh"
|
||||
compiler: clang
|
||||
UPLOAD_COMMIT_HASH: d812f1254a1157c80fd402f94446310560f54e5f
|
||||
UPLOAD_REPO_FULL_NAME: "rpcs3/rpcs3-binaries-linux"
|
||||
- os: ubuntu-24.04
|
||||
docker_img: "rpcs3/rpcs3-ci-jammy:1.7"
|
||||
docker_img: "rpcs3/rpcs3-ci-jammy:1.11"
|
||||
build_sh: "/rpcs3/.ci/build-linux.sh"
|
||||
compiler: gcc
|
||||
- os: ubuntu-24.04-arm
|
||||
docker_img: "rpcs3/rpcs3-ci-jammy-aarch64:1.7"
|
||||
docker_img: "rpcs3/rpcs3-ci-jammy-aarch64:1.11"
|
||||
build_sh: "/rpcs3/.ci/build-linux-aarch64.sh"
|
||||
compiler: clang
|
||||
UPLOAD_COMMIT_HASH: a1d35836e8d45bfc6f63c26f0a3e5d46ef622fe1
|
||||
UPLOAD_REPO_FULL_NAME: "rpcs3/rpcs3-binaries-linux-arm64"
|
||||
- os: ubuntu-24.04-arm
|
||||
docker_img: "rpcs3/rpcs3-ci-jammy-aarch64:1.7"
|
||||
docker_img: "rpcs3/rpcs3-ci-jammy-aarch64:1.11"
|
||||
build_sh: "/rpcs3/.ci/build-linux-aarch64.sh"
|
||||
compiler: gcc
|
||||
name: RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }}
|
||||
|
|
@ -134,7 +134,7 @@ jobs:
|
|||
runs-on: macos-14
|
||||
env:
|
||||
CCACHE_DIR: /tmp/ccache_dir
|
||||
QT_VER: '6.10.2'
|
||||
QT_VER: '6.11.0'
|
||||
QT_VER_MAIN: '6'
|
||||
LLVM_COMPILER_VER: '21'
|
||||
RELEASE_MESSAGE: ../GitHubReleaseMessage.txt
|
||||
|
|
@ -213,13 +213,13 @@ jobs:
|
|||
env:
|
||||
COMPILER: msvc
|
||||
QT_VER_MAIN: '6'
|
||||
QT_VER: '6.10.2'
|
||||
QT_VER: '6.11.0'
|
||||
QT_VER_MSVC: 'msvc2022'
|
||||
QT_DATE: '202601261212'
|
||||
QT_DATE: '202603180535'
|
||||
LLVM_VER: '19.1.7'
|
||||
VULKAN_VER: '1.3.268.0'
|
||||
VULKAN_SDK_SHA: '8459ef49bd06b697115ddd3d97c9aec729e849cd775f5be70897718a9b3b9db5'
|
||||
CCACHE_SHA: '1f39f3ad5aae3fe915e99ad1302633bc8f6718e58fa7c0de2b0ba7e080f0f08c'
|
||||
CCACHE_SHA: '859141059ac950e1e8cd042c66f842f26b9e3a62a1669a69fe6ba180cb58bbdf'
|
||||
CCACHE_BIN_DIR: 'C:\ccache_bin'
|
||||
CCACHE_DIR: 'C:\ccache'
|
||||
CCACHE_INODECACHE: 'true'
|
||||
|
|
|
|||
3
.gitignore
vendored
|
|
@ -69,6 +69,9 @@ CMakeSettings.json
|
|||
*PVS-Studio*
|
||||
PVS/*
|
||||
|
||||
# Zed Editor files
|
||||
.zed/*
|
||||
|
||||
# Ignore other system generated files
|
||||
x64/*
|
||||
rpcs3/x64/*
|
||||
|
|
|
|||
2
3rdparty/7zip/7zip
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit 5e96a8279489832924056b1fa82f29d5837c9469
|
||||
Subproject commit 839151eaaad24771892afaae6bac690e31e58384
|
||||
2
3rdparty/FAudio
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit 633bdb772a593104414b4b103ec752567d57c3c1
|
||||
Subproject commit 0372329dbb56e7814d0dea7b6eafa7a613bd8042
|
||||
125
3rdparty/GL/glext.h
vendored
|
|
@ -6,7 +6,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
/*
|
||||
** Copyright 2013-2020 The Khronos Group Inc.
|
||||
** Copyright 2013-2026 The Khronos Group Inc.
|
||||
** SPDX-License-Identifier: MIT
|
||||
**
|
||||
** This header is generated from the Khronos OpenGL / OpenGL ES XML
|
||||
|
|
@ -32,7 +32,7 @@ extern "C" {
|
|||
#define GLAPI extern
|
||||
#endif
|
||||
|
||||
#define GL_GLEXT_VERSION 20250203
|
||||
#define GL_GLEXT_VERSION 20260126
|
||||
|
||||
#include <KHR/khrplatform.h>
|
||||
|
||||
|
|
@ -7358,6 +7358,47 @@ GLAPI void APIENTRY glFogCoordPointerEXT (GLenum type, GLsizei stride, const voi
|
|||
#endif
|
||||
#endif /* GL_EXT_fog_coord */
|
||||
|
||||
#ifndef GL_EXT_fragment_shading_rate
|
||||
#define GL_EXT_fragment_shading_rate 1
|
||||
#define GL_SHADING_RATE_1X1_PIXELS_EXT 0x96A6
|
||||
#define GL_SHADING_RATE_1X2_PIXELS_EXT 0x96A7
|
||||
#define GL_SHADING_RATE_2X1_PIXELS_EXT 0x96A8
|
||||
#define GL_SHADING_RATE_2X2_PIXELS_EXT 0x96A9
|
||||
#define GL_SHADING_RATE_1X4_PIXELS_EXT 0x96AA
|
||||
#define GL_SHADING_RATE_4X1_PIXELS_EXT 0x96AB
|
||||
#define GL_SHADING_RATE_4X2_PIXELS_EXT 0x96AC
|
||||
#define GL_SHADING_RATE_2X4_PIXELS_EXT 0x96AD
|
||||
#define GL_SHADING_RATE_4X4_PIXELS_EXT 0x96AE
|
||||
#define GL_SHADING_RATE_EXT 0x96D0
|
||||
#define GL_SHADING_RATE_ATTACHMENT_EXT 0x96D1
|
||||
#define GL_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_EXT 0x96D2
|
||||
#define GL_FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_EXT 0x96D3
|
||||
#define GL_FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_EXT 0x96D4
|
||||
#define GL_FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_EXT 0x96D5
|
||||
#define GL_FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_EXT 0x96D6
|
||||
#define GL_MIN_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_WIDTH_EXT 0x96D7
|
||||
#define GL_MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_WIDTH_EXT 0x96D8
|
||||
#define GL_MIN_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_HEIGHT_EXT 0x96D9
|
||||
#define GL_MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_HEIGHT_EXT 0x96DA
|
||||
#define GL_MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_ASPECT_RATIO_EXT 0x96DB
|
||||
#define GL_MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_LAYERS_EXT 0x96DC
|
||||
#define GL_FRAGMENT_SHADING_RATE_WITH_SHADER_DEPTH_STENCIL_WRITES_SUPPORTED_EXT 0x96DD
|
||||
#define GL_FRAGMENT_SHADING_RATE_WITH_SAMPLE_MASK_SUPPORTED_EXT 0x96DE
|
||||
#define GL_FRAGMENT_SHADING_RATE_ATTACHMENT_WITH_DEFAULT_FRAMEBUFFER_SUPPORTED_EXT 0x96DF
|
||||
#define GL_FRAGMENT_SHADING_RATE_NON_TRIVIAL_COMBINERS_SUPPORTED_EXT 0x8F6F
|
||||
#define GL_FRAGMENT_SHADING_RATE_PRIMITIVE_RATE_WITH_MULTI_VIEWPORT_SUPPORTED_EXT 0x9780
|
||||
typedef void (APIENTRYP PFNGLGETFRAGMENTSHADINGRATESEXTPROC) (GLsizei samples, GLsizei maxCount, GLsizei *count, GLenum *shadingRates);
|
||||
typedef void (APIENTRYP PFNGLSHADINGRATEEXTPROC) (GLenum rate);
|
||||
typedef void (APIENTRYP PFNGLSHADINGRATECOMBINEROPSEXTPROC) (GLenum combinerOp0, GLenum combinerOp1);
|
||||
typedef void (APIENTRYP PFNGLFRAMEBUFFERSHADINGRATEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint baseLayer, GLsizei numLayers, GLsizei texelWidth, GLsizei texelHeight);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glGetFragmentShadingRatesEXT (GLsizei samples, GLsizei maxCount, GLsizei *count, GLenum *shadingRates);
|
||||
GLAPI void APIENTRY glShadingRateEXT (GLenum rate);
|
||||
GLAPI void APIENTRY glShadingRateCombinerOpsEXT (GLenum combinerOp0, GLenum combinerOp1);
|
||||
GLAPI void APIENTRY glFramebufferShadingRateEXT (GLenum target, GLenum attachment, GLuint texture, GLint baseLayer, GLsizei numLayers, GLsizei texelWidth, GLsizei texelHeight);
|
||||
#endif
|
||||
#endif /* GL_EXT_fragment_shading_rate */
|
||||
|
||||
#ifndef GL_EXT_framebuffer_blit
|
||||
#define GL_EXT_framebuffer_blit 1
|
||||
#define GL_READ_FRAMEBUFFER_EXT 0x8CA8
|
||||
|
|
@ -7816,6 +7857,86 @@ GLAPI void APIENTRY glImportMemoryWin32NameEXT (GLuint memory, GLuint64 size, GL
|
|||
#endif
|
||||
#endif /* GL_EXT_memory_object_win32 */
|
||||
|
||||
#ifndef GL_EXT_mesh_shader
|
||||
#define GL_EXT_mesh_shader 1
|
||||
#define GL_MESH_SHADER_EXT 0x9559
|
||||
#define GL_TASK_SHADER_EXT 0x955A
|
||||
#define GL_MAX_MESH_UNIFORM_BLOCKS_EXT 0x8E60
|
||||
#define GL_MAX_MESH_TEXTURE_IMAGE_UNITS_EXT 0x8E61
|
||||
#define GL_MAX_MESH_IMAGE_UNIFORMS_EXT 0x8E62
|
||||
#define GL_MAX_MESH_UNIFORM_COMPONENTS_EXT 0x8E63
|
||||
#define GL_MAX_MESH_ATOMIC_COUNTER_BUFFERS_EXT 0x8E64
|
||||
#define GL_MAX_MESH_ATOMIC_COUNTERS_EXT 0x8E65
|
||||
#define GL_MAX_MESH_SHADER_STORAGE_BLOCKS_EXT 0x8E66
|
||||
#define GL_MAX_COMBINED_MESH_UNIFORM_COMPONENTS_EXT 0x8E67
|
||||
#define GL_MAX_TASK_UNIFORM_BLOCKS_EXT 0x8E68
|
||||
#define GL_MAX_TASK_TEXTURE_IMAGE_UNITS_EXT 0x8E69
|
||||
#define GL_MAX_TASK_IMAGE_UNIFORMS_EXT 0x8E6A
|
||||
#define GL_MAX_TASK_UNIFORM_COMPONENTS_EXT 0x8E6B
|
||||
#define GL_MAX_TASK_ATOMIC_COUNTER_BUFFERS_EXT 0x8E6C
|
||||
#define GL_MAX_TASK_ATOMIC_COUNTERS_EXT 0x8E6D
|
||||
#define GL_MAX_TASK_SHADER_STORAGE_BLOCKS_EXT 0x8E6E
|
||||
#define GL_MAX_COMBINED_TASK_UNIFORM_COMPONENTS_EXT 0x8E6F
|
||||
#define GL_MAX_TASK_WORK_GROUP_TOTAL_COUNT_EXT 0x9740
|
||||
#define GL_MAX_MESH_WORK_GROUP_TOTAL_COUNT_EXT 0x9741
|
||||
#define GL_MAX_MESH_WORK_GROUP_INVOCATIONS_EXT 0x9757
|
||||
#define GL_MAX_TASK_WORK_GROUP_INVOCATIONS_EXT 0x9759
|
||||
#define GL_MAX_TASK_PAYLOAD_SIZE_EXT 0x9742
|
||||
#define GL_MAX_TASK_SHARED_MEMORY_SIZE_EXT 0x9743
|
||||
#define GL_MAX_MESH_SHARED_MEMORY_SIZE_EXT 0x9744
|
||||
#define GL_MAX_TASK_PAYLOAD_AND_SHARED_MEMORY_SIZE_EXT 0x9745
|
||||
#define GL_MAX_MESH_PAYLOAD_AND_SHARED_MEMORY_SIZE_EXT 0x9746
|
||||
#define GL_MAX_MESH_OUTPUT_MEMORY_SIZE_EXT 0x9747
|
||||
#define GL_MAX_MESH_PAYLOAD_AND_OUTPUT_MEMORY_SIZE_EXT 0x9748
|
||||
#define GL_MAX_MESH_OUTPUT_VERTICES_EXT 0x9538
|
||||
#define GL_MAX_MESH_OUTPUT_PRIMITIVES_EXT 0x9756
|
||||
#define GL_MAX_MESH_OUTPUT_COMPONENTS_EXT 0x9749
|
||||
#define GL_MAX_MESH_OUTPUT_LAYERS_EXT 0x974A
|
||||
#define GL_MAX_MESH_MULTIVIEW_VIEW_COUNT_EXT 0x9557
|
||||
#define GL_MESH_OUTPUT_PER_VERTEX_GRANULARITY_EXT 0x92DF
|
||||
#define GL_MESH_OUTPUT_PER_PRIMITIVE_GRANULARITY_EXT 0x9543
|
||||
#define GL_MAX_PREFERRED_TASK_WORK_GROUP_INVOCATIONS_EXT 0x974B
|
||||
#define GL_MAX_PREFERRED_MESH_WORK_GROUP_INVOCATIONS_EXT 0x974C
|
||||
#define GL_MESH_PREFERS_LOCAL_INVOCATION_VERTEX_OUTPUT_EXT 0x974D
|
||||
#define GL_MESH_PREFERS_LOCAL_INVOCATION_PRIMITIVE_OUTPUT_EXT 0x974E
|
||||
#define GL_MESH_PREFERS_COMPACT_VERTEX_OUTPUT_EXT 0x974F
|
||||
#define GL_MESH_PREFERS_COMPACT_PRIMITIVE_OUTPUT_EXT 0x9750
|
||||
#define GL_MAX_TASK_WORK_GROUP_COUNT_EXT 0x9751
|
||||
#define GL_MAX_MESH_WORK_GROUP_COUNT_EXT 0x9752
|
||||
#define GL_MAX_MESH_WORK_GROUP_SIZE_EXT 0x9758
|
||||
#define GL_MAX_TASK_WORK_GROUP_SIZE_EXT 0x975A
|
||||
#define GL_MESH_WORK_GROUP_SIZE_EXT 0x953E
|
||||
#define GL_TASK_WORK_GROUP_SIZE_EXT 0x953F
|
||||
#define GL_MESH_VERTICES_OUT_EXT 0x9579
|
||||
#define GL_MESH_PRIMITIVES_OUT_EXT 0x957A
|
||||
#define GL_MESH_OUTPUT_TYPE_EXT 0x957B
|
||||
#define GL_UNIFORM_BLOCK_REFERENCED_BY_MESH_SHADER_EXT 0x959C
|
||||
#define GL_UNIFORM_BLOCK_REFERENCED_BY_TASK_SHADER_EXT 0x959D
|
||||
#define GL_REFERENCED_BY_MESH_SHADER_EXT 0x95A0
|
||||
#define GL_REFERENCED_BY_TASK_SHADER_EXT 0x95A1
|
||||
#define GL_TASK_SHADER_INVOCATIONS_EXT 0x9753
|
||||
#define GL_MESH_SHADER_INVOCATIONS_EXT 0x9754
|
||||
#define GL_MESH_PRIMITIVES_GENERATED_EXT 0x9755
|
||||
#define GL_MESH_SHADER_BIT_EXT 0x00000040
|
||||
#define GL_TASK_SHADER_BIT_EXT 0x00000080
|
||||
#define GL_MESH_SUBROUTINE_EXT 0x957C
|
||||
#define GL_TASK_SUBROUTINE_EXT 0x957D
|
||||
#define GL_MESH_SUBROUTINE_UNIFORM_EXT 0x957E
|
||||
#define GL_TASK_SUBROUTINE_UNIFORM_EXT 0x957F
|
||||
#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_MESH_SHADER_EXT 0x959E
|
||||
#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TASK_SHADER_EXT 0x959F
|
||||
typedef void (APIENTRYP PFNGLDRAWMESHTASKSEXTPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
|
||||
typedef void (APIENTRYP PFNGLDRAWMESHTASKSINDIRECTEXTPROC) (GLintptr indirect);
|
||||
typedef void (APIENTRYP PFNGLMULTIDRAWMESHTASKSINDIRECTEXTPROC) (GLintptr indirect, GLsizei drawcount, GLsizei stride);
|
||||
typedef void (APIENTRYP PFNGLMULTIDRAWMESHTASKSINDIRECTCOUNTEXTPROC) (GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glDrawMeshTasksEXT (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
|
||||
GLAPI void APIENTRY glDrawMeshTasksIndirectEXT (GLintptr indirect);
|
||||
GLAPI void APIENTRY glMultiDrawMeshTasksIndirectEXT (GLintptr indirect, GLsizei drawcount, GLsizei stride);
|
||||
GLAPI void APIENTRY glMultiDrawMeshTasksIndirectCountEXT (GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
|
||||
#endif
|
||||
#endif /* GL_EXT_mesh_shader */
|
||||
|
||||
#ifndef GL_EXT_misc_attribute
|
||||
#define GL_EXT_misc_attribute 1
|
||||
#endif /* GL_EXT_misc_attribute */
|
||||
|
|
|
|||
2
3rdparty/OpenAL/openal-soft
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit 75c00596307bf05ba7bbc8c7022836bf52f17477
|
||||
Subproject commit c41d64c6a35f6174bf4a27010aeac52a8d3bb2c6
|
||||
2
3rdparty/SoundTouch/soundtouch
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit 3982730833b6daefe77dcfb32b5c282851640c17
|
||||
Subproject commit a0fba77b6f9cfbdb71f8bbec58b6ac4e5e3b1097
|
||||
2
3rdparty/cubeb/cubeb
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit e495bee4cd630c9f99907a764e16edba37a4b564
|
||||
Subproject commit 484857522c73318c06f18ba0a3e17525fa98c608
|
||||
3
3rdparty/curl/CMakeLists.txt
vendored
|
|
@ -18,9 +18,6 @@ else()
|
|||
set(USE_LIBIDN2 OFF CACHE BOOL "Use libidn2 for IDN support") # Disabled because MacOS CI doesn't work otherwise
|
||||
set(CURL_CA_PATH "none" CACHE STRING "Location of default CA path. Set 'none' to disable or 'auto' for auto-detection. Defaults to 'auto'.")
|
||||
option(CURL_DISABLE_INSTALL "Disable installation targets" ON)
|
||||
if(USE_MSVC_STATIC_CRT)
|
||||
set(CURL_STATIC_CRT ON CACHE BOOL "Use static crt to build curl")
|
||||
endif()
|
||||
if(WIN32)
|
||||
set(ENABLE_UNICODE ON CACHE BOOL "enable Unicode")
|
||||
endif()
|
||||
|
|
|
|||
2
3rdparty/curl/curl
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit 400fffa90f30c7a2dc762fa33009d24851bd2016
|
||||
Subproject commit 8c908d2d0a6d32abdedda2c52e90bd56ec76c24d
|
||||
28
3rdparty/curl/libcurl.vcxproj
vendored
|
|
@ -79,12 +79,16 @@
|
|||
<ClCompile Include="curl\lib\cookie.c" />
|
||||
<ClCompile Include="curl\lib\cshutdn.c" />
|
||||
<ClCompile Include="curl\lib\curlx\base64.c" />
|
||||
<ClCompile Include="curl\lib\curlx\basename.c" />
|
||||
<ClCompile Include="curl\lib\curlx\dynbuf.c" />
|
||||
<ClCompile Include="curl\lib\curlx\fopen.c" />
|
||||
<ClCompile Include="curl\lib\curlx\inet_ntop.c" />
|
||||
<ClCompile Include="curl\lib\curlx\inet_pton.c" />
|
||||
<ClCompile Include="curl\lib\curlx\multibyte.c" />
|
||||
<ClCompile Include="curl\lib\curlx\nonblock.c" />
|
||||
<ClCompile Include="curl\lib\curlx\snprintf.c" />
|
||||
<ClCompile Include="curl\lib\curlx\strcopy.c" />
|
||||
<ClCompile Include="curl\lib\curlx\strdup.c" />
|
||||
<ClCompile Include="curl\lib\curlx\strerr.c" />
|
||||
<ClCompile Include="curl\lib\curlx\strparse.c" />
|
||||
<ClCompile Include="curl\lib\curlx\timediff.c" />
|
||||
|
|
@ -106,6 +110,7 @@
|
|||
<ClCompile Include="curl\lib\curl_rtmp.c" />
|
||||
<ClCompile Include="curl\lib\curl_sasl.c" />
|
||||
<ClCompile Include="curl\lib\curl_sha512_256.c" />
|
||||
<ClCompile Include="curl\lib\curl_share.c" />
|
||||
<ClCompile Include="curl\lib\curl_sspi.c" />
|
||||
<ClCompile Include="curl\lib\curl_threads.c" />
|
||||
<ClCompile Include="curl\lib\curl_trc.c" />
|
||||
|
|
@ -169,14 +174,13 @@
|
|||
<ClCompile Include="curl\lib\progress.c" />
|
||||
<ClCompile Include="curl\lib\psl.c" />
|
||||
<ClCompile Include="curl\lib\rand.c" />
|
||||
<ClCompile Include="curl\lib\rename.c" />
|
||||
<ClCompile Include="curl\lib\ratelimit.c" />
|
||||
<ClCompile Include="curl\lib\request.c" />
|
||||
<ClCompile Include="curl\lib\rtsp.c" />
|
||||
<ClCompile Include="curl\lib\select.c" />
|
||||
<ClCompile Include="curl\lib\sendf.c" />
|
||||
<ClCompile Include="curl\lib\setopt.c" />
|
||||
<ClCompile Include="curl\lib\sha256.c" />
|
||||
<ClCompile Include="curl\lib\share.c" />
|
||||
<ClCompile Include="curl\lib\slist.c" />
|
||||
<ClCompile Include="curl\lib\smb.c" />
|
||||
<ClCompile Include="curl\lib\smtp.c" />
|
||||
|
|
@ -184,10 +188,8 @@
|
|||
<ClCompile Include="curl\lib\socks.c" />
|
||||
<ClCompile Include="curl\lib\socks_gssapi.c" />
|
||||
<ClCompile Include="curl\lib\socks_sspi.c" />
|
||||
<ClCompile Include="curl\lib\speedcheck.c" />
|
||||
<ClCompile Include="curl\lib\splay.c" />
|
||||
<ClCompile Include="curl\lib\strcase.c" />
|
||||
<ClCompile Include="curl\lib\strdup.c" />
|
||||
<ClCompile Include="curl\lib\strequal.c" />
|
||||
<ClCompile Include="curl\lib\strerror.c" />
|
||||
<ClCompile Include="curl\lib\system_win32.c" />
|
||||
|
|
@ -204,6 +206,7 @@
|
|||
<ClCompile Include="curl\lib\version.c" />
|
||||
<ClCompile Include="curl\lib\vquic\curl_ngtcp2.c" />
|
||||
<ClCompile Include="curl\lib\vquic\curl_quiche.c" />
|
||||
<ClCompile Include="curl\lib\vssh\vssh.c" />
|
||||
<ClCompile Include="curl\lib\vtls\apple.c" />
|
||||
<ClCompile Include="curl\lib\vtls\cipher_suite.c" />
|
||||
<ClCompile Include="curl\lib\vtls\hostcheck.c" />
|
||||
|
|
@ -224,13 +227,11 @@
|
|||
<ClCompile Include="curl\lib\vauth\spnego_sspi.c" />
|
||||
<ClCompile Include="curl\lib\vauth\vauth.c" />
|
||||
<ClCompile Include="curl\lib\vquic\vquic.c" />
|
||||
<ClCompile Include="curl\lib\vssh\curl_path.c" />
|
||||
<ClCompile Include="curl\lib\vssh\libssh.c" />
|
||||
<ClCompile Include="curl\lib\vssh\libssh2.c" />
|
||||
<ClCompile Include="curl\lib\vtls\gtls.c" />
|
||||
<ClCompile Include="curl\lib\vtls\keylog.c" />
|
||||
<ClCompile Include="curl\lib\vtls\mbedtls.c" />
|
||||
<ClCompile Include="curl\lib\vtls\mbedtls_threadlock.c" />
|
||||
<ClCompile Include="curl\lib\vtls\openssl.c" />
|
||||
<ClCompile Include="curl\lib\vtls\schannel.c" />
|
||||
<ClCompile Include="curl\lib\vtls\schannel_verify.c" />
|
||||
|
|
@ -272,6 +273,7 @@
|
|||
<ClInclude Include="curl\lib\cookie.h" />
|
||||
<ClInclude Include="curl\lib\cshutdn.h" />
|
||||
<ClInclude Include="curl\lib\curlx\base64.h" />
|
||||
<ClInclude Include="curl\lib\curlx\basename.h" />
|
||||
<ClInclude Include="curl\lib\curlx\binmode.h" />
|
||||
<ClInclude Include="curl\lib\curlx\curlx.h" />
|
||||
<ClInclude Include="curl\lib\curlx\dynbuf.h" />
|
||||
|
|
@ -280,6 +282,9 @@
|
|||
<ClInclude Include="curl\lib\curlx\inet_pton.h" />
|
||||
<ClInclude Include="curl\lib\curlx\multibyte.h" />
|
||||
<ClInclude Include="curl\lib\curlx\nonblock.h" />
|
||||
<ClInclude Include="curl\lib\curlx\snprintf.h" />
|
||||
<ClInclude Include="curl\lib\curlx\strcopy.h" />
|
||||
<ClInclude Include="curl\lib\curlx\strdup.h" />
|
||||
<ClInclude Include="curl\lib\curlx\strerr.h" />
|
||||
<ClInclude Include="curl\lib\curlx\strparse.h" />
|
||||
<ClInclude Include="curl\lib\curlx\timediff.h" />
|
||||
|
|
@ -300,9 +305,7 @@
|
|||
<ClInclude Include="curl\lib\curl_ldap.h" />
|
||||
<ClInclude Include="curl\lib\curl_md4.h" />
|
||||
<ClInclude Include="curl\lib\curl_md5.h" />
|
||||
<ClInclude Include="curl\lib\curl_memory.h" />
|
||||
<ClInclude Include="curl\lib\curl_memrchr.h" />
|
||||
<ClInclude Include="curl\lib\curl_mem_undef.h" />
|
||||
<ClInclude Include="curl\lib\curl_ntlm_core.h" />
|
||||
<ClInclude Include="curl\lib\curl_printf.h" />
|
||||
<ClInclude Include="curl\lib\curl_range.h" />
|
||||
|
|
@ -312,6 +315,7 @@
|
|||
<ClInclude Include="curl\lib\curl_setup_once.h" />
|
||||
<ClInclude Include="curl\lib\curl_sha256.h" />
|
||||
<ClInclude Include="curl\lib\curl_sha512_256.h" />
|
||||
<ClInclude Include="curl\lib\curl_share.h" />
|
||||
<ClInclude Include="curl\lib\curl_sspi.h" />
|
||||
<ClInclude Include="curl\lib\curl_threads.h" />
|
||||
<ClInclude Include="curl\lib\curl_trc.h" />
|
||||
|
|
@ -352,7 +356,6 @@
|
|||
<ClInclude Include="curl\lib\imap.h" />
|
||||
<ClInclude Include="curl\lib\llist.h" />
|
||||
<ClInclude Include="curl\lib\macos.h" />
|
||||
<ClInclude Include="curl\lib\memdebug.h" />
|
||||
<ClInclude Include="curl\lib\mime.h" />
|
||||
<ClInclude Include="curl\lib\mqtt.h" />
|
||||
<ClInclude Include="curl\lib\multihandle.h" />
|
||||
|
|
@ -367,7 +370,7 @@
|
|||
<ClInclude Include="curl\lib\progress.h" />
|
||||
<ClInclude Include="curl\lib\psl.h" />
|
||||
<ClInclude Include="curl\lib\rand.h" />
|
||||
<ClInclude Include="curl\lib\rename.h" />
|
||||
<ClInclude Include="curl\lib\ratelimit.h" />
|
||||
<ClInclude Include="curl\lib\request.h" />
|
||||
<ClInclude Include="curl\lib\rtsp.h" />
|
||||
<ClInclude Include="curl\lib\select.h" />
|
||||
|
|
@ -376,7 +379,6 @@
|
|||
<ClInclude Include="curl\lib\setup-os400.h" />
|
||||
<ClInclude Include="curl\lib\setup-vms.h" />
|
||||
<ClInclude Include="curl\lib\setup-win32.h" />
|
||||
<ClInclude Include="curl\lib\share.h" />
|
||||
<ClInclude Include="curl\lib\sigpipe.h" />
|
||||
<ClInclude Include="curl\lib\slist.h" />
|
||||
<ClInclude Include="curl\lib\smb.h" />
|
||||
|
|
@ -384,7 +386,6 @@
|
|||
<ClInclude Include="curl\lib\sockaddr.h" />
|
||||
<ClInclude Include="curl\lib\socketpair.h" />
|
||||
<ClInclude Include="curl\lib\socks.h" />
|
||||
<ClInclude Include="curl\lib\speedcheck.h" />
|
||||
<ClInclude Include="curl\lib\splay.h" />
|
||||
<ClInclude Include="curl\lib\strcase.h" />
|
||||
<ClInclude Include="curl\lib\strdup.h" />
|
||||
|
|
@ -405,6 +406,7 @@
|
|||
<ClInclude Include="curl\lib\vquic\curl_ngtcp2.h" />
|
||||
<ClInclude Include="curl\lib\vquic\curl_quiche.h" />
|
||||
<ClInclude Include="curl\lib\vquic\vquic_int.h" />
|
||||
<ClInclude Include="curl\lib\vssh\vssh.h" />
|
||||
<ClInclude Include="curl\lib\vtls\apple.h" />
|
||||
<ClInclude Include="curl\lib\vtls\cipher_suite.h" />
|
||||
<ClInclude Include="curl\lib\vtls\hostcheck.h" />
|
||||
|
|
@ -418,12 +420,10 @@
|
|||
<ClInclude Include="curl\lib\vauth\ntlm.h" />
|
||||
<ClInclude Include="curl\lib\vauth\vauth.h" />
|
||||
<ClInclude Include="curl\lib\vquic\vquic.h" />
|
||||
<ClInclude Include="curl\lib\vssh\curl_path.h" />
|
||||
<ClInclude Include="curl\lib\vssh\ssh.h" />
|
||||
<ClInclude Include="curl\lib\vtls\gtls.h" />
|
||||
<ClInclude Include="curl\lib\vtls\keylog.h" />
|
||||
<ClInclude Include="curl\lib\vtls\mbedtls.h" />
|
||||
<ClInclude Include="curl\lib\vtls\mbedtls_threadlock.h" />
|
||||
<ClInclude Include="curl\lib\vtls\openssl.h" />
|
||||
<ClInclude Include="curl\lib\vtls\schannel.h" />
|
||||
<ClInclude Include="curl\lib\vtls\vtls.h" />
|
||||
|
|
|
|||
84
3rdparty/curl/libcurl.vcxproj.filters
vendored
|
|
@ -204,9 +204,6 @@
|
|||
<ClCompile Include="curl\lib\rand.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="curl\lib\rename.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="curl\lib\rtsp.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
|
@ -222,9 +219,6 @@
|
|||
<ClCompile Include="curl\lib\sha256.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="curl\lib\share.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="curl\lib\slist.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
|
@ -246,18 +240,12 @@
|
|||
<ClCompile Include="curl\lib\socks_sspi.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="curl\lib\speedcheck.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="curl\lib\splay.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="curl\lib\strcase.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="curl\lib\strdup.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="curl\lib\strerror.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
|
@ -318,9 +306,6 @@
|
|||
<ClCompile Include="curl\lib\vauth\vauth.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="curl\lib\vssh\curl_path.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="curl\lib\vssh\libssh.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
|
@ -333,9 +318,6 @@
|
|||
<ClCompile Include="curl\lib\vtls\mbedtls.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="curl\lib\vtls\mbedtls_threadlock.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="curl\lib\vtls\openssl.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
|
@ -549,6 +531,27 @@
|
|||
<ClCompile Include="curl\lib\curlx\strerr.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="curl\lib\curlx\strcopy.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="curl\lib\vssh\vssh.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="curl\lib\curl_share.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="curl\lib\ratelimit.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="curl\lib\curlx\basename.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="curl\lib\curlx\snprintf.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="curl\lib\curlx\strdup.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="curl\include\curl\curl.h">
|
||||
|
|
@ -653,9 +656,6 @@
|
|||
<ClInclude Include="curl\lib\curl_md5.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="curl\lib\curl_memory.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="curl\lib\curl_memrchr.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
|
|
@ -758,9 +758,6 @@
|
|||
<ClInclude Include="curl\lib\llist.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="curl\lib\memdebug.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="curl\lib\mime.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
|
|
@ -791,9 +788,6 @@
|
|||
<ClInclude Include="curl\lib\rand.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="curl\lib\rename.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="curl\lib\rtsp.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
|
|
@ -812,9 +806,6 @@
|
|||
<ClInclude Include="curl\lib\setup-vms.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="curl\lib\share.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="curl\lib\sigpipe.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
|
|
@ -836,9 +827,6 @@
|
|||
<ClInclude Include="curl\lib\socks.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="curl\lib\speedcheck.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="curl\lib\splay.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
|
|
@ -887,9 +875,6 @@
|
|||
<ClInclude Include="curl\lib\vauth\vauth.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="curl\lib\vssh\curl_path.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="curl\lib\vssh\ssh.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
|
|
@ -899,9 +884,6 @@
|
|||
<ClInclude Include="curl\lib\vtls\mbedtls.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="curl\lib\vtls\mbedtls_threadlock.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="curl\lib\vtls\openssl.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
|
|
@ -1103,9 +1085,6 @@
|
|||
<ClInclude Include="curl\lib\cf-ip-happy.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="curl\lib\curl_mem_undef.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="curl\lib\curl_fopen.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
|
|
@ -1121,6 +1100,27 @@
|
|||
<ClInclude Include="curl\lib\curlx\strerr.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="curl\lib\curlx\snprintf.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="curl\lib\curlx\strcopy.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="curl\lib\vssh\vssh.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="curl\lib\curl_share.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="curl\lib\ratelimit.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="curl\lib\curlx\basename.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="curl\lib\curlx\strdup.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="curl\lib\libcurl.rc">
|
||||
|
|
|
|||
2
3rdparty/libpng/libpng
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit 02f2b4f4699f0ef9111a6534f093b53732df4452
|
||||
Subproject commit 95ab3fdca83ea294efd3b092e9a53c5a39886444
|
||||
2
3rdparty/libsdl-org/SDL
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit a962f40bbba175e9716557a25d5d7965f134a3d3
|
||||
Subproject commit 5848e584a1b606de26e3dbd1c7e4ecbc34f807a6
|
||||
6
3rdparty/protobuf/CMakeLists.txt
vendored
|
|
@ -2,8 +2,8 @@ add_library(3rdparty_protobuf INTERFACE)
|
|||
if (USE_SYSTEM_PROTOBUF)
|
||||
pkg_check_modules(PROTOBUF REQUIRED IMPORTED_TARGET protobuf>=33.0.0)
|
||||
target_link_libraries(3rdparty_protobuf INTERFACE PkgConfig::PROTOBUF)
|
||||
set(PROTOBUF_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../rpcs3/Emu/NP/generated/")
|
||||
execute_process(COMMAND protoc --cpp_out="${PROTOBUF_DIR}" --proto_path="${PROTOBUF_DIR}" np2_structs.proto RESULT_VARIABLE PROTOBUF_CMD_ERROR)
|
||||
set(PROTOBUF_DIR "${CMAKE_SOURCE_DIR}/rpcs3/Emu/NP/generated")
|
||||
execute_process(COMMAND protoc --cpp_out=${PROTOBUF_DIR} --proto_path=${PROTOBUF_DIR} np2_structs.proto RESULT_VARIABLE PROTOBUF_CMD_ERROR)
|
||||
if(PROTOBUF_CMD_ERROR AND NOT PROTOBUF_CMD_ERROR EQUAL 0)
|
||||
message(FATAL_ERROR "protoc failed to regenerate protobuf files.")
|
||||
endif()
|
||||
|
|
@ -20,6 +20,8 @@ else()
|
|||
option(protobuf_DISABLE_RTTI "Remove runtime type information in the binaries" OFF)
|
||||
option(protobuf_FORCE_FETCH_DEPENDENCIES "Force all dependencies to be downloaded from GitHub. Local installations will be ignored." OFF)
|
||||
option(protobuf_LOCAL_DEPENDENCIES_ONLY "Prevent downloading any dependencies from GitHub. If this option is set, the dependency must be available locally as an installed package." OFF)
|
||||
option(protobuf_BUILD_SHARED_LIBS "Build Shared Libraries" OFF)
|
||||
option(protobuf_MSVC_STATIC_RUNTIME "Link static runtime libraries" OFF)
|
||||
|
||||
add_subdirectory(protobuf EXCLUDE_FROM_ALL)
|
||||
target_include_directories(3rdparty_protobuf SYSTEM INTERFACE protobuf/src)
|
||||
|
|
|
|||
13
3rdparty/qt6.cmake
vendored
|
|
@ -6,15 +6,22 @@ find_package(Qt6 ${QT_MIN_VER} CONFIG COMPONENTS Widgets Concurrent Multimedia M
|
|||
if(WIN32)
|
||||
target_link_libraries(3rdparty_qt6 INTERFACE Qt6::Widgets Qt6::Concurrent Qt6::Multimedia Qt6::MultimediaWidgets Qt6::Svg Qt6::SvgWidgets)
|
||||
else()
|
||||
set(QT_NO_PRIVATE_MODULE_WARNING ON)
|
||||
find_package(Qt6 ${QT_MIN_VER} COMPONENTS DBus Gui GuiPrivate)
|
||||
find_package(Qt6 ${QT_MIN_VER} COMPONENTS DBus Gui)
|
||||
if(Qt6_VERSION VERSION_GREATER_EQUAL "6.10.0")
|
||||
set(QT_NO_PRIVATE_MODULE_WARNING ON)
|
||||
find_package(Qt6 ${QT_MIN_VER} COMPONENTS GuiPrivate)
|
||||
endif()
|
||||
if(Qt6DBus_FOUND)
|
||||
target_link_libraries(3rdparty_qt6 INTERFACE Qt6::Widgets Qt6::DBus Qt6::Concurrent Qt6::Multimedia Qt6::MultimediaWidgets Qt6::Svg Qt6::SvgWidgets)
|
||||
target_compile_definitions(3rdparty_qt6 INTERFACE -DHAVE_QTDBUS)
|
||||
else()
|
||||
target_link_libraries(3rdparty_qt6 INTERFACE Qt6::Widgets Qt6::Concurrent Qt6::Multimedia Qt6::MultimediaWidgets Qt6::Svg Qt6::SvgWidgets)
|
||||
endif()
|
||||
target_link_libraries(3rdparty_qt6 INTERFACE Qt6::GuiPrivate)
|
||||
if(Qt6_VERSION VERSION_GREATER_EQUAL "6.10.0")
|
||||
target_link_libraries(3rdparty_qt6 INTERFACE Qt6::GuiPrivate)
|
||||
else()
|
||||
target_include_directories(3rdparty_qt6 INTERFACE ${Qt6Gui_PRIVATE_INCLUDE_DIRS})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(Qt6Widgets_FOUND)
|
||||
|
|
|
|||
2
3rdparty/wolfssl/wolfssl
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit b077c81eb635392e694ccedbab8b644297ec0285
|
||||
Subproject commit 1d363f3adceba9d1478230ede476a37b0dcdef24
|
||||
2
3rdparty/yaml-cpp/yaml-cpp
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit 456c68f452da09d8ca84b375faa2b1397713eaba
|
||||
Subproject commit 51a5d623e3fde1f58829a56ba910f1cb33596222
|
||||
1
3rdparty/yaml-cpp/yaml-cpp.vcxproj
vendored
|
|
@ -76,6 +76,7 @@
|
|||
<ClCompile Include="yaml-cpp\src\exceptions.cpp" />
|
||||
<ClCompile Include="yaml-cpp\src\exp.cpp">
|
||||
</ClCompile>
|
||||
<ClCompile Include="yaml-cpp\src\fptostring.cpp" />
|
||||
<ClCompile Include="yaml-cpp\src\memory.cpp">
|
||||
</ClCompile>
|
||||
<ClCompile Include="yaml-cpp\src\node.cpp">
|
||||
|
|
|
|||
3
3rdparty/yaml-cpp/yaml-cpp.vcxproj.filters
vendored
|
|
@ -94,5 +94,8 @@
|
|||
<ClCompile Include="yaml-cpp\src\depthguard.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="yaml-cpp\src\fptostring.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
3
3rdparty/zlib/CMakeLists.txt
vendored
|
|
@ -6,7 +6,8 @@ if (USE_SYSTEM_ZLIB)
|
|||
target_link_libraries(3rdparty_zlib INTERFACE ZLIB::ZLIB)
|
||||
target_compile_definitions(3rdparty_zlib INTERFACE -DZLIB_CONST=1)
|
||||
else()
|
||||
option(ZLIB_BUILD_EXAMPLES "Enable Zlib Examples" OFF)
|
||||
option(ZLIB_BUILD_TESTING "Enable Zlib Examples as tests" OFF)
|
||||
option(ZLIB_BUILD_SHARED "Enable building zlib shared library" OFF)
|
||||
message(STATUS "RPCS3: Using builtin ZLIB")
|
||||
set(SKIP_INSTALL_ALL ON)
|
||||
add_subdirectory(zlib EXCLUDE_FROM_ALL)
|
||||
|
|
|
|||
2
3rdparty/zlib/zlib
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit 51b7f2abdade71cd9bb0e7a373ef2610ec6f9daf
|
||||
Subproject commit da607da739fa6047df13e66a2af6b8bec7c2a498
|
||||
12
BUILDING.md
|
|
@ -20,26 +20,26 @@ The following tools are required to build RPCS3 on Windows 10 or later:
|
|||
with standalone **CMake** tool.
|
||||
|
||||
- [Python 3.6+](https://www.python.org/downloads/) (add to PATH)
|
||||
- [Qt 6.10.2](https://www.qt.io/download-qt-installer) In case you can't download from the official installer, you can use [Another Qt installer](https://github.com/miurahr/aqtinstall) (In that case you will need to manually add the "qtmultimedia" module when installing Qt)
|
||||
- [Qt 6.11.0](https://www.qt.io/download-qt-installer) In case you can't download from the official installer, you can use [Another Qt installer](https://github.com/miurahr/aqtinstall) (In that case you will need to manually add the "qtmultimedia" module when installing Qt)
|
||||
- [Vulkan SDK 1.3.268.0](https://vulkan.lunarg.com/sdk/home) (see "Install the SDK" [here](https://vulkan.lunarg.com/doc/sdk/latest/windows/getting_started.html)) for now future SDKs don't work. You need precisely 1.3.268.0.
|
||||
|
||||
The `sln` solution available only on **Visual Studio** is the preferred building solution. It easily allows to build the **RPCS3** application in `Release` and `Debug` mode.
|
||||
|
||||
In order to build **RPCS3** with the `sln` solution (with **Visual Studio**), **Qt** libs need to be detected. To detect the libs:
|
||||
- add and set the `QTDIR` environment variable, e.g. `<QtInstallFolder>\6.10.2\msvc2022_64\`
|
||||
- add and set the `QTDIR` environment variable, e.g. `<QtInstallFolder>\6.11.0\msvc2022_64\`
|
||||
- or use the [Visual Studio Qt Plugin](https://marketplace.visualstudio.com/items?itemName=TheQtCompany.QtVisualStudioTools2022)
|
||||
|
||||
**NOTE:** If you have issues with the **Visual Studio Qt Plugin**, you may want to uninstall it and install the [Legacy Qt Plugin](https://marketplace.visualstudio.com/items?itemName=TheQtCompany.LEGACYQtVisualStudioTools2022) instead.
|
||||
|
||||
In order to build **RPCS3** with the `CMake` solution (with both **Visual Studio** and standalone **CMake** tool):
|
||||
- add and set the `Qt6_ROOT` environment variable to the **Qt** libs path, e.g. `<QtInstallFolder>\6.10.2\msvc2022_64\`
|
||||
- add and set the `Qt6_ROOT` environment variable to the **Qt** libs path, e.g. `<QtInstallFolder>\6.11.0\msvc2022_64\`
|
||||
|
||||
### Linux
|
||||
|
||||
These are the essentials tools to build RPCS3 on Linux. Some of them can be installed through your favorite package manager:
|
||||
- Clang 17+ or GCC 13+
|
||||
- [CMake 3.28.0+](https://www.cmake.org/download/)
|
||||
- [Qt 6.10.2](https://www.qt.io/download-qt-installer)
|
||||
- [Qt 6.11.0](https://www.qt.io/download-qt-installer)
|
||||
- [Vulkan SDK 1.3.268.0](https://vulkan.lunarg.com/sdk/home) (See "Install the SDK" [here](https://vulkan.lunarg.com/doc/sdk/latest/linux/getting_started.html)) for now future SDKs don't work. You need precisely 1.3.268.0.
|
||||
- [SDL3](https://github.com/libsdl-org/SDL/releases) (for the FAudio backend)
|
||||
|
||||
|
|
@ -95,7 +95,7 @@ sudo apt-get install cmake
|
|||
|
||||
#### Fedora
|
||||
|
||||
sudo dnf install alsa-lib-devel cmake ninja-build glew glew-devel libatomic libevdev-devel libudev-devel openal-devel qt6-qtbase-devel qt6-qtbase-private-devel vulkan-devel pipewire-jack-audio-connection-kit-devel qt6-qtmultimedia-devel qt6-qtsvg-devel llvm-devel
|
||||
sudo dnf install alsa-lib-devel cmake ninja-build glew glew-devel libatomic libevdev-devel libudev-devel openal-soft-devel qt6-qtbase-devel qt6-qtbase-private-devel vulkan-devel pipewire-jack-audio-connection-kit-devel qt6-qtmultimedia-devel qt6-qtsvg-devel llvm-devel libcurl-devel
|
||||
|
||||
#### OpenSUSE
|
||||
|
||||
|
|
@ -123,7 +123,7 @@ Start **Visual Studio**, click on `Open a project or solution` and select the `r
|
|||
##### Configuring the Qt Plugin (if used)
|
||||
|
||||
1) go to `Extensions->Qt VS Tools->Qt Versions`
|
||||
2) add the path to your Qt installation with compiler e.g. `<QtInstallFolder>\6.10.2\msvc2022_64`, version will fill in automatically
|
||||
2) add the path to your Qt installation with compiler e.g. `<QtInstallFolder>\6.11.0\msvc2022_64`, version will fill in automatically
|
||||
3) go to `Extensions->Qt VS Tools->Options->Legacy Project Format`. (Only available in the **Legacy Qt Plugin**)
|
||||
4) set `Build: Run pre-build setup` to `true`. (Only available in the **Legacy Qt Plugin**)
|
||||
|
||||
|
|
|
|||
|
|
@ -13,12 +13,12 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 11)
|
||||
message(FATAL_ERROR "RPCS3 requires at least gcc-11.")
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13)
|
||||
message(FATAL_ERROR "RPCS3 requires at least gcc-13.")
|
||||
endif()
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.0)
|
||||
message(FATAL_ERROR "RPCS3 requires at least clang-12.0.")
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.0)
|
||||
message(FATAL_ERROR "RPCS3 requires at least clang-19.0.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ option(USE_LIBEVDEV "libevdev-based joystick support" ON)
|
|||
option(USE_DISCORD_RPC "Discord rich presence integration" OFF)
|
||||
option(USE_VULKAN "Vulkan render backend" ON)
|
||||
option(USE_PRECOMPILED_HEADERS "Use precompiled headers" OFF)
|
||||
option(USE_SDL "Enables SDL input handler" OFF)
|
||||
option(USE_SDL "Enables SDL input handler" ON)
|
||||
option(USE_SYSTEM_CUBEB "Prefer system cubeb instead of the builtin one" OFF)
|
||||
option(USE_SYSTEM_CURL "Prefer system Curl instead of the prebuild one" ON)
|
||||
option(USE_SYSTEM_FAUDIO "Prefer system FAudio instead of the builtin one" OFF)
|
||||
|
|
@ -86,50 +86,7 @@ if(CMAKE_BUILD_TYPE MATCHES "Debug" AND NOT MSVC)
|
|||
endif()
|
||||
|
||||
if(MSVC)
|
||||
option(USE_MSVC_STATIC_CRT "Use static MSVC C runtime" OFF)
|
||||
|
||||
# TODO(cjj19970505@live.cn)
|
||||
# DiscordRPC binary in 3rdparty is compiled /MT
|
||||
# So theoretically we should enable DiscordRPC in Release and static CRT build
|
||||
# since we might encounter some rumtime issues when more than one CRT version are presented.
|
||||
# https://docs.microsoft.com/en-us/cpp/c-runtime-library/crt-library-features?view=msvc-160#what-problems-exist-if-an-application-uses-more-than-one-crt-version
|
||||
# Add other DiscordRPC binaries(compiled with /MTd, /MD, /MDd) or compile it from source may address this issue.
|
||||
if(NOT IS_MULTI_CONFIG)
|
||||
if(NOT(CMAKE_BUILD_TYPE MATCHES "Release" AND USE_MSVC_STATIC_CRT))
|
||||
set(USE_DISCORD_RPC OFF CACHE BOOL "Discord RPC is only available in Release and static CRT build." FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(USE_MSVC_STATIC_CRT)
|
||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
else()
|
||||
# though doc ( https://cmake.org/cmake/help/latest/variable/CMAKE_MSVC_RUNTIME_LIBRARY.html )
|
||||
# says if that property is not set then CMake uses the default value MultiThreaded$<$<CONFIG:Debug>:Debug>DLL
|
||||
# to select a MSVC runtime library.
|
||||
# But yaml-cpp set /MT(d) if CMAKE_MSVC_RUNTIME_LIBRARY is undefined
|
||||
# So we have to define it explicitly
|
||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
|
||||
endif()
|
||||
|
||||
# TODO(cjj19970505@live.cn)
|
||||
# offical QT uses dynamic CRT.
|
||||
# When building our lib with static CRT and debug build type
|
||||
# and linking with Qt with dynamic CRT and debug build,
|
||||
# error is encountered in runtime (which is expected).
|
||||
# But building our lib with static CRT and release build type,
|
||||
# and linking with Qt with dynamic CRT and release build seems to be working,
|
||||
# which is the same config with VS solution.
|
||||
# (though technically it might still have some hidden errors).
|
||||
# So we allow static CRT in both relase and debug build, but prompt warning in debug build.
|
||||
# For more info:
|
||||
# https://docs.microsoft.com/en-us/cpp/c-runtime-library/crt-library-features?view=msvc-160#what-problems-exist-if-an-application-uses-more-than-one-crt-version
|
||||
# https://wiki.qt.io/Technical_FAQ#Why_does_a_statically_built_Qt_use_the_dynamic_Visual_Studio_runtime_libraries_.3F_Do_I_need_to_deploy_those_with_my_application_.3F
|
||||
if(USE_MSVC_STATIC_CRT)
|
||||
if(IS_MULTI_CONFIG OR CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||
message(AUTHOR_WARNING "Debug build currently can not work with static CRT.")
|
||||
endif()
|
||||
endif()
|
||||
add_compile_options(/MP)
|
||||
add_compile_options("$<$<COMPILE_LANGUAGE:C,CXX>:/MP>")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
|
|
@ -142,7 +99,7 @@ if(APPLE AND CMAKE_OSX_ARCHITECTURES STREQUAL "arm64")
|
|||
endif()
|
||||
|
||||
if(MSVC)
|
||||
add_compile_options(/wd4530 /utf-8) # C++ exception handler used, but unwind semantics are not enabled
|
||||
add_compile_options("$<$<COMPILE_LANGUAGE:C,CXX>:/wd4530;/utf-8>") # C++ exception handler used, but unwind semantics are not enabled
|
||||
endif()
|
||||
|
||||
add_subdirectory(3rdparty)
|
||||
|
|
@ -161,10 +118,6 @@ if (NOT FOUND_LTO EQUAL -1)
|
|||
message(FATAL_ERROR "RPCS3 doesn't support building with LTO, use -DDISABLE_LTO=TRUE to force-disable it")
|
||||
endif()
|
||||
|
||||
if(NOT WIN32)
|
||||
add_compile_options(-pthread)
|
||||
endif()
|
||||
|
||||
## Look for Gamemode if its installed on Linux
|
||||
if(LINUX)
|
||||
## User chooses whether to Enable GameMode features or not
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ namespace cfg
|
|||
owner->m_nodes.emplace_back(this);
|
||||
}
|
||||
|
||||
bool _base::from_string(std::string_view, bool)
|
||||
bool _base::from_string(std::string_view /*value*/, bool /*dynamic*/)
|
||||
{
|
||||
cfg_log.fatal("cfg::_base::from_string() purecall");
|
||||
return false;
|
||||
|
|
@ -68,7 +68,7 @@ namespace cfg
|
|||
|
||||
// Incrementally load config entries from YAML::Node.
|
||||
// The config value is preserved if the corresponding YAML node doesn't exist.
|
||||
static void decode(const YAML::Node& data, class _base& rhs, bool dynamic = false);
|
||||
[[nodiscard]] static bool decode(const YAML::Node& data, class _base& rhs, bool dynamic, bool strict);
|
||||
}
|
||||
|
||||
std::vector<std::string> cfg::make_int_range(s64 min, s64 max)
|
||||
|
|
@ -76,11 +76,11 @@ std::vector<std::string> cfg::make_int_range(s64 min, s64 max)
|
|||
return {std::to_string(min), std::to_string(max)};
|
||||
}
|
||||
|
||||
bool try_to_int64(s64* out, std::string_view value, s64 min, s64 max)
|
||||
bool try_to_int64(s64* out, std::string_view value, s64 min, s64 max, std::string_view name)
|
||||
{
|
||||
if (value.empty())
|
||||
{
|
||||
if (out) cfg_log.error("cfg::try_to_int64(): called with an empty string");
|
||||
if (out) cfg_log.error("cfg::try_to_int64('%s'): called with an empty string", name);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -107,7 +107,7 @@ bool try_to_int64(s64* out, std::string_view value, s64 min, s64 max)
|
|||
|
||||
if (ret.ec != std::errc() || ret.ptr != end || (start[0] == '-' && sign < 0))
|
||||
{
|
||||
if (out) cfg_log.error("cfg::try_to_int64('%s'): invalid integer", value);
|
||||
if (out) cfg_log.error("cfg::try_to_int64('%s', '%s'): invalid integer", value, name);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -115,7 +115,7 @@ bool try_to_int64(s64* out, std::string_view value, s64 min, s64 max)
|
|||
|
||||
if (result < min || result > max)
|
||||
{
|
||||
if (out) cfg_log.error("cfg::try_to_int64('%s'): out of bounds (val=%d, min=%d, max=%d)", value, result, min, max);
|
||||
if (out) cfg_log.error("cfg::try_to_int64('%s', '%s'): out of bounds (val=%d, min=%d, max=%d)", value, name, result, min, max);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -128,11 +128,11 @@ std::vector<std::string> cfg::make_uint_range(u64 min, u64 max)
|
|||
return {std::to_string(min), std::to_string(max)};
|
||||
}
|
||||
|
||||
bool try_to_uint64(u64* out, std::string_view value, u64 min, u64 max)
|
||||
bool try_to_uint64(u64* out, std::string_view value, u64 min, u64 max, std::string_view name)
|
||||
{
|
||||
if (value.empty())
|
||||
{
|
||||
if (out) cfg_log.error("cfg::try_to_uint64(): called with an empty string");
|
||||
if (out) cfg_log.error("cfg::try_to_uint64('%s'): called with an empty string", name);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -152,13 +152,13 @@ bool try_to_uint64(u64* out, std::string_view value, u64 min, u64 max)
|
|||
|
||||
if (ret.ec != std::errc() || ret.ptr != end)
|
||||
{
|
||||
if (out) cfg_log.error("cfg::try_to_uint64('%s'): invalid integer", value);
|
||||
if (out) cfg_log.error("cfg::try_to_uint64('%s', '%s'): invalid integer", value, name);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (result < min || result > max)
|
||||
{
|
||||
if (out) cfg_log.error("cfg::try_to_uint64('%s'): out of bounds (val=%u, min=%u, max=%u)", value, result, min, max);
|
||||
if (out) cfg_log.error("cfg::try_to_uint64('%s', '%s'): out of bounds (val=%u, min=%u, max=%u)", value, name, result, min, max);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -166,11 +166,11 @@ bool try_to_uint64(u64* out, std::string_view value, u64 min, u64 max)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool try_to_uint128(u128* out, std::string_view value)
|
||||
bool try_to_uint128(u128* out, std::string_view value, std::string_view name)
|
||||
{
|
||||
if (value.empty())
|
||||
{
|
||||
if (out) cfg_log.error("cfg::try_to_uint128(): called with an empty string");
|
||||
if (out) cfg_log.error("cfg::try_to_uint128('%s'): called with an empty string", name);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -193,7 +193,7 @@ bool try_to_uint128(u128* out, std::string_view value)
|
|||
|
||||
if (ret.ec != std::errc() || ret.ptr != end)
|
||||
{
|
||||
if (out) cfg_log.error("cfg::try_to_uint128('%s'): invalid integer", value);
|
||||
if (out) cfg_log.error("cfg::try_to_uint128('%s', '%s'): invalid integer", value, name);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -207,7 +207,7 @@ bool try_to_uint128(u128* out, std::string_view value)
|
|||
|
||||
if (ret.ec != std::errc() || ret.ptr != start_low64)
|
||||
{
|
||||
if (out) cfg_log.error("cfg::try_to_uint128('%s'): invalid integer", value);
|
||||
if (out) cfg_log.error("cfg::try_to_uint128('%s', '%s'): invalid integer", value, name);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -220,11 +220,11 @@ std::vector<std::string> cfg::make_float_range(f64 min, f64 max)
|
|||
return {std::to_string(min), std::to_string(max)};
|
||||
}
|
||||
|
||||
bool try_to_float(f64* out, std::string_view value, f64 min, f64 max)
|
||||
bool try_to_float(f64* out, std::string_view value, f64 min, f64 max, std::string_view name)
|
||||
{
|
||||
if (value.empty())
|
||||
{
|
||||
if (out) cfg_log.error("cfg::try_to_float(): called with an empty string");
|
||||
if (out) cfg_log.error("cfg::try_to_float('%s'): called with an empty string", name);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -237,13 +237,13 @@ bool try_to_float(f64* out, std::string_view value, f64 min, f64 max)
|
|||
|
||||
if (end_check != str.data() + str.size())
|
||||
{
|
||||
if (out) cfg_log.error("cfg::try_to_float('%s'): invalid float", value);
|
||||
if (out) cfg_log.error("cfg::try_to_float('%s', '%s'): invalid float", value, name);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (result < min || result > max)
|
||||
{
|
||||
if (out) cfg_log.error("cfg::try_to_float('%s'): out of bounds (val=%f, min=%f, max=%f)", value, result, min, max);
|
||||
if (out) cfg_log.error("cfg::try_to_float('%s', '%s'): out of bounds (val=%f, min=%f, max=%f)", value, name, result, min, max);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -251,7 +251,7 @@ bool try_to_float(f64* out, std::string_view value, f64 min, f64 max)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool try_to_string(std::string* out, const f64& value)
|
||||
bool try_to_string(std::string* out, f64 value, std::string_view name)
|
||||
{
|
||||
#ifdef __APPLE__
|
||||
if (out) *out = std::to_string(value);
|
||||
|
|
@ -266,13 +266,13 @@ bool try_to_string(std::string* out, const f64& value)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (out) cfg_log.error("cfg::try_to_string(): could not convert value '%f' to string. error='%s'", value, std::make_error_code(ec).message());
|
||||
if (out) cfg_log.error("cfg::try_to_string('%s'): could not convert value '%f' to string. error='%s'", name, value, std::make_error_code(ec).message());
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
bool cfg::try_to_enum_value(u64* out, decltype(&fmt_class_string<int>::format) func, std::string_view value)
|
||||
bool cfg::try_to_enum_value(u64* out, decltype(&fmt_class_string<int>::format) func, std::string_view value, std::string_view name)
|
||||
{
|
||||
u64 max = umax;
|
||||
|
||||
|
|
@ -313,13 +313,13 @@ bool cfg::try_to_enum_value(u64* out, decltype(&fmt_class_string<int>::format) f
|
|||
|
||||
if (ret.ec != std::errc() || ret.ptr != end)
|
||||
{
|
||||
if (out) cfg_log.error("cfg::try_to_enum_value('%s'): invalid enum or integer", value);
|
||||
if (out) cfg_log.error("cfg::try_to_enum_value('%s', '%s'): invalid enum or integer", value, name);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (result > max)
|
||||
{
|
||||
if (out) cfg_log.error("cfg::try_to_enum_value('%s'): out of bounds(val=%u, min=0, max=%u)", value, result, max);
|
||||
if (out) cfg_log.error("cfg::try_to_enum_value('%s', '%s'): out of bounds(val=%u, min=0, max=%u)", value, name, result, max);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -362,6 +362,27 @@ std::vector<std::string> cfg::try_to_enum_list(decltype(&fmt_class_string<int>::
|
|||
return result;
|
||||
}
|
||||
|
||||
size_t cfg::try_to_enum_size(decltype(&fmt_class_string<int>::format) func)
|
||||
{
|
||||
size_t result = 0;
|
||||
for (u64 i = 0;; i++)
|
||||
{
|
||||
std::string var;
|
||||
func(var, i);
|
||||
|
||||
std::string hex;
|
||||
fmt_class_string<u64>::format(hex, i);
|
||||
if (var == hex)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
result++;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void cfg::encode(YAML::Emitter& out, const cfg::_base& rhs)
|
||||
{
|
||||
switch (rhs.get_type())
|
||||
|
|
@ -416,7 +437,7 @@ void cfg::encode(YAML::Emitter& out, const cfg::_base& rhs)
|
|||
out << YAML::BeginMap;
|
||||
for (const auto& np : static_cast<const log_entry&>(rhs).get_map())
|
||||
{
|
||||
if (np.second == logs::level::notice) continue;
|
||||
if (np.second == logs::level::_default) continue;
|
||||
out << YAML::Key << np.first;
|
||||
out << YAML::Value << fmt::format("%s", np.second);
|
||||
}
|
||||
|
|
@ -447,37 +468,50 @@ void cfg::encode(YAML::Emitter& out, const cfg::_base& rhs)
|
|||
}
|
||||
}
|
||||
|
||||
void cfg::decode(const YAML::Node& data, cfg::_base& rhs, bool dynamic)
|
||||
bool cfg::decode(const YAML::Node& data, cfg::_base& rhs, bool dynamic, bool strict)
|
||||
{
|
||||
if (dynamic && !rhs.get_is_dynamic())
|
||||
{
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (rhs.get_type())
|
||||
{
|
||||
case type::node:
|
||||
{
|
||||
if (data.IsScalar() || data.IsSequence())
|
||||
if (!data.IsMap())
|
||||
{
|
||||
return; // ???
|
||||
cfg_log.error("node node is not a map");
|
||||
return false;
|
||||
}
|
||||
|
||||
bool success = true;
|
||||
|
||||
for (const auto& pair : data)
|
||||
{
|
||||
if (!pair.first.IsScalar()) continue;
|
||||
|
||||
// Find the key among existing nodes
|
||||
for (const auto& node : static_cast<node&>(rhs).get_nodes())
|
||||
const auto& nodes = static_cast<node&>(rhs).get_nodes();
|
||||
const auto it = std::find_if(nodes.cbegin(), nodes.cend(), [&pair](const auto& node) { return ensure(node)->get_name() == pair.first.Scalar(); });
|
||||
|
||||
if (it == nodes.cend())
|
||||
{
|
||||
if (node->get_name() == pair.first.Scalar())
|
||||
if (strict)
|
||||
{
|
||||
decode(pair.second, *node, dynamic);
|
||||
cfg_log.error("Unknown key found: '%s'", pair.first.Scalar());
|
||||
success = false;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!decode(pair.second, *ensure(*it), dynamic, strict) && strict)
|
||||
{
|
||||
success = false;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
return success;
|
||||
}
|
||||
case type::set:
|
||||
{
|
||||
|
|
@ -485,7 +519,10 @@ void cfg::decode(const YAML::Node& data, cfg::_base& rhs, bool dynamic)
|
|||
|
||||
if (YAML::convert<decltype(values)>::decode(data, values))
|
||||
{
|
||||
rhs.from_list(std::move(values));
|
||||
if (!rhs.from_list(std::move(values)) && strict)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
@ -495,7 +532,8 @@ void cfg::decode(const YAML::Node& data, cfg::_base& rhs, bool dynamic)
|
|||
{
|
||||
if (!data.IsMap())
|
||||
{
|
||||
return;
|
||||
cfg_log.error("map node is not a map");
|
||||
return false;
|
||||
}
|
||||
|
||||
map_of_type<std::string> values;
|
||||
|
|
@ -512,22 +550,36 @@ void cfg::decode(const YAML::Node& data, cfg::_base& rhs, bool dynamic)
|
|||
}
|
||||
case type::log:
|
||||
{
|
||||
if (data.IsScalar() || data.IsSequence())
|
||||
if (!data.IsMap())
|
||||
{
|
||||
return; // ???
|
||||
cfg_log.error("log node is not a map");
|
||||
return false;
|
||||
}
|
||||
|
||||
map_of_type<logs::level> values;
|
||||
|
||||
for (const auto& pair : data)
|
||||
{
|
||||
if (!pair.first.IsScalar() || !pair.second.IsScalar()) continue;
|
||||
if (!pair.first.IsScalar() || !pair.second.IsScalar())
|
||||
{
|
||||
if (strict)
|
||||
{
|
||||
if (!pair.first.IsScalar())
|
||||
cfg_log.error("Key in map is not a scalar");
|
||||
else
|
||||
cfg_log.error("Value in map is not a scalar. key='%s'", pair.first.Scalar());
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
u64 value;
|
||||
if (cfg::try_to_enum_value(&value, &fmt_class_string<logs::level>::format, pair.second.Scalar()))
|
||||
if (!cfg::try_to_enum_value(&value, &fmt_class_string<logs::level>::format, pair.second.Scalar(), pair.first.Scalar()) && strict)
|
||||
{
|
||||
values.emplace(pair.first.Scalar(), static_cast<logs::level>(static_cast<int>(value)));
|
||||
return false;
|
||||
}
|
||||
|
||||
values.emplace(pair.first.Scalar(), static_cast<logs::level>(static_cast<int>(value)));
|
||||
}
|
||||
|
||||
static_cast<log_entry&>(rhs).set_map(std::move(values));
|
||||
|
|
@ -537,20 +589,43 @@ void cfg::decode(const YAML::Node& data, cfg::_base& rhs, bool dynamic)
|
|||
{
|
||||
if (!data.IsMap())
|
||||
{
|
||||
return; // ???
|
||||
cfg_log.error("device node is not a map");
|
||||
return false;
|
||||
}
|
||||
|
||||
map_of_type<device_info> values;
|
||||
|
||||
for (const auto& pair : data)
|
||||
{
|
||||
if (!pair.first.IsScalar() || !pair.second.IsMap()) continue;
|
||||
if (!pair.first.IsScalar() || !pair.second.IsMap())
|
||||
{
|
||||
if (strict)
|
||||
{
|
||||
if (!pair.first.IsScalar())
|
||||
cfg_log.error("Key in device map is not a scalar");
|
||||
else
|
||||
cfg_log.error("Value in device map is not a map. key='%s'", pair.first.Scalar());
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
device_info info{};
|
||||
|
||||
for (const auto& key_value : pair.second)
|
||||
{
|
||||
if (!key_value.first.IsScalar() || !key_value.second.IsScalar()) continue;
|
||||
if (!key_value.first.IsScalar() || !key_value.second.IsScalar())
|
||||
{
|
||||
if (strict)
|
||||
{
|
||||
if (!key_value.first.IsScalar())
|
||||
cfg_log.error("Key in device info map is not a scalar");
|
||||
else
|
||||
cfg_log.error("Value in device map is not a scalar. key='%s'", key_value.first.Scalar());
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if (key_value.first.Scalar() == "Path")
|
||||
info.path = key_value.second.Scalar();
|
||||
|
|
@ -577,12 +652,17 @@ void cfg::decode(const YAML::Node& data, cfg::_base& rhs, bool dynamic)
|
|||
|
||||
if (YAML::convert<std::string>::decode(data, value))
|
||||
{
|
||||
rhs.from_string(value, dynamic);
|
||||
if (!rhs.from_string(value, dynamic) && strict)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
break; // ???
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string cfg::node::to_string() const
|
||||
|
|
@ -599,8 +679,7 @@ bool cfg::node::from_string(std::string_view value, bool dynamic)
|
|||
|
||||
if (error.empty())
|
||||
{
|
||||
cfg::decode(result, *this, dynamic);
|
||||
return true;
|
||||
return cfg::decode(result, *this, dynamic, false);
|
||||
}
|
||||
|
||||
cfg_log.error("Failed to load node: %s", error);
|
||||
|
|
@ -623,6 +702,19 @@ void cfg::node::restore_defaults()
|
|||
}
|
||||
}
|
||||
|
||||
bool cfg::node::validate(std::string_view value)
|
||||
{
|
||||
auto [result, error] = yaml_load(std::string(value));
|
||||
|
||||
if (error.empty())
|
||||
{
|
||||
return cfg::decode(result, *this, false, true);
|
||||
}
|
||||
|
||||
cfg_log.error("Failed to load node: %s", error);
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string cfg::map_entry::get_value(std::string_view key)
|
||||
{
|
||||
if (auto it = m_map.find(key); it != m_map.end())
|
||||
|
|
|
|||
|
|
@ -25,11 +25,14 @@ namespace cfg
|
|||
std::vector<std::string> make_float_range(f64 min, f64 max);
|
||||
|
||||
// Internal hack
|
||||
bool try_to_enum_value(u64* out, decltype(&fmt_class_string<int>::format) func, std::string_view);
|
||||
bool try_to_enum_value(u64* out, decltype(&fmt_class_string<int>::format) func, std::string_view value, std::string_view name = {});
|
||||
|
||||
// Internal hack
|
||||
std::vector<std::string> try_to_enum_list(decltype(&fmt_class_string<int>::format) func);
|
||||
|
||||
// Internal hack
|
||||
size_t try_to_enum_size(decltype(&fmt_class_string<int>::format) func);
|
||||
|
||||
// Config tree entry type.
|
||||
enum class type : unsigned
|
||||
{
|
||||
|
|
@ -107,7 +110,7 @@ namespace cfg
|
|||
}
|
||||
|
||||
// Try to convert from string (optional)
|
||||
virtual bool from_string(std::string_view, bool /*dynamic*/ = false);
|
||||
virtual bool from_string(std::string_view value, bool dynamic = false);
|
||||
|
||||
// Get string list (optional)
|
||||
virtual std::vector<std::string> to_list() const
|
||||
|
|
@ -158,6 +161,9 @@ namespace cfg
|
|||
|
||||
// Restore default members
|
||||
void restore_defaults() override;
|
||||
|
||||
// Try to convert from string and validate
|
||||
bool validate(std::string_view value);
|
||||
};
|
||||
|
||||
class _bool final : public _base
|
||||
|
|
@ -298,7 +304,7 @@ namespace cfg
|
|||
{
|
||||
u64 result;
|
||||
|
||||
if (try_to_enum_value(&result, &fmt_class_string<T>::format, value))
|
||||
if (try_to_enum_value(&result, &fmt_class_string<T>::format, value, m_name))
|
||||
{
|
||||
// No narrowing check, it's hard to do right there
|
||||
m_value = static_cast<T>(static_cast<std::underlying_type_t<T>>(result));
|
||||
|
|
@ -312,6 +318,11 @@ namespace cfg
|
|||
{
|
||||
return try_to_enum_list(&fmt_class_string<T>::format);
|
||||
}
|
||||
|
||||
size_t size() const
|
||||
{
|
||||
return try_to_enum_size(&fmt_class_string<T>::format);
|
||||
}
|
||||
};
|
||||
|
||||
// Signed 32/64-bit integer entry with custom Min/Max range.
|
||||
|
|
@ -374,7 +385,7 @@ namespace cfg
|
|||
bool from_string(std::string_view value, bool /*dynamic*/ = false) override
|
||||
{
|
||||
s64 result;
|
||||
if (try_to_int64(&result, value, Min, Max))
|
||||
if (try_to_int64(&result, value, Min, Max, m_name))
|
||||
{
|
||||
m_value = static_cast<int_type>(result);
|
||||
return true;
|
||||
|
|
@ -385,7 +396,7 @@ namespace cfg
|
|||
|
||||
void set(const s64& value)
|
||||
{
|
||||
ensure(value >= Min && value <= Max);
|
||||
if (value < Min || value > Max) fmt::throw_exception("'%s': value %d out of bounds (min=%d, max=%d)", m_name, value, Min, Max);
|
||||
m_value = static_cast<int_type>(value);
|
||||
}
|
||||
|
||||
|
|
@ -443,7 +454,7 @@ namespace cfg
|
|||
std::string to_string() const override
|
||||
{
|
||||
std::string result;
|
||||
if (try_to_string(&result, m_value))
|
||||
if (try_to_string(&result, m_value, m_name))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
|
@ -454,7 +465,7 @@ namespace cfg
|
|||
std::string def_to_string() const override
|
||||
{
|
||||
std::string result;
|
||||
if (try_to_string(&result, def))
|
||||
if (try_to_string(&result, def, m_name))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
|
@ -465,7 +476,7 @@ namespace cfg
|
|||
bool from_string(std::string_view value, bool /*dynamic*/ = false) override
|
||||
{
|
||||
f64 result;
|
||||
if (try_to_float(&result, value, Min, Max))
|
||||
if (try_to_float(&result, value, Min, Max, m_name))
|
||||
{
|
||||
m_value = static_cast<float_type>(result);
|
||||
return true;
|
||||
|
|
@ -476,7 +487,7 @@ namespace cfg
|
|||
|
||||
void set(const f64& value)
|
||||
{
|
||||
ensure(value >= Min && value <= Max);
|
||||
if (value < Min || value > Max) fmt::throw_exception("'%s': value %d out of bounds (min=%d, max=%d)", m_name, value, Min, Max);
|
||||
m_value = static_cast<float_type>(value);
|
||||
}
|
||||
|
||||
|
|
@ -552,7 +563,7 @@ namespace cfg
|
|||
bool from_string(std::string_view value, bool /*dynamic*/ = false) override
|
||||
{
|
||||
u64 result;
|
||||
if (try_to_uint64(&result, value, Min, Max))
|
||||
if (try_to_uint64(&result, value, Min, Max, m_name))
|
||||
{
|
||||
m_value = static_cast<int_type>(result);
|
||||
return true;
|
||||
|
|
@ -563,7 +574,7 @@ namespace cfg
|
|||
|
||||
void set(const u64& value)
|
||||
{
|
||||
ensure(value >= Min && value <= Max);
|
||||
if (value < Min || value > Max) fmt::throw_exception("'%s': value %d out of bounds (min=%d, max=%d)", m_name, value, Min, Max);
|
||||
m_value = static_cast<int_type>(value);
|
||||
}
|
||||
|
||||
|
|
@ -638,7 +649,7 @@ namespace cfg
|
|||
bool from_string(std::string_view value, bool /*dynamic*/ = false) override
|
||||
{
|
||||
u128 result;
|
||||
if (try_to_uint128(&result, value))
|
||||
if (try_to_uint128(&result, value, m_name))
|
||||
{
|
||||
m_value = result;
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -117,6 +117,7 @@ static fs::error to_error(DWORD e)
|
|||
case ERROR_NEGATIVE_SEEK: return fs::error::inval;
|
||||
case ERROR_DIRECTORY: return fs::error::inval;
|
||||
case ERROR_INVALID_NAME: return fs::error::inval;
|
||||
case ERROR_INVALID_FUNCTION: return fs::error::inval;
|
||||
case ERROR_SHARING_VIOLATION: return fs::error::acces;
|
||||
case ERROR_DIR_NOT_EMPTY: return fs::error::notempty;
|
||||
case ERROR_NOT_READY: return fs::error::noent;
|
||||
|
|
@ -165,6 +166,7 @@ static fs::error to_error(int e)
|
|||
case ENOTEMPTY: return fs::error::notempty;
|
||||
case EROFS: return fs::error::readonly;
|
||||
case EISDIR: return fs::error::isdir;
|
||||
case ENOTDIR: return fs::error::notdir;
|
||||
case ENOSPC: return fs::error::nospace;
|
||||
case EXDEV: return fs::error::xdev;
|
||||
default: return fs::error::unknown;
|
||||
|
|
@ -398,12 +400,11 @@ namespace fs
|
|||
class windows_file final : public file_base
|
||||
{
|
||||
HANDLE m_handle;
|
||||
atomic_t<u64> m_pos;
|
||||
atomic_t<u64> m_pos {0};
|
||||
|
||||
public:
|
||||
windows_file(HANDLE handle)
|
||||
: m_handle(handle)
|
||||
, m_pos(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -417,10 +418,10 @@ namespace fs
|
|||
|
||||
stat_t get_stat() override
|
||||
{
|
||||
FILE_BASIC_INFO basic_info;
|
||||
FILE_BASIC_INFO basic_info {};
|
||||
ensure(GetFileInformationByHandleEx(m_handle, FileBasicInfo, &basic_info, sizeof(FILE_BASIC_INFO))); // "file::stat"
|
||||
|
||||
stat_t info;
|
||||
stat_t info {};
|
||||
info.is_directory = (basic_info.FileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0;
|
||||
info.is_writable = (basic_info.FileAttributes & FILE_ATTRIBUTE_READONLY) == 0;
|
||||
info.size = this->size();
|
||||
|
|
@ -441,7 +442,7 @@ namespace fs
|
|||
|
||||
bool trunc(u64 length) override
|
||||
{
|
||||
FILE_END_OF_FILE_INFO _eof;
|
||||
FILE_END_OF_FILE_INFO _eof {};
|
||||
_eof.EndOfFile.QuadPart = length;
|
||||
|
||||
if (!SetFileInformationByHandle(m_handle, FileEndOfFileInfo, &_eof, sizeof(_eof)))
|
||||
|
|
@ -563,6 +564,7 @@ namespace fs
|
|||
|
||||
u64 size() override
|
||||
{
|
||||
// NOTE: this can fail if we access a mounted empty drive (e.g. after unmounting an iso).
|
||||
LARGE_INTEGER size;
|
||||
ensure(GetFileSizeEx(m_handle, &size)); // "file::size"
|
||||
|
||||
|
|
@ -579,12 +581,12 @@ namespace fs
|
|||
file_id id{"windows_file"};
|
||||
id.data.resize(sizeof(FILE_ID_INFO));
|
||||
|
||||
FILE_ID_INFO info;
|
||||
FILE_ID_INFO info {};
|
||||
|
||||
if (!GetFileInformationByHandleEx(m_handle, FileIdInfo, &info, sizeof(info)))
|
||||
{
|
||||
// Try GetFileInformationByHandle as a fallback
|
||||
BY_HANDLE_FILE_INFORMATION info2;
|
||||
BY_HANDLE_FILE_INFORMATION info2{};
|
||||
ensure(GetFileInformationByHandle(m_handle, &info2));
|
||||
|
||||
info = {};
|
||||
|
|
@ -625,7 +627,7 @@ namespace fs
|
|||
struct ::stat file_info;
|
||||
ensure(::fstat(m_fd, &file_info) == 0); // "file::stat"
|
||||
|
||||
stat_t info;
|
||||
stat_t info {};
|
||||
info.is_directory = S_ISDIR(file_info.st_mode);
|
||||
info.is_writable = file_info.st_mode & 0200; // HACK: approximation
|
||||
info.size = file_info.st_size;
|
||||
|
|
@ -1656,6 +1658,45 @@ fs::file::file(const std::string& path, bs_t<open_mode> mode)
|
|||
return;
|
||||
}
|
||||
|
||||
// Check if the handle is actually valid.
|
||||
// This can fail on empty mounted drives (e.g. with ERROR_NOT_READY or ERROR_INVALID_FUNCTION).
|
||||
BY_HANDLE_FILE_INFORMATION info{};
|
||||
if (!GetFileInformationByHandle(handle, &info))
|
||||
{
|
||||
const DWORD last_error = GetLastError();
|
||||
CloseHandle(handle);
|
||||
|
||||
if (last_error == ERROR_INVALID_FUNCTION)
|
||||
{
|
||||
g_tls_error = fs::error::isdir;
|
||||
return;
|
||||
}
|
||||
|
||||
g_tls_error = to_error(last_error);
|
||||
return;
|
||||
}
|
||||
|
||||
if (info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
|
||||
{
|
||||
CloseHandle(handle);
|
||||
g_tls_error = fs::error::isdir;
|
||||
return;
|
||||
}
|
||||
|
||||
if (info.dwFileAttributes & FILE_ATTRIBUTE_SYSTEM)
|
||||
{
|
||||
CloseHandle(handle);
|
||||
g_tls_error = fs::error::acces;
|
||||
return;
|
||||
}
|
||||
|
||||
if ((mode & fs::write) && (info.dwFileAttributes & FILE_ATTRIBUTE_READONLY))
|
||||
{
|
||||
CloseHandle(handle);
|
||||
g_tls_error = fs::error::readonly;
|
||||
return;
|
||||
}
|
||||
|
||||
m_file = std::make_unique<windows_file>(handle);
|
||||
#else
|
||||
int flags = O_CLOEXEC; // Ensures all files are closed on execl for auto updater
|
||||
|
|
@ -2595,7 +2636,7 @@ bool fs::pending_file::commit(bool overwrite)
|
|||
while (file_handle != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
// Get file ID (used to check for hardlinks)
|
||||
BY_HANDLE_FILE_INFORMATION file_info;
|
||||
BY_HANDLE_FILE_INFORMATION file_info{};
|
||||
|
||||
if (!GetFileInformationByHandle(file_handle, &file_info) || file_info.nNumberOfLinks == 1)
|
||||
{
|
||||
|
|
@ -2793,6 +2834,7 @@ void fmt_class_string<fs::error>::format(std::string& out, u64 arg)
|
|||
case fs::error::notempty: return "Not empty";
|
||||
case fs::error::readonly: return "Read only";
|
||||
case fs::error::isdir: return "Is a directory";
|
||||
case fs::error::notdir: return "Not a directory";
|
||||
case fs::error::toolong: return "Path too long";
|
||||
case fs::error::nospace: return "Not enough space on the device";
|
||||
case fs::error::xdev: return "Device mismatch";
|
||||
|
|
|
|||
|
|
@ -66,13 +66,13 @@ namespace fs
|
|||
// File attributes (TODO)
|
||||
struct stat_t
|
||||
{
|
||||
bool is_directory;
|
||||
bool is_symlink;
|
||||
bool is_writable;
|
||||
u64 size;
|
||||
s64 atime;
|
||||
s64 mtime;
|
||||
s64 ctime;
|
||||
bool is_directory = false;
|
||||
bool is_symlink = false;
|
||||
bool is_writable = false;
|
||||
u64 size = 0;
|
||||
s64 atime = 0;
|
||||
s64 mtime = 0;
|
||||
s64 ctime = 0;
|
||||
|
||||
using enable_bitcopy = std::true_type;
|
||||
|
||||
|
|
@ -683,6 +683,7 @@ namespace fs
|
|||
notempty,
|
||||
readonly,
|
||||
isdir,
|
||||
notdir,
|
||||
toolong,
|
||||
nospace,
|
||||
xdev,
|
||||
|
|
|
|||
|
|
@ -493,6 +493,10 @@ inline FT build_function_asm(std::string_view name, F&& builder, ::jit_runtime*
|
|||
return reinterpret_cast<FT>(uptr(result));
|
||||
}
|
||||
|
||||
#if defined(__INTELLISENSE__) && !defined(LLVM_AVAILABLE)
|
||||
#define LLVM_AVAILABLE
|
||||
#endif
|
||||
|
||||
#ifdef LLVM_AVAILABLE
|
||||
|
||||
namespace llvm
|
||||
|
|
|
|||
|
|
@ -14,6 +14,10 @@
|
|||
#define CAN_OVERCOMMIT
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#include <mutex>
|
||||
#endif
|
||||
|
||||
LOG_CHANNEL(jit_log, "JIT");
|
||||
|
||||
void jit_announce(uptr func, usz size, std::string_view name)
|
||||
|
|
|
|||
|
|
@ -16,12 +16,12 @@
|
|||
#include <errno.h>
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4996)
|
||||
#elif defined(__clang__)
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
#elif defined(_MSC_VER)
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4996)
|
||||
#else
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
|
|
|||
|
|
@ -13,29 +13,29 @@ std::string wchar_to_utf8(std::wstring_view src);
|
|||
std::string utf16_to_utf8(std::u16string_view src);
|
||||
std::u16string utf8_to_utf16(std::string_view src);
|
||||
|
||||
// Copy null-terminated string from a std::string or a char array to a char array with truncation
|
||||
template <typename D, typename T>
|
||||
// Copy null-terminated string from a std::basic_string or a char array to a char array with truncation
|
||||
template <typename D, typename T> requires requires (D& d, T& t) { std::declval<decltype(&t[0])&>() = &d[0]; }
|
||||
inline void strcpy_trunc(D&& dst, const T& src)
|
||||
{
|
||||
const usz count = std::size(src) >= std::size(dst) ? std::max<usz>(std::size(dst), 1) - 1 : std::size(src);
|
||||
std::memcpy(std::data(dst), std::data(src), count);
|
||||
std::memset(std::data(dst) + count, 0, std::size(dst) - count);
|
||||
std::copy_n(std::data(src), count, std::data(dst));
|
||||
std::fill_n(std::data(dst) + count, std::size(dst) - count, std::remove_cvref_t<decltype(dst[0])>{});
|
||||
}
|
||||
|
||||
// Convert string to signed integer
|
||||
bool try_to_int64(s64* out, std::string_view value, s64 min, s64 max);
|
||||
bool try_to_int64(s64* out, std::string_view value, s64 min, s64 max, std::string_view name = {});
|
||||
|
||||
// Convert string to unsigned integer
|
||||
bool try_to_uint64(u64* out, std::string_view value, u64 min, u64 max);
|
||||
bool try_to_uint64(u64* out, std::string_view value, u64 min, u64 max, std::string_view name = {});
|
||||
|
||||
// Convert string to unsigned int128_t
|
||||
bool try_to_uint128(u128* out, std::string_view value);
|
||||
bool try_to_uint128(u128* out, std::string_view value, std::string_view name = {});
|
||||
|
||||
// Convert string to float
|
||||
bool try_to_float(f64* out, std::string_view value, f64 min, f64 max);
|
||||
bool try_to_float(f64* out, std::string_view value, f64 min, f64 max, std::string_view name = {});
|
||||
|
||||
// Convert float to string locale independent
|
||||
bool try_to_string(std::string* out, const f64& value);
|
||||
bool try_to_string(std::string* out, f64 value, std::string_view name = {});
|
||||
|
||||
// Get the file extension of a file path ("png", "jpg", etc.)
|
||||
std::string get_file_extension(const std::string& file_path);
|
||||
|
|
|
|||
|
|
@ -8,19 +8,24 @@
|
|||
#include "Emu/RSX/RSXThread.h"
|
||||
#include "Thread.h"
|
||||
#include "Utilities/JIT.h"
|
||||
#include <thread>
|
||||
#include <cfenv>
|
||||
|
||||
#ifdef ARCH_ARM64
|
||||
#include "Emu/CPU/Backends/AArch64/AArch64Signal.h"
|
||||
#endif
|
||||
|
||||
#ifdef __cpp_lib_stacktrace
|
||||
#include "rpcs3_version.h"
|
||||
#include <stacktrace>
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <Windows.h>
|
||||
#include <Psapi.h>
|
||||
#include <process.h>
|
||||
#include <sysinfoapi.h>
|
||||
|
||||
#include "stack_trace.h"
|
||||
#include "util/dyn_lib.hpp"
|
||||
|
||||
DYNAMIC_IMPORT_RENAME("Kernel32.dll", SetThreadDescriptionImport, "SetThreadDescription", HRESULT(HANDLE hThread, PCWSTR lpThreadDescription));
|
||||
|
|
@ -103,7 +108,7 @@ thread_local u64 g_tls_fault_rsx = 0;
|
|||
thread_local u64 g_tls_fault_spu = 0;
|
||||
thread_local u64 g_tls_wait_time = 0;
|
||||
thread_local u64 g_tls_wait_fail = 0;
|
||||
thread_local bool g_tls_access_violation_recovered = false;
|
||||
thread_local u64 g_tls_access_violation_recovered = umax;
|
||||
extern thread_local std::string(*g_tls_log_prefix)();
|
||||
|
||||
namespace stx
|
||||
|
|
@ -1265,7 +1270,7 @@ namespace rsx
|
|||
extern std::function<bool(u32 addr, bool is_writing)> g_access_violation_handler;
|
||||
}
|
||||
|
||||
bool handle_access_violation(u32 addr, bool is_writing, ucontext_t* context) noexcept
|
||||
bool handle_access_violation(u32 addr, bool is_writing, bool is_exec, ucontext_t* context) noexcept
|
||||
{
|
||||
g_tls_fault_all++;
|
||||
|
||||
|
|
@ -1301,7 +1306,7 @@ bool handle_access_violation(u32 addr, bool is_writing, ucontext_t* context) noe
|
|||
}
|
||||
} spu_protection{cpu};
|
||||
|
||||
if (addr < RAW_SPU_BASE_ADDR && vm::check_addr(addr) && rsx::g_access_violation_handler)
|
||||
if (!is_exec && addr < RAW_SPU_BASE_ADDR && vm::check_addr(addr) && rsx::g_access_violation_handler)
|
||||
{
|
||||
bool state_changed = false;
|
||||
|
||||
|
|
@ -1367,7 +1372,7 @@ bool handle_access_violation(u32 addr, bool is_writing, ucontext_t* context) noe
|
|||
{
|
||||
auto thread = idm::get_unlocked<named_thread<spu_thread>>(spu_thread::find_raw_spu((addr - RAW_SPU_BASE_ADDR) / RAW_SPU_OFFSET));
|
||||
|
||||
if (!thread)
|
||||
if (!thread || is_exec)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
|
@ -1499,7 +1504,9 @@ bool handle_access_violation(u32 addr, bool is_writing, ucontext_t* context) noe
|
|||
static_cast<void>(context);
|
||||
#endif /* ARCH_ */
|
||||
|
||||
if (vm::check_addr(addr, is_writing ? vm::page_writable : vm::page_readable))
|
||||
const auto required_page_perms = (is_writing ? vm::page_writable : vm::page_readable) + (is_exec ? vm::page_executable : 0);
|
||||
|
||||
if (vm::check_addr(addr, required_page_perms))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1507,9 +1514,7 @@ bool handle_access_violation(u32 addr, bool is_writing, ucontext_t* context) noe
|
|||
// Hack: allocate memory in case the emulator is stopping
|
||||
const auto hack_alloc = [&]()
|
||||
{
|
||||
g_tls_access_violation_recovered = true;
|
||||
|
||||
if (vm::check_addr(addr, is_writing ? vm::page_writable : vm::page_readable))
|
||||
if (vm::check_addr(addr, required_page_perms))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1521,17 +1526,45 @@ bool handle_access_violation(u32 addr, bool is_writing, ucontext_t* context) noe
|
|||
return false;
|
||||
}
|
||||
|
||||
extern void ppu_register_range(u32 addr, u32 size);
|
||||
|
||||
bool reprotected = false;
|
||||
|
||||
if (vm::writer_lock mlock; area->flags & vm::preallocated || vm::check_addr(addr, 0))
|
||||
{
|
||||
// For allocated memory with protection lower than required (such as protection::no or read-only while writing to it)
|
||||
utils::memory_protect(vm::base(addr & -0x1000), 0x1000, utils::protection::rw);
|
||||
reprotected = true;
|
||||
}
|
||||
|
||||
if (reprotected)
|
||||
{
|
||||
if (is_exec && !vm::check_addr(addr, vm::page_executable))
|
||||
{
|
||||
ppu_register_range(addr & -0x10000, 0x10000);
|
||||
}
|
||||
|
||||
g_tls_access_violation_recovered = addr;
|
||||
return true;
|
||||
}
|
||||
|
||||
return area->falloc(addr & -0x10000, 0x10000) || vm::check_addr(addr, is_writing ? vm::page_writable : vm::page_readable);
|
||||
const bool allocated = area->falloc(addr & -0x10000, 0x10000);
|
||||
|
||||
if (allocated)
|
||||
{
|
||||
if (is_exec && !vm::check_addr(addr, vm::page_executable))
|
||||
{
|
||||
ppu_register_range(addr & -0x10000, 0x10000);
|
||||
}
|
||||
|
||||
g_tls_access_violation_recovered = addr;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
if (cpu && (cpu->get_class() == thread_class::ppu || cpu->get_class() == thread_class::spu))
|
||||
if (cpu && (cpu->get_class() == thread_class::ppu || cpu->get_class() == thread_class::spu) && !is_exec)
|
||||
{
|
||||
vm::temporary_unlock(*cpu);
|
||||
u32 pf_port_id = 0;
|
||||
|
|
@ -1674,7 +1707,7 @@ bool handle_access_violation(u32 addr, bool is_writing, ucontext_t* context) noe
|
|||
|
||||
if (cpu->get_class() == thread_class::spu)
|
||||
{
|
||||
if (!g_tls_access_violation_recovered)
|
||||
if (g_tls_access_violation_recovered != addr)
|
||||
{
|
||||
vm_log.notice("\n%s", dump_useful_thread_info());
|
||||
vm_log.always()("[%s] Access violation %s location 0x%x (%s)", cpu->get_name(), is_writing ? "writing" : "reading", addr, (is_writing && vm::check_addr(addr)) ? "read-only memory" : "unmapped memory");
|
||||
|
|
@ -1710,10 +1743,10 @@ bool handle_access_violation(u32 addr, bool is_writing, ucontext_t* context) noe
|
|||
|
||||
// Note: a thread may access violate more than once after hack_alloc recovery
|
||||
// Do not log any further access violations in this case.
|
||||
if (!g_tls_access_violation_recovered)
|
||||
if (g_tls_access_violation_recovered != addr)
|
||||
{
|
||||
vm_log.notice("\n%s", dump_useful_thread_info());
|
||||
vm_log.fatal("Access violation %s location 0x%x (%s)", is_writing ? "writing" : (cpu && cpu->get_class() == thread_class::ppu && cpu->get_pc() == addr ? "executing" : "reading"), addr, (is_writing && vm::check_addr(addr)) ? "read-only memory" : "unmapped memory");
|
||||
vm_log.fatal("Access violation %s location 0x%x (%s)", is_writing ? "writing" : (is_exec ? "executing" : "reading"), addr, (is_writing && vm::check_addr(addr)) ? "read-only memory" : "unmapped memory");
|
||||
}
|
||||
|
||||
while (Emu.IsPausedOrReady())
|
||||
|
|
@ -1762,8 +1795,13 @@ bool handle_access_violation(u32 addr, bool is_writing, ucontext_t* context) noe
|
|||
}
|
||||
}
|
||||
|
||||
if (Emu.IsStopped() && !hack_alloc())
|
||||
if (Emu.IsStopped())
|
||||
{
|
||||
while (!hack_alloc())
|
||||
{
|
||||
thread_ctrl::wait_for(1000);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -1802,6 +1840,7 @@ static LONG exception_handler(PEXCEPTION_POINTERS pExp) noexcept
|
|||
if (pExp->ExceptionRecord->ExceptionCode == EXCEPTION_ACCESS_VIOLATION && !is_executing)
|
||||
{
|
||||
u32 addr = 0;
|
||||
bool is_exec = false;
|
||||
|
||||
if (auto [addr0, ok] = vm::try_get_addr(ptr); ok)
|
||||
{
|
||||
|
|
@ -1809,14 +1848,21 @@ static LONG exception_handler(PEXCEPTION_POINTERS pExp) noexcept
|
|||
}
|
||||
else if (const usz exec64 = (ptr - vm::g_exec_addr) / 2; exec64 <= u32{umax})
|
||||
{
|
||||
is_exec = true;
|
||||
addr = static_cast<u32>(exec64);
|
||||
}
|
||||
else
|
||||
else if (const usz exec64 = (ptr - vm::g_exec_addr - vm::g_exec_addr_seg_offset); exec64 <= u32{umax})
|
||||
{
|
||||
is_exec = true;
|
||||
addr = static_cast<u32>(exec64);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::this_thread::sleep_for(1ms);
|
||||
return EXCEPTION_CONTINUE_SEARCH;
|
||||
}
|
||||
|
||||
if (thread_ctrl::get_current() && handle_access_violation(addr, is_writing, pExp->ContextRecord))
|
||||
if (thread_ctrl::get_current() && handle_access_violation(addr, is_writing, is_exec, pExp->ContextRecord))
|
||||
{
|
||||
return EXCEPTION_CONTINUE_EXECUTION;
|
||||
}
|
||||
|
|
@ -1936,9 +1982,39 @@ static LONG exception_filter(PEXCEPTION_POINTERS pExp) noexcept
|
|||
}
|
||||
|
||||
fmt::append(msg, "RPCS3 image base: %p.\n", GetModuleHandle(NULL));
|
||||
|
||||
#if defined(ARCH_X64)
|
||||
fmt::append(msg, "RAX: %016llX RBX: %016llX\n", pExp->ContextRecord->Rax, pExp->ContextRecord->Rbx);
|
||||
fmt::append(msg, "RCX: %016llX RDX: %016llX\n", pExp->ContextRecord->Rcx, pExp->ContextRecord->Rdx);
|
||||
fmt::append(msg, "RSI: %016llX RDI: %016llX\n", pExp->ContextRecord->Rsi, pExp->ContextRecord->Rdi);
|
||||
fmt::append(msg, "RBP: %016llX RSP: %016llX\n", pExp->ContextRecord->Rbp, pExp->ContextRecord->Rsp);
|
||||
fmt::append(msg, "R8: %016llX R9: %016llX\n", pExp->ContextRecord->R8, pExp->ContextRecord->R9);
|
||||
fmt::append(msg, "R10: %016llX R11: %016llX\n", pExp->ContextRecord->R10, pExp->ContextRecord->R11);
|
||||
fmt::append(msg, "R12: %016llX R13: %016llX\n", pExp->ContextRecord->R12, pExp->ContextRecord->R13);
|
||||
fmt::append(msg, "R14: %016llX R15: %016llX\n", pExp->ContextRecord->R14, pExp->ContextRecord->R15);
|
||||
fmt::append(msg, "RFLAGS: %08X\n", pExp->ContextRecord->EFlags);
|
||||
#elif defined(ARCH_ARM64)
|
||||
for (int i = 0; i < 29; i += 2)
|
||||
{
|
||||
if (i + 1 < 29)
|
||||
fmt::append(msg, "X%-2d: %016llX X%-2d: %016llX\n", i, pExp->ContextRecord->X[i], i + 1, pExp->ContextRecord->X[i + 1]);
|
||||
else
|
||||
fmt::append(msg, "X%-2d: %016llX\n", i, pExp->ContextRecord->X[i]);
|
||||
}
|
||||
fmt::append(msg, "SP: %016llX FP: %016llX LR: %016llX\n", pExp->ContextRecord->Sp, pExp->ContextRecord->Fp, pExp->ContextRecord->Lr);
|
||||
fmt::append(msg, "CPSR: %08X\n", pExp->ContextRecord->Cpsr);
|
||||
#endif
|
||||
|
||||
// TODO: print registers and the callstack
|
||||
const auto stack_trace = utils::get_backtrace(64, pExp->ContextRecord);
|
||||
const auto stack_symbols = utils::get_backtrace_symbols(stack_trace);
|
||||
|
||||
msg += "Stack Trace:\n";
|
||||
|
||||
for (const auto& symbol : stack_symbols)
|
||||
{
|
||||
fmt::append(msg, "%s\n", symbol);
|
||||
}
|
||||
|
||||
sys_log.fatal("\n%s", msg);
|
||||
logs::listener::sync_all();
|
||||
|
||||
|
|
@ -2023,12 +2099,13 @@ static void signal_handler(int /*sig*/, siginfo_t* info, void* uct) noexcept
|
|||
#endif
|
||||
|
||||
const u64 exec64 = (reinterpret_cast<u64>(info->si_addr) - reinterpret_cast<u64>(vm::g_exec_addr)) / 2;
|
||||
const u64 exec64_2 = (reinterpret_cast<u64>(info->si_addr) - reinterpret_cast<u64>(vm::g_exec_addr)) - vm::g_exec_addr_seg_offset;
|
||||
const auto cause = is_executing ? "executing" : is_writing ? "writing" : "reading";
|
||||
|
||||
if (auto [addr, ok] = vm::try_get_addr(info->si_addr); ok && !is_executing)
|
||||
{
|
||||
// Try to process access violation
|
||||
if (thread_ctrl::get_current() && handle_access_violation(addr, is_writing, context))
|
||||
if (thread_ctrl::get_current() && handle_access_violation(addr, is_writing, false, context))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -2036,7 +2113,14 @@ static void signal_handler(int /*sig*/, siginfo_t* info, void* uct) noexcept
|
|||
|
||||
if (exec64 < 0x100000000ull && !is_executing)
|
||||
{
|
||||
if (thread_ctrl::get_current() && handle_access_violation(static_cast<u32>(exec64), is_writing, context))
|
||||
if (thread_ctrl::get_current() && handle_access_violation(static_cast<u32>(exec64), is_writing, true, context))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (exec64_2 < 0x100000000ull && !is_executing)
|
||||
{
|
||||
if (thread_ctrl::get_current() && handle_access_violation(static_cast<u32>(exec64_2), is_writing, true, context))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -2355,7 +2439,7 @@ thread_base::native_entry thread_base::finalize(u64 _self) noexcept
|
|||
g_tls_fault_spu = 0;
|
||||
g_tls_wait_time = 0;
|
||||
g_tls_wait_fail = 0;
|
||||
g_tls_access_violation_recovered = false;
|
||||
g_tls_access_violation_recovered = umax;
|
||||
|
||||
g_tls_log_prefix = []() -> std::string { return {}; };
|
||||
|
||||
|
|
@ -2799,8 +2883,25 @@ void thread_base::exec()
|
|||
}
|
||||
}
|
||||
|
||||
void thread_ctrl::set_name(std::string name)
|
||||
{
|
||||
ensure(g_tls_this_thread);
|
||||
g_tls_this_thread->m_tname.store(make_single<std::string>(name));
|
||||
g_tls_this_thread->set_name(std::move(name));
|
||||
}
|
||||
|
||||
[[noreturn]] void thread_ctrl::emergency_exit(std::string_view reason)
|
||||
{
|
||||
// Print stacktrace
|
||||
#ifdef __cpp_lib_stacktrace
|
||||
if (rpcs3::is_local_build())
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << std::stacktrace::current();
|
||||
sys_log.notice("StackTrace\n\n%s\n", oss.str());
|
||||
}
|
||||
#endif
|
||||
|
||||
if (const std::string info = dump_useful_thread_info(); !info.empty())
|
||||
{
|
||||
sys_log.notice("\n%s", info);
|
||||
|
|
@ -2816,6 +2917,16 @@ void thread_base::exec()
|
|||
}
|
||||
}
|
||||
|
||||
if (auto [total, current] = utils::get_memory_usage(); total - current <= 256 * 1024 * 1024)
|
||||
{
|
||||
if (reason_buf.empty())
|
||||
{
|
||||
reason_buf = std::string{reason};
|
||||
}
|
||||
|
||||
fmt::append(reason_buf, " (Possible RAM deficiency: free RAM: %dMB)", (total - current) / (1024 * 1024));
|
||||
}
|
||||
|
||||
if (!reason_buf.empty())
|
||||
{
|
||||
reason = reason_buf;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
#include "util/atomic.hpp"
|
||||
#include "util/shared_ptr.hpp"
|
||||
|
||||
#include <thread>
|
||||
#include <string>
|
||||
|
||||
// Hardware core layout
|
||||
|
|
@ -128,7 +129,7 @@ public:
|
|||
const native_entry entry_point;
|
||||
|
||||
// Set name for debugger
|
||||
static void set_name(std::string);
|
||||
static void set_name(std::string name);
|
||||
|
||||
private:
|
||||
// Thread handle (platform-specific)
|
||||
|
|
@ -231,11 +232,7 @@ public:
|
|||
}
|
||||
|
||||
// Set current thread name (not recommended)
|
||||
static void set_name(std::string name)
|
||||
{
|
||||
g_tls_this_thread->m_tname.store(make_single<std::string>(name));
|
||||
g_tls_this_thread->set_name(std::move(name));
|
||||
}
|
||||
static void set_name(std::string name);
|
||||
|
||||
// Set thread name (not recommended)
|
||||
template <typename T>
|
||||
|
|
|
|||
|
|
@ -329,7 +329,7 @@ bool patch_engine::load(patch_map& patches_map, const std::string& path, std::st
|
|||
is_valid = false;
|
||||
continue;
|
||||
}
|
||||
else if (serial.size() != 9 || !std::all_of(serial.begin(), serial.end(), [](char c) { return std::isalnum(c); }))
|
||||
else if (serial.size() != 9 || !std::all_of(serial.begin(), serial.end(), [](char c) { return std::isalnum(static_cast<unsigned char>(c)); }))
|
||||
{
|
||||
append_log_message(log_messages, fmt::format("Error: Serial '%s' invalid (patch: %s, key: %s, location: %s, file: %s)", serial, description, main_key, get_yaml_node_location(serial_node), path), &patch_log.error);
|
||||
is_valid = false;
|
||||
|
|
|
|||
|
|
@ -821,6 +821,14 @@ struct color4_base
|
|||
a *= rhs;
|
||||
}
|
||||
|
||||
void operator += (const color4_base<T>& rhs)
|
||||
{
|
||||
r += rhs.r;
|
||||
g += rhs.g;
|
||||
b += rhs.b;
|
||||
a += rhs.a;
|
||||
}
|
||||
|
||||
constexpr color4_base<T> operator * (const color4_base<T>& rhs) const
|
||||
{
|
||||
return { r * rhs.r, g * rhs.g, b * rhs.b, a * rhs.a };
|
||||
|
|
|
|||
|
|
@ -30,42 +30,61 @@ namespace utils
|
|||
return out.data();
|
||||
}
|
||||
|
||||
std::vector<void*> get_backtrace(int max_depth)
|
||||
std::vector<void*> get_backtrace(int max_depth, PCONTEXT ctx)
|
||||
{
|
||||
static struct sym_initer_t
|
||||
{
|
||||
sym_initer_t() noexcept
|
||||
{
|
||||
SymInitialize(GetCurrentProcess(), NULL, TRUE);
|
||||
}
|
||||
~sym_initer_t() noexcept
|
||||
{
|
||||
SymCleanup(GetCurrentProcess());
|
||||
}
|
||||
} s_initer{};
|
||||
|
||||
std::vector<void*> result = {};
|
||||
|
||||
const auto hProcess = ::GetCurrentProcess();
|
||||
const auto hThread = ::GetCurrentThread();
|
||||
|
||||
CONTEXT context{};
|
||||
RtlCaptureContext(&context);
|
||||
if (ctx)
|
||||
context = *ctx;
|
||||
else
|
||||
RtlCaptureContext(&context);
|
||||
|
||||
STACKFRAME64 stack = {};
|
||||
stack.AddrPC.Mode = AddrModeFlat;
|
||||
stack.AddrStack.Mode = AddrModeFlat;
|
||||
stack.AddrFrame.Mode = AddrModeFlat;
|
||||
#if defined(ARCH_X64)
|
||||
const DWORD machineType = IMAGE_FILE_MACHINE_AMD64;
|
||||
stack.AddrPC.Offset = context.Rip;
|
||||
stack.AddrStack.Offset = context.Rsp;
|
||||
stack.AddrFrame.Offset = context.Rbp;
|
||||
#elif defined(ARCH_ARM64)
|
||||
const DWORD machineType = IMAGE_FILE_MACHINE_ARM64;
|
||||
stack.AddrPC.Offset = context.Pc;
|
||||
stack.AddrStack.Offset = context.Sp;
|
||||
stack.AddrFrame.Offset = context.Fp;
|
||||
#else
|
||||
#error "Unsupported architecture"
|
||||
#endif
|
||||
|
||||
while (max_depth--)
|
||||
{
|
||||
if (!StackWalk64(
|
||||
IMAGE_FILE_MACHINE_AMD64,
|
||||
hProcess,
|
||||
hThread,
|
||||
&stack,
|
||||
&context,
|
||||
NULL,
|
||||
SymFunctionTableAccess64,
|
||||
SymGetModuleBase64,
|
||||
NULL))
|
||||
machineType,
|
||||
hProcess,
|
||||
hThread,
|
||||
&stack,
|
||||
&context,
|
||||
NULL,
|
||||
SymFunctionTableAccess64,
|
||||
SymGetModuleBase64,
|
||||
NULL))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,11 @@
|
|||
#include <util/types.hpp>
|
||||
#include <util/logs.hpp>
|
||||
|
||||
#ifdef _WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
namespace utils
|
||||
{
|
||||
namespace stack_trace
|
||||
|
|
@ -30,7 +35,12 @@ namespace utils
|
|||
};
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
std::vector<void*> get_backtrace(int max_depth = 255, PCONTEXT ctx = nullptr);
|
||||
#else
|
||||
std::vector<void*> get_backtrace(int max_depth = 255);
|
||||
#endif
|
||||
|
||||
std::vector<std::string> get_backtrace_symbols(const std::vector<void*>& stack);
|
||||
|
||||
FORCE_INLINE void print_trace(stack_trace::Logger auto& logger, int max_depth = 255)
|
||||
|
|
|
|||
|
|
@ -37,10 +37,6 @@ QSlider#sizeSlider::handle:horizontal {
|
|||
QLabel#toolbar_icon_color {
|
||||
color: rgba(64,64,64,255);
|
||||
}
|
||||
/* thumbnail icon color stylesheet */
|
||||
QLabel#thumbnail_icon_color {
|
||||
color: rgba(0,100,231,255);
|
||||
}
|
||||
/* gamelist icon color stylesheet */
|
||||
QLabel#gamelist_icon_background_color {
|
||||
color: rgba(209,209,209,255);
|
||||
|
|
|
|||
|
|
@ -237,11 +237,6 @@ QLabel#gamelist_icon_background_color {
|
|||
color: transparent;
|
||||
}
|
||||
|
||||
/* Set Windows Taskbar Thumbnail colors */
|
||||
QLabel#thumbnail_icon_color {
|
||||
color: #262626;
|
||||
}
|
||||
|
||||
/* Set Log colors */
|
||||
QPlainTextEdit#log_frame {
|
||||
background-color: #000; /* Black */
|
||||
|
|
|
|||
|
|
@ -573,11 +573,6 @@ QLabel#gamelist_icon_background_color {
|
|||
color: transparent;
|
||||
}
|
||||
|
||||
/* Set Windows Taskbar Thumbnail colors */
|
||||
QLabel#thumbnail_icon_color {
|
||||
color: #23262d;
|
||||
}
|
||||
|
||||
/* Log colors */
|
||||
QPlainTextEdit#log_frame {
|
||||
background-color: #23262d;
|
||||
|
|
|
|||
|
|
@ -265,11 +265,6 @@ QLabel#gamelist_icon_background_color {
|
|||
color: transparent;
|
||||
}
|
||||
|
||||
/* Set Taskbar Thumbnail colors */
|
||||
QLabel#thumbnail_icon_color {
|
||||
color: #444444;
|
||||
}
|
||||
|
||||
/* Memory Viewer */
|
||||
QLabel#memory_viewer_address_panel {
|
||||
color: #00cbff; /* Font Color: Blue */
|
||||
|
|
|
|||
|
|
@ -244,11 +244,6 @@ QLabel#gamelist_icon_background_color {
|
|||
color: transparent;
|
||||
}
|
||||
|
||||
/* Set Windows Taskbar Thumbnail colors */
|
||||
QLabel#thumbnail_icon_color {
|
||||
color: #262626;
|
||||
}
|
||||
|
||||
/* Set Log colors */
|
||||
QPlainTextEdit#log_frame {
|
||||
background-color: #181d24; /* Black */
|
||||
|
|
|
|||
|
|
@ -397,12 +397,6 @@ QLabel#gamelist_icon_background_color {
|
|||
}
|
||||
|
||||
|
||||
/* Set Windows Taskbar Thumbnail colors */
|
||||
QLabel#thumbnail_icon_color {
|
||||
color: #ffd785;
|
||||
}
|
||||
|
||||
|
||||
QLabel#log_level_always {
|
||||
color: #00ffff; /* Cyan */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -656,11 +656,6 @@ QLabel#color_button {
|
|||
background: transparent;
|
||||
}
|
||||
|
||||
/* Set Windows Taskbar Thumbnail colors */
|
||||
QLabel#thumbnail_icon_color {
|
||||
color: #370048;
|
||||
}
|
||||
|
||||
/* Debugger colors */
|
||||
QLabel#debugger_frame_breakpoint {
|
||||
color: #000; /* Font Color: Black */
|
||||
|
|
|
|||
|
|
@ -664,11 +664,6 @@ QLabel#color_button {
|
|||
background: transparent;
|
||||
}
|
||||
|
||||
/* Set Windows Taskbar Thumbnail colors */
|
||||
QLabel#thumbnail_icon_color {
|
||||
color: #8500ae;
|
||||
}
|
||||
|
||||
/* Debugger colors */
|
||||
QLabel#debugger_frame_breakpoint {
|
||||
color: #000; /* Font Color: Black */
|
||||
|
|
|
|||
|
|
@ -379,11 +379,6 @@ QLabel#gamelist_icon_background_color {
|
|||
color: transparent;
|
||||
}
|
||||
|
||||
/* Set Windows Taskbar Thumbnail colors */
|
||||
QLabel#thumbnail_icon_color {
|
||||
color: #4d4940;
|
||||
}
|
||||
|
||||
QLabel#log_level_always {
|
||||
color: #00ffff; /* Cyan */
|
||||
}
|
||||
|
|
|
|||
BIN
bin/Icons/ui/home/256/bug-solid.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
bin/Icons/ui/home/256/circle-left-solid.png
Normal file
|
After Width: | Height: | Size: 8.4 KiB |
BIN
bin/Icons/ui/home/256/display-solid.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
bin/Icons/ui/home/256/floppy-disk-solid.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
bin/Icons/ui/home/256/gamepad-solid.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
bin/Icons/ui/home/256/gauge-solid.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
bin/Icons/ui/home/256/headphones-solid.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
bin/Icons/ui/home/256/home.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
bin/Icons/ui/home/256/maximize-solid.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
bin/Icons/ui/home/256/play-button-arrowhead.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
bin/Icons/ui/home/256/power-off-solid.png
Normal file
|
After Width: | Height: | Size: 8 KiB |
BIN
bin/Icons/ui/home/256/rotate-left-solid.png
Normal file
|
After Width: | Height: | Size: 8 KiB |
BIN
bin/Icons/ui/home/256/screenshot.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
bin/Icons/ui/home/256/settings.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
bin/Icons/ui/home/256/sliders-solid.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
bin/Icons/ui/home/256/trophy-solid.png
Normal file
|
After Width: | Height: | Size: 7 KiB |
BIN
bin/Icons/ui/home/256/user-group-solid.png
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
BIN
bin/Icons/ui/home/256/video-camera.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
bin/Icons/ui/home/32/bug-solid.png
Normal file
|
After Width: | Height: | Size: 618 B |
BIN
bin/Icons/ui/home/32/circle-left-solid.png
Normal file
|
After Width: | Height: | Size: 497 B |
BIN
bin/Icons/ui/home/32/display-solid.png
Normal file
|
After Width: | Height: | Size: 360 B |
BIN
bin/Icons/ui/home/32/floppy-disk-solid.png
Normal file
|
After Width: | Height: | Size: 561 B |
BIN
bin/Icons/ui/home/32/gamepad-solid.png
Normal file
|
After Width: | Height: | Size: 472 B |
BIN
bin/Icons/ui/home/32/gauge-solid.png
Normal file
|
After Width: | Height: | Size: 473 B |
BIN
bin/Icons/ui/home/32/headphones-solid.png
Normal file
|
After Width: | Height: | Size: 489 B |
BIN
bin/Icons/ui/home/32/home.png
Normal file
|
After Width: | Height: | Size: 384 B |
BIN
bin/Icons/ui/home/32/maximize-solid.png
Normal file
|
After Width: | Height: | Size: 721 B |
BIN
bin/Icons/ui/home/32/play-button-arrowhead.png
Normal file
|
After Width: | Height: | Size: 509 B |
BIN
bin/Icons/ui/home/32/power-off-solid.png
Normal file
|
After Width: | Height: | Size: 702 B |
BIN
bin/Icons/ui/home/32/rotate-left-solid.png
Normal file
|
After Width: | Height: | Size: 672 B |
BIN
bin/Icons/ui/home/32/screenshot.png
Normal file
|
After Width: | Height: | Size: 447 B |
BIN
bin/Icons/ui/home/32/settings.png
Normal file
|
After Width: | Height: | Size: 587 B |
BIN
bin/Icons/ui/home/32/sliders-solid.png
Normal file
|
After Width: | Height: | Size: 332 B |
BIN
bin/Icons/ui/home/32/trophy-solid.png
Normal file
|
After Width: | Height: | Size: 668 B |
BIN
bin/Icons/ui/home/32/user-group-solid.png
Normal file
|
After Width: | Height: | Size: 659 B |
BIN
bin/Icons/ui/home/32/video-camera.png
Normal file
|
After Width: | Height: | Size: 354 B |
BIN
bin/Icons/ui/loading.png
Normal file
|
After Width: | Height: | Size: 358 KiB |
|
|
@ -96,11 +96,6 @@ else()
|
|||
# This hides our LLVM from mesa's LLVM, otherwise we get some unresolvable conflicts.
|
||||
add_link_options(-Wl,--exclude-libs,ALL)
|
||||
elseif(WIN32)
|
||||
add_compile_definitions(__STDC_FORMAT_MACROS=1)
|
||||
|
||||
# Workaround for mingw64 (MSYS2)
|
||||
add_link_options(-Wl,--allow-multiple-definition)
|
||||
|
||||
# Increase stack limit to 8 MB
|
||||
add_link_options(-Wl,--stack -Wl,8388608)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
set(WOLFSSL_LIBRARY ON)
|
||||
set(WOLFSSL_INCLUDE_DIR ON)
|
||||
set(WOLFSSL_LIBRARIES wolfssl)
|
||||
set(WOLFSSL_LIBRARY wolfssl)
|
||||
set(WOLFSSL_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/3rdparty/wolfssl)
|
||||
set(WOLFSSL_FOUND TRUE)
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ if(USE_SYSTEM_ZLIB)
|
|||
find_package(ZLIB)
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
|
||||
else()
|
||||
add_library(ZLIB::ZLIB INTERFACE IMPORTED)
|
||||
add_library(ZLIB::ZLIB STATIC IMPORTED)
|
||||
set_target_properties(ZLIB::ZLIB PROPERTIES
|
||||
INTERFACE_LINK_LIBRARIES zlibstatic
|
||||
IMPORTED_LOCATION "${CMAKE_BINARY_DIR}/3rdparty/zlib/zlib/libzlibstatic.a"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_SOURCE_DIR}/3rdparty/zlib/zlib;${CMAKE_BINARY_DIR}/3rdparty/zlib/zlib")
|
||||
set(ZLIB_FOUND TRUE)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<LanguageStandard Condition = "'$(VisualStudioVersion.Substring(0,2))'<'17'">stdcpplatest</LanguageStandard>
|
||||
<LanguageStandard Condition = "'$(VisualStudioVersion.Substring(0,2))'>='17'">stdcpp20</LanguageStandard>
|
||||
<LanguageStandard Condition = "'$(VisualStudioVersion.Substring(0,2))'>='17'">stdcpp23</LanguageStandard>
|
||||
<PreprocessorDefinitions>_SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING=1;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>false</ExceptionHandling>
|
||||
<AdditionalOptions>-d2FH4- %(AdditionalOptions)</AdditionalOptions>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ include(${CMAKE_CURRENT_SOURCE_DIR}/git-version.cmake)
|
|||
include(ConfigureCompiler)
|
||||
include(CheckFunctionExists)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD 23)
|
||||
|
||||
if(UNIX AND NOT APPLE AND NOT ANDROID)
|
||||
add_compile_definitions(DATADIR="${CMAKE_INSTALL_FULL_DATADIR}/rpcs3")
|
||||
|
|
@ -87,12 +87,6 @@ if (NOT ANDROID)
|
|||
message(FATAL_ERROR "RPCS3 requires either X11 or Wayland (or both) for Vulkan.")
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
|
||||
find_package(Threads REQUIRED)
|
||||
target_link_libraries(rpcs3_lib PRIVATE Threads::Threads)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
target_link_libraries(rpcs3_lib PRIVATE ws2_32 Iphlpapi Winmm Psapi gdi32 setupapi)
|
||||
else()
|
||||
|
|
@ -193,8 +187,10 @@ if(BUILD_RPCS3_TESTS)
|
|||
tests/test_tuple.cpp
|
||||
tests/test_simple_array.cpp
|
||||
tests/test_address_range.cpp
|
||||
tests/test_sys_fs.cpp
|
||||
tests/test_rsx_cfg.cpp
|
||||
tests/test_rsx_fp_asm.cpp
|
||||
tests/test_dmux_pamf.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(rpcs3_test
|
||||
|
|
@ -202,6 +198,7 @@ if(BUILD_RPCS3_TESTS)
|
|||
rpcs3_lib
|
||||
rpcs3_emu
|
||||
GTest::gtest
|
||||
GTest::gmock
|
||||
)
|
||||
|
||||
target_include_directories(rpcs3_test
|
||||
|
|
|
|||
|
|
@ -126,6 +126,7 @@ target_sources(rpcs3_emu PRIVATE
|
|||
../Loader/PUP.cpp
|
||||
../Loader/TAR.cpp
|
||||
../Loader/ISO.cpp
|
||||
../Loader/iso_cache.cpp
|
||||
../Loader/TROPUSR.cpp
|
||||
../Loader/TRP.cpp
|
||||
)
|
||||
|
|
@ -160,7 +161,7 @@ if(WIN32)
|
|||
Audio/XAudio2/xaudio2_enumerator.cpp
|
||||
)
|
||||
target_compile_definitions(rpcs3_emu PRIVATE UNICODE _UNICODE _WIN32_WINNT=0x0A00)
|
||||
target_link_libraries(rpcs3_emu PRIVATE pdh bcrypt)
|
||||
target_link_libraries(rpcs3_emu PRIVATE pdh bcrypt dbghelp)
|
||||
endif()
|
||||
|
||||
# Cell
|
||||
|
|
@ -487,6 +488,7 @@ target_sources(rpcs3_emu PRIVATE
|
|||
RSX/NV47/HW/nv406e.cpp
|
||||
RSX/NV47/HW/nv4097.cpp
|
||||
RSX/Overlays/FriendsList/overlay_friends_list_dialog.cpp
|
||||
RSX/Overlays/HomeMenu/overlay_home_icons.cpp
|
||||
RSX/Overlays/HomeMenu/overlay_home_menu.cpp
|
||||
RSX/Overlays/HomeMenu/overlay_home_menu_components.cpp
|
||||
RSX/Overlays/HomeMenu/overlay_home_menu_main_menu.cpp
|
||||
|
|
@ -500,6 +502,8 @@ target_sources(rpcs3_emu PRIVATE
|
|||
RSX/Overlays/overlays.cpp
|
||||
RSX/Overlays/overlay_animated_icon.cpp
|
||||
RSX/Overlays/overlay_animation.cpp
|
||||
RSX/Overlays/overlay_audio.cpp
|
||||
RSX/Overlays/overlay_checkbox.cpp
|
||||
RSX/Overlays/overlay_compile_notification.cpp
|
||||
RSX/Overlays/overlay_controls.cpp
|
||||
RSX/Overlays/overlay_cursor.cpp
|
||||
|
|
@ -516,6 +520,9 @@ target_sources(rpcs3_emu PRIVATE
|
|||
RSX/Overlays/overlay_perf_metrics.cpp
|
||||
RSX/Overlays/overlay_progress_bar.cpp
|
||||
RSX/Overlays/overlay_save_dialog.cpp
|
||||
RSX/Overlays/overlay_select.cpp
|
||||
RSX/Overlays/overlay_slider.cpp
|
||||
RSX/Overlays/overlay_tabs.cpp
|
||||
RSX/Overlays/overlay_trophy_notification.cpp
|
||||
RSX/Overlays/overlay_user_list_dialog.cpp
|
||||
RSX/Overlays/overlay_utils.cpp
|
||||
|
|
@ -639,6 +646,9 @@ if(TARGET 3rdparty_vulkan)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT WIN32)
|
||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
endif()
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
target_link_libraries(rpcs3_emu
|
||||
|
|
|
|||
|
|
@ -20,19 +20,19 @@ namespace aarch64
|
|||
sp
|
||||
};
|
||||
|
||||
static const char* gpr_names[] =
|
||||
[[maybe_unused]] static const char* gpr_names[] =
|
||||
{
|
||||
"x0", "x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9",
|
||||
"x10", "x11", "x12", "x13", "x14", "x15", "x16", "x17", "x18", "x19",
|
||||
"x20", "x21", "x22", "x23", "x24", "x25", "x26", "x27", "x28", "x29", "x30"
|
||||
};
|
||||
|
||||
static const char* spr_names[] =
|
||||
[[maybe_unused]] static const char* spr_names[] =
|
||||
{
|
||||
"xzr", "pc", "sp"
|
||||
};
|
||||
|
||||
static const char* spr_asm_names[] =
|
||||
[[maybe_unused]] static const char* spr_asm_names[] =
|
||||
{
|
||||
"xzr", ".", "sp"
|
||||
};
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ void fmt_class_string<cpu_flag>::format(std::string& out, u64 arg)
|
|||
case cpu_flag::notify: return "ntf";
|
||||
case cpu_flag::yield: return "y";
|
||||
case cpu_flag::preempt: return "PREEMPT";
|
||||
case cpu_flag::req_exit: return "REQ-EXIT";
|
||||
case cpu_flag::dbg_global_pause: return "G-PAUSE";
|
||||
case cpu_flag::dbg_pause: return "PAUSE";
|
||||
case cpu_flag::dbg_step: return "STEP";
|
||||
|
|
@ -206,11 +207,7 @@ struct cpu_prof
|
|||
// Print only 7 hash characters out of 11 (which covers roughly 48 bits)
|
||||
if (type_id == 2)
|
||||
{
|
||||
fmt::append(results, "\n\t[%s", fmt::base57(be_t<u64>{name}));
|
||||
results.resize(results.size() - 4);
|
||||
|
||||
// Print chunk address from lowest 16 bits
|
||||
fmt::append(results, "...chunk-0x%05x]: %.4f%% (%u)", (name & 0xffff) * 4, _frac * 100., count);
|
||||
fmt::append(results, "\n\t[%s]: %.4f%% (%u)", spu_block_hash{name}, _frac * 100., count);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -733,8 +730,14 @@ void cpu_thread::operator()()
|
|||
{
|
||||
if (_this)
|
||||
{
|
||||
sys_log.warning("CPU Thread '%s' terminated abnormally!", name);
|
||||
cleanup();
|
||||
|
||||
auto log_thread = named_thread("CPU Thread Cleanup Logger", [name = name]()
|
||||
{
|
||||
sys_log.warning("CPU Thread '%s' terminated abnormally!", name);
|
||||
});
|
||||
|
||||
log_thread();
|
||||
}
|
||||
}
|
||||
} cleanup;
|
||||
|
|
@ -892,6 +895,14 @@ bool cpu_thread::check_state() noexcept
|
|||
store = true;
|
||||
}
|
||||
|
||||
if (flags & cpu_flag::req_exit)
|
||||
{
|
||||
// A request for the thread to quit has been made
|
||||
flags -= cpu_flag::req_exit;
|
||||
flags += cpu_flag::exit;
|
||||
store = true;
|
||||
}
|
||||
|
||||
// Can't process dbg_step if we only paused temporarily
|
||||
if (cpu_can_stop && flags & cpu_flag::dbg_step)
|
||||
{
|
||||
|
|
@ -1161,13 +1172,13 @@ void cpu_thread::notify()
|
|||
|
||||
cpu_thread& cpu_thread::operator=(thread_state)
|
||||
{
|
||||
if (state & cpu_flag::exit)
|
||||
if (state & (cpu_flag::exit + cpu_flag::req_exit))
|
||||
{
|
||||
// Must be notified elsewhere or self-raised
|
||||
return *this;
|
||||
}
|
||||
|
||||
const auto old = state.fetch_add(cpu_flag::exit);
|
||||
const auto old = state.fetch_add(cpu_flag::req_exit);
|
||||
|
||||
if (old & cpu_flag::wait && old.none_of(cpu_flag::again + cpu_flag::exit))
|
||||
{
|
||||
|
|
@ -1326,8 +1337,9 @@ extern std::shared_ptr<CPUDisAsm> make_disasm(const cpu_thread* cpu, shared_ptr<
|
|||
void cpu_thread::dump_all(std::string& ret) const
|
||||
{
|
||||
std::any func_data;
|
||||
std::any misc_data;
|
||||
|
||||
ret += dump_misc();
|
||||
dump_misc(ret, misc_data);
|
||||
ret += '\n';
|
||||
dump_regs(ret, func_data);
|
||||
ret += '\n';
|
||||
|
|
@ -1375,9 +1387,9 @@ std::vector<std::pair<u32, u32>> cpu_thread::dump_callstack_list() const
|
|||
return {};
|
||||
}
|
||||
|
||||
std::string cpu_thread::dump_misc() const
|
||||
void cpu_thread::dump_misc(std::string& ret, std::any& /*custom_data*/) const
|
||||
{
|
||||
return fmt::format("Type: %s; State: %s\n", get_class() == thread_class::ppu ? "PPU" : get_class() == thread_class::spu ? "SPU" : "RSX", state.load());
|
||||
fmt::append(ret, "%s[0x%x]; State: %s\n", get_class() == thread_class::ppu ? "PPU" : get_class() == thread_class::spu ? "SPU" : "RSX", id, state.load());
|
||||
}
|
||||
|
||||
bool cpu_thread::suspend_work::push(cpu_thread* _this) noexcept
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ enum class cpu_flag : u32
|
|||
yield, // Thread is being requested to yield its execution time if it's running
|
||||
preempt, // Thread is being requested to preempt the execution of all CPU threads
|
||||
|
||||
req_exit, // Request the thread to exit
|
||||
dbg_global_pause, // Emulation paused
|
||||
dbg_pause, // Thread paused
|
||||
dbg_step, // Thread forced to pause after one step (one instruction, etc)
|
||||
|
|
@ -39,7 +40,7 @@ enum class cpu_flag : u32
|
|||
// Test stopped state
|
||||
constexpr bool is_stopped(bs_t<cpu_flag> state)
|
||||
{
|
||||
return !!(state & (cpu_flag::stop + cpu_flag::exit + cpu_flag::again));
|
||||
return !!(state & (cpu_flag::stop + cpu_flag::exit + cpu_flag::again + cpu_flag::req_exit));
|
||||
}
|
||||
|
||||
// Test paused state
|
||||
|
|
@ -176,7 +177,7 @@ public:
|
|||
virtual std::vector<std::pair<u32, u32>> dump_callstack_list() const;
|
||||
|
||||
// Get CPU dump of misc information
|
||||
virtual std::string dump_misc() const;
|
||||
virtual void dump_misc(std::string& ret, std::any& /*custom_data*/) const;
|
||||
|
||||
// Thread entry point function
|
||||
virtual void cpu_task() = 0;
|
||||
|
|
|
|||