Fix submodule errors

This commit is contained in:
Live session user 2025-10-31 07:37:56 -07:00
parent d1e7fe4da0
commit e65b63308f
15 changed files with 85 additions and 64 deletions

View file

@ -30,9 +30,10 @@ fi
echo "Found llvm-mt.exe at: $mtPath"
VcpkgRoot="$(pwd)/vcpkg"
VcpkgRoot="$VCPKG_ROOT"
VcpkgBuildRoot="$GITHUB_WORKSPACE/build"
VcpkgTriplet="$VCPKG_TRIPLET"
VcpkgInstall="$VcpkgRoot/installed/$VcpkgTriplet"
VcpkgInstall="$VcpkgBuildRoot/vcpkg_installed/$VcpkgTriplet"
VcpkgInclude="$VcpkgInstall/include"
VcpkgLib="$VcpkgInstall/lib"
@ -42,8 +43,10 @@ git config --global --add safe.directory '*'
# Initialize submodules except certain ones
echo "Initializing submodules"
set -x
# shellcheck disable=SC2046
git submodule -q update --init $(awk '/path/ && !/llvm/ && !/opencv/ && !/FAudio/ && !/libpng/ && !/zlib/ && !/feralinteractive/ { print $3 }' .gitmodules)
set +x
# Create and enter build directory
echo "Creating build directory"

View file

@ -344,12 +344,15 @@ jobs:
CCACHE_DIR: 'C:\ccache'
VCPKG_TRIPLET: x64-windows
VCPKG_BUILD_TYPE: release
VCPKG_ROOT: "${{github.workspace}}/vcpkg"
VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite'
name: RPCS3 Windows ${{ matrix.compiler }}
steps:
- name: Checkout repository
uses: actions/checkout@main
with:
fetch-depth: 0
- name: Setup msys2
uses: msys2/setup-msys2@v2
if: ${{ matrix.compiler == 'clang' }}
@ -386,42 +389,21 @@ jobs:
run: |
git clone https://github.com/microsoft/vcpkg.git
.\vcpkg\bootstrap-vcpkg.bat
- name: Restore vcpkg cache
if: ${{ matrix.compiler == 'clang-cl' }}
uses: actions/cache/restore@main
id: restore-vcpkg-cache
with:
path: |
vcpkg/installed
vcpkg/buildtrees
key: vcpkg-${{ runner.os }}-${{ matrix.compiler }}-${{ runner.arch }}-${{ hashFiles('**/vcpkg') }}
restore-keys: vcpkg-${{ runner.os }}-${{ matrix.compiler }}-${{ runner.arch }}-
- name: Install dependencies with vcpkg
- name: 'Setup NuGet Credentials for vcpkg'
if: ${{ matrix.compiler == 'clang-cl' }}
shell: pwsh
run: >-
.\vcpkg\vcpkg.exe install
ffmpeg[avcodec,avformat,swscale,swresample]
libpng
opencv
qtbase
qtmultimedia
qtsvg
qttools
vulkan
zlib
--triplet $env:VCPKG_TRIPLET
--clean-after-build
- name: Save vcpkg cache
if: ${{ github.ref == 'refs/heads/master' && matrix.compiler == 'clang-cl' }}
uses: actions/cache/save@main
with:
path: |
vcpkg/installed
vcpkg/buildtrees
key: ${{ steps.restore-vcpkg-cache.outputs.cache-primary-key }}
shell: 'bash'
run: |
`./vcpkg/vcpkg fetch nuget | tail -n 1` \
sources add \
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \
-storepasswordincleartext \
-name "GitHub" \
-username "${{ github.repository_owner }}" \
-password "${{ secrets.GITHUB_TOKEN }}"
`./vcpkg/vcpkg fetch nuget | tail -n 1` \
setapikey "${{ secrets.GITHUB_TOKEN }}" \
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
- name: Restore LLVM Cache
if: ${{ matrix.compiler == 'clang-cl' }}
@ -431,6 +413,7 @@ jobs:
path: ./llvm-${{ matrix.llvmver }}
key: ${{ runner.os }}-llvm-dl-cache-${{ hashFiles('**/llvm-${{ matrix.llvmver }}') }}
restore-keys: ${{ runner.os }}-clang-dl-cache-
- name: Add LLVM
if: ${{ matrix.compiler == 'clang-cl' }}
shell: pwsh
@ -447,7 +430,7 @@ jobs:
rm -r clang*
}
Add-Content -Path $env:GITHUB_PATH -Value "D:\a\rpcs3\rpcs3\llvm-${{ matrix.llvmver }}\bin"
C:\PROGRA~1\LLVM\bin\clang-cl.exe --version
- name: Save LLVM Cache
if: ${{ github.ref == 'refs/heads/master' && matrix.compiler == 'clang-cl' }}
uses: actions/cache/save@main

@ -1 +1 @@
Subproject commit 9c50193236ad4d8c68f390a3151f8253709baabd
Subproject commit 0e5e98e4ac8adae92e4f7653dd6eee17aa9c8791

View file

