diff options
| -rwxr-xr-x | .ci/scripts/clang/docker.sh | 12 | ||||
| -rw-r--r-- | .ci/scripts/linux/exec.sh | 7 | ||||
| -rwxr-xr-x | .ci/scripts/transifex/docker.sh | 5 | ||||
| -rwxr-xr-x | .ci/scripts/windows/docker.sh | 5 | ||||
| -rw-r--r-- | .ci/scripts/windows/upload.ps1 | 50 | ||||
| -rw-r--r-- | .ci/templates/build-msvc.yml | 4 | ||||
| -rw-r--r-- | .github/workflows/verify.yml | 10 | ||||
| -rw-r--r-- | .gitmodules | 7 | ||||
| -rw-r--r-- | CMakeLists.txt | 176 | ||||
| -rw-r--r-- | CMakeModules/CopyYuzuQt5Deps.cmake | 10 | ||||
| m--------- | externals/vcpkg | 0 | ||||
| -rw-r--r-- | src/common/CMakeLists.txt | 5 | ||||
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_blit_screen.cpp | 13 | ||||
| -rw-r--r-- | vcpkg.json | 29 |
14 files changed, 160 insertions, 173 deletions
diff --git a/.ci/scripts/clang/docker.sh b/.ci/scripts/clang/docker.sh index 94a9ca0ec..db736f72b 100755 --- a/.ci/scripts/clang/docker.sh +++ b/.ci/scripts/clang/docker.sh | |||
| @@ -6,7 +6,17 @@ set -e | |||
| 6 | ccache -s | 6 | ccache -s |
| 7 | 7 | ||
| 8 | mkdir build || true && cd build | 8 | mkdir build || true && cd build |
| 9 | cmake .. -GNinja -DDISPLAY_VERSION=$1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/lib/ccache/clang -DCMAKE_CXX_COMPILER=/usr/lib/ccache/clang++ -DYUZU_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_QT_TRANSLATION=ON -DCMAKE_INSTALL_PREFIX="/usr" | 9 | cmake .. \ |
| 10 | -DCMAKE_BUILD_TYPE=Release \ | ||
| 11 | -DCMAKE_CXX_COMPILER=/usr/lib/ccache/clang++ \ | ||
| 12 | -DCMAKE_C_COMPILER=/usr/lib/ccache/clang \ | ||
| 13 | -DCMAKE_INSTALL_PREFIX="/usr" \ | ||
| 14 | -DDISPLAY_VERSION=$1 \ | ||
| 15 | -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON \ | ||
| 16 | -DENABLE_QT_TRANSLATION=ON \ | ||
| 17 | -DUSE_DISCORD_PRESENCE=ON \ | ||
| 18 | -DYUZU_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} \ | ||
| 19 | -GNinja | ||
| 10 | 20 | ||
| 11 | ninja | 21 | ninja |
| 12 | 22 | ||
diff --git a/.ci/scripts/linux/exec.sh b/.ci/scripts/linux/exec.sh index fc4594d65..78e8aeabf 100644 --- a/.ci/scripts/linux/exec.sh +++ b/.ci/scripts/linux/exec.sh | |||
| @@ -4,5 +4,10 @@ mkdir -p "ccache" || true | |||
| 4 | chmod a+x ./.ci/scripts/linux/docker.sh | 4 | chmod a+x ./.ci/scripts/linux/docker.sh |
| 5 | # the UID for the container yuzu user is 1027 | 5 | # the UID for the container yuzu user is 1027 |
| 6 | sudo chown -R 1027 ./ | 6 | sudo chown -R 1027 ./ |
| 7 | docker run -e ENABLE_COMPATIBILITY_REPORTING -e CCACHE_DIR=/yuzu/ccache -v "$(pwd):/yuzu" -w /yuzu yuzuemu/build-environments:linux-fresh /bin/bash /yuzu/.ci/scripts/linux/docker.sh "$1" | 7 | |
| 8 | # The environment variables listed below: | ||
| 9 | # AZURECIREPO TITLEBARFORMATIDLE TITLEBARFORMATRUNNING DISPLAYVERSION | ||
| 10 | # are requested in src/common/CMakeLists.txt and appear to be provided somewhere in Azure DevOps | ||
| 11 | |||
| 12 | docker run -e AZURECIREPO -e TITLEBARFORMATIDLE -e TITLEBARFORMATRUNNING -e DISPLAYVERSION -e ENABLE_COMPATIBILITY_REPORTING -e CCACHE_DIR=/yuzu/ccache -v "$(pwd):/yuzu" -w /yuzu yuzuemu/build-environments:linux-fresh /bin/bash /yuzu/.ci/scripts/linux/docker.sh "$1" | ||
| 8 | sudo chown -R $UID ./ | 13 | sudo chown -R $UID ./ |
diff --git a/.ci/scripts/transifex/docker.sh b/.ci/scripts/transifex/docker.sh index bafd326f9..05e1a98f5 100755 --- a/.ci/scripts/transifex/docker.sh +++ b/.ci/scripts/transifex/docker.sh | |||
| @@ -16,8 +16,11 @@ cmake --version | |||
| 16 | gcc -v | 16 | gcc -v |
| 17 | tx --version | 17 | tx --version |
| 18 | 18 | ||
| 19 | # vcpkg needs these: curl zip unzip tar, have tar | ||
| 20 | apt-get install -y curl zip unzip | ||
| 21 | |||
| 19 | mkdir build && cd build | 22 | mkdir build && cd build |
| 20 | cmake .. -DENABLE_QT_TRANSLATION=ON -DGENERATE_QT_TRANSLATION=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_SDL2=OFF | 23 | cmake .. -DENABLE_QT_TRANSLATION=ON -DGENERATE_QT_TRANSLATION=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_SDL2=OFF -DYUZU_TESTS=OFF -DYUZU_USE_BUNDLED_VCPKG=ON |
| 21 | make translation | 24 | make translation |
| 22 | cd .. | 25 | cd .. |
| 23 | 26 | ||
diff --git a/.ci/scripts/windows/docker.sh b/.ci/scripts/windows/docker.sh index 5bd5f0b6b..9f34530d6 100755 --- a/.ci/scripts/windows/docker.sh +++ b/.ci/scripts/windows/docker.sh | |||
| @@ -6,10 +6,6 @@ set -e | |||
| 6 | 6 | ||
| 7 | ccache -sv | 7 | ccache -sv |
| 8 | 8 | ||
| 9 | mkdir -p "$HOME/.conan/profiles" | ||
| 10 | wget -c "https://github.com/yuzu-emu/build-environments/raw/master/linux-mingw/default" -O "$HOME/.conan/profiles/default" | ||
| 11 | wget -c "https://github.com/yuzu-emu/build-environments/raw/master/linux-mingw/settings.yml" -O "$HOME/.conan/settings.yml" | ||
| 12 | |||
| 13 | mkdir -p build && cd build | 9 | mkdir -p build && cd build |
| 14 | export LDFLAGS="-fuse-ld=lld" | 10 | export LDFLAGS="-fuse-ld=lld" |
| 15 | # -femulated-tls required due to an incompatibility between GCC and Clang | 11 | # -femulated-tls required due to an incompatibility between GCC and Clang |
| @@ -24,6 +20,7 @@ cmake .. \ | |||
| 24 | -DUSE_CCACHE=ON \ | 20 | -DUSE_CCACHE=ON \ |
| 25 | -DYUZU_USE_BUNDLED_SDL2=OFF \ | 21 | -DYUZU_USE_BUNDLED_SDL2=OFF \ |
| 26 | -DYUZU_USE_EXTERNAL_SDL2=OFF \ | 22 | -DYUZU_USE_EXTERNAL_SDL2=OFF \ |
| 23 | -DYUZU_TESTS=OFF \ | ||
| 27 | -GNinja | 24 | -GNinja |
| 28 | ninja yuzu yuzu-cmd | 25 | ninja yuzu yuzu-cmd |
| 29 | 26 | ||
diff --git a/.ci/scripts/windows/upload.ps1 b/.ci/scripts/windows/upload.ps1 index 62483607b..ac2a38f1d 100644 --- a/.ci/scripts/windows/upload.ps1 +++ b/.ci/scripts/windows/upload.ps1 | |||
| @@ -25,6 +25,9 @@ $env:BUILD_UPDATE = $MSVC_SEVENZIP | |||
| 25 | 25 | ||
| 26 | $BUILD_DIR = ".\build\bin\Release" | 26 | $BUILD_DIR = ".\build\bin\Release" |
| 27 | 27 | ||
| 28 | # Cleanup unneeded data in submodules | ||
| 29 | git submodule foreach git clean -fxd | ||
| 30 | |||
| 28 | # Upload debugging symbols | 31 | # Upload debugging symbols |
| 29 | mkdir pdb | 32 | mkdir pdb |
| 30 | Get-ChildItem "$BUILD_DIR\" -Recurse -Filter "*.pdb" | Copy-Item -destination .\pdb | 33 | Get-ChildItem "$BUILD_DIR\" -Recurse -Filter "*.pdb" | Copy-Item -destination .\pdb |
| @@ -47,6 +50,49 @@ Copy-Item .\CMakeModules -Recurse -Destination $MSVC_SOURCE | |||
| 47 | 7z a -r -ttar $MSVC_SOURCE_TAR $MSVC_SOURCE | 50 | 7z a -r -ttar $MSVC_SOURCE_TAR $MSVC_SOURCE |
| 48 | 7z a -r -txz $MSVC_SOURCE_TARXZ $MSVC_SOURCE_TAR | 51 | 7z a -r -txz $MSVC_SOURCE_TARXZ $MSVC_SOURCE_TAR |
| 49 | 52 | ||
| 53 | # Following section is quick hack to package artifacts differently for GitHub Actions | ||
| 54 | if ("$env:GITHUB_ACTIONS" -eq "true") { | ||
| 55 | echo "Hello GitHub Actions" | ||
| 56 | |||
| 57 | # Hopefully there is an exe in either .\build\bin or .\build\bin\Release | ||
| 58 | cp .\build\bin\yuzu*.exe .\artifacts\ | ||
| 59 | Copy-Item "$BUILD_DIR\*" -Destination "artifacts" -Recurse | ||
| 60 | Remove-Item .\artifacts\tests.exe -ErrorAction ignore | ||
| 61 | |||
| 62 | # None of the other GHA builds are including source, so commenting out today | ||
| 63 | #Copy-Item $MSVC_SOURCE_TARXZ -Destination "artifacts" | ||
| 64 | |||
| 65 | # Are debug symbols important? | ||
| 66 | # cp .\build\bin\yuzu*.pdb .\pdb\ | ||
| 67 | |||
| 68 | # Write out a tag BUILD_TAG to environment for the Upload step | ||
| 69 | # We're getting ${{ github.event.number }} as $env:PR_NUMBER" | ||
| 70 | echo "env:PR_NUMBER: $env:PR_NUMBER" | ||
| 71 | if (Test-Path env:PR_NUMBER) { | ||
| 72 | $PR_NUMBER = $env:PR_NUMBER.Substring(2) -as [int] | ||
| 73 | $PR_NUMBER_TAG = "pr"+([string]$PR_NUMBER).PadLeft(5,'0') | ||
| 74 | if ($PR_NUMBER -gt 1){ | ||
| 75 | $BUILD_TAG="verify-$PR_NUMBER_TAG-$GITDATE-$GITREV" | ||
| 76 | } else { | ||
| 77 | $BUILD_TAG = "verify-$GITDATE-$GITREV" | ||
| 78 | } | ||
| 79 | } else { | ||
| 80 | # If env:PR_NUMBER isn't set, we should still write out a variable | ||
| 81 | $BUILD_TAG = "verify-$GITDATE-$GITREV" | ||
| 82 | } | ||
| 83 | echo "BUILD_TAG=$BUILD_TAG" | ||
| 84 | echo "BUILD_TAG=$BUILD_TAG" >> $env:GITHUB_ENV | ||
| 85 | |||
| 86 | # For extra job, just the exe | ||
| 87 | $INDIVIDUAL_EXE = "yuzu-msvc-$BUILD_TAG.exe" | ||
| 88 | echo "INDIVIDUAL_EXE=$INDIVIDUAL_EXE" | ||
| 89 | echo "INDIVIDUAL_EXE=$INDIVIDUAL_EXE" >> $env:GITHUB_ENV | ||
| 90 | echo "Just the exe: $INDIVIDUAL_EXE" | ||
| 91 | cp .\artifacts\yuzu.exe .\$INDIVIDUAL_EXE | ||
| 92 | |||
| 93 | |||
| 94 | } else { | ||
| 95 | |||
| 50 | # Build the final release artifacts | 96 | # Build the final release artifacts |
| 51 | Copy-Item $MSVC_SOURCE_TARXZ -Destination $RELEASE_DIST | 97 | Copy-Item $MSVC_SOURCE_TARXZ -Destination $RELEASE_DIST |
| 52 | Copy-Item "$BUILD_DIR\*" -Destination $RELEASE_DIST -Recurse | 98 | Copy-Item "$BUILD_DIR\*" -Destination $RELEASE_DIST -Recurse |
| @@ -62,3 +108,7 @@ Get-ChildItem "$BUILD_DIR" -Recurse -Filter "QtWebEngineProcess*.exe" | Copy-Ite | |||
| 62 | Get-ChildItem . -Filter "*.zip" | Copy-Item -destination "artifacts" | 108 | Get-ChildItem . -Filter "*.zip" | Copy-Item -destination "artifacts" |
| 63 | Get-ChildItem . -Filter "*.7z" | Copy-Item -destination "artifacts" | 109 | Get-ChildItem . -Filter "*.7z" | Copy-Item -destination "artifacts" |
| 64 | Get-ChildItem . -Filter "*.tar.xz" | Copy-Item -destination "artifacts" | 110 | Get-ChildItem . -Filter "*.tar.xz" | Copy-Item -destination "artifacts" |
| 111 | } | ||
| 112 | # Extra items | ||
| 113 | git status | ||
| 114 | cp .\build\src\common\scm_rev.cpp .\artifacts | ||
diff --git a/.ci/templates/build-msvc.yml b/.ci/templates/build-msvc.yml index cca3189fa..5d2e86179 100644 --- a/.ci/templates/build-msvc.yml +++ b/.ci/templates/build-msvc.yml | |||
| @@ -6,9 +6,7 @@ parameters: | |||
| 6 | steps: | 6 | steps: |
| 7 | - script: choco install vulkan-sdk | 7 | - script: choco install vulkan-sdk |
| 8 | displayName: 'Install vulkan-sdk' | 8 | displayName: 'Install vulkan-sdk' |
| 9 | - script: python -m pip install --upgrade pip conan | 9 | - script: refreshenv && mkdir build && cd build && cmake -G "Visual Studio 17 2022" -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 .. |
| 10 | displayName: 'Install conan' | ||
| 11 | - script: refreshenv && mkdir build && cd build && cmake -G "Visual Studio 17 2022" -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 .. | ||
| 12 | displayName: 'Configure CMake' | 10 | displayName: 'Configure CMake' |
| 13 | - task: MSBuild@1 | 11 | - task: MSBuild@1 |
| 14 | displayName: 'Build' | 12 | displayName: 'Build' |
diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index c1886b9f3..887220441 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml | |||
| @@ -3,6 +3,8 @@ name: 'yuzu verify' | |||
| 3 | on: | 3 | on: |
| 4 | pull_request: | 4 | pull_request: |
| 5 | branches: [ master ] | 5 | branches: [ master ] |
| 6 | env: | ||
| 7 | PR_NUMBER: pr${{ github.event.number }} | ||
| 6 | 8 | ||
| 7 | jobs: | 9 | jobs: |
| 8 | format: | 10 | format: |
| @@ -80,7 +82,6 @@ jobs: | |||
| 80 | shell: cmd | 82 | shell: cmd |
| 81 | run: | | 83 | run: | |
| 82 | choco install vulkan-sdk wget | 84 | choco install vulkan-sdk wget |
| 83 | python -m pip install --upgrade pip conan | ||
| 84 | call refreshenv | 85 | call refreshenv |
| 85 | wget https://github.com/mbitsnbites/buildcache/releases/download/v0.27.6/buildcache-windows.zip | 86 | wget https://github.com/mbitsnbites/buildcache/releases/download/v0.27.6/buildcache-windows.zip |
| 86 | 7z x buildcache-windows.zip | 87 | 7z x buildcache-windows.zip |
| @@ -100,7 +101,7 @@ jobs: | |||
| 100 | run: | | 101 | run: | |
| 101 | glslangValidator --version | 102 | glslangValidator --version |
| 102 | mkdir build | 103 | mkdir build |
| 103 | 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 | 104 | 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 |
| 104 | - name: Build | 105 | - name: Build |
| 105 | run: cmake --build build | 106 | run: cmake --build build |
| 106 | - name: Cache Summary | 107 | - name: Cache Summary |
| @@ -113,3 +114,8 @@ jobs: | |||
| 113 | with: | 114 | with: |
| 114 | name: msvc | 115 | name: msvc |
| 115 | path: artifacts/ | 116 | path: artifacts/ |
| 117 | - name: Upload EXE | ||
| 118 | uses: actions/upload-artifact@v3 | ||
| 119 | with: | ||
| 120 | name: ${{ env.INDIVIDUAL_EXE }} | ||
| 121 | path: ${{ env.INDIVIDUAL_EXE }} | ||
diff --git a/.gitmodules b/.gitmodules index ed533f8d4..3c0d15951 100644 --- a/.gitmodules +++ b/.gitmodules | |||
| @@ -34,9 +34,12 @@ | |||
| 34 | [submodule "SDL"] | 34 | [submodule "SDL"] |
| 35 | path = externals/SDL | 35 | path = externals/SDL |
| 36 | url = https://github.com/libsdl-org/SDL.git | 36 | url = https://github.com/libsdl-org/SDL.git |
| 37 | [submodule "externals/cpp-httplib"] | 37 | [submodule "cpp-httplib"] |
| 38 | path = externals/cpp-httplib | 38 | path = externals/cpp-httplib |
| 39 | url = https://github.com/yhirose/cpp-httplib.git | 39 | url = https://github.com/yhirose/cpp-httplib.git |
| 40 | [submodule "externals/ffmpeg/ffmpeg"] | 40 | [submodule "ffmpeg"] |
| 41 | path = externals/ffmpeg/ffmpeg | 41 | path = externals/ffmpeg/ffmpeg |
| 42 | url = https://git.ffmpeg.org/ffmpeg.git | 42 | url = https://git.ffmpeg.org/ffmpeg.git |
| 43 | [submodule "vcpkg"] | ||
| 44 | path = externals/vcpkg | ||
| 45 | url = https://github.com/Microsoft/vcpkg.git | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt index 80a8d4ed8..3f7dcc924 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
| @@ -35,6 +35,16 @@ option(YUZU_USE_BUNDLED_OPUS "Compile bundled opus" ON) | |||
| 35 | 35 | ||
| 36 | option(YUZU_TESTS "Compile tests" ON) | 36 | option(YUZU_TESTS "Compile tests" ON) |
| 37 | 37 | ||
| 38 | option(YUZU_USE_BUNDLED_VCPKG "Use vcpkg for yuzu dependencies" OFF) | ||
| 39 | |||
| 40 | if (YUZU_USE_BUNDLED_VCPKG) | ||
| 41 | include(${CMAKE_SOURCE_DIR}/externals/vcpkg/scripts/buildsystems/vcpkg.cmake) | ||
| 42 | elseif(NOT "$ENV{VCPKG_TOOLCHAIN_FILE}" STREQUAL "") | ||
| 43 | # Disable manifest mode (use vcpkg classic mode) when using a custom vcpkg installation | ||
| 44 | option(VCPKG_MANIFEST_MODE "") | ||
| 45 | include("$ENV{VCPKG_TOOLCHAIN_FILE}") | ||
| 46 | endif() | ||
| 47 | |||
| 38 | # Default to a Release build | 48 | # Default to a Release build |
| 39 | get_property(IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) | 49 | get_property(IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) |
| 40 | if (NOT IS_MULTI_CONFIG AND NOT CMAKE_BUILD_TYPE) | 50 | if (NOT IS_MULTI_CONFIG AND NOT CMAKE_BUILD_TYPE) |
| @@ -144,82 +154,34 @@ endif() | |||
| 144 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) | 154 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) |
| 145 | 155 | ||
| 146 | # System imported libraries | 156 | # System imported libraries |
| 147 | # If not found, download any missing through Conan | ||
| 148 | # ======================================================================= | 157 | # ======================================================================= |
| 149 | set(CONAN_CMAKE_SILENT_OUTPUT TRUE) | ||
| 150 | set(CMAKE_FIND_PACKAGE_PREFER_CONFIG TRUE) | ||
| 151 | if (YUZU_CONAN_INSTALLED) | ||
| 152 | if (IS_MULTI_CONFIG) | ||
| 153 | include(${CMAKE_BINARY_DIR}/conanbuildinfo_multi.cmake) | ||
| 154 | else() | ||
| 155 | include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) | ||
| 156 | endif() | ||
| 157 | list(APPEND CMAKE_MODULE_PATH "${CMAKE_BINARY_DIR}") | ||
| 158 | list(APPEND CMAKE_PREFIX_PATH "${CMAKE_BINARY_DIR}") | ||
| 159 | conan_basic_setup() | ||
| 160 | message(STATUS "Adding conan installed libraries to the search path") | ||
| 161 | endif() | ||
| 162 | 158 | ||
| 163 | macro(yuzu_find_packages) | 159 | find_package(fmt 8.0.1 REQUIRED CONFIG) |
| 164 | set(options FORCE_REQUIRED) | 160 | find_package(lz4 1.8 REQUIRED) |
| 165 | cmake_parse_arguments(FN "${options}" "" "" ${ARGN}) | 161 | find_package(nlohmann_json 3.8 REQUIRED CONFIG) |
| 166 | 162 | find_package(ZLIB 1.2 REQUIRED) | |
| 167 | # Cmake has a *serious* lack of 2D array or associative array... | ||
| 168 | # Capitalization matters here. We need the naming to match the generated paths from Conan | ||
| 169 | set(REQUIRED_LIBS | ||
| 170 | # Cmake Pkg Prefix Version Conan Pkg | ||
| 171 | "fmt 8.0.1 fmt/8.1.1" | ||
| 172 | "lz4 1.8 lz4/1.9.2" | ||
| 173 | "nlohmann_json 3.8 nlohmann_json/3.8.0" | ||
| 174 | "ZLIB 1.2 zlib/1.2.11" | ||
| 175 | "zstd 1.5 zstd/1.5.0" | ||
| 176 | # can't use opus until AVX check is fixed: https://github.com/yuzu-emu/yuzu/pull/4068 | ||
| 177 | #"opus 1.3 opus/1.3.1" | ||
| 178 | ) | ||
| 179 | if (YUZU_TESTS) | ||
| 180 | list(APPEND REQUIRED_LIBS | ||
| 181 | "Catch2 2.13.7 catch2/2.13.7" | ||
| 182 | ) | ||
| 183 | endif() | ||
| 184 | 163 | ||
| 185 | foreach(PACKAGE ${REQUIRED_LIBS}) | 164 | # Search for config-only package first (for vcpkg), then try non-config |
| 186 | string(REGEX REPLACE "[ \t\r\n]+" ";" PACKAGE_SPLIT ${PACKAGE}) | 165 | find_package(zstd 1.5 CONFIG) |
| 187 | list(GET PACKAGE_SPLIT 0 PACKAGE_PREFIX) | 166 | if (NOT zstd_FOUND) |
| 188 | list(GET PACKAGE_SPLIT 1 PACKAGE_VERSION) | 167 | find_package(zstd 1.5 REQUIRED) |
| 189 | list(GET PACKAGE_SPLIT 2 PACKAGE_CONAN) | 168 | endif() |
| 190 | # This function is called twice, once to check if the packages exist on the system already | 169 | |
| 191 | # and a second time to check if conan installed them properly. The second check passes in FORCE_REQUIRED | 170 | if (YUZU_TESTS) |
| 192 | if (NOT ${PACKAGE_PREFIX}_FOUND) | 171 | find_package(Catch2 2.13.7 REQUIRED CONFIG) |
| 193 | if (FN_FORCE_REQUIRED) | 172 | endif() |
| 194 | find_package(${PACKAGE_PREFIX} ${PACKAGE_VERSION} REQUIRED) | ||
| 195 | else() | ||
| 196 | find_package(${PACKAGE_PREFIX} ${PACKAGE_VERSION}) | ||
| 197 | endif() | ||
| 198 | endif() | ||
| 199 | if (NOT ${PACKAGE_PREFIX}_FOUND) | ||
| 200 | list(APPEND CONAN_REQUIRED_LIBS ${PACKAGE_CONAN}) | ||
| 201 | else() | ||
| 202 | # Set a legacy findPackage.cmake style PACKAGE_LIBRARIES variable for subprojects that rely on this | ||
| 203 | set(${PACKAGE_PREFIX}_LIBRARIES "${PACKAGE_PREFIX}::${PACKAGE_PREFIX}") | ||
| 204 | endif() | ||
| 205 | endforeach() | ||
| 206 | unset(FN_FORCE_REQUIRED) | ||
| 207 | endmacro() | ||
| 208 | 173 | ||
| 209 | find_package(Boost 1.73.0 COMPONENTS context headers) | 174 | find_package(Boost 1.73.0 COMPONENTS context) |
| 210 | if (Boost_FOUND) | 175 | if (Boost_FOUND) |
| 211 | set(Boost_LIBRARIES Boost::boost) | 176 | set(Boost_LIBRARIES Boost::boost) |
| 212 | # Conditionally add Boost::context only if the active version of the Conan or system Boost package provides it | 177 | # Conditionally add Boost::context only if the found Boost package provides it |
| 213 | # The old version is missing Boost::context, so we want to avoid adding in that case | 178 | # The old version is missing Boost::context, so we want to avoid adding in that case |
| 214 | # The new version requires adding Boost::context to prevent linking issues | 179 | # The new version requires adding Boost::context to prevent linking issues |
| 215 | # | ||
| 216 | # This one is used by Conan on subsequent CMake configures, not the first configure. | ||
| 217 | if (TARGET Boost::context) | 180 | if (TARGET Boost::context) |
| 218 | list(APPEND Boost_LIBRARIES Boost::context) | 181 | list(APPEND Boost_LIBRARIES Boost::context) |
| 219 | endif() | 182 | endif() |
| 220 | else() | 183 | else() |
| 221 | message(STATUS "Boost 1.79.0 or newer not found, falling back to Conan") | 184 | message(FATAL_ERROR "Boost 1.73.0 or newer not found") |
| 222 | list(APPEND CONAN_REQUIRED_LIBS "boost/1.79.0") | ||
| 223 | endif() | 185 | endif() |
| 224 | 186 | ||
| 225 | # boost:asio has functions that require AcceptEx et al | 187 | # boost:asio has functions that require AcceptEx et al |
| @@ -227,19 +189,9 @@ if (MINGW) | |||
| 227 | find_library(MSWSOCK_LIBRARY mswsock REQUIRED) | 189 | find_library(MSWSOCK_LIBRARY mswsock REQUIRED) |
| 228 | endif() | 190 | endif() |
| 229 | 191 | ||
| 230 | # Attempt to locate any packages that are required and report the missing ones in CONAN_REQUIRED_LIBS | ||
| 231 | yuzu_find_packages() | ||
| 232 | |||
| 233 | # Qt5 requires that we find components, so it doesn't fit our pretty little find package function | 192 | # Qt5 requires that we find components, so it doesn't fit our pretty little find package function |
| 234 | if(ENABLE_QT) | 193 | if(ENABLE_QT) |
| 235 | set(QT_VERSION 5.15) | 194 | set(QT_VERSION 5.15) |
| 236 | # We want to load the generated conan qt config so that we get the QT_ROOT var so that we can use the official | ||
| 237 | # Qt5Config inside the root folder instead of the conan generated one. | ||
| 238 | if(EXISTS ${CMAKE_BINARY_DIR}/qtConfig.cmake) | ||
| 239 | include(${CMAKE_BINARY_DIR}/qtConfig.cmake) | ||
| 240 | list(APPEND CMAKE_MODULE_PATH "${CONAN_QT_ROOT_RELEASE}") | ||
| 241 | list(APPEND CMAKE_PREFIX_PATH "${CONAN_QT_ROOT_RELEASE}") | ||
| 242 | endif() | ||
| 243 | 195 | ||
| 244 | # Check for system Qt on Linux, fallback to bundled Qt | 196 | # Check for system Qt on Linux, fallback to bundled Qt |
| 245 | if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") | 197 | if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") |
| @@ -330,9 +282,6 @@ if(ENABLE_QT) | |||
| 330 | 282 | ||
| 331 | set(YUZU_QT_NO_CMAKE_SYSTEM_PATH) | 283 | set(YUZU_QT_NO_CMAKE_SYSTEM_PATH) |
| 332 | 284 | ||
| 333 | # Workaround for an issue where conan tries to build Qt from scratch instead of download prebuilt binaries | ||
| 334 | set(QT_PREFIX_HINT) | ||
| 335 | |||
| 336 | if(YUZU_USE_BUNDLED_QT) | 285 | if(YUZU_USE_BUNDLED_QT) |
| 337 | if ((MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS 1940) AND ARCHITECTURE_x86_64) | 286 | if ((MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS 1940) AND ARCHITECTURE_x86_64) |
| 338 | set(QT_BUILD qt-5.15.2-msvc2019_64) | 287 | set(QT_BUILD qt-5.15.2-msvc2019_64) |
| @@ -351,12 +300,12 @@ if(ENABLE_QT) | |||
| 351 | set(YUZU_QT_NO_CMAKE_SYSTEM_PATH "NO_CMAKE_SYSTEM_PATH") | 300 | set(YUZU_QT_NO_CMAKE_SYSTEM_PATH "NO_CMAKE_SYSTEM_PATH") |
| 352 | endif() | 301 | endif() |
| 353 | if ((${CMAKE_SYSTEM_NAME} STREQUAL "Linux") AND YUZU_USE_BUNDLED_QT) | 302 | if ((${CMAKE_SYSTEM_NAME} STREQUAL "Linux") AND YUZU_USE_BUNDLED_QT) |
| 354 | find_package(Qt5 ${QT_VERSION} REQUIRED COMPONENTS Widgets DBus ${QT_PREFIX_HINT} ${YUZU_QT_NO_CMAKE_SYSTEM_PATH}) | 303 | find_package(Qt5 ${QT_VERSION} REQUIRED COMPONENTS Widgets Concurrent DBus ${QT_PREFIX_HINT} ${YUZU_QT_NO_CMAKE_SYSTEM_PATH}) |
| 355 | else() | 304 | else() |
| 356 | find_package(Qt5 ${QT_VERSION} REQUIRED COMPONENTS Widgets ${QT_PREFIX_HINT} ${YUZU_QT_NO_CMAKE_SYSTEM_PATH}) | 305 | find_package(Qt5 ${QT_VERSION} REQUIRED COMPONENTS Widgets Concurrent ${QT_PREFIX_HINT} ${YUZU_QT_NO_CMAKE_SYSTEM_PATH}) |
| 357 | endif() | 306 | endif() |
| 358 | if (YUZU_USE_QT_WEB_ENGINE) | 307 | if (YUZU_USE_QT_WEB_ENGINE) |
| 359 | find_package(Qt5 COMPONENTS WebEngineCore WebEngineWidgets) | 308 | find_package(Qt5 REQUIRED COMPONENTS WebEngineCore WebEngineWidgets) |
| 360 | endif() | 309 | endif() |
| 361 | 310 | ||
| 362 | if (ENABLE_QT_TRANSLATION) | 311 | if (ENABLE_QT_TRANSLATION) |
| @@ -403,71 +352,8 @@ if (ENABLE_SDL2) | |||
| 403 | endif() | 352 | endif() |
| 404 | endif() | 353 | endif() |
| 405 | 354 | ||
| 406 | # Install any missing dependencies with conan install | 355 | # TODO(lat9nq): Determine what if any of this we still need |
| 407 | if (CONAN_REQUIRED_LIBS) | 356 | # |
| 408 | message(STATUS "Packages ${CONAN_REQUIRED_LIBS} not found!") | ||
| 409 | # Use Conan to fetch the libraries that aren't found | ||
| 410 | # Download conan.cmake automatically, you can also just copy the conan.cmake file | ||
| 411 | if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake") | ||
| 412 | message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan") | ||
| 413 | file(DOWNLOAD "https://raw.githubusercontent.com/conan-io/cmake-conan/release/0.18/conan.cmake" "${CMAKE_BINARY_DIR}/conan.cmake") | ||
| 414 | endif() | ||
| 415 | include(${CMAKE_BINARY_DIR}/conan.cmake) | ||
| 416 | |||
| 417 | conan_check(VERSION 1.45.0 REQUIRED) | ||
| 418 | |||
| 419 | # Manually add iconv to fix a dep conflict between qt and sdl2 | ||
| 420 | # We don't need to add it through find_package or anything since the other two can find it just fine | ||
| 421 | if ("${CONAN_REQUIRED_LIBS}" MATCHES "qt" AND "${CONAN_REQUIRED_LIBS}" MATCHES "sdl") | ||
| 422 | list(APPEND CONAN_REQUIRED_LIBS "libiconv/1.16") | ||
| 423 | endif() | ||
| 424 | if (IS_MULTI_CONFIG) | ||
| 425 | conan_cmake_run(REQUIRES ${CONAN_REQUIRED_LIBS} | ||
| 426 | OPTIONS ${CONAN_LIB_OPTIONS} | ||
| 427 | BUILD missing | ||
| 428 | CONFIGURATION_TYPES "Release;Debug" | ||
| 429 | GENERATORS cmake_multi cmake_find_package_multi) | ||
| 430 | include(${CMAKE_BINARY_DIR}/conanbuildinfo_multi.cmake) | ||
| 431 | else() | ||
| 432 | conan_cmake_run(REQUIRES ${CONAN_REQUIRED_LIBS} | ||
| 433 | OPTIONS ${CONAN_LIB_OPTIONS} | ||
| 434 | BUILD missing | ||
| 435 | GENERATORS cmake cmake_find_package_multi) | ||
| 436 | include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) | ||
| 437 | endif() | ||
| 438 | list(APPEND CMAKE_MODULE_PATH "${CMAKE_BINARY_DIR}") | ||
| 439 | list(APPEND CMAKE_PREFIX_PATH "${CMAKE_BINARY_DIR}") | ||
| 440 | conan_basic_setup() | ||
| 441 | |||
| 442 | set(YUZU_CONAN_INSTALLED TRUE CACHE BOOL "If true, the following builds will add conan to the lib search path" FORCE) | ||
| 443 | |||
| 444 | # Now that we've installed what we are missing, try to locate them again, | ||
| 445 | # this time with required, so we bail if its not found. | ||
| 446 | yuzu_find_packages(FORCE_REQUIRED) | ||
| 447 | |||
| 448 | if (NOT Boost_FOUND) | ||
| 449 | find_package(Boost 1.73.0 REQUIRED COMPONENTS context headers) | ||
| 450 | set(Boost_LIBRARIES Boost::boost) | ||
| 451 | # Conditionally add Boost::context only if the active version of the Conan Boost package provides it | ||
| 452 | # The old version is missing Boost::context, so we want to avoid adding in that case | ||
| 453 | # The new version requires adding Boost::context to prevent linking issues | ||
| 454 | if (TARGET Boost::context) | ||
| 455 | list(APPEND Boost_LIBRARIES Boost::context) | ||
| 456 | endif() | ||
| 457 | endif() | ||
| 458 | |||
| 459 | # Due to issues with variable scopes in functions, we need to also find_package(qt5) outside of the function | ||
| 460 | if(ENABLE_QT) | ||
| 461 | list(APPEND CMAKE_MODULE_PATH "${CONAN_QT_ROOT_RELEASE}") | ||
| 462 | list(APPEND CMAKE_PREFIX_PATH "${CONAN_QT_ROOT_RELEASE}") | ||
| 463 | find_package(Qt5 5.15 REQUIRED COMPONENTS Widgets) | ||
| 464 | if (YUZU_USE_QT_WEB_ENGINE) | ||
| 465 | find_package(Qt5 REQUIRED COMPONENTS WebEngineCore WebEngineWidgets) | ||
| 466 | endif() | ||
| 467 | endif() | ||
| 468 | |||
| 469 | endif() | ||
| 470 | |||
| 471 | # Reexport some targets that are named differently when using the upstream CmakeConfig vs the generated Conan config | 357 | # Reexport some targets that are named differently when using the upstream CmakeConfig vs the generated Conan config |
| 472 | # In order to ALIAS targets to a new name, they first need to be IMPORTED_GLOBAL | 358 | # In order to ALIAS targets to a new name, they first need to be IMPORTED_GLOBAL |
| 473 | # Dynarmic checks for target `boost` and so we want to make sure it can find it through our system instead of using their external | 359 | # Dynarmic checks for target `boost` and so we want to make sure it can find it through our system instead of using their external |
diff --git a/CMakeModules/CopyYuzuQt5Deps.cmake b/CMakeModules/CopyYuzuQt5Deps.cmake index dd97f5b2b..0c27d51a6 100644 --- a/CMakeModules/CopyYuzuQt5Deps.cmake +++ b/CMakeModules/CopyYuzuQt5Deps.cmake | |||
| @@ -19,9 +19,6 @@ function(copy_yuzu_Qt5_deps target_dir) | |||
| 19 | set(IMAGEFORMATS ${DLL_DEST}plugins/imageformats/) | 19 | set(IMAGEFORMATS ${DLL_DEST}plugins/imageformats/) |
| 20 | if (MSVC) | 20 | if (MSVC) |
| 21 | windows_copy_files(${target_dir} ${Qt5_DLL_DIR} ${DLL_DEST} | 21 | windows_copy_files(${target_dir} ${Qt5_DLL_DIR} ${DLL_DEST} |
| 22 | icudt*.dll | ||
| 23 | icuin*.dll | ||
| 24 | icuuc*.dll | ||
| 25 | Qt5Core$<$<CONFIG:Debug>:d>.* | 22 | Qt5Core$<$<CONFIG:Debug>:d>.* |
| 26 | Qt5Gui$<$<CONFIG:Debug>:d>.* | 23 | Qt5Gui$<$<CONFIG:Debug>:d>.* |
| 27 | Qt5Widgets$<$<CONFIG:Debug>:d>.* | 24 | Qt5Widgets$<$<CONFIG:Debug>:d>.* |
| @@ -37,18 +34,17 @@ function(copy_yuzu_Qt5_deps target_dir) | |||
| 37 | Qt5Quick$<$<CONFIG:Debug>:d>.* | 34 | Qt5Quick$<$<CONFIG:Debug>:d>.* |
| 38 | Qt5QuickWidgets$<$<CONFIG:Debug>:d>.* | 35 | Qt5QuickWidgets$<$<CONFIG:Debug>:d>.* |
| 39 | Qt5WebChannel$<$<CONFIG:Debug>:d>.* | 36 | Qt5WebChannel$<$<CONFIG:Debug>:d>.* |
| 40 | Qt5WebEngine$<$<CONFIG:Debug>:d>.* | ||
| 41 | Qt5WebEngineCore$<$<CONFIG:Debug>:d>.* | 37 | Qt5WebEngineCore$<$<CONFIG:Debug>:d>.* |
| 42 | Qt5WebEngineWidgets$<$<CONFIG:Debug>:d>.* | 38 | Qt5WebEngineWidgets$<$<CONFIG:Debug>:d>.* |
| 43 | QtWebEngineProcess$<$<CONFIG:Debug>:d>.* | 39 | QtWebEngineProcess$<$<CONFIG:Debug>:d>.* |
| 44 | ) | 40 | ) |
| 45 | 41 | ||
| 46 | windows_copy_files(${target_dir} ${Qt5_RESOURCES_DIR} ${DLL_DEST} | 42 | windows_copy_files(${target_dir} ${Qt5_RESOURCES_DIR} ${DLL_DEST} |
| 47 | qtwebengine_resources.pak | 43 | icudtl.dat |
| 48 | qtwebengine_devtools_resources.pak | 44 | qtwebengine_devtools_resources.pak |
| 45 | qtwebengine_resources.pak | ||
| 49 | qtwebengine_resources_100p.pak | 46 | qtwebengine_resources_100p.pak |
| 50 | qtwebengine_resources_200p.pak | 47 | qtwebengine_resources_200p.pak |
| 51 | icudtl.dat | ||
| 52 | ) | 48 | ) |
| 53 | endif () | 49 | endif () |
| 54 | windows_copy_files(yuzu ${Qt5_PLATFORMS_DIR} ${PLATFORMS} qwindows$<$<CONFIG:Debug>:d>.*) | 50 | windows_copy_files(yuzu ${Qt5_PLATFORMS_DIR} ${PLATFORMS} qwindows$<$<CONFIG:Debug>:d>.*) |
| @@ -56,7 +52,7 @@ function(copy_yuzu_Qt5_deps target_dir) | |||
| 56 | windows_copy_files(yuzu ${Qt5_IMAGEFORMATS_DIR} ${IMAGEFORMATS} | 52 | windows_copy_files(yuzu ${Qt5_IMAGEFORMATS_DIR} ${IMAGEFORMATS} |
| 57 | qjpeg$<$<CONFIG:Debug>:d>.* | 53 | qjpeg$<$<CONFIG:Debug>:d>.* |
| 58 | qgif$<$<CONFIG:Debug>:d>.* | 54 | qgif$<$<CONFIG:Debug>:d>.* |
| 59 | ) | 55 | ) |
| 60 | else() | 56 | else() |
| 61 | set(Qt5_DLLS | 57 | set(Qt5_DLLS |
| 62 | "${Qt5_DLL_DIR}libQt5Core.so.5" | 58 | "${Qt5_DLL_DIR}libQt5Core.so.5" |
diff --git a/externals/vcpkg b/externals/vcpkg new file mode 160000 | |||
| Subproject cef0b3ec767df6e83806899fe9525f6cf8d7bc9 | |||
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 64bb753e6..d574e4b79 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt | |||
| @@ -185,8 +185,9 @@ create_target_directory_groups(common) | |||
| 185 | 185 | ||
| 186 | target_link_libraries(common PUBLIC ${Boost_LIBRARIES} fmt::fmt microprofile Threads::Threads) | 186 | target_link_libraries(common PUBLIC ${Boost_LIBRARIES} fmt::fmt microprofile Threads::Threads) |
| 187 | target_link_libraries(common PRIVATE lz4::lz4 xbyak) | 187 | target_link_libraries(common PRIVATE lz4::lz4 xbyak) |
| 188 | if (MSVC) | 188 | if (TARGET zstd::zstd) |
| 189 | target_link_libraries(common PRIVATE zstd::zstd) | 189 | target_link_libraries(common PRIVATE zstd::zstd) |
| 190 | else() | 190 | else() |
| 191 | target_link_libraries(common PRIVATE zstd) | 191 | target_link_libraries(common PRIVATE |
| 192 | $<IF:$<TARGET_EXISTS:zstd::libzstd_shared>,zstd::libzstd_shared,zstd::libzstd_static>) | ||
| 192 | endif() | 193 | endif() |
diff --git a/src/video_core/renderer_vulkan/vk_blit_screen.cpp b/src/video_core/renderer_vulkan/vk_blit_screen.cpp index 1ec8392e1..4a1d96322 100644 --- a/src/video_core/renderer_vulkan/vk_blit_screen.cpp +++ b/src/video_core/renderer_vulkan/vk_blit_screen.cpp | |||
| @@ -87,8 +87,12 @@ u32 GetBytesPerPixel(const Tegra::FramebufferConfig& framebuffer) { | |||
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | std::size_t GetSizeInBytes(const Tegra::FramebufferConfig& framebuffer) { | 89 | std::size_t GetSizeInBytes(const Tegra::FramebufferConfig& framebuffer) { |
| 90 | return static_cast<std::size_t>(framebuffer.stride) * | 90 | // TODO(Rodrigo): Read this from HLE |
| 91 | static_cast<std::size_t>(framebuffer.height) * GetBytesPerPixel(framebuffer); | 91 | constexpr u32 block_height_log2 = 4; |
| 92 | const u32 bytes_per_pixel = GetBytesPerPixel(framebuffer); | ||
| 93 | const u64 size_bytes{Tegra::Texture::CalculateSize( | ||
| 94 | true, bytes_per_pixel, framebuffer.stride, framebuffer.height, 1, block_height_log2, 0)}; | ||
| 95 | return size_bytes; | ||
| 92 | } | 96 | } |
| 93 | 97 | ||
| 94 | VkFormat GetFormat(const Tegra::FramebufferConfig& framebuffer) { | 98 | VkFormat GetFormat(const Tegra::FramebufferConfig& framebuffer) { |
| @@ -169,9 +173,8 @@ VkSemaphore BlitScreen::Draw(const Tegra::FramebufferConfig& framebuffer, | |||
| 169 | // TODO(Rodrigo): Read this from HLE | 173 | // TODO(Rodrigo): Read this from HLE |
| 170 | constexpr u32 block_height_log2 = 4; | 174 | constexpr u32 block_height_log2 = 4; |
| 171 | const u32 bytes_per_pixel = GetBytesPerPixel(framebuffer); | 175 | const u32 bytes_per_pixel = GetBytesPerPixel(framebuffer); |
| 172 | const u64 size_bytes{Tegra::Texture::CalculateSize(true, bytes_per_pixel, | 176 | const u64 size_bytes{GetSizeInBytes(framebuffer)}; |
| 173 | framebuffer.stride, framebuffer.height, | 177 | |
| 174 | 1, block_height_log2, 0)}; | ||
| 175 | Tegra::Texture::UnswizzleTexture( | 178 | Tegra::Texture::UnswizzleTexture( |
| 176 | mapped_span.subspan(image_offset, size_bytes), std::span(host_ptr, size_bytes), | 179 | mapped_span.subspan(image_offset, size_bytes), std::span(host_ptr, size_bytes), |
| 177 | bytes_per_pixel, framebuffer.width, framebuffer.height, 1, block_height_log2, 0); | 180 | bytes_per_pixel, framebuffer.width, framebuffer.height, 1, block_height_log2, 0); |
diff --git a/vcpkg.json b/vcpkg.json new file mode 100644 index 000000000..8d3c5919a --- /dev/null +++ b/vcpkg.json | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | { | ||
| 2 | "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json", | ||
| 3 | "name": "yuzu", | ||
| 4 | "version": "1.0", | ||
| 5 | "dependencies": [ | ||
| 6 | "boost-algorithm", | ||
| 7 | "boost-asio", | ||
| 8 | "boost-bind", | ||
| 9 | "boost-config", | ||
| 10 | "boost-container", | ||
| 11 | "boost-context", | ||
| 12 | "boost-crc", | ||
| 13 | "boost-functional", | ||
| 14 | "boost-icl", | ||
| 15 | "boost-intrusive", | ||
| 16 | "boost-mpl", | ||
| 17 | "boost-process", | ||
| 18 | "boost-range", | ||
| 19 | "boost-spirit", | ||
| 20 | "boost-test", | ||
| 21 | "boost-timer", | ||
| 22 | "boost-variant", | ||
| 23 | "fmt", | ||
| 24 | "lz4", | ||
| 25 | "nlohmann-json", | ||
| 26 | "zlib", | ||
| 27 | "zstd" | ||
| 28 | ] | ||
| 29 | } | ||