mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 05:51:27 +12:00
Merge branch 'master' into test
This commit is contained in:
commit
307d93ef86
29 changed files with 322 additions and 114 deletions
|
@ -49,8 +49,8 @@ brew_arm64_install_packages 0mq aom aribb24 ca-certificates cjson dav1d ffmpeg@5
|
||||||
"$BREW_ARM64_PATH/bin/brew" link -f ffmpeg@5
|
"$BREW_ARM64_PATH/bin/brew" link -f ffmpeg@5
|
||||||
ln -s "/opt/homebrew1/opt/llvm@$LLVM_COMPILER_VER/lib/unwind/libunwind.1.dylib" "/opt/homebrew1/opt/llvm@$LLVM_COMPILER_VER/lib/libunwind.1.dylib"
|
ln -s "/opt/homebrew1/opt/llvm@$LLVM_COMPILER_VER/lib/unwind/libunwind.1.dylib" "/opt/homebrew1/opt/llvm@$LLVM_COMPILER_VER/lib/libunwind.1.dylib"
|
||||||
|
|
||||||
# moltenvk based on commit for 1.2.11 release
|
# moltenvk based on commit for 1.3.0 release
|
||||||
wget https://raw.githubusercontent.com/Homebrew/homebrew-core/6bfc8950c696d1f952425e8af2a6248603dc0df9/Formula/m/molten-vk.rb
|
wget https://raw.githubusercontent.com/Homebrew/homebrew-core/7255441cbcafabaa8950f67c7ec55ff499dbb2d3/Formula/m/molten-vk.rb
|
||||||
/usr/local/bin/brew install -f --overwrite ./molten-vk.rb
|
/usr/local/bin/brew install -f --overwrite ./molten-vk.rb
|
||||||
export CXX=clang++
|
export CXX=clang++
|
||||||
export CC=clang
|
export CC=clang
|
||||||
|
|
|
@ -16,8 +16,8 @@ arch -x86_64 /usr/local/bin/brew reinstall -f --build-from-source gnutls freetyp
|
||||||
arch -x86_64 /usr/local/bin/brew install llvm@$LLVM_COMPILER_VER glew cmake sdl3 vulkan-headers coreutils
|
arch -x86_64 /usr/local/bin/brew install llvm@$LLVM_COMPILER_VER glew cmake sdl3 vulkan-headers coreutils
|
||||||
arch -x86_64 /usr/local/bin/brew link -f llvm@$LLVM_COMPILER_VER ffmpeg@5
|
arch -x86_64 /usr/local/bin/brew link -f llvm@$LLVM_COMPILER_VER ffmpeg@5
|
||||||
|
|
||||||
# moltenvk based on commit for 1.2.11 release
|
# moltenvk based on commit for 1.3.0 release
|
||||||
wget https://raw.githubusercontent.com/Homebrew/homebrew-core/6bfc8950c696d1f952425e8af2a6248603dc0df9/Formula/m/molten-vk.rb
|
wget https://raw.githubusercontent.com/Homebrew/homebrew-core/7255441cbcafabaa8950f67c7ec55ff499dbb2d3/Formula/m/molten-vk.rb
|
||||||
arch -x86_64 /usr/local/bin/brew install -f --overwrite ./molten-vk.rb
|
arch -x86_64 /usr/local/bin/brew install -f --overwrite ./molten-vk.rb
|
||||||
export CXX=clang++
|
export CXX=clang++
|
||||||
export CC=clang
|
export CC=clang
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#!/bin/sh -ex
|
#!/bin/sh -ex
|
||||||
|
|
||||||
curl -fLo "./llvm.lock" "https://github.com/RPCS3/llvm-mirror/releases/download/custom-build-win-${LLVM_VER}/llvmlibs_mt.7z.sha256"
|
curl -fLo "./llvm.lock" "https://github.com/RPCS3/llvm-mirror/releases/download/custom-build-win-${LLVM_VER}/llvmlibs_mt.7z.sha256"
|
||||||
curl -fLo "./glslang.lock" "https://github.com/RPCS3/glslang/releases/download/custom-build-win/glslanglibs_mt.7z.sha256"
|
|
||||||
|
|
|
@ -20,7 +20,6 @@ QT_TOOL_URL="${QT_HOST}${QT_PREFIX}${QT_PREFIX_2}qttools${QT_SUFFIX}"
|
||||||
QT_MM_URL="${QT_HOST}${QT_PREFIX}addons.qtmultimedia.${QT_PREFIX_2}qtmultimedia${QT_SUFFIX}"
|
QT_MM_URL="${QT_HOST}${QT_PREFIX}addons.qtmultimedia.${QT_PREFIX_2}qtmultimedia${QT_SUFFIX}"
|
||||||
QT_SVG_URL="${QT_HOST}${QT_PREFIX}${QT_PREFIX_2}qtsvg${QT_SUFFIX}"
|
QT_SVG_URL="${QT_HOST}${QT_PREFIX}${QT_PREFIX_2}qtsvg${QT_SUFFIX}"
|
||||||
LLVMLIBS_URL="https://github.com/RPCS3/llvm-mirror/releases/download/custom-build-win-${LLVM_VER}/llvmlibs_mt.7z"
|
LLVMLIBS_URL="https://github.com/RPCS3/llvm-mirror/releases/download/custom-build-win-${LLVM_VER}/llvmlibs_mt.7z"
|
||||||
GLSLANG_URL='https://github.com/RPCS3/glslang/releases/latest/download/glslanglibs_mt.7z'
|
|
||||||
VULKAN_SDK_URL="https://www.dropbox.com/scl/fi/sjjh0fc4ld281pjbl2xzu/VulkanSDK-${VULKAN_VER}-Installer.exe?rlkey=f6wzc0lvms5vwkt2z3qabfv9d&dl=1"
|
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.11.2/ccache-4.11.2-windows-x86_64.zip"
|
||||||
|
|
||||||
|
@ -31,7 +30,6 @@ DEP_URLS=" \
|
||||||
$QT_MM_URL \
|
$QT_MM_URL \
|
||||||
$QT_SVG_URL \
|
$QT_SVG_URL \
|
||||||
$LLVMLIBS_URL \
|
$LLVMLIBS_URL \
|
||||||
$GLSLANG_URL \
|
|
||||||
$VULKAN_SDK_URL\
|
$VULKAN_SDK_URL\
|
||||||
$CCACHE_URL"
|
$CCACHE_URL"
|
||||||
|
|
||||||
|
@ -80,7 +78,6 @@ for url in $DEP_URLS; do
|
||||||
case "$url" in
|
case "$url" in
|
||||||
*qt*) checksum=$(curl -fL "${url}.sha1"); algo="sha1"; outDir="$QTDIR/" ;;
|
*qt*) checksum=$(curl -fL "${url}.sha1"); algo="sha1"; outDir="$QTDIR/" ;;
|
||||||
*llvm*) checksum=$(curl -fL "${url}.sha256"); algo="sha256"; outDir="./build/lib_ext/Release-x64" ;;
|
*llvm*) checksum=$(curl -fL "${url}.sha256"); algo="sha256"; outDir="./build/lib_ext/Release-x64" ;;
|
||||||
*glslang*) checksum=$(curl -fL "${url}.sha256"); algo="sha256"; outDir="./build/lib_ext/Release-x64" ;;
|
|
||||||
*ccache*) checksum=$CCACHE_SHA; algo="sha256"; outDir="$CCACHE_BIN_DIR" ;;
|
*ccache*) checksum=$CCACHE_SHA; algo="sha256"; outDir="$CCACHE_BIN_DIR" ;;
|
||||||
*Vulkan*)
|
*Vulkan*)
|
||||||
# Vulkan setup needs to be run in batch environment
|
# Vulkan setup needs to be run in batch environment
|
||||||
|
|
2
.github/workflows/rpcs3.yml
vendored
2
.github/workflows/rpcs3.yml
vendored
|
@ -159,7 +159,7 @@ jobs:
|
||||||
uses: actions/cache@main
|
uses: actions/cache@main
|
||||||
with:
|
with:
|
||||||
path: ${{ env.DEPS_CACHE_DIR }}
|
path: ${{ env.DEPS_CACHE_DIR }}
|
||||||
key: "${{ runner.os }}-${{ env.COMPILER }}-${{ env.QT_VER }}-${{ env.VULKAN_SDK_SHA }}-${{ env.CCACHE_SHA }}-${{ hashFiles('llvm.lock') }}-${{ hashFiles('glslang.lock') }}"
|
key: "${{ runner.os }}-${{ env.COMPILER }}-${{ env.QT_VER }}-${{ env.VULKAN_SDK_SHA }}-${{ env.CCACHE_SHA }}-${{ hashFiles('llvm.lock') }}"
|
||||||
restore-keys: ${{ runner.os }}-${{ env.COMPILER }}-
|
restore-keys: ${{ runner.os }}-${{ env.COMPILER }}-
|
||||||
|
|
||||||
- name: Download and unpack dependencies
|
- name: Download and unpack dependencies
|
||||||
|
|
2
3rdparty/MoltenVK/CMakeLists.txt
vendored
2
3rdparty/MoltenVK/CMakeLists.txt
vendored
|
@ -3,7 +3,7 @@ include(ExternalProject)
|
||||||
|
|
||||||
ExternalProject_Add(moltenvk
|
ExternalProject_Add(moltenvk
|
||||||
GIT_REPOSITORY https://github.com/KhronosGroup/MoltenVK.git
|
GIT_REPOSITORY https://github.com/KhronosGroup/MoltenVK.git
|
||||||
GIT_TAG 81541f6
|
GIT_TAG 49b97f2
|
||||||
BUILD_IN_SOURCE 1
|
BUILD_IN_SOURCE 1
|
||||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/MoltenVK
|
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/MoltenVK
|
||||||
CONFIGURE_COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/MoltenVK/fetchDependencies" --macos
|
CONFIGURE_COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/MoltenVK/fetchDependencies" --macos
|
||||||
|
|
2
3rdparty/glslang/glslang
vendored
2
3rdparty/glslang/glslang
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit 36d08c0d940cf307a23928299ef52c7970d8cee6
|
Subproject commit fc9889c889561c5882e83819dcaffef5ed45529b
|
6
3rdparty/glslang/glslang.vcxproj
vendored
6
3rdparty/glslang/glslang.vcxproj
vendored
|
@ -39,17 +39,15 @@
|
||||||
<PropertyGroup Label="UserMacros">
|
<PropertyGroup Label="UserMacros">
|
||||||
<CmakeGenerator>"Visual Studio $(VisualStudioVersion.Substring(0,2))"</CmakeGenerator>
|
<CmakeGenerator>"Visual Studio $(VisualStudioVersion.Substring(0,2))"</CmakeGenerator>
|
||||||
<CmakeReleaseCLI>call vsdevcmd.bat -arch=amd64
|
<CmakeReleaseCLI>call vsdevcmd.bat -arch=amd64
|
||||||
cmake -G $(CmakeGenerator) -A x64 -DCMAKE_BUILD_TYPE="Release" -DLLVM_USE_CRT_DEBUG=MDd -DLLVM_USE_CRT_RELEASE=MT -DENABLE_OPT=OFF -S glslang -B "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)"
|
cmake -G $(CmakeGenerator) -A x64 -DCMAKE_BUILD_TYPE="Release" -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DGLSLANG_TESTS=OFF -DENABLE_GLSLANG_BINARIES=OFF -DBUILD_EXTERNAL=OFF -DENABLE_SPVREMAPPER=OFF -DENABLE_HLSL=OFF -DENABLE_OPT=OFF -S glslang -B "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)"
|
||||||
</CmakeReleaseCLI>
|
</CmakeReleaseCLI>
|
||||||
<CmakeDebugCLI>call vsdevcmd.bat -arch=amd64
|
<CmakeDebugCLI>call vsdevcmd.bat -arch=amd64
|
||||||
cmake -G $(CmakeGenerator) -A x64 -DCMAKE_BUILD_TYPE="Debug" -DLLVM_USE_CRT_DEBUG=MDd -DLLVM_USE_CRT_RELEASE=MT -DENABLE_OPT=OFF -S glslang -B "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)"
|
cmake -G $(CmakeGenerator) -A x64 -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebug -DGLSLANG_TESTS=OFF -DENABLE_GLSLANG_BINARIES=OFF -DBUILD_EXTERNAL=OFF -DENABLE_SPVREMAPPER=OFF -DENABLE_HLSL=OFF -DENABLE_OPT=OFF -S glslang -B "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)"
|
||||||
</CmakeDebugCLI>
|
</CmakeDebugCLI>
|
||||||
<CmakeCopyCLI>
|
<CmakeCopyCLI>
|
||||||
echo Copying..
|
echo Copying..
|
||||||
mkdir "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\$(ProjectName)"
|
mkdir "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\$(ProjectName)"
|
||||||
copy "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\hlsl\$(CONFIGURATION)\*.lib" "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\$(ProjectName)"
|
|
||||||
copy "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\SPIRV\$(CONFIGURATION)\*.lib" "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\$(ProjectName)"
|
copy "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\SPIRV\$(CONFIGURATION)\*.lib" "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\$(ProjectName)"
|
||||||
copy "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\OGLCompilersDLL\$(CONFIGURATION)\*.lib" "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\$(ProjectName)"
|
|
||||||
copy "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\glslang\OSDependent\Windows\$(CONFIGURATION)\*.lib" "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\$(ProjectName)"
|
copy "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\glslang\OSDependent\Windows\$(CONFIGURATION)\*.lib" "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\$(ProjectName)"
|
||||||
copy "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\glslang\$(CONFIGURATION)\*.lib" "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\$(ProjectName)"
|
copy "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\glslang\$(CONFIGURATION)\*.lib" "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\$(ProjectName)"
|
||||||
</CmakeCopyCLI>
|
</CmakeCopyCLI>
|
||||||
|
|
2
3rdparty/libsdl-org/SDL
vendored
2
3rdparty/libsdl-org/SDL
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit 877399b2b2cf21e67554ed9046410f268ce1d1b2
|
Subproject commit 5ac37a8ffcf89da390404c1016833d56e2d67ae4
|
2
3rdparty/libsdl-org/SDL.vcxproj
vendored
2
3rdparty/libsdl-org/SDL.vcxproj
vendored
|
@ -532,8 +532,6 @@
|
||||||
<AdditionalIncludeDirectories>SDL\include;SDL\include\build_config;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>SDL\include;SDL\include\build_config;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<DebugInformationFormat Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">ProgramDatabase</DebugInformationFormat>
|
||||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
|
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
|
||||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">SDL_HIDAPI_DISABLED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">SDL_HIDAPI_DISABLED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
|
|
@ -129,19 +129,17 @@ Start **Visual Studio**, click on `Open a project or solution` and select the `r
|
||||||
|
|
||||||
**NOTE:** The recommended build configuration is `Release`. (On older revisions: `Release - LLVM`)
|
**NOTE:** The recommended build configuration is `Release`. (On older revisions: `Release - LLVM`)
|
||||||
|
|
||||||
To speed up the compilation time, you may want to download and extract to `<rpcs3_root>\build\lib_ext\<$(Configuration)>-x64` (e.g. `c:\rpcs3\build\lib_ext\Release-x64`; the path needs to be created) some of the following precompiled libs:
|
To speed up the compilation time, you may want to download and extract to `<rpcs3_root>\build\lib_ext\<$(Configuration)>-x64` (e.g. `c:\rpcs3\build\lib_ext\Release-x64`; the path needs to be created) the following precompiled lib:
|
||||||
- [LLVM libs](https://github.com/RPCS3/llvm-mirror/releases/download/custom-build-win-19.1.7/llvmlibs_mt.7z)
|
- [LLVM libs](https://github.com/RPCS3/llvm-mirror/releases/download/custom-build-win-19.1.7/llvmlibs_mt.7z)
|
||||||
- [additional libs](https://github.com/RPCS3/glslang/releases/latest/download/glslanglibs_mt.7z)
|
|
||||||
|
|
||||||
**NOTES:**
|
**NOTES:**
|
||||||
- `<$(Configuration)>` can assume values `Release` or `Debug`.
|
- `<$(Configuration)>` can assume values `Release` or `Debug`.
|
||||||
- Unoptimised/debug libs are currently not available precompiled for both **LLVM** and **glslang**. Trying to use them when building the **RPCS3** application in `Debug` mode will provide a `cannot open file` error.
|
- Unoptimised/debug libs are currently not available precompiled for **LLVM**. Trying to use it when building the **RPCS3** application in `Debug` mode will provide a `cannot open file` error.
|
||||||
|
|
||||||
If you're not using the precompiled libs, those dependency libs need to be compiled first. From the `Solution Explorer` panel:
|
If you're not using the precompiled libs, those dependency libs need to be compiled first. From the `Solution Explorer` panel:
|
||||||
1) expand `__BUILD_BEFORE`
|
1) expand `__BUILD_BEFORE`
|
||||||
2) from the `Solution Configurations` drop-down menu, select `Release` (select `Debug` if you want to build in `Debug` mode)
|
2) from the `Solution Configurations` drop-down menu, select `Release` (select `Debug` if you want to build in `Debug` mode)
|
||||||
3) one after another, right-click on the following projects and then click on `Build` to build the selected lib:
|
3) right-click one of the following projects and then click on `Build` to build the selected lib:
|
||||||
- `glslang`
|
|
||||||
- `llvm_build`
|
- `llvm_build`
|
||||||
- or `llvm_build_clang_cl` (if you have also the **clang** compiler installed on VS)
|
- or `llvm_build_clang_cl` (if you have also the **clang** compiler installed on VS)
|
||||||
|
|
||||||
|
|
|
@ -384,7 +384,7 @@ public:
|
||||||
template <typename T>
|
template <typename T>
|
||||||
class lf_queue final
|
class lf_queue final
|
||||||
{
|
{
|
||||||
public:
|
private:
|
||||||
struct fat_ptr
|
struct fat_ptr
|
||||||
{
|
{
|
||||||
u64 ptr{};
|
u64 ptr{};
|
||||||
|
@ -392,7 +392,6 @@ public:
|
||||||
u32 reserved{};
|
u32 reserved{};
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
|
||||||
atomic_t<fat_ptr> m_head{fat_ptr{}};
|
atomic_t<fat_ptr> m_head{fat_ptr{}};
|
||||||
|
|
||||||
lf_queue_item<T>* load(fat_ptr value) const noexcept
|
lf_queue_item<T>* load(fat_ptr value) const noexcept
|
||||||
|
@ -439,8 +438,7 @@ public:
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
delete load(m_head);
|
delete load(m_head.exchange(other.m_head.exchange(fat_ptr{})));
|
||||||
m_head.release(other.m_head.exchange(fat_ptr{}));
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -453,10 +451,15 @@ public:
|
||||||
{
|
{
|
||||||
if (!operator bool())
|
if (!operator bool())
|
||||||
{
|
{
|
||||||
utils::bless<atomic_t<u32>>(&m_head.raw().is_non_null)->wait(0);
|
get_wait_atomic().wait(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
atomic_t<u32> &get_wait_atomic()
|
||||||
|
{
|
||||||
|
return *utils::bless<atomic_t<u32>>(&m_head.raw().is_non_null);
|
||||||
|
}
|
||||||
|
|
||||||
const volatile void* observe() const noexcept
|
const volatile void* observe() const noexcept
|
||||||
{
|
{
|
||||||
return load(m_head);
|
return load(m_head);
|
||||||
|
@ -491,7 +494,7 @@ public:
|
||||||
{
|
{
|
||||||
if (force || operator bool())
|
if (force || operator bool())
|
||||||
{
|
{
|
||||||
utils::bless<atomic_t<u32>>(&m_head.raw().is_non_null)->notify_one();
|
get_wait_atomic().notify_one();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,7 @@ jobs:
|
||||||
|
|
||||||
# - task: Cache@2
|
# - task: Cache@2
|
||||||
# inputs:
|
# inputs:
|
||||||
# key: $(Agent.OS) | $(COMPILER) | "$(QT_VER)" | $(VULKAN_SDK_SHA) | $(CCACHE_SHA) | llvm.lock | glslang.lock
|
# key: $(Agent.OS) | $(COMPILER) | "$(QT_VER)" | $(VULKAN_SDK_SHA) | $(CCACHE_SHA) | llvm.lock
|
||||||
# path: $(DEPS_CACHE_DIR)
|
# path: $(DEPS_CACHE_DIR)
|
||||||
# displayName: Dependencies Cache
|
# displayName: Dependencies Cache
|
||||||
|
|
||||||
|
|
|
@ -151,7 +151,9 @@ Global
|
||||||
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Release|x64.ActiveCfg = Release|x64
|
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Release|x64.ActiveCfg = Release|x64
|
||||||
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Release|x64.Build.0 = Release|x64
|
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Release|x64.Build.0 = Release|x64
|
||||||
{8F85B6CC-250F-4ACA-A617-E820A74E3E3C}.Debug|x64.ActiveCfg = Debug|x64
|
{8F85B6CC-250F-4ACA-A617-E820A74E3E3C}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{8F85B6CC-250F-4ACA-A617-E820A74E3E3C}.Debug|x64.Build.0 = Debug|x64
|
||||||
{8F85B6CC-250F-4ACA-A617-E820A74E3E3C}.Release|x64.ActiveCfg = Release|x64
|
{8F85B6CC-250F-4ACA-A617-E820A74E3E3C}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{8F85B6CC-250F-4ACA-A617-E820A74E3E3C}.Release|x64.Build.0 = Release|x64
|
||||||
{3EE5F075-B546-42C4-B6A8-E3CCEF38B78D}.Debug|x64.ActiveCfg = Debug|x64
|
{3EE5F075-B546-42C4-B6A8-E3CCEF38B78D}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
{3EE5F075-B546-42C4-B6A8-E3CCEF38B78D}.Debug|x64.Build.0 = Debug|x64
|
{3EE5F075-B546-42C4-B6A8-E3CCEF38B78D}.Debug|x64.Build.0 = Debug|x64
|
||||||
{3EE5F075-B546-42C4-B6A8-E3CCEF38B78D}.Release|x64.ActiveCfg = Release|x64
|
{3EE5F075-B546-42C4-B6A8-E3CCEF38B78D}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
@ -243,7 +245,7 @@ Global
|
||||||
{EB33566E-DA7F-4D28-9077-88C0B7C77E35} = {6C3B64A0-8F8A-4DC4-8C0B-D71EBEED7FA8}
|
{EB33566E-DA7F-4D28-9077-88C0B7C77E35} = {6C3B64A0-8F8A-4DC4-8C0B-D71EBEED7FA8}
|
||||||
{D6973076-9317-4EF2-A0B8-B7A18AC0713E} = {6C3B64A0-8F8A-4DC4-8C0B-D71EBEED7FA8}
|
{D6973076-9317-4EF2-A0B8-B7A18AC0713E} = {6C3B64A0-8F8A-4DC4-8C0B-D71EBEED7FA8}
|
||||||
{60F89955-91C6-3A36-8000-13C592FEC2DF} = {6C3B64A0-8F8A-4DC4-8C0B-D71EBEED7FA8}
|
{60F89955-91C6-3A36-8000-13C592FEC2DF} = {6C3B64A0-8F8A-4DC4-8C0B-D71EBEED7FA8}
|
||||||
{8F85B6CC-250F-4ACA-A617-E820A74E3E3C} = {B0AC29FD-7B01-4B5E-9C8D-0A081E4C5668}
|
{8F85B6CC-250F-4ACA-A617-E820A74E3E3C} = {6C3B64A0-8F8A-4DC4-8C0B-D71EBEED7FA8}
|
||||||
{3EE5F075-B546-42C4-B6A8-E3CCEF38B78D} = {10FBF193-D532-4CCF-B875-4C7091A7F6C2}
|
{3EE5F075-B546-42C4-B6A8-E3CCEF38B78D} = {10FBF193-D532-4CCF-B875-4C7091A7F6C2}
|
||||||
{FDC361C5-7734-493B-8CFB-037308B35122} = {6C3B64A0-8F8A-4DC4-8C0B-D71EBEED7FA8}
|
{FDC361C5-7734-493B-8CFB-037308B35122} = {6C3B64A0-8F8A-4DC4-8C0B-D71EBEED7FA8}
|
||||||
{A107C21C-418A-4697-BB10-20C3AA60E2E4} = {6C3B64A0-8F8A-4DC4-8C0B-D71EBEED7FA8}
|
{A107C21C-418A-4697-BB10-20C3AA60E2E4} = {6C3B64A0-8F8A-4DC4-8C0B-D71EBEED7FA8}
|
||||||
|
|
|
@ -7376,7 +7376,7 @@ struct spu_llvm_worker
|
||||||
set_relax_flag = false;
|
set_relax_flag = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
thread_ctrl::wait_on(utils::bless<atomic_t<u32>>(®istered)[1], 0);
|
thread_ctrl::wait_on(registered.get_wait_atomic(), 0);
|
||||||
slice = registered.pop_all();
|
slice = registered.pop_all();
|
||||||
}())
|
}())
|
||||||
{
|
{
|
||||||
|
@ -7491,7 +7491,7 @@ struct spu_llvm
|
||||||
while (!registered && thread_ctrl::state() != thread_state::aborting)
|
while (!registered && thread_ctrl::state() != thread_state::aborting)
|
||||||
{
|
{
|
||||||
// Wait for the first SPU block before launching any thread
|
// Wait for the first SPU block before launching any thread
|
||||||
thread_ctrl::wait_on(utils::bless<atomic_t<u32>>(®istered)[1], 0);
|
thread_ctrl::wait_on(registered.get_wait_atomic(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (thread_ctrl::state() == thread_state::aborting)
|
if (thread_ctrl::state() == thread_state::aborting)
|
||||||
|
@ -7594,7 +7594,7 @@ struct spu_llvm
|
||||||
|
|
||||||
// Interrupt profiler thread and put it to sleep
|
// Interrupt profiler thread and put it to sleep
|
||||||
static_cast<void>(prof_mutex.reset());
|
static_cast<void>(prof_mutex.reset());
|
||||||
thread_ctrl::wait_on(utils::bless<atomic_t<u32>>(®istered)[1], 0);
|
thread_ctrl::wait_on(registered.get_wait_atomic(), 0);
|
||||||
std::fill(notify_compile.begin(), notify_compile.end(), 0); // Reset notification flags
|
std::fill(notify_compile.begin(), notify_compile.end(), 0); // Reset notification flags
|
||||||
notify_compile_count = 0;
|
notify_compile_count = 0;
|
||||||
compile_pending = 0;
|
compile_pending = 0;
|
||||||
|
|
|
@ -387,6 +387,16 @@ void GLGSRender::load_texture_env()
|
||||||
{
|
{
|
||||||
m_graphics_state |= rsx::fragment_program_state_dirty;
|
m_graphics_state |= rsx::fragment_program_state_dirty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (const auto texture_format = tex.format() & ~(CELL_GCM_TEXTURE_UN | CELL_GCM_TEXTURE_LN);
|
||||||
|
sampler_state->format_class != rsx::classify_format(texture_format) &&
|
||||||
|
(texture_format == CELL_GCM_TEXTURE_A8R8G8B8 || texture_format == CELL_GCM_TEXTURE_D8R8G8B8))
|
||||||
|
{
|
||||||
|
// Depth format redirected to BGRA8 resample stage. Do not filter to avoid bits leaking.
|
||||||
|
// If accurate graphics are desired, force a bitcast to COLOR as a workaround.
|
||||||
|
m_fs_sampler_states[i].set_parameteri(GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||||
|
m_fs_sampler_states[i].set_parameteri(GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -13,6 +13,8 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#include "3rdparty/glslang/glslang/SPIRV/GlslangToSpv.h"
|
#include "3rdparty/glslang/glslang/SPIRV/GlslangToSpv.h"
|
||||||
|
#include "3rdparty/glslang/glslang/glslang/Include/ResourceLimits.h"
|
||||||
|
#include "3rdparty/glslang/glslang/glslang/Public/ShaderLang.h"
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -324,6 +324,12 @@ void VKGSRender::load_texture_env()
|
||||||
// Most PS3-like formats can be linearly filtered without problem
|
// Most PS3-like formats can be linearly filtered without problem
|
||||||
can_sample_linear = true;
|
can_sample_linear = true;
|
||||||
}
|
}
|
||||||
|
else if (sampler_state->format_class != rsx::classify_format(texture_format) &&
|
||||||
|
(texture_format == CELL_GCM_TEXTURE_A8R8G8B8 || texture_format == CELL_GCM_TEXTURE_D8R8G8B8))
|
||||||
|
{
|
||||||
|
// Depth format redirected to BGRA8 resample stage. Do not filter to avoid bits leaking
|
||||||
|
can_sample_linear = false;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Not all GPUs support linear filtering of depth formats
|
// Not all GPUs support linear filtering of depth formats
|
||||||
|
|
|
@ -150,15 +150,57 @@ namespace vk
|
||||||
// v3dv and PanVK support BC1-BC3 which is all we require, support is reported as false since not all formats are supported
|
// v3dv and PanVK support BC1-BC3 which is all we require, support is reported as false since not all formats are supported
|
||||||
optional_features_support.texture_compression_bc = features.textureCompressionBC
|
optional_features_support.texture_compression_bc = features.textureCompressionBC
|
||||||
|| get_driver_vendor() == driver_vendor::V3DV || get_driver_vendor() == driver_vendor::PANVK;
|
|| get_driver_vendor() == driver_vendor::V3DV || get_driver_vendor() == driver_vendor::PANVK;
|
||||||
|
|
||||||
|
// Texel buffer UAB is reported to the trigger for some driver crashes on older NV cards
|
||||||
|
if (get_driver_vendor() == driver_vendor::NVIDIA &&
|
||||||
|
get_chip_class() >= chip_class::NV_kepler &&
|
||||||
|
get_chip_class() <= chip_class::NV_pascal)
|
||||||
|
{
|
||||||
|
// UBOs are unsupported on these cards anyway, disable texel buffers as well
|
||||||
|
descriptor_indexing_support.update_after_bind_mask &= ~(1ull << VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void physical_device::get_physical_device_properties(bool allow_extensions)
|
void physical_device::get_physical_device_properties_0(bool allow_extensions)
|
||||||
{
|
{
|
||||||
|
// Core properties only
|
||||||
vkGetPhysicalDeviceMemoryProperties(dev, &memory_properties);
|
vkGetPhysicalDeviceMemoryProperties(dev, &memory_properties);
|
||||||
|
vkGetPhysicalDeviceProperties(dev, &props);
|
||||||
|
|
||||||
if (!allow_extensions)
|
if (!allow_extensions)
|
||||||
{
|
{
|
||||||
vkGetPhysicalDeviceProperties(dev, &props);
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Try to query driver properties if possible
|
||||||
|
supported_extensions instance_extensions(supported_extensions::instance);
|
||||||
|
supported_extensions device_extensions(supported_extensions::device, nullptr, dev);
|
||||||
|
|
||||||
|
if (!instance_extensions.is_supported(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME) ||
|
||||||
|
!device_extensions.is_supported(VK_KHR_DRIVER_PROPERTIES_EXTENSION_NAME))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
VkPhysicalDeviceProperties2KHR properties2;
|
||||||
|
properties2.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR;
|
||||||
|
properties2.pNext = nullptr;
|
||||||
|
|
||||||
|
driver_properties.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR;
|
||||||
|
driver_properties.pNext = properties2.pNext;
|
||||||
|
properties2.pNext = &driver_properties;
|
||||||
|
|
||||||
|
auto _vkGetPhysicalDeviceProperties2KHR = reinterpret_cast<PFN_vkGetPhysicalDeviceProperties2KHR>(vkGetInstanceProcAddr(parent, "vkGetPhysicalDeviceProperties2KHR"));
|
||||||
|
ensure(_vkGetPhysicalDeviceProperties2KHR);
|
||||||
|
|
||||||
|
_vkGetPhysicalDeviceProperties2KHR(dev, &properties2);
|
||||||
|
}
|
||||||
|
|
||||||
|
void physical_device::get_physical_device_properties_1(bool allow_extensions)
|
||||||
|
{
|
||||||
|
// Extended properties. Call after checking for features
|
||||||
|
if (!allow_extensions)
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -167,10 +209,9 @@ namespace vk
|
||||||
|
|
||||||
if (!instance_extensions.is_supported(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME))
|
if (!instance_extensions.is_supported(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME))
|
||||||
{
|
{
|
||||||
vkGetPhysicalDeviceProperties(dev, &props);
|
return;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
VkPhysicalDeviceProperties2KHR properties2;
|
VkPhysicalDeviceProperties2KHR properties2;
|
||||||
properties2.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR;
|
properties2.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR;
|
||||||
properties2.pNext = nullptr;
|
properties2.pNext = nullptr;
|
||||||
|
@ -192,13 +233,6 @@ namespace vk
|
||||||
properties2.pNext = &multidraw_props;
|
properties2.pNext = &multidraw_props;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (device_extensions.is_supported(VK_KHR_DRIVER_PROPERTIES_EXTENSION_NAME))
|
|
||||||
{
|
|
||||||
driver_properties.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR;
|
|
||||||
driver_properties.pNext = properties2.pNext;
|
|
||||||
properties2.pNext = &driver_properties;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto _vkGetPhysicalDeviceProperties2KHR = reinterpret_cast<PFN_vkGetPhysicalDeviceProperties2KHR>(vkGetInstanceProcAddr(parent, "vkGetPhysicalDeviceProperties2KHR"));
|
auto _vkGetPhysicalDeviceProperties2KHR = reinterpret_cast<PFN_vkGetPhysicalDeviceProperties2KHR>(vkGetInstanceProcAddr(parent, "vkGetPhysicalDeviceProperties2KHR"));
|
||||||
ensure(_vkGetPhysicalDeviceProperties2KHR);
|
ensure(_vkGetPhysicalDeviceProperties2KHR);
|
||||||
|
|
||||||
|
@ -230,15 +264,15 @@ namespace vk
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void physical_device::create(VkInstance context, VkPhysicalDevice pdev, bool allow_extensions)
|
void physical_device::create(VkInstance context, VkPhysicalDevice pdev, bool allow_extensions)
|
||||||
{
|
{
|
||||||
dev = pdev;
|
dev = pdev;
|
||||||
parent = context;
|
parent = context;
|
||||||
|
|
||||||
|
get_physical_device_properties_0(allow_extensions);
|
||||||
get_physical_device_features(allow_extensions);
|
get_physical_device_features(allow_extensions);
|
||||||
get_physical_device_properties(allow_extensions);
|
get_physical_device_properties_1(allow_extensions);
|
||||||
|
|
||||||
rsx_log.always()("Found Vulkan-compatible GPU: '%s' running on driver %s", get_name(), get_driver_version());
|
rsx_log.always()("Found Vulkan-compatible GPU: '%s' running on driver %s", get_name(), get_driver_version());
|
||||||
|
|
||||||
|
|
|
@ -106,7 +106,8 @@ namespace vk
|
||||||
friend class render_device;
|
friend class render_device;
|
||||||
private:
|
private:
|
||||||
void get_physical_device_features(bool allow_extensions);
|
void get_physical_device_features(bool allow_extensions);
|
||||||
void get_physical_device_properties(bool allow_extensions);
|
void get_physical_device_properties_0(bool allow_extensions);
|
||||||
|
void get_physical_device_properties_1(bool allow_extensions);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,14 @@ void sdl_instance::pump_events()
|
||||||
SDL_PumpEvents();
|
SDL_PumpEvents();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void sdl_instance::set_hint(const char* name, const char* value)
|
||||||
|
{
|
||||||
|
if (!SDL_SetHint(name, value))
|
||||||
|
{
|
||||||
|
sdl_log.error("Could not set hint '%s' to '%s': %s", name, value, SDL_GetError());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool sdl_instance::initialize()
|
bool sdl_instance::initialize()
|
||||||
{
|
{
|
||||||
const std::lock_guard<std::mutex> lock(m_instance_mutex);
|
const std::lock_guard<std::mutex> lock(m_instance_mutex);
|
||||||
|
@ -52,10 +60,14 @@ bool sdl_instance::initialize()
|
||||||
sdl_log.notice("Initializing SDL ...");
|
sdl_log.notice("Initializing SDL ...");
|
||||||
|
|
||||||
// Set non-dynamic hints before SDL_Init
|
// Set non-dynamic hints before SDL_Init
|
||||||
if (!SDL_SetHint(SDL_HINT_JOYSTICK_THREAD, "1"))
|
set_hint(SDL_HINT_JOYSTICK_THREAD, "1");
|
||||||
{
|
|
||||||
sdl_log.error("Could not set SDL_HINT_JOYSTICK_THREAD: %s", SDL_GetError());
|
// DS3 pressure sensitive buttons
|
||||||
}
|
#ifdef _WIN32
|
||||||
|
set_hint(SDL_HINT_JOYSTICK_HIDAPI_PS3_SIXAXIS_DRIVER, "1");
|
||||||
|
#else
|
||||||
|
set_hint(SDL_HINT_JOYSTICK_HIDAPI_PS3, "1");
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!SDL_Init(SDL_INIT_JOYSTICK | SDL_INIT_GAMEPAD))
|
if (!SDL_Init(SDL_INIT_JOYSTICK | SDL_INIT_GAMEPAD))
|
||||||
{
|
{
|
||||||
|
@ -96,6 +108,9 @@ bool sdl_instance::initialize()
|
||||||
case SDL_LOG_CATEGORY_TEST:
|
case SDL_LOG_CATEGORY_TEST:
|
||||||
category_name = "test";
|
category_name = "test";
|
||||||
break;
|
break;
|
||||||
|
case SDL_LOG_CATEGORY_GPU:
|
||||||
|
category_name = "gpu";
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
category_name = fmt::format("unknown(%d)", category);
|
category_name = fmt::format("unknown(%d)", category);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#ifdef HAVE_SDL3
|
||||||
|
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
|
|
||||||
struct sdl_instance
|
struct sdl_instance
|
||||||
|
@ -14,6 +16,10 @@ public:
|
||||||
void pump_events();
|
void pump_events();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void set_hint(const char* name, const char* value);
|
||||||
|
|
||||||
bool m_initialized = false;
|
bool m_initialized = false;
|
||||||
std::mutex m_instance_mutex;
|
std::mutex m_instance_mutex;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -32,6 +32,11 @@ sdl_pad_handler::sdl_pad_handler() : PadHandlerBase(pad_handler::sdl)
|
||||||
{ SDLKeyCodes::RS, "RS" },
|
{ SDLKeyCodes::RS, "RS" },
|
||||||
{ SDLKeyCodes::Guide, "Guide" },
|
{ SDLKeyCodes::Guide, "Guide" },
|
||||||
{ SDLKeyCodes::Misc1, "Misc 1" },
|
{ SDLKeyCodes::Misc1, "Misc 1" },
|
||||||
|
{ SDLKeyCodes::Misc2, "Misc 2" },
|
||||||
|
{ SDLKeyCodes::Misc3, "Misc 3" },
|
||||||
|
{ SDLKeyCodes::Misc4, "Misc 4" },
|
||||||
|
{ SDLKeyCodes::Misc5, "Misc 5" },
|
||||||
|
{ SDLKeyCodes::Misc6, "Misc 6" },
|
||||||
{ SDLKeyCodes::RPaddle1, "R Paddle 1" },
|
{ SDLKeyCodes::RPaddle1, "R Paddle 1" },
|
||||||
{ SDLKeyCodes::LPaddle1, "L Paddle 1" },
|
{ SDLKeyCodes::LPaddle1, "L Paddle 1" },
|
||||||
{ SDLKeyCodes::RPaddle2, "R Paddle 2" },
|
{ SDLKeyCodes::RPaddle2, "R Paddle 2" },
|
||||||
|
@ -51,6 +56,16 @@ sdl_pad_handler::sdl_pad_handler() : PadHandlerBase(pad_handler::sdl)
|
||||||
{ SDLKeyCodes::RSXPos, "RS X+" },
|
{ SDLKeyCodes::RSXPos, "RS X+" },
|
||||||
{ SDLKeyCodes::RSYPos, "RS Y+" },
|
{ SDLKeyCodes::RSYPos, "RS Y+" },
|
||||||
{ SDLKeyCodes::RSYNeg, "RS Y-" },
|
{ SDLKeyCodes::RSYNeg, "RS Y-" },
|
||||||
|
{ SDLKeyCodes::PressureCross, "South" }, // Same name as non-pressure button
|
||||||
|
{ SDLKeyCodes::PressureCircle, "East" }, // Same name as non-pressure button
|
||||||
|
{ SDLKeyCodes::PressureSquare, "West" }, // Same name as non-pressure button
|
||||||
|
{ SDLKeyCodes::PressureTriangle, "North" }, // Same name as non-pressure button
|
||||||
|
{ SDLKeyCodes::PressureL1, "LB" }, // Same name as non-pressure button
|
||||||
|
{ SDLKeyCodes::PressureR1, "RB" }, // Same name as non-pressure button
|
||||||
|
{ SDLKeyCodes::PressureUp, "Up" }, // Same name as non-pressure button
|
||||||
|
{ SDLKeyCodes::PressureDown, "Down" }, // Same name as non-pressure button
|
||||||
|
{ SDLKeyCodes::PressureLeft, "Left" }, // Same name as non-pressure button
|
||||||
|
{ SDLKeyCodes::PressureRight, "Right" }, // Same name as non-pressure button
|
||||||
};
|
};
|
||||||
|
|
||||||
init_configs();
|
init_configs();
|
||||||
|
@ -242,6 +257,7 @@ SDLDevice::sdl_info sdl_pad_handler::get_sdl_info(SDL_JoystickID id)
|
||||||
}
|
}
|
||||||
|
|
||||||
info.type = SDL_GetGamepadType(info.gamepad);
|
info.type = SDL_GetGamepadType(info.gamepad);
|
||||||
|
info.real_type = SDL_GetRealGamepadType(info.gamepad);
|
||||||
info.vid = SDL_GetGamepadVendor(info.gamepad);
|
info.vid = SDL_GetGamepadVendor(info.gamepad);
|
||||||
info.pid = SDL_GetGamepadProduct(info.gamepad);
|
info.pid = SDL_GetGamepadProduct(info.gamepad);
|
||||||
info.product_version = SDL_GetGamepadProductVersion(info.gamepad);
|
info.product_version = SDL_GetGamepadProductVersion(info.gamepad);
|
||||||
|
@ -275,8 +291,8 @@ SDLDevice::sdl_info sdl_pad_handler::get_sdl_info(SDL_JoystickID id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sdl_log.notice("Found game pad %d: type=%d, name='%s', path='%s', serial='%s', vid=0x%x, pid=0x%x, product_version=0x%x, firmware_version=0x%x, has_led=%d, has_player_led=%d, has_mono_led=%d, has_rumble=%d, has_rumble_triggers=%d, has_accel=%d, has_gyro=%d",
|
sdl_log.notice("Found game pad %d: type=%d, real_type=%d, name='%s', path='%s', serial='%s', vid=0x%x, pid=0x%x, product_version=0x%x, firmware_version=0x%x, has_led=%d, has_player_led=%d, has_mono_led=%d, has_rumble=%d, has_rumble_triggers=%d, has_accel=%d, has_gyro=%d",
|
||||||
id, static_cast<int>(info.type), info.name, info.path, info.serial, info.vid, info.pid, info.product_version, info.firmware_version, info.has_led, info.has_player_led, info.has_mono_led, info.has_rumble, info.has_rumble_triggers, info.has_accel, info.has_gyro);
|
id, static_cast<int>(info.type), static_cast<int>(info.real_type), info.name, info.path, info.serial, info.vid, info.pid, info.product_version, info.firmware_version, info.has_led, info.has_player_led, info.has_mono_led, info.has_rumble, info.has_rumble_triggers, info.has_accel, info.has_gyro);
|
||||||
|
|
||||||
if (info.has_accel)
|
if (info.has_accel)
|
||||||
{
|
{
|
||||||
|
@ -326,6 +342,33 @@ SDLDevice::sdl_info sdl_pad_handler::get_sdl_info(SDL_JoystickID id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The DS3 may have extra pressure sensitive buttons as axis
|
||||||
|
if (info.real_type == SDL_GamepadType::SDL_GAMEPAD_TYPE_PS3)
|
||||||
|
{
|
||||||
|
if (SDL_Joystick* joystick = SDL_GetGamepadJoystick(info.gamepad))
|
||||||
|
{
|
||||||
|
const int num_axes = SDL_GetNumJoystickAxes(joystick);
|
||||||
|
const int num_buttons = SDL_GetNumJoystickButtons(joystick);
|
||||||
|
|
||||||
|
info.is_ds3_with_pressure_buttons = num_axes == 16 && num_buttons == 11;
|
||||||
|
|
||||||
|
sdl_log.notice("DS3 device %d has %d axis and %d buttons (has_pressure_buttons=%d)", id, num_axes, num_buttons, info.is_ds3_with_pressure_buttons);
|
||||||
|
|
||||||
|
if (info.is_ds3_with_pressure_buttons)
|
||||||
|
{
|
||||||
|
// Add pressure buttons
|
||||||
|
for (int i = SDL_GAMEPAD_AXIS_COUNT; i < num_axes; i++)
|
||||||
|
{
|
||||||
|
const SDL_GamepadAxis axis_id = static_cast<SDL_GamepadAxis>(i);
|
||||||
|
//if (SDL_GamepadHasAxis(info.gamepad, axis_id)) // Always returns false for axis >= SDL_GAMEPAD_AXIS_COUNT
|
||||||
|
{
|
||||||
|
info.axis_ids.insert(axis_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -623,7 +666,7 @@ void sdl_pad_handler::get_extended_info(const pad_ensemble& binding)
|
||||||
{
|
{
|
||||||
const f32 accel_x = dev->values_accel[0]; // Angular speed around the x axis (pitch)
|
const f32 accel_x = dev->values_accel[0]; // Angular speed around the x axis (pitch)
|
||||||
const f32 accel_y = dev->values_accel[1]; // Angular speed around the y axis (yaw)
|
const f32 accel_y = dev->values_accel[1]; // Angular speed around the y axis (yaw)
|
||||||
const f32 accel_z = dev->values_accel[2]; // Angular speed around the z axis (roll
|
const f32 accel_z = dev->values_accel[2]; // Angular speed around the z axis (roll)
|
||||||
|
|
||||||
// Convert to ds3. The ds3 resolution is 113/G.
|
// Convert to ds3. The ds3 resolution is 113/G.
|
||||||
pad->m_sensors[0].m_value = Clamp0To1023((accel_x / SDL_STANDARD_GRAVITY) * -1 * MOTION_ONE_G + 512);
|
pad->m_sensors[0].m_value = Clamp0To1023((accel_x / SDL_STANDARD_GRAVITY) * -1 * MOTION_ONE_G + 512);
|
||||||
|
@ -873,18 +916,61 @@ std::unordered_map<u64, u16> sdl_pad_handler::get_button_values(const std::share
|
||||||
if (!dev || !dev->sdl.gamepad)
|
if (!dev || !dev->sdl.gamepad)
|
||||||
return values;
|
return values;
|
||||||
|
|
||||||
|
std::set<SDLKeyCodes> pressed_pressure_buttons;
|
||||||
|
|
||||||
for (SDL_GamepadButton button_id : dev->sdl.button_ids)
|
for (SDL_GamepadButton button_id : dev->sdl.button_ids)
|
||||||
{
|
{
|
||||||
const u8 value = SDL_GetGamepadButton(dev->sdl.gamepad, button_id);
|
const bool value = SDL_GetGamepadButton(dev->sdl.gamepad, button_id);
|
||||||
const SDLKeyCodes key_code = get_button_code(button_id);
|
const SDLKeyCodes key_code = get_button_code(button_id);
|
||||||
|
|
||||||
// TODO: SDL does not support DS3 button intensity in the current version
|
// NOTE: SDL does not simply support DS3 button intensity in the current version
|
||||||
|
// So we have to skip the normal buttons if a DS3 with pressure buttons was detected
|
||||||
|
if (dev->sdl.is_ds3_with_pressure_buttons)
|
||||||
|
{
|
||||||
|
switch (key_code)
|
||||||
|
{
|
||||||
|
case SDLKeyCodes::North:
|
||||||
|
case SDLKeyCodes::South:
|
||||||
|
case SDLKeyCodes::West:
|
||||||
|
case SDLKeyCodes::East:
|
||||||
|
case SDLKeyCodes::Left:
|
||||||
|
case SDLKeyCodes::Right:
|
||||||
|
case SDLKeyCodes::Up:
|
||||||
|
case SDLKeyCodes::Down:
|
||||||
|
case SDLKeyCodes::LB:
|
||||||
|
case SDLKeyCodes::RB:
|
||||||
|
{
|
||||||
|
static const std::map<SDLKeyCodes, SDLKeyCodes> button_to_pressure =
|
||||||
|
{
|
||||||
|
{ SDLKeyCodes::South, SDLKeyCodes::PressureCross },
|
||||||
|
{ SDLKeyCodes::East, SDLKeyCodes::PressureCircle },
|
||||||
|
{ SDLKeyCodes::West, SDLKeyCodes::PressureSquare },
|
||||||
|
{ SDLKeyCodes::North, SDLKeyCodes::PressureTriangle },
|
||||||
|
{ SDLKeyCodes::LB, SDLKeyCodes::PressureL1 },
|
||||||
|
{ SDLKeyCodes::RB, SDLKeyCodes::PressureR1 },
|
||||||
|
{ SDLKeyCodes::Up, SDLKeyCodes::PressureUp },
|
||||||
|
{ SDLKeyCodes::Down, SDLKeyCodes::PressureDown },
|
||||||
|
{ SDLKeyCodes::Left, SDLKeyCodes::PressureLeft },
|
||||||
|
{ SDLKeyCodes::Right, SDLKeyCodes::PressureRight }
|
||||||
|
};
|
||||||
|
|
||||||
|
if (value)
|
||||||
|
{
|
||||||
|
pressed_pressure_buttons.insert(::at32(button_to_pressure, key_code));
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
values[key_code] = value ? 255 : 0;
|
values[key_code] = value ? 255 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (SDL_GamepadAxis axis_id : dev->sdl.axis_ids)
|
for (SDL_GamepadAxis axis_id : dev->sdl.axis_ids)
|
||||||
{
|
{
|
||||||
const s16 value = SDL_GetGamepadAxis(dev->sdl.gamepad, axis_id);
|
s16 value = SDL_GetGamepadAxis(dev->sdl.gamepad, axis_id);
|
||||||
|
|
||||||
switch (axis_id)
|
switch (axis_id)
|
||||||
{
|
{
|
||||||
|
@ -911,9 +997,33 @@ std::unordered_map<u64, u16> sdl_pad_handler::get_button_values(const std::share
|
||||||
values[SDLKeyCodes::RSYPos] = value < 0 ? std::abs(value) - 1 : 0;
|
values[SDLKeyCodes::RSYPos] = value < 0 ? std::abs(value) - 1 : 0;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
{
|
||||||
|
if (dev->sdl.is_ds3_with_pressure_buttons)
|
||||||
|
{
|
||||||
|
// Get pressure button value from axis
|
||||||
|
if (const int key_code = SDLKeyCodes::PressureBegin + 1 + axis_id - SDL_GAMEPAD_AXIS_COUNT;
|
||||||
|
key_code > SDLKeyCodes::PressureBegin && key_code < SDLKeyCodes::PressureEnd)
|
||||||
|
{
|
||||||
|
// We need to get the joystick value directly for axis >= SDL_GAMEPAD_AXIS_COUNT
|
||||||
|
if (SDL_Joystick* joystick = SDL_GetGamepadJoystick(dev->sdl.gamepad))
|
||||||
|
{
|
||||||
|
value = SDL_GetJoystickAxis(joystick, axis_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
value = static_cast<s16>(ScaledInput(value, SDL_JOYSTICK_AXIS_MIN, SDL_JOYSTICK_AXIS_MAX, 0.0f, 255.0f));
|
||||||
|
|
||||||
|
if (value <= 0 && pressed_pressure_buttons.contains(static_cast<SDLKeyCodes>(key_code)))
|
||||||
|
{
|
||||||
|
value = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
values[key_code] = Clamp0To255(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (const SDLDevice::touchpad& touchpad : dev->sdl.touchpads)
|
for (const SDLDevice::touchpad& touchpad : dev->sdl.touchpads)
|
||||||
{
|
{
|
||||||
|
@ -1006,6 +1116,11 @@ sdl_pad_handler::SDLKeyCodes sdl_pad_handler::get_button_code(SDL_GamepadButton
|
||||||
case SDL_GamepadButton::SDL_GAMEPAD_BUTTON_RIGHT_STICK: return SDLKeyCodes::RS;
|
case SDL_GamepadButton::SDL_GAMEPAD_BUTTON_RIGHT_STICK: return SDLKeyCodes::RS;
|
||||||
case SDL_GamepadButton::SDL_GAMEPAD_BUTTON_GUIDE: return SDLKeyCodes::Guide;
|
case SDL_GamepadButton::SDL_GAMEPAD_BUTTON_GUIDE: return SDLKeyCodes::Guide;
|
||||||
case SDL_GamepadButton::SDL_GAMEPAD_BUTTON_MISC1: return SDLKeyCodes::Misc1;
|
case SDL_GamepadButton::SDL_GAMEPAD_BUTTON_MISC1: return SDLKeyCodes::Misc1;
|
||||||
|
case SDL_GamepadButton::SDL_GAMEPAD_BUTTON_MISC2: return SDLKeyCodes::Misc2;
|
||||||
|
case SDL_GamepadButton::SDL_GAMEPAD_BUTTON_MISC3: return SDLKeyCodes::Misc3;
|
||||||
|
case SDL_GamepadButton::SDL_GAMEPAD_BUTTON_MISC4: return SDLKeyCodes::Misc4;
|
||||||
|
case SDL_GamepadButton::SDL_GAMEPAD_BUTTON_MISC5: return SDLKeyCodes::Misc5;
|
||||||
|
case SDL_GamepadButton::SDL_GAMEPAD_BUTTON_MISC6: return SDLKeyCodes::Misc6;
|
||||||
case SDL_GamepadButton::SDL_GAMEPAD_BUTTON_RIGHT_PADDLE1: return SDLKeyCodes::RPaddle1;
|
case SDL_GamepadButton::SDL_GAMEPAD_BUTTON_RIGHT_PADDLE1: return SDLKeyCodes::RPaddle1;
|
||||||
case SDL_GamepadButton::SDL_GAMEPAD_BUTTON_LEFT_PADDLE1: return SDLKeyCodes::LPaddle1;
|
case SDL_GamepadButton::SDL_GAMEPAD_BUTTON_LEFT_PADDLE1: return SDLKeyCodes::LPaddle1;
|
||||||
case SDL_GamepadButton::SDL_GAMEPAD_BUTTON_RIGHT_PADDLE2: return SDLKeyCodes::RPaddle2;
|
case SDL_GamepadButton::SDL_GAMEPAD_BUTTON_RIGHT_PADDLE2: return SDLKeyCodes::RPaddle2;
|
||||||
|
|
|
@ -35,6 +35,7 @@ public:
|
||||||
{
|
{
|
||||||
SDL_Gamepad* gamepad = nullptr;
|
SDL_Gamepad* gamepad = nullptr;
|
||||||
SDL_GamepadType type = SDL_GamepadType::SDL_GAMEPAD_TYPE_UNKNOWN;
|
SDL_GamepadType type = SDL_GamepadType::SDL_GAMEPAD_TYPE_UNKNOWN;
|
||||||
|
SDL_GamepadType real_type = SDL_GamepadType::SDL_GAMEPAD_TYPE_UNKNOWN;
|
||||||
int power_level = 0;
|
int power_level = 0;
|
||||||
int last_power_level = 0;
|
int last_power_level = 0;
|
||||||
|
|
||||||
|
@ -47,6 +48,7 @@ public:
|
||||||
u16 firmware_version = 0;
|
u16 firmware_version = 0;
|
||||||
|
|
||||||
bool is_virtual_device = false;
|
bool is_virtual_device = false;
|
||||||
|
bool is_ds3_with_pressure_buttons = false;
|
||||||
|
|
||||||
bool has_led = false;
|
bool has_led = false;
|
||||||
bool has_mono_led = false;
|
bool has_mono_led = false;
|
||||||
|
@ -98,6 +100,11 @@ class sdl_pad_handler : public PadHandlerBase
|
||||||
Back,
|
Back,
|
||||||
Guide,
|
Guide,
|
||||||
Misc1,
|
Misc1,
|
||||||
|
Misc2,
|
||||||
|
Misc3,
|
||||||
|
Misc4,
|
||||||
|
Misc5,
|
||||||
|
Misc6,
|
||||||
RPaddle1,
|
RPaddle1,
|
||||||
LPaddle1,
|
LPaddle1,
|
||||||
RPaddle2,
|
RPaddle2,
|
||||||
|
@ -119,7 +126,21 @@ class sdl_pad_handler : public PadHandlerBase
|
||||||
RSXNeg,
|
RSXNeg,
|
||||||
RSXPos,
|
RSXPos,
|
||||||
RSYNeg,
|
RSYNeg,
|
||||||
RSYPos
|
RSYPos,
|
||||||
|
|
||||||
|
// DS3 Pressure sensitive buttons (reported as axis)
|
||||||
|
PressureBegin,
|
||||||
|
PressureCross, // Cross axis 6
|
||||||
|
PressureCircle, // Circle axis 7
|
||||||
|
PressureSquare, // Square axis 8
|
||||||
|
PressureTriangle, // Triangle axis 9
|
||||||
|
PressureL1, // L1 axis 10
|
||||||
|
PressureR1, // R1 axis 11
|
||||||
|
PressureUp, // D-Pad Up axis 12
|
||||||
|
PressureDown, // D-Pad Down axis 13
|
||||||
|
PressureLeft, // D-Pad Left axis 14
|
||||||
|
PressureRight, // D-Pad Right axis 15
|
||||||
|
PressureEnd,
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
<ItemDefinitionGroup>
|
<ItemDefinitionGroup>
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
<AdditionalIncludeDirectories>..\3rdparty\miniupnp\miniupnp\miniupnpc\include;..\3rdparty\wolfssl\wolfssl;..\3rdparty\flatbuffers\include;..\3rdparty\libusb\libusb\libusb;..\3rdparty\yaml-cpp\yaml-cpp\include;..\3rdparty\SoundTouch\soundtouch\include;..\3rdparty\rtmidi\rtmidi;..\3rdparty\zlib\zlib;$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build\include;$(SolutionDir)build\lib_ext\$(Configuration)-$(Platform)\llvm_build\include;$(SolutionDir)build\lib_ext\$(Configuration)-$(Platform)\llvm\include;$(SolutionDir)build\lib_ext\$(Configuration)-$(Platform)\llvm_build\include;$(VULKAN_SDK)\Include;..\3rdparty\zstd\zstd\lib;$(SolutionDir)3rdparty\fusion\fusion\Fusion;$(SolutionDir)3rdparty\wolfssl\extra\win32;$(SolutionDir)3rdparty\libsdl-org\SDL\include</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..\3rdparty\miniupnp\miniupnp\miniupnpc\include;..\3rdparty\wolfssl\wolfssl;..\3rdparty\flatbuffers\include;..\3rdparty\libusb\libusb\libusb;..\3rdparty\yaml-cpp\yaml-cpp\include;..\3rdparty\SoundTouch\soundtouch\include;..\3rdparty\rtmidi\rtmidi;..\3rdparty\zlib\zlib;$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build\include;$(SolutionDir)build\lib_ext\$(Configuration)-$(Platform)\llvm_build\include;$(SolutionDir)build\lib_ext\$(Configuration)-$(Platform)\llvm\include;$(SolutionDir)build\lib_ext\$(Configuration)-$(Platform)\llvm_build\include;$(VULKAN_SDK)\Include;..\3rdparty\zstd\zstd\lib;$(SolutionDir)3rdparty\fusion\fusion\Fusion;$(SolutionDir)3rdparty\wolfssl\extra\win32;$(SolutionDir)3rdparty\libsdl-org\SDL\include;$(SolutionDir)3rdparty\glslang\glslang</AdditionalIncludeDirectories>
|
||||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
|
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
|
||||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AL_LIBTYPE_STATIC;MINIUPNP_STATICLIB;HAVE_VULKAN;HAVE_SDL3;ZLIB_CONST;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AL_LIBTYPE_STATIC;MINIUPNP_STATICLIB;HAVE_VULKAN;HAVE_SDL3;ZLIB_CONST;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AL_LIBTYPE_STATIC;MINIUPNP_STATICLIB;HAVE_VULKAN;HAVE_SDL3;ZLIB_CONST;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AL_LIBTYPE_STATIC;MINIUPNP_STATICLIB;HAVE_VULKAN;HAVE_SDL3;ZLIB_CONST;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
|
|
@ -87,7 +87,7 @@
|
||||||
<ExternalWarningLevel>TurnOffAllWarnings</ExternalWarningLevel>
|
<ExternalWarningLevel>TurnOffAllWarnings</ExternalWarningLevel>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>opencv_world4100.lib;DbgHelp.lib;Ole32.lib;gdi32.lib;hidapi.lib;libusb-1.0.lib;winmm.lib;miniupnpc_static.lib;rtmidi.lib;imm32.lib;ksuser.lib;version.lib;OpenAL32.lib;XAudio.lib;GLGSRender.lib;shlwapi.lib;VKGSRender.lib;vulkan-1.lib;wolfssl.lib;libcurl.lib;Wldap32.lib;glslang.lib;OSDependent.lib;OGLCompiler.lib;SPIRV.lib;MachineIndependent.lib;GenericCodeGen.lib;Advapi32.lib;user32.lib;zlib.lib;zstd.lib;libpng16.lib;asmjit.lib;yaml-cpp.lib;discord-rpc.lib;emucore.lib;dxgi.lib;shell32.lib;Qt6Core.lib;Qt6Gui.lib;Qt6Widgets.lib;Qt6Concurrent.lib;Qt6Multimedia.lib;Qt6MultimediaWidgets.lib;Qt6Svg.lib;Qt6SvgWidgets.lib;7zip.lib;libcubeb.lib;cubeb.lib;soundtouch.lib;Avrt.lib;SDL.lib;fusion.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>opencv_world4100.lib;DbgHelp.lib;Ole32.lib;gdi32.lib;hidapi.lib;libusb-1.0.lib;winmm.lib;miniupnpc_static.lib;rtmidi.lib;imm32.lib;ksuser.lib;version.lib;OpenAL32.lib;XAudio.lib;GLGSRender.lib;shlwapi.lib;VKGSRender.lib;vulkan-1.lib;wolfssl.lib;libcurl.lib;Wldap32.lib;glslang.lib;OSDependent.lib;SPIRV.lib;MachineIndependent.lib;GenericCodeGen.lib;Advapi32.lib;user32.lib;zlib.lib;zstd.lib;libpng16.lib;asmjit.lib;yaml-cpp.lib;discord-rpc.lib;emucore.lib;dxgi.lib;shell32.lib;Qt6Core.lib;Qt6Gui.lib;Qt6Widgets.lib;Qt6Concurrent.lib;Qt6Multimedia.lib;Qt6MultimediaWidgets.lib;Qt6Svg.lib;Qt6SvgWidgets.lib;7zip.lib;libcubeb.lib;cubeb.lib;soundtouch.lib;Avrt.lib;SDL.lib;fusion.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(SolutionDir)3rdparty\opencv\opencv\opencv410\build\x64\lib;$(SolutionDir)build\lib\$(Configuration)-$(Platform)\glslang;$(SolutionDir)build\lib_ext\$(CONFIGURATION)-$(PLATFORM);$(QTDIR)\lib;$(VULKAN_SDK)\Lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(SolutionDir)3rdparty\opencv\opencv\opencv410\build\x64\lib;$(SolutionDir)build\lib\$(Configuration)-$(Platform)\glslang;$(SolutionDir)build\lib_ext\$(CONFIGURATION)-$(PLATFORM);$(QTDIR)\lib;$(VULKAN_SDK)\Lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
|
||||||
<DataExecutionPrevention>true</DataExecutionPrevention>
|
<DataExecutionPrevention>true</DataExecutionPrevention>
|
||||||
|
@ -147,7 +147,7 @@
|
||||||
<ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
<ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>opencv_world4100.lib;DbgHelp.lib;Ole32.lib;gdi32.lib;hidapi.lib;libusb-1.0.lib;winmm.lib;miniupnpc_static.lib;rtmidi.lib;imm32.lib;ksuser.lib;version.lib;OpenAL32.lib;XAudio.lib;GLGSRender.lib;shlwapi.lib;VKGSRender.lib;vulkan-1.lib;wolfssl.lib;libcurl.lib;Wldap32.lib;glslangd.lib;OSDependentd.lib;OGLCompilerd.lib;SPIRVd.lib;MachineIndependentd.lib;GenericCodeGend.lib;Advapi32.lib;user32.lib;zlib.lib;zstd.lib;libpng16.lib;asmjit.lib;yaml-cpp.lib;discord-rpc.lib;emucore.lib;dxgi.lib;shell32.lib;Qt6Cored.lib;Qt6Guid.lib;Qt6Widgetsd.lib;Qt6Concurrentd.lib;Qt6Multimediad.lib;Qt6MultimediaWidgetsd.lib;Qt6Svgd.lib;Qt6SvgWidgetsd.lib;7zip.lib;libcubeb.lib;cubeb.lib;soundtouch.lib;Avrt.lib;SDL.lib;fusion.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>opencv_world4100.lib;DbgHelp.lib;Ole32.lib;gdi32.lib;hidapi.lib;libusb-1.0.lib;winmm.lib;miniupnpc_static.lib;rtmidi.lib;imm32.lib;ksuser.lib;version.lib;OpenAL32.lib;XAudio.lib;GLGSRender.lib;shlwapi.lib;VKGSRender.lib;vulkan-1.lib;wolfssl.lib;libcurl.lib;Wldap32.lib;glslangd.lib;OSDependentd.lib;SPIRVd.lib;MachineIndependentd.lib;GenericCodeGend.lib;Advapi32.lib;user32.lib;zlib.lib;zstd.lib;libpng16.lib;asmjit.lib;yaml-cpp.lib;discord-rpc.lib;emucore.lib;dxgi.lib;shell32.lib;Qt6Cored.lib;Qt6Guid.lib;Qt6Widgetsd.lib;Qt6Concurrentd.lib;Qt6Multimediad.lib;Qt6MultimediaWidgetsd.lib;Qt6Svgd.lib;Qt6SvgWidgetsd.lib;7zip.lib;libcubeb.lib;cubeb.lib;soundtouch.lib;Avrt.lib;SDL.lib;fusion.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(SolutionDir)3rdparty\opencv\opencv\opencv410\build\x64\lib;$(SolutionDir)build\lib\$(Configuration)-$(Platform)\glslang;$(SolutionDir)build\lib\$(CONFIGURATION)-$(PLATFORM);$(QTDIR)\lib;$(VULKAN_SDK)\Lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(SolutionDir)3rdparty\opencv\opencv\opencv410\build\x64\lib;$(SolutionDir)build\lib\$(Configuration)-$(Platform)\glslang;$(SolutionDir)build\lib\$(CONFIGURATION)-$(PLATFORM);$(QTDIR)\lib;$(VULKAN_SDK)\Lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /VERBOSE %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /VERBOSE %(AdditionalOptions)</AdditionalOptions>
|
||||||
<DataExecutionPrevention>true</DataExecutionPrevention>
|
<DataExecutionPrevention>true</DataExecutionPrevention>
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
<ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
<ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>rpcs3.lib;opencv_world4100.lib;DbgHelp.lib;Ole32.lib;gdi32.lib;hidapi.lib;libusb-1.0.lib;winmm.lib;miniupnpc_static.lib;rtmidi.lib;imm32.lib;ksuser.lib;version.lib;OpenAL32.lib;XAudio.lib;GLGSRender.lib;shlwapi.lib;VKGSRender.lib;vulkan-1.lib;wolfssl.lib;libcurl.lib;Wldap32.lib;glslang.lib;OSDependent.lib;OGLCompiler.lib;SPIRV.lib;MachineIndependent.lib;GenericCodeGen.lib;Advapi32.lib;user32.lib;zlib.lib;zstd.lib;libpng16.lib;asmjit.lib;yaml-cpp.lib;discord-rpc.lib;emucore.lib;dxgi.lib;shell32.lib;Qt6Core.lib;Qt6Gui.lib;Qt6Widgets.lib;Qt6Concurrent.lib;Qt6Multimedia.lib;Qt6MultimediaWidgets.lib;Qt6Svg.lib;Qt6SvgWidgets.lib;7zip.lib;libcubeb.lib;cubeb.lib;soundtouch.lib;Avrt.lib;SDL.lib;fusion.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>rpcs3.lib;opencv_world4100.lib;DbgHelp.lib;Ole32.lib;gdi32.lib;hidapi.lib;libusb-1.0.lib;winmm.lib;miniupnpc_static.lib;rtmidi.lib;imm32.lib;ksuser.lib;version.lib;OpenAL32.lib;XAudio.lib;GLGSRender.lib;shlwapi.lib;VKGSRender.lib;vulkan-1.lib;wolfssl.lib;libcurl.lib;Wldap32.lib;glslang.lib;OSDependent.lib;SPIRV.lib;MachineIndependent.lib;GenericCodeGen.lib;Advapi32.lib;user32.lib;zlib.lib;zstd.lib;libpng16.lib;asmjit.lib;yaml-cpp.lib;discord-rpc.lib;emucore.lib;dxgi.lib;shell32.lib;Qt6Core.lib;Qt6Gui.lib;Qt6Widgets.lib;Qt6Concurrent.lib;Qt6Multimedia.lib;Qt6MultimediaWidgets.lib;Qt6Svg.lib;Qt6SvgWidgets.lib;7zip.lib;libcubeb.lib;cubeb.lib;soundtouch.lib;Avrt.lib;SDL.lib;fusion.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(SolutionDir)3rdparty\opencv\opencv\opencv410\build\x64\lib;$(SolutionDir)build\lib\$(Configuration)-$(Platform)\glslang;$(SolutionDir)build\lib_ext\$(CONFIGURATION)-$(PLATFORM);$(QTDIR)\lib;$(VULKAN_SDK)\Lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(SolutionDir)3rdparty\opencv\opencv\opencv410\build\x64\lib;$(SolutionDir)build\lib\$(Configuration)-$(Platform)\glslang;$(SolutionDir)build\lib_ext\$(CONFIGURATION)-$(PLATFORM);$(QTDIR)\lib;$(VULKAN_SDK)\Lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<RandomizedBaseAddress>true</RandomizedBaseAddress>
|
<RandomizedBaseAddress>true</RandomizedBaseAddress>
|
||||||
|
@ -70,7 +70,7 @@
|
||||||
<ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
<ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>rpcs3d.lib;opencv_world4100.lib;DbgHelp.lib;Ole32.lib;gdi32.lib;hidapi.lib;libusb-1.0.lib;winmm.lib;miniupnpc_static.lib;rtmidi.lib;imm32.lib;ksuser.lib;version.lib;OpenAL32.lib;XAudio.lib;GLGSRender.lib;shlwapi.lib;VKGSRender.lib;vulkan-1.lib;wolfssl.lib;libcurl.lib;Wldap32.lib;glslangd.lib;OSDependentd.lib;OGLCompilerd.lib;SPIRVd.lib;MachineIndependentd.lib;GenericCodeGend.lib;Advapi32.lib;user32.lib;zlib.lib;zstd.lib;libpng16.lib;asmjit.lib;yaml-cpp.lib;discord-rpc.lib;emucore.lib;dxgi.lib;shell32.lib;Qt6Cored.lib;Qt6Guid.lib;Qt6Widgetsd.lib;Qt6Concurrentd.lib;Qt6Multimediad.lib;Qt6MultimediaWidgetsd.lib;Qt6Svgd.lib;Qt6SvgWidgetsd.lib;7zip.lib;libcubeb.lib;cubeb.lib;soundtouch.lib;Avrt.lib;SDL.lib;fusion.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>rpcs3d.lib;opencv_world4100.lib;DbgHelp.lib;Ole32.lib;gdi32.lib;hidapi.lib;libusb-1.0.lib;winmm.lib;miniupnpc_static.lib;rtmidi.lib;imm32.lib;ksuser.lib;version.lib;OpenAL32.lib;XAudio.lib;GLGSRender.lib;shlwapi.lib;VKGSRender.lib;vulkan-1.lib;wolfssl.lib;libcurl.lib;Wldap32.lib;glslangd.lib;OSDependentd.lib;SPIRVd.lib;MachineIndependentd.lib;GenericCodeGend.lib;Advapi32.lib;user32.lib;zlib.lib;zstd.lib;libpng16.lib;asmjit.lib;yaml-cpp.lib;discord-rpc.lib;emucore.lib;dxgi.lib;shell32.lib;Qt6Cored.lib;Qt6Guid.lib;Qt6Widgetsd.lib;Qt6Concurrentd.lib;Qt6Multimediad.lib;Qt6MultimediaWidgetsd.lib;Qt6Svgd.lib;Qt6SvgWidgetsd.lib;7zip.lib;libcubeb.lib;cubeb.lib;soundtouch.lib;Avrt.lib;SDL.lib;fusion.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(SolutionDir)3rdparty\opencv\opencv\opencv410\build\x64\lib;$(SolutionDir)build\lib\$(Configuration)-$(Platform)\glslang;$(SolutionDir)build\lib\$(CONFIGURATION)-$(PLATFORM);$(QTDIR)\lib;$(VULKAN_SDK)\Lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(SolutionDir)3rdparty\opencv\opencv\opencv410\build\x64\lib;$(SolutionDir)build\lib\$(Configuration)-$(Platform)\glslang;$(SolutionDir)build\lib\$(CONFIGURATION)-$(PLATFORM);$(QTDIR)\lib;$(VULKAN_SDK)\Lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<RandomizedBaseAddress>true</RandomizedBaseAddress>
|
<RandomizedBaseAddress>true</RandomizedBaseAddress>
|
||||||
|
|
|
@ -207,7 +207,7 @@ namespace atomic_wait
|
||||||
static_assert(Index < Max);
|
static_assert(Index < Max);
|
||||||
static_assert(sizeof(var) == sizeof(uptr) * 2);
|
static_assert(sizeof(var) == sizeof(uptr) * 2);
|
||||||
|
|
||||||
m_info[Index].data = reinterpret_cast<char*>(&var) + offsetof(typename lf_queue<T2>::fat_ptr, is_non_null);
|
m_info[Index].data = std::bit_cast<char*>(&var.get_wait_atomic().raw());
|
||||||
m_info[Index].old = 0;
|
m_info[Index].old = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -217,7 +217,7 @@ namespace atomic_wait
|
||||||
static_assert(Index < Max);
|
static_assert(Index < Max);
|
||||||
static_assert(sizeof(var) == sizeof(uptr) * 2);
|
static_assert(sizeof(var) == sizeof(uptr) * 2);
|
||||||
|
|
||||||
m_info[Index].data = reinterpret_cast<char*>(&var) + offsetof(typename stx::atomic_ptr<T2>::fat_ptr, is_non_null);
|
m_info[Index].data = std::bit_cast<char*>(&var.get_wait_atomic().raw());
|
||||||
m_info[Index].old = 0;
|
m_info[Index].old = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -576,7 +576,7 @@ namespace stx
|
||||||
template <typename T>
|
template <typename T>
|
||||||
class atomic_ptr
|
class atomic_ptr
|
||||||
{
|
{
|
||||||
public:
|
private:
|
||||||
struct fat_ptr
|
struct fat_ptr
|
||||||
{
|
{
|
||||||
uptr ptr{};
|
uptr ptr{};
|
||||||
|
@ -584,8 +584,6 @@ namespace stx
|
||||||
u32 ref_ctr{};
|
u32 ref_ctr{};
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
mutable atomic_t<fat_ptr> m_val{fat_ptr{}};
|
mutable atomic_t<fat_ptr> m_val{fat_ptr{}};
|
||||||
|
|
||||||
static shared_counter* d(fat_ptr val) noexcept
|
static shared_counter* d(fat_ptr val) noexcept
|
||||||
|
@ -1117,19 +1115,24 @@ namespace stx
|
||||||
return static_cast<volatile const void*>(observe()) == r.get();
|
return static_cast<volatile const void*>(observe()) == r.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
atomic_t<u32> &get_wait_atomic()
|
||||||
|
{
|
||||||
|
return *utils::bless<atomic_t<u32>>(&m_val.raw().is_non_null);
|
||||||
|
}
|
||||||
|
|
||||||
void wait(std::nullptr_t, atomic_wait_timeout timeout = atomic_wait_timeout::inf)
|
void wait(std::nullptr_t, atomic_wait_timeout timeout = atomic_wait_timeout::inf)
|
||||||
{
|
{
|
||||||
utils::bless<atomic_t<u32>>(&m_val.raw().is_non_null)->wait(0, timeout);
|
get_wait_atomic().wait(0, timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
void notify_one()
|
void notify_one()
|
||||||
{
|
{
|
||||||
utils::bless<atomic_t<u32>>(&m_val.raw().is_non_null)->notify_one();
|
get_wait_atomic().notify_one();
|
||||||
}
|
}
|
||||||
|
|
||||||
void notify_all()
|
void notify_all()
|
||||||
{
|
{
|
||||||
utils::bless<atomic_t<u32>>(&m_val.raw().is_non_null)->notify_all();
|
get_wait_atomic().notify_all();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue