summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.ci/templates/build-msvc.yml2
-rw-r--r--.github/workflows/verify.yml2
-rw-r--r--CMakeLists.txt23
-rw-r--r--src/audio_core/renderer/effect/effect_info_base.h8
-rw-r--r--src/common/threadsafe_queue.h2
-rw-r--r--src/core/hle/service/service.cpp7
-rw-r--r--src/video_core/renderer_opengl/gl_shader_util.cpp1
-rw-r--r--src/yuzu/loading_screen.cpp4
-rw-r--r--vcpkg.json13
9 files changed, 43 insertions, 19 deletions
diff --git a/.ci/templates/build-msvc.yml b/.ci/templates/build-msvc.yml
index dfb5862c3..2a1bf93bc 100644
--- a/.ci/templates/build-msvc.yml
+++ b/.ci/templates/build-msvc.yml
@@ -9,7 +9,7 @@ parameters:
steps:
- script: choco install vulkan-sdk
displayName: 'Install vulkan-sdk'
-- script: refreshenv && mkdir build && cd build && cmake -G "Visual Studio 16 2019" -A x64 -DYUZU_USE_BUNDLED_QT=1 -DYUZU_USE_BUNDLED_SDL2=1 -DYUZU_USE_QT_WEB_ENGINE=ON -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DYUZU_ENABLE_COMPATIBILITY_REPORTING=${COMPAT} -DYUZU_TESTS=OFF -DUSE_DISCORD_PRESENCE=ON -DENABLE_QT_TRANSLATION=ON -DDISPLAY_VERSION=${{ parameters['version'] }} -DCMAKE_BUILD_TYPE=Release -DYUZU_TESTS=OFF -DYUZU_USE_BUNDLED_VCPKG=ON .. && cd ..
+- script: refreshenv && mkdir build && cd build && cmake -G "Visual Studio 16 2019" -A x64 -DYUZU_USE_BUNDLED_QT=1 -DYUZU_USE_BUNDLED_SDL2=1 -DYUZU_USE_QT_WEB_ENGINE=ON -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DYUZU_ENABLE_COMPATIBILITY_REPORTING=${COMPAT} -DYUZU_TESTS=OFF -DUSE_DISCORD_PRESENCE=ON -DENABLE_QT_TRANSLATION=ON -DDISPLAY_VERSION=${{ parameters['version'] }} -DCMAKE_BUILD_TYPE=Release .. && cd ..
displayName: 'Configure CMake'
- task: MSBuild@1
displayName: 'Build'
diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml
index 18cefe325..b753f1764 100644
--- a/.github/workflows/verify.yml
+++ b/.github/workflows/verify.yml
@@ -104,7 +104,7 @@ jobs:
run: |
glslangValidator --version
mkdir build
- cmake . -B build -GNinja -DCMAKE_TOOLCHAIN_FILE="CMakeModules/MSVCCache.cmake" -DUSE_CCACHE=ON -DYUZU_USE_BUNDLED_QT=1 -DYUZU_USE_BUNDLED_SDL2=1 -DYUZU_USE_QT_WEB_ENGINE=ON -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DYUZU_ENABLE_COMPATIBILITY_REPORTING=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_QT_TRANSLATION=ON -DCMAKE_BUILD_TYPE=Release -DGIT_BRANCH=pr-verify -DCLANG_FORMAT_SUFFIX=discordplzdontclang -DYUZU_TESTS=OFF -DYUZU_USE_BUNDLED_VCPKG=ON
+ cmake . -B build -GNinja -DCMAKE_TOOLCHAIN_FILE="CMakeModules/MSVCCache.cmake" -DUSE_CCACHE=ON -DYUZU_USE_BUNDLED_QT=1 -DYUZU_USE_BUNDLED_SDL2=1 -DYUZU_USE_QT_WEB_ENGINE=ON -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DYUZU_ENABLE_COMPATIBILITY_REPORTING=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_QT_TRANSLATION=ON -DCMAKE_BUILD_TYPE=Release -DGIT_BRANCH=pr-verify -DCLANG_FORMAT_SUFFIX=discordplzdontclang
- name: Build
run: cmake --build build
- name: Cache Summary
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d35ccb696..5f508d61a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,9 +38,13 @@ option(YUZU_USE_BUNDLED_OPUS "Compile bundled opus" ON)
option(YUZU_TESTS "Compile tests" ON)
-option(YUZU_USE_BUNDLED_VCPKG "Use vcpkg for yuzu dependencies" OFF)
+option(YUZU_USE_BUNDLED_VCPKG "Use vcpkg for yuzu dependencies" "${MSVC}")
if (YUZU_USE_BUNDLED_VCPKG)
+ if (YUZU_TESTS)
+ list(APPEND VCPKG_MANIFEST_FEATURES "yuzu-tests")
+ endif()
+
include(${CMAKE_SOURCE_DIR}/externals/vcpkg/scripts/buildsystems/vcpkg.cmake)
elseif(NOT "$ENV{VCPKG_TOOLCHAIN_FILE}" STREQUAL "")
# Disable manifest mode (use vcpkg classic mode) when using a custom vcpkg installation
@@ -160,7 +164,6 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
# =======================================================================
find_package(fmt 8.0.1 REQUIRED CONFIG)
-find_package(lz4 1.8 REQUIRED)
find_package(nlohmann_json 3.8 REQUIRED CONFIG)
find_package(ZLIB 1.2 REQUIRED)
@@ -170,6 +173,12 @@ if (NOT zstd_FOUND)
find_package(zstd 1.5 REQUIRED)
endif()
+# lz4 1.8 is required, but vcpkg's lz4-config.cmake does not have version info
+find_package(lz4 CONFIG)
+if (NOT lz4_FOUND)
+ find_package(lz4 1.8 REQUIRED)
+endif()
+
if (YUZU_TESTS)
find_package(Catch2 2.13.7 REQUIRED CONFIG)
endif()
@@ -355,16 +364,10 @@ if (ENABLE_SDL2)
endif()
endif()
-# TODO(lat9nq): Determine what if any of this we still need
-#
-# Reexport some targets that are named differently when using the upstream CmakeConfig vs the generated Conan config
+# Reexport some targets that are named differently when using the upstream CmakeConfig
# In order to ALIAS targets to a new name, they first need to be IMPORTED_GLOBAL
# Dynarmic checks for target `boost` and so we want to make sure it can find it through our system instead of using their external
-if (TARGET Boost::Boost)
- set_target_properties(Boost::Boost PROPERTIES IMPORTED_GLOBAL TRUE)
- add_library(Boost::boost ALIAS Boost::Boost)
- add_library(boost ALIAS Boost::Boost)
-elseif (TARGET Boost::boost)
+if (TARGET Boost::boost)
set_target_properties(Boost::boost PROPERTIES IMPORTED_GLOBAL TRUE)
add_library(boost ALIAS Boost::boost)
endif()
diff --git a/src/audio_core/renderer/effect/effect_info_base.h b/src/audio_core/renderer/effect/effect_info_base.h
index 43d0589cc..8c9583878 100644
--- a/src/audio_core/renderer/effect/effect_info_base.h
+++ b/src/audio_core/renderer/effect/effect_info_base.h
@@ -419,13 +419,13 @@ protected:
/// Workbuffers assigned to this effect
std::array<AddressInfo, 2> workbuffers{AddressInfo(CpuAddr(0), 0), AddressInfo(CpuAddr(0), 0)};
/// Aux/Capture buffer info for reading
- CpuAddr send_buffer_info;
+ CpuAddr send_buffer_info{};
/// Aux/Capture buffer for reading
- CpuAddr send_buffer;
+ CpuAddr send_buffer{};
/// Aux/Capture buffer info for writing
- CpuAddr return_buffer_info;
+ CpuAddr return_buffer_info{};
/// Aux/Capture buffer for writing
- CpuAddr return_buffer;
+ CpuAddr return_buffer{};
/// Parameters of this effect
std::array<u8, sizeof(InParameterVersion2)> parameter{};
/// State of this effect used by the AudioRenderer across calls
diff --git a/src/common/threadsafe_queue.h b/src/common/threadsafe_queue.h
index f7ae9d8c2..053798e79 100644
--- a/src/common/threadsafe_queue.h
+++ b/src/common/threadsafe_queue.h
@@ -39,7 +39,7 @@ public:
template <typename Arg>
void Push(Arg&& t) {
// create the element, add it to the queue
- write_ptr->current = std::forward<Arg>(t);
+ write_ptr->current = std::move(t);
// set the next pointer to a new element ptr
// then advance the write pointer
ElementPtr* new_ptr = new ElementPtr();
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp
index c64291e7f..dadaf897f 100644
--- a/src/core/hle/service/service.cpp
+++ b/src/core/hle/service/service.cpp
@@ -194,13 +194,16 @@ Result ServiceFrameworkBase::HandleSyncRequest(Kernel::KServerSession& session,
Kernel::HLERequestContext& ctx) {
const auto guard = LockService();
+ Result result = ResultSuccess;
+
switch (ctx.GetCommandType()) {
case IPC::CommandType::Close:
case IPC::CommandType::TIPC_Close: {
session.Close();
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(ResultSuccess);
- return IPC::ERR_REMOTE_PROCESS_DEAD;
+ result = IPC::ERR_REMOTE_PROCESS_DEAD;
+ break;
}
case IPC::CommandType::ControlWithContext:
case IPC::CommandType::Control: {
@@ -227,7 +230,7 @@ Result ServiceFrameworkBase::HandleSyncRequest(Kernel::KServerSession& session,
ctx.WriteToOutgoingCommandBuffer(ctx.GetThread());
}
- return ResultSuccess;
+ return result;
}
/// Initialize Services
diff --git a/src/video_core/renderer_opengl/gl_shader_util.cpp b/src/video_core/renderer_opengl/gl_shader_util.cpp
index f83ad0a5b..a0d9d10ef 100644
--- a/src/video_core/renderer_opengl/gl_shader_util.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_util.cpp
@@ -17,6 +17,7 @@ static OGLProgram LinkSeparableProgram(GLuint shader) {
glProgramParameteri(program.handle, GL_PROGRAM_SEPARABLE, GL_TRUE);
glAttachShader(program.handle, shader);
glLinkProgram(program.handle);
+ glDetachShader(program.handle, shader);
if (!Settings::values.renderer_debug) {
return program;
}
diff --git a/src/yuzu/loading_screen.cpp b/src/yuzu/loading_screen.cpp
index e273744fd..e263a07a7 100644
--- a/src/yuzu/loading_screen.cpp
+++ b/src/yuzu/loading_screen.cpp
@@ -147,6 +147,10 @@ void LoadingScreen::OnLoadProgress(VideoCore::LoadCallbackStage stage, std::size
ui->progress_bar->setMaximum(static_cast<int>(total));
previous_total = total;
}
+ // Reset the progress bar ranges if compilation is done
+ if (stage == VideoCore::LoadCallbackStage::Complete) {
+ ui->progress_bar->setRange(0, 0);
+ }
QString estimate;
// If theres a drastic slowdown in the rate, then display an estimate
diff --git a/vcpkg.json b/vcpkg.json
index 8d3c5919a..b247f7386 100644
--- a/vcpkg.json
+++ b/vcpkg.json
@@ -1,6 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json",
"name": "yuzu",
+ "builtin-baseline": "cef0b3ec767df6e83806899fe9525f6cf8d7bc91",
"version": "1.0",
"dependencies": [
"boost-algorithm",
@@ -25,5 +26,17 @@
"nlohmann-json",
"zlib",
"zstd"
+ ],
+ "features": {
+ "yuzu-tests": {
+ "description": "Compile tests",
+ "dependencies": [ "catch2" ]
+ }
+ },
+ "overrides": [
+ {
+ "name": "catch2",
+ "version": "2.13.9"
+ }
]
}