@ -11,6 +11,7 @@ include("${ASMJIT_DIR}/CMakeLists.txt")
add_library(asmjit ${ASMJIT_SRC})
target_include_directories(asmjit PUBLIC ${ASMJIT_DIR}/src)
target_link_libraries(asmjit PRIVATE ${ASMJIT_DEPS})
target_compile_options(asmjit PRIVATE -Wno-nontrivial-memcall -Wno-deprecated-anon-enum-enum-conversion)
# ASMJIT should have a option for disabling installing and this wouldnt
# be required to avoid installing ASMJIT...

View file

@ -10,6 +10,11 @@ set(USE_SANITIZERS FALSE CACHE BOOL "Dont't use sanitizers")
add_subdirectory(cubeb EXCLUDE_FROM_ALL)
add_library(3rdparty::cubeb ALIAS cubeb)
target_compile_options(cubeb PRIVATE
-Wno-int-to-void-pointer-cast
-Wno-deprecated-declarations
-Wno-implicit-const-int-float-conversion
)
if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm|ARM|aarch64|AArch64|Aarch64)")
target_compile_definitions(speex PUBLIC

View file

@ -33,6 +33,13 @@ if (${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
)
elseif(MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
if (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
append_compiler_flags(
-Wno-unused-value
-Wno-pragma-pack
${ADDITIONAL_CC_FLAGS}
)
endif()
endif()
check_include_files(sys/timerfd.h USBI_TIMERFD_AVAILABLE)

View file

@ -12,5 +12,6 @@ set(YAML_CPP_BUILD_TESTS OFF CACHE BOOL "Enable testing" FORCE)
set(YAML_CPP_BUILD_TOOLS OFF CACHE BOOL "Enable parse tools" FORCE)
set(YAML_CPP_BUILD_CONTRIB OFF CACHE BOOL "Enable contrib stuff in library" FORCE)
add_subdirectory(yaml-cpp EXCLUDE_FROM_ALL)
target_compile_options(yaml-cpp PRIVATE -Wno-ignored-attributes -Wno-unused-value)
set(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX_OLD})

View file

@ -5,8 +5,7 @@ if(MSVC)
check_cxx_compiler_flag("-msse -msse2 -mcx16" COMPILER_X86)
check_cxx_compiler_flag("-march=native" COMPILER_SUPPORTS_MARCH_NATIVE)
if (COMPILER_X86)
#add_compile_options(-msse -msse2 -mcx16 -mavx512f -mavx512vbmi -mavx512vl -mavx512dq -mavx512vpopcntdq -mavx -mavx2 -maes -mrtm -mpclmul -mmwaitx -mwaitpkg)
add_compile_options(-maes -mrtm -mpclmul -mmwaitx -mwaitpkg)
add_compile_options(-msse -msse2 -mcx16)
endif()
if(COMPILER_SUPPORTS_MARCH_NATIVE)
add_compile_options(-march=native)

View file

@ -35,6 +35,9 @@
#if defined(_MSC_VER) && defined(_M_X64)
#define POLARSSL_HAVE_MSVC_X64_INTRINSICS
#include <intrin.h>
#ifdef __clang__
#include <immintrin.h>
#endif
#endif
/*

View file

@ -171,7 +171,7 @@ namespace vm
auto stamp0 = utils::get_tsc(), stamp1 = stamp0, stamp2 = stamp0;
#ifndef _MSC_VER
#if !defined(_MSC_VER) || (defined(__clang__) && defined(_MSC_VER))
__asm__ goto ("xbegin %l[stage2];" ::: "memory" : stage2);
#else
status = _xbegin();
@ -180,7 +180,7 @@ namespace vm
{
if (res & rsrv_unique_lock)
{
#ifndef _MSC_VER
#if !defined(_MSC_VER) || (defined(__clang__) && defined(_MSC_VER))
__asm__ volatile ("xend; mov $-1, %%eax;" ::: "memory");
#else
_xend();
@ -192,7 +192,7 @@ namespace vm
{
std::invoke(op, *sptr);
const u64 old_time = res.fetch_add(128);
#ifndef _MSC_VER
#if !defined(_MSC_VER) || (defined(__clang__) && defined(_MSC_VER))
__asm__ volatile ("xend;" ::: "memory");
#else
_xend();
@ -206,7 +206,7 @@ namespace vm
if (auto result = std::invoke(op, *sptr))
{
const u64 old_time = res.fetch_add(128);
#ifndef _MSC_VER
#if !defined(_MSC_VER) || (defined(__clang__) && defined(_MSC_VER))
__asm__ volatile ("xend;" ::: "memory");
#else
_xend();
@ -247,7 +247,7 @@ namespace vm
break;
}
#ifndef _MSC_VER
#if !defined(_MSC_VER) || (defined(__clang__) && defined(_MSC_VER))
__asm__ goto ("xbegin %l[retry];" ::: "memory" : retry);
#else
status = _xbegin();
@ -260,7 +260,7 @@ namespace vm
if constexpr (std::is_void_v<std::invoke_result_t<F, T&>>)
{
std::invoke(op, *sptr);
#ifndef _MSC_VER
#if !defined(_MSC_VER) || (defined(__clang__) && defined(_MSC_VER))
__asm__ volatile ("xend;" ::: "memory");
#else
_xend();
@ -274,7 +274,7 @@ namespace vm
{
if (auto result = std::invoke(op, *sptr))
{
#ifndef _MSC_VER
#if !defined(_MSC_VER) || (defined(__clang__) && defined(_MSC_VER))
__asm__ volatile ("xend;" ::: "memory");
#else
_xend();
@ -286,7 +286,7 @@ namespace vm
}
else
{
#ifndef _MSC_VER
#if !defined(_MSC_VER) || (defined(__clang__) && defined(_MSC_VER))
__asm__ volatile ("xend;" ::: "memory");
#else
_xend();

View file

@ -19,7 +19,7 @@
#include "Emu/CPU/sse2neon.h"
#endif
#if defined(_MSC_VER) || !defined(__SSE2__)
#if defined(_MSC_VER) && !defined(__clang__) || !defined(__SSE2__)
#define SSE4_1_FUNC
#define AVX2_FUNC
#define AVX3_FUNC

View file

@ -23,7 +23,6 @@
#endif
#endif
//#ifdef _MSC_VER
#if defined(_MSC_VER) && !defined(__clang__)
#define AVX512_ICL_FUNC
#else
@ -33,8 +32,7 @@
using namespace program_hash_util;
//#ifdef ARCH_X64
#if defined(ARCH_X64) && !(defined(__clang__) && defined(_MSC_VER))
#ifdef ARCH_X64
AVX512_ICL_FUNC usz get_vertex_program_ucode_hash_512(const RSXVertexProgram &program)
{
// Load all elements of the instruction_mask bitset
@ -426,8 +424,7 @@ vertex_program_utils::vertex_program_metadata vertex_program_utils::analyse_vert
usz vertex_program_storage_hash::operator()(const RSXVertexProgram &program) const
{
//#ifdef ARCH_X64
#if defined(ARCH_X64) && !(defined(__clang__) && defined(_MSC_VER))
#ifdef ARCH_X64
usz ucode_hash;
if (utils::has_avx512_icl())
@ -452,8 +449,7 @@ usz vertex_program_storage_hash::operator()(const RSXVertexProgram &program) con
return rpcs3::hash64(ucode_hash, metadata_hash);
}
//#ifdef ARCH_X64
#if defined(ARCH_X64) && !(defined(__clang__) && defined(_MSC_VER))
#ifdef ARCH_X64
AVX512_ICL_FUNC bool vertex_program_compare_512(const RSXVertexProgram &binary1, const RSXVertexProgram &binary2)
{
// Load all elements of the instruction_mask bitset
@ -544,8 +540,7 @@ bool vertex_program_compare::operator()(const RSXVertexProgram &binary1, const R
return false;
}
//#ifdef ARCH_X64
#if defined(ARCH_X64) && !(defined(__clang__) && defined(_MSC_VER))
#ifdef ARCH_X64
if (utils::has_avx512_icl())
{
return vertex_program_compare_512(binary1, binary2);

View file

@ -46,7 +46,7 @@ namespace utils
for (auto stamp0 = get_tsc(), stamp1 = stamp0; g_use_rtm && stamp1 - stamp0 <= g_rtm_tx_limit1; stamp1 = get_tsc())
{
#ifndef _MSC_VER
#if !defined(_MSC_VER) || (defined(__clang__) && defined(_MSC_VER))
__asm__ goto ("xbegin %l[retry];" ::: "memory" : retry);
#else
status = _xbegin();
@ -60,7 +60,7 @@ namespace utils
if constexpr (std::is_void_v<R>)
{
std::invoke(op);
#ifndef _MSC_VER
#if !defined(_MSC_VER) || (defined(__clang__) && defined(_MSC_VER))
__asm__ volatile ("xend;" ::: "memory");
#else
_xend();
@ -70,7 +70,7 @@ namespace utils
else
{
auto result = std::invoke(op);
#ifndef _MSC_VER
#if !defined(_MSC_VER) || (defined(__clang__) && defined(_MSC_VER))
__asm__ volatile ("xend;" ::: "memory");
#else
_xend();

View file

@ -46,7 +46,7 @@ static inline std::array<u32, 4> get_cpuid(u32 func, u32 subfunc)
static inline u64 get_xgetbv(u32 xcr)
{
#ifdef _MSC_VER
#if defined(_MSC_VER) && !defined(__clang__)
return _xgetbv(xcr);
#else
u32 eax, edx;

24
vcpkg.json Normal file
View file

@ -0,0 +1,24 @@
{
"name": "rpcs3",
"version-string": "1.0",
"builtin-baseline": "b94ab47c998b93fe72b0f501eaac70f96328019e",
"dependencies": [
{
"name": "ffmpeg",
"features": [
"avcodec",
"avformat",
"swscale",
"swresample"
]
},
"libpng",
"opencv",
"qtbase",
"qtmultimedia",
"qtsvg",
"qttools",
"vulkan",
"zlib"
]
}