mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-07-15 19:54:27 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0090655899 | ||
|
|
7103e9be1e | ||
|
|
b04906c3e9 | ||
|
|
fc5fe8b48c | ||
|
|
e32e91af5c | ||
|
|
aa5b026d4a | ||
|
|
9568f3305b | ||
|
|
f33064a1e2 | ||
|
|
6c9a2e96e1 | ||
|
|
8c98f5d928 | ||
|
|
19f0cfcf06 | ||
|
|
4f42d95d3c | ||
|
|
68823c524f | ||
|
|
05917796a5 | ||
|
|
d64da07b7d | ||
|
|
27074a809c | ||
|
|
33b366180e | ||
|
|
d8e310e7bf | ||
|
|
534ddd80ae | ||
|
|
d34f2ec142 | ||
|
|
7381a02dae | ||
|
|
333c7ef61b | ||
|
|
77d5a04aa4 | ||
|
|
d3effdb176 | ||
|
|
d7e1350b95 | ||
|
|
14ac653e45 | ||
|
|
a5e4274cd2 | ||
|
|
16b1095a7b | ||
|
|
3b5b3ffa91 | ||
|
|
7ebcca36d2 | ||
|
|
501c543d1b | ||
|
|
4dafea65f2 | ||
|
|
e7cdd89577 | ||
|
|
1a508439b3 | ||
|
|
3548d103f4 | ||
|
|
b1d4101490 | ||
|
|
a714582c1c | ||
|
|
0e7da0f1a8 | ||
|
|
4f7c8a77f6 | ||
|
|
1842fe6db8 | ||
|
|
1feb31498d | ||
|
|
f3632c44c8 | ||
|
|
32a6e62212 | ||
|
|
575ec07553 | ||
|
|
18308b6525 | ||
|
|
d52f29dcd7 | ||
|
|
288d8047ae | ||
|
|
26b232292c | ||
|
|
1fff69b0aa | ||
|
|
4d347305b5 | ||
|
|
2fd6f8e4ac | ||
|
|
97f316eca7 | ||
|
|
f7ba355697 | ||
|
|
c334040a96 | ||
|
|
b01359e06f | ||
|
|
905f9431a5 | ||
|
|
424951e1bb | ||
|
|
2167d9e4f5 | ||
|
|
82a38a7124 | ||
|
|
eb6a52c55c | ||
|
|
234b8f6abf | ||
|
|
843566eb49 |
@@ -16,10 +16,10 @@ fi
|
||||
|
||||
LIBBACKTRACE=ad106d5fdd5d960bd33fae1c48a351af567fd075
|
||||
LIBJPEG=9f
|
||||
LIBPNG=1.6.44
|
||||
LIBWEBP=1.4.0
|
||||
LIBPNG=1.6.45
|
||||
LIBWEBP=1.5.0
|
||||
LZ4=b8fd2d15309dd4e605070bd4486e26b6ef814e29
|
||||
SDL=SDL2-2.30.10
|
||||
SDL=SDL2-2.30.11
|
||||
QT=6.8.1
|
||||
ZSTD=1.5.6
|
||||
|
||||
@@ -34,10 +34,10 @@ cd deps-build
|
||||
cat > SHASUMS <<EOF
|
||||
fd6f417fe9e3a071cf1424a5152d926a34c4a3c5070745470be6cf12a404ed79 $LIBBACKTRACE.zip
|
||||
04705c110cb2469caa79fb71fba3d7bf834914706e9641a4589485c1f832565b jpegsrc.v$LIBJPEG.tar.gz
|
||||
60c4da1d5b7f0aa8d158da48e8f8afa9773c1c8baa5d21974df61f1886b8ce8e libpng-$LIBPNG.tar.xz
|
||||
61f873ec69e3be1b99535634340d5bde750b2e4447caa1db9f61be3fd49ab1e5 libwebp-$LIBWEBP.tar.gz
|
||||
926485350139ffb51ef69760db35f78846c805fef3d59bfdcb2fba704663f370 libpng-$LIBPNG.tar.xz
|
||||
7d6fab70cf844bf6769077bd5d7a74893f8ffd4dfb42861745750c63c2a5c92c libwebp-$LIBWEBP.tar.gz
|
||||
0728800155f3ed0a0c87e03addbd30ecbe374f7b080678bbca1506051d50dec3 $LZ4.tar.gz
|
||||
f59adf36a0fcf4c94198e7d3d776c1b3824211ab7aeebeb31fe19836661196aa $SDL.tar.gz
|
||||
8b8d4aef2038533da814965220f88f77d60dfa0f32685f80ead65e501337da7f $SDL.tar.gz
|
||||
8c29e06cf42aacc1eafc4077ae2ec6c6fcb96a626157e0593d5e82a34fd403c1 zstd-$ZSTD.tar.gz
|
||||
40b14562ef3bd779bc0e0418ea2ae08fa28235f8ea6e8c0cb3bce1d6ad58dcaf qtbase-everywhere-src-$QT.tar.xz
|
||||
138cc2909aa98f5ff7283e36eb3936eb5e625d3ca3b4febae2ca21d8903dd237 qtimageformats-everywhere-src-$QT.tar.xz
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
"sources": [
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://libsdl.org/release/SDL2-2.30.10.tar.gz",
|
||||
"sha256": "f59adf36a0fcf4c94198e7d3d776c1b3824211ab7aeebeb31fe19836661196aa"
|
||||
"url": "https://libsdl.org/release/SDL2-2.30.11.tar.gz",
|
||||
"sha256": "8b8d4aef2038533da814965220f88f77d60dfa0f32685f80ead65e501337da7f"
|
||||
}
|
||||
],
|
||||
"cleanup": [
|
||||
|
||||
@@ -40,12 +40,12 @@ fi
|
||||
|
||||
FREETYPE=2.13.3
|
||||
HARFBUZZ=10.0.1
|
||||
SDL=SDL2-2.30.10
|
||||
SDL=SDL2-2.30.11
|
||||
ZSTD=1.5.6
|
||||
LZ4=b8fd2d15309dd4e605070bd4486e26b6ef814e29
|
||||
LIBPNG=1.6.44
|
||||
LIBPNG=1.6.45
|
||||
LIBJPEG=9f
|
||||
LIBWEBP=1.4.0
|
||||
LIBWEBP=1.5.0
|
||||
FFMPEG=6.0
|
||||
MOLTENVK=1.2.9
|
||||
QT=6.7.2
|
||||
@@ -76,11 +76,11 @@ CMAKE_ARCH_UNIVERSAL=-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"
|
||||
cat > SHASUMS <<EOF
|
||||
0550350666d427c74daeb85d5ac7bb353acba5f76956395995311a9c6f063289 freetype-$FREETYPE.tar.xz
|
||||
e7358ea86fe10fb9261931af6f010d4358dac64f7074420ca9bc94aae2bdd542 harfbuzz-$HARFBUZZ.tar.gz
|
||||
f59adf36a0fcf4c94198e7d3d776c1b3824211ab7aeebeb31fe19836661196aa $SDL.tar.gz
|
||||
8b8d4aef2038533da814965220f88f77d60dfa0f32685f80ead65e501337da7f $SDL.tar.gz
|
||||
8c29e06cf42aacc1eafc4077ae2ec6c6fcb96a626157e0593d5e82a34fd403c1 zstd-$ZSTD.tar.gz
|
||||
0728800155f3ed0a0c87e03addbd30ecbe374f7b080678bbca1506051d50dec3 $LZ4.tar.gz
|
||||
60c4da1d5b7f0aa8d158da48e8f8afa9773c1c8baa5d21974df61f1886b8ce8e libpng-$LIBPNG.tar.xz
|
||||
61f873ec69e3be1b99535634340d5bde750b2e4447caa1db9f61be3fd49ab1e5 libwebp-$LIBWEBP.tar.gz
|
||||
926485350139ffb51ef69760db35f78846c805fef3d59bfdcb2fba704663f370 libpng-$LIBPNG.tar.xz
|
||||
7d6fab70cf844bf6769077bd5d7a74893f8ffd4dfb42861745750c63c2a5c92c libwebp-$LIBWEBP.tar.gz
|
||||
04705c110cb2469caa79fb71fba3d7bf834914706e9641a4589485c1f832565b jpegsrc.v$LIBJPEG.tar.gz
|
||||
57be87c22d9b49c112b6d24bc67d42508660e6b718b3db89c44e47e289137082 ffmpeg-$FFMPEG.tar.xz
|
||||
f415a09385030c6510a936155ce211f617c31506db5fbc563e804345f1ecf56e v$MOLTENVK.tar.gz
|
||||
|
||||
@@ -22,12 +22,12 @@ fi
|
||||
|
||||
FREETYPE=2.13.3
|
||||
HARFBUZZ=10.0.1
|
||||
SDL=SDL2-2.30.10
|
||||
SDL=SDL2-2.30.11
|
||||
ZSTD=1.5.6
|
||||
LZ4=b8fd2d15309dd4e605070bd4486e26b6ef814e29
|
||||
LIBPNG=1.6.44
|
||||
LIBPNG=1.6.45
|
||||
LIBJPEG=9f
|
||||
LIBWEBP=1.4.0
|
||||
LIBWEBP=1.5.0
|
||||
FFMPEG=6.0
|
||||
MOLTENVK=1.2.9
|
||||
QT=6.7.2
|
||||
@@ -56,11 +56,11 @@ CMAKE_COMMON=(
|
||||
cat > SHASUMS <<EOF
|
||||
0550350666d427c74daeb85d5ac7bb353acba5f76956395995311a9c6f063289 freetype-$FREETYPE.tar.xz
|
||||
e7358ea86fe10fb9261931af6f010d4358dac64f7074420ca9bc94aae2bdd542 harfbuzz-$HARFBUZZ.tar.gz
|
||||
f59adf36a0fcf4c94198e7d3d776c1b3824211ab7aeebeb31fe19836661196aa $SDL.tar.gz
|
||||
8b8d4aef2038533da814965220f88f77d60dfa0f32685f80ead65e501337da7f $SDL.tar.gz
|
||||
8c29e06cf42aacc1eafc4077ae2ec6c6fcb96a626157e0593d5e82a34fd403c1 zstd-$ZSTD.tar.gz
|
||||
0728800155f3ed0a0c87e03addbd30ecbe374f7b080678bbca1506051d50dec3 $LZ4.tar.gz
|
||||
60c4da1d5b7f0aa8d158da48e8f8afa9773c1c8baa5d21974df61f1886b8ce8e libpng-$LIBPNG.tar.xz
|
||||
61f873ec69e3be1b99535634340d5bde750b2e4447caa1db9f61be3fd49ab1e5 libwebp-$LIBWEBP.tar.gz
|
||||
926485350139ffb51ef69760db35f78846c805fef3d59bfdcb2fba704663f370 libpng-$LIBPNG.tar.xz
|
||||
7d6fab70cf844bf6769077bd5d7a74893f8ffd4dfb42861745750c63c2a5c92c libwebp-$LIBWEBP.tar.gz
|
||||
04705c110cb2469caa79fb71fba3d7bf834914706e9641a4589485c1f832565b jpegsrc.v$LIBJPEG.tar.gz
|
||||
57be87c22d9b49c112b6d24bc67d42508660e6b718b3db89c44e47e289137082 ffmpeg-$FFMPEG.tar.xz
|
||||
f415a09385030c6510a936155ce211f617c31506db5fbc563e804345f1ecf56e v$MOLTENVK.tar.gz
|
||||
|
||||
@@ -45,12 +45,12 @@ cd "%BUILDDIR%"
|
||||
set FREETYPE=2.13.3
|
||||
set HARFBUZZ=10.0.1
|
||||
set LIBJPEG=9f
|
||||
set LIBPNG=1643
|
||||
set LIBPNG=1645
|
||||
set LZ4=b8fd2d15309dd4e605070bd4486e26b6ef814e29
|
||||
set QT=6.8.1
|
||||
set QTMINOR=6.8
|
||||
set SDL=SDL2-2.30.10
|
||||
set WEBP=1.4.0
|
||||
set SDL=SDL2-2.30.11
|
||||
set WEBP=1.5.0
|
||||
set ZLIB=1.3.1
|
||||
set ZLIBSHORT=131
|
||||
set ZSTD=1.5.6
|
||||
@@ -62,11 +62,11 @@ set SHADERC_SPIRVTOOLS=dd4b663e13c07fea4fbb3f70c1c91c86731099f7
|
||||
|
||||
call :downloadfile "freetype-%FREETYPE%.tar.gz" https://sourceforge.net/projects/freetype/files/freetype2/%FREETYPE%/freetype-%FREETYPE%.tar.gz/download 5c3a8e78f7b24c20b25b54ee575d6daa40007a5f4eea2845861c3409b3021747 || goto error
|
||||
call :downloadfile "harfbuzz-%HARFBUZZ%.zip" https://github.com/harfbuzz/harfbuzz/archive/refs/tags/%HARFBUZZ%.zip 8adf9f5a4b6022aa2744f45c89ce347df46fea8403e99f01d650b11c417d0aa8 || goto error
|
||||
call :downloadfile "lpng%LIBPNG%.zip" https://download.sourceforge.net/libpng/lpng1643.zip fc466a1e638e635d6c66363bdf3f38555b81b0141d0b06ba45b49ccca327436d || goto error
|
||||
call :downloadfile "lpng%LIBPNG%.zip" https://download.sourceforge.net/libpng/lpng1645.zip 7d6fab70cf844bf6769077bd5d7a74893f8ffd4dfb42861745750c63c2a5c92c || goto error
|
||||
call :downloadfile "jpegsr%LIBJPEG%.zip" https://ijg.org/files/jpegsr%LIBJPEG%.zip 6255da8c89e09d694e6800688c76145eb6870a76ac0d36c74fccd61b3940aafa || goto error
|
||||
call :downloadfile "libwebp-%WEBP%.tar.gz" "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-%WEBP%.tar.gz" 61f873ec69e3be1b99535634340d5bde750b2e4447caa1db9f61be3fd49ab1e5 || goto error
|
||||
call :downloadfile "lz4-%LZ4%.zip" "https://github.com/lz4/lz4/archive/%LZ4%.zip" 0c33119688d6b180c7e760b0acd70059222389cfd581632623784bee27e51a31 || goto error
|
||||
call :downloadfile "%SDL%.zip" "https://libsdl.org/release/%SDL%.zip" 14b06b30d3400953875e73b0c4771cad1483488a1ef816803610f22b32300ce8 || goto error
|
||||
call :downloadfile "%SDL%.zip" "https://libsdl.org/release/%SDL%.zip" a0b3e7ac5f708042683ff0f22e069bdf75563540c615f9854ecc9bc8913e2488 || goto error
|
||||
call :downloadfile "qtbase-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtbase-everywhere-src-%QT%.zip" e22d997bd15b795a176c8da62c8c1da0a674eb534e02f7c01ca507bf11bce0c3 || goto error
|
||||
call :downloadfile "qtimageformats-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtimageformats-everywhere-src-%QT%.zip" 247a0a58039275a5a4fb499a600a90f66dc6e00321bb6f86a9b8d8020344d853 || goto error
|
||||
call :downloadfile "qtsvg-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtsvg-everywhere-src-%QT%.zip" 57bd332e5550ff70a852560c591b786b6ba587c5e41cb5ef91038d82db137ab9 || goto error
|
||||
|
||||
@@ -43,12 +43,12 @@ cd "%BUILDDIR%"
|
||||
set FREETYPE=2.13.3
|
||||
set HARFBUZZ=10.0.1
|
||||
set LIBJPEG=9f
|
||||
set LIBPNG=1643
|
||||
set LIBPNG=1645
|
||||
set LZ4=b8fd2d15309dd4e605070bd4486e26b6ef814e29
|
||||
set QT=6.8.1
|
||||
set QTMINOR=6.8
|
||||
set SDL=SDL2-2.30.10
|
||||
set WEBP=1.4.0
|
||||
set SDL=SDL2-2.30.11
|
||||
set WEBP=1.5.0
|
||||
set ZLIB=1.3.1
|
||||
set ZLIBSHORT=131
|
||||
set ZSTD=1.5.6
|
||||
@@ -60,11 +60,11 @@ set SHADERC_SPIRVTOOLS=dd4b663e13c07fea4fbb3f70c1c91c86731099f7
|
||||
|
||||
call :downloadfile "freetype-%FREETYPE%.tar.gz" https://sourceforge.net/projects/freetype/files/freetype2/%FREETYPE%/freetype-%FREETYPE%.tar.gz/download 5c3a8e78f7b24c20b25b54ee575d6daa40007a5f4eea2845861c3409b3021747 || goto error
|
||||
call :downloadfile "harfbuzz-%HARFBUZZ%.zip" https://github.com/harfbuzz/harfbuzz/archive/refs/tags/%HARFBUZZ%.zip 8adf9f5a4b6022aa2744f45c89ce347df46fea8403e99f01d650b11c417d0aa8 || goto error
|
||||
call :downloadfile "lpng%LIBPNG%.zip" https://download.sourceforge.net/libpng/lpng1643.zip fc466a1e638e635d6c66363bdf3f38555b81b0141d0b06ba45b49ccca327436d || goto error
|
||||
call :downloadfile "lpng%LIBPNG%.zip" https://download.sourceforge.net/libpng/lpng1645.zip a66c4b1350b67776e90263e2550933067cd9ccbd318db489f84dcc0d2b033249 || goto error
|
||||
call :downloadfile "jpegsr%LIBJPEG%.zip" https://ijg.org/files/jpegsr%LIBJPEG%.zip 6255da8c89e09d694e6800688c76145eb6870a76ac0d36c74fccd61b3940aafa || goto error
|
||||
call :downloadfile "libwebp-%WEBP%.tar.gz" "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-%WEBP%.tar.gz" 61f873ec69e3be1b99535634340d5bde750b2e4447caa1db9f61be3fd49ab1e5 || goto error
|
||||
call :downloadfile "libwebp-%WEBP%.tar.gz" "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-%WEBP%.tar.gz" 7d6fab70cf844bf6769077bd5d7a74893f8ffd4dfb42861745750c63c2a5c92c || goto error
|
||||
call :downloadfile "lz4-%LZ4%.zip" "https://github.com/lz4/lz4/archive/%LZ4%.zip" 0c33119688d6b180c7e760b0acd70059222389cfd581632623784bee27e51a31 || goto error
|
||||
call :downloadfile "%SDL%.zip" "https://libsdl.org/release/%SDL%.zip" 14b06b30d3400953875e73b0c4771cad1483488a1ef816803610f22b32300ce8 || goto error
|
||||
call :downloadfile "%SDL%.zip" "https://libsdl.org/release/%SDL%.zip" a0b3e7ac5f708042683ff0f22e069bdf75563540c615f9854ecc9bc8913e2488 || goto error
|
||||
call :downloadfile "qtbase-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtbase-everywhere-src-%QT%.zip" e22d997bd15b795a176c8da62c8c1da0a674eb534e02f7c01ca507bf11bce0c3 || goto error
|
||||
call :downloadfile "qtimageformats-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtimageformats-everywhere-src-%QT%.zip" 247a0a58039275a5a4fb499a600a90f66dc6e00321bb6f86a9b8d8020344d853 || goto error
|
||||
call :downloadfile "qtsvg-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtsvg-everywhere-src-%QT%.zip" 57bd332e5550ff70a852560c591b786b6ba587c5e41cb5ef91038d82db137ab9 || goto error
|
||||
|
||||
@@ -13,7 +13,7 @@ jobs:
|
||||
lint_vs_proj_files:
|
||||
name: Lint VS Project Files
|
||||
if: github.repository != 'PCSX2/pcsx2' || github.event_name == 'pull_request'
|
||||
runs-on: windows-2019
|
||||
runs-on: windows-2025
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
@@ -12,7 +12,7 @@ on:
|
||||
os:
|
||||
required: false
|
||||
type: string
|
||||
default: windows-2022
|
||||
default: windows-2025
|
||||
platform:
|
||||
required: false
|
||||
type: string
|
||||
@@ -55,13 +55,31 @@ jobs:
|
||||
POWERSHELL_TELEMETRY_OPTOUT: 1
|
||||
|
||||
steps:
|
||||
- name: Tempfix Clang
|
||||
if: inputs.configuration == 'CMake'
|
||||
run: choco uninstall llvm
|
||||
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Configure MSBuild Clang Version
|
||||
if: inputs.configuration != 'CMake'
|
||||
shell: pwsh
|
||||
run: |
|
||||
[string[]] $clang_cl = &clang-cl.exe --version
|
||||
|
||||
$version = [Regex]::Match($clang_cl[0], "(\d+\.\d+\.\d+)")
|
||||
$path = $clang_cl[3].TrimStart("InstalledDir: ").TrimEnd("\bin")
|
||||
|
||||
$output = @"
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<LLVMInstallDir>$path</LLVMInstallDir>
|
||||
<LLVMToolsVersion>$version</LLVMToolsVersion>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
"@
|
||||
|
||||
Write-Host $output
|
||||
|
||||
$output | Out-File Directory.build.props
|
||||
|
||||
# actions/checkout elides tags, fetch them primarily for releases
|
||||
- name: Fetch Tags
|
||||
if: ${{ inputs.fetchTags }}
|
||||
|
||||
Vendored
+11
@@ -419,6 +419,8 @@ enum cpuinfo_uarch {
|
||||
cpuinfo_uarch_zen3 = 0x0020010B,
|
||||
/** AMD Zen 4 microarchitecture. */
|
||||
cpuinfo_uarch_zen4 = 0x0020010C,
|
||||
/** AMD Zen 5 microarchitecture. */
|
||||
cpuinfo_uarch_zen5 = 0x0020010D,
|
||||
|
||||
/** NSC Geode and AMD Geode GX and LX. */
|
||||
cpuinfo_uarch_geode = 0x00200200,
|
||||
@@ -818,6 +820,7 @@ struct cpuinfo_x86_isa {
|
||||
bool avx512vp2intersect;
|
||||
bool avx512_4vnniw;
|
||||
bool avx512_4fmaps;
|
||||
bool avx10_1;
|
||||
bool amx_bf16;
|
||||
bool amx_tile;
|
||||
bool amx_int8;
|
||||
@@ -1433,6 +1436,14 @@ static inline bool cpuinfo_has_x86_avx_ne_convert(void) {
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline bool cpuinfo_has_x86_avx10_1(void) {
|
||||
#if CPUINFO_ARCH_X86 || CPUINFO_ARCH_X86_64
|
||||
return cpuinfo_isa.avx10_1;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline bool cpuinfo_has_x86_hle(void) {
|
||||
#if CPUINFO_ARCH_X86 || CPUINFO_ARCH_X86_64
|
||||
return cpuinfo_isa.hle;
|
||||
|
||||
Vendored
+2
-1
@@ -1341,7 +1341,8 @@ void cpuinfo_arm_decode_cache(
|
||||
* information, please refer to the technical manuals
|
||||
* linked above
|
||||
*/
|
||||
const uint32_t min_l2_size_KB = uarch == cpuinfo_uarch_neoverse_v2 ? 1024 : 256;
|
||||
const uint32_t min_l2_size_KB =
|
||||
(uarch == cpuinfo_uarch_neoverse_v2 || midr_is_ampere_altra(midr)) ? 1024 : 256;
|
||||
const uint32_t min_l3_size_KB = 0;
|
||||
|
||||
*l1i = (struct cpuinfo_cache){
|
||||
|
||||
Vendored
+6
@@ -34,6 +34,7 @@
|
||||
#define CPUINFO_ARM_MIDR_KRYO_SILVER_820 UINT32_C(0x510F2110)
|
||||
#define CPUINFO_ARM_MIDR_EXYNOS_M1_M2 UINT32_C(0x530F0010)
|
||||
#define CPUINFO_ARM_MIDR_DENVER2 UINT32_C(0x4E0F0030)
|
||||
#define CPUINFO_ARM_MIDR_AMPERE_ALTRA UINT32_C(0x413fd0c1)
|
||||
|
||||
inline static uint32_t midr_set_implementer(uint32_t midr, uint32_t implementer) {
|
||||
return (midr & ~CPUINFO_ARM_MIDR_IMPLEMENTER_MASK) |
|
||||
@@ -167,6 +168,11 @@ inline static bool midr_is_kryo_gold(uint32_t midr) {
|
||||
return (midr & uarch_mask) == (CPUINFO_ARM_MIDR_KRYO_GOLD & uarch_mask);
|
||||
}
|
||||
|
||||
inline static bool midr_is_ampere_altra(uint32_t midr) {
|
||||
const uint32_t uarch_mask = CPUINFO_ARM_MIDR_IMPLEMENTER_MASK | CPUINFO_ARM_MIDR_PART_MASK;
|
||||
return (midr & uarch_mask) == (CPUINFO_ARM_MIDR_AMPERE_ALTRA & uarch_mask);
|
||||
}
|
||||
|
||||
inline static uint32_t midr_score_core(uint32_t midr) {
|
||||
const uint32_t core_mask = CPUINFO_ARM_MIDR_IMPLEMENTER_MASK | CPUINFO_ARM_MIDR_PART_MASK;
|
||||
switch (midr & core_mask) {
|
||||
|
||||
Vendored
+5
@@ -429,6 +429,11 @@ struct cpuinfo_x86_isa cpuinfo_x86_detect_isa(
|
||||
*/
|
||||
isa.avx512f = avx512_regs && !!(structured_feature_info0.ebx & UINT32_C(0x00010000));
|
||||
|
||||
/*
|
||||
* AVX 10.1 instructions:
|
||||
*/
|
||||
isa.avx10_1 = avx512_regs && !!(structured_feature_info1.edx & UINT32_C(0x00080000));
|
||||
|
||||
/*
|
||||
* AVX512PF instructions:
|
||||
* - Intel: ebx[bit 26] in structured feature info (ecx = 0).
|
||||
|
||||
Vendored
+2
@@ -387,6 +387,8 @@ enum cpuinfo_uarch cpuinfo_x86_decode_uarch(
|
||||
return cpuinfo_uarch_zen4;
|
||||
}
|
||||
break;
|
||||
case 0x1a:
|
||||
return cpuinfo_uarch_zen5;
|
||||
}
|
||||
break;
|
||||
case cpuinfo_vendor_hygon:
|
||||
|
||||
Vendored
+2146
-885
File diff suppressed because it is too large
Load Diff
Vendored
+252
-39
@@ -23,7 +23,7 @@ OS2Version: 0
|
||||
OS2_WeightWidthSlopeOnly: 0
|
||||
OS2_UseTypoMetrics: 0
|
||||
CreationTime: 1544355305
|
||||
ModificationTime: 1712653578
|
||||
ModificationTime: 1736751870
|
||||
PfmFamily: 33
|
||||
TTFWeight: 400
|
||||
TTFWidth: 5
|
||||
@@ -65,7 +65,7 @@ NameList: AGL For New Fonts
|
||||
DisplaySize: -48
|
||||
AntiAlias: 1
|
||||
FitToEm: 0
|
||||
WinInfo: 8816 38 14
|
||||
WinInfo: 8360 38 14
|
||||
BeginPrivate: 8
|
||||
BlueValues 29 [0 0 380 380 490 490 660 660]
|
||||
OtherBlues 39 [-210 -210 -180 -180 -160 -160 280 280]
|
||||
@@ -77,7 +77,7 @@ StemSnapV 13 [140 180 200]
|
||||
ForceBold 4 true
|
||||
EndPrivate
|
||||
TeXData: 1 0 0 335544 167772 111848 513802 1048576 111848 783286 444596 497025 792723 393216 433062 380633 303038 157286 324010 404750 52429 2506097 1059062 262144
|
||||
BeginChars: 1114112 731
|
||||
BeginChars: 1114112 733
|
||||
|
||||
StartChar: exclam
|
||||
Encoding: 33 33 0
|
||||
@@ -19511,40 +19511,40 @@ VStem: 92.5596 41.7305<171.236 408.764> 189.39 149.051<176.142 403.858> 699.66 1
|
||||
LayerCount: 2
|
||||
Fore
|
||||
SplineSet
|
||||
500 600.610351562 m 1
|
||||
671.459960938 600.610351562 810.610351562 461.459960938 810.610351562 290 c 0
|
||||
810.610351562 118.540039062 671.459960938 -20.6103515625 500 -20.6103515625 c 0
|
||||
328.540039062 -20.6103515625 189.389648438 118.540039062 189.389648438 290 c 0
|
||||
189.389648438 461.459960938 328.540039062 600.610351562 500 600.610351562 c 1
|
||||
699.66015625 102.129882812 m 1
|
||||
699.66015625 167.830078125 l 1
|
||||
456.870117188 167.830078125 l 1
|
||||
456.870117188 463.459960938 l 1
|
||||
338.440429688 463.459960938 l 1
|
||||
338.440429688 102.129882812 l 1
|
||||
699.66015625 102.129882812 l 1
|
||||
500 -117.440429688 m 0
|
||||
445 -117.440429688 391.639648438 -106.66015625 341.400390625 -85.41015625 c 0
|
||||
292.879882812 -64.8896484375 249.309570312 -35.509765625 211.900390625 1.900390625 c 0
|
||||
174.490234375 39.3095703125 145.110351562 82.8798828125 124.58984375 131.400390625 c 0
|
||||
103.33984375 181.639648438 92.5595703125 235.009765625 92.5595703125 290 c 0
|
||||
92.5595703125 344.990234375 103.33984375 398.360351562 124.58984375 448.599609375 c 0
|
||||
145.110351562 497.120117188 174.490234375 540.690429688 211.900390625 578.099609375 c 0
|
||||
249.309570312 615.509765625 292.879882812 644.889648438 341.400390625 665.41015625 c 0
|
||||
391.639648438 686.66015625 445.009765625 697.440429688 500 697.440429688 c 0
|
||||
554.990234375 697.440429688 608.360351562 686.66015625 658.599609375 665.41015625 c 0
|
||||
707.120117188 644.889648438 750.690429688 615.509765625 788.099609375 578.099609375 c 0
|
||||
825.509765625 540.690429688 854.889648438 497.120117188 875.41015625 448.599609375 c 0
|
||||
896.66015625 398.360351562 907.440429688 344.990234375 907.440429688 290 c 0
|
||||
907.440429688 235.009765625 896.66015625 181.639648438 875.41015625 131.400390625 c 0
|
||||
854.889648438 82.8798828125 825.509765625 39.3095703125 788.099609375 1.900390625 c 0
|
||||
750.690429688 -35.509765625 707.120117188 -64.8896484375 658.599609375 -85.41015625 c 0
|
||||
608.360351562 -106.66015625 554.990234375 -117.440429688 500 -117.440429688 c 0
|
||||
500 655.709960938 m 0
|
||||
298.349609375 655.709960938 134.290039062 491.66015625 134.290039062 290 c 0
|
||||
134.290039062 88.33984375 298.33984375 -75.7099609375 500 -75.7099609375 c 0
|
||||
701.66015625 -75.7099609375 865.709960938 88.349609375 865.709960938 290 c 0
|
||||
865.709960938 491.650390625 701.66015625 655.709960938 500 655.709960938 c 0
|
||||
500 600.610351562 m 5
|
||||
671.459960938 600.610351562 810.610351562 461.459960938 810.610351562 290 c 4
|
||||
810.610351562 118.540039062 671.459960938 -20.6103515625 500 -20.6103515625 c 4
|
||||
328.540039062 -20.6103515625 189.389648438 118.540039062 189.389648438 290 c 4
|
||||
189.389648438 461.459960938 328.540039062 600.610351562 500 600.610351562 c 5
|
||||
699.66015625 102.129882812 m 5
|
||||
699.66015625 167.830078125 l 5
|
||||
456.870117188 167.830078125 l 5
|
||||
456.870117188 463.459960938 l 5
|
||||
338.440429688 463.459960938 l 5
|
||||
338.440429688 102.129882812 l 5
|
||||
699.66015625 102.129882812 l 5
|
||||
500 -117.440429688 m 4
|
||||
445 -117.440429688 391.639648438 -106.66015625 341.400390625 -85.41015625 c 4
|
||||
292.879882812 -64.8896484375 249.309570312 -35.509765625 211.900390625 1.900390625 c 4
|
||||
174.490234375 39.3095703125 145.110351562 82.8798828125 124.58984375 131.400390625 c 4
|
||||
103.33984375 181.639648438 92.5595703125 235.009765625 92.5595703125 290 c 4
|
||||
92.5595703125 344.990234375 103.33984375 398.360351562 124.58984375 448.599609375 c 4
|
||||
145.110351562 497.120117188 174.490234375 540.690429688 211.900390625 578.099609375 c 4
|
||||
249.309570312 615.509765625 292.879882812 644.889648438 341.400390625 665.41015625 c 4
|
||||
391.639648438 686.66015625 445.009765625 697.440429688 500 697.440429688 c 4
|
||||
554.990234375 697.440429688 608.360351562 686.66015625 658.599609375 665.41015625 c 4
|
||||
707.120117188 644.889648438 750.690429688 615.509765625 788.099609375 578.099609375 c 4
|
||||
825.509765625 540.690429688 854.889648438 497.120117188 875.41015625 448.599609375 c 4
|
||||
896.66015625 398.360351562 907.440429688 344.990234375 907.440429688 290 c 4
|
||||
907.440429688 235.009765625 896.66015625 181.639648438 875.41015625 131.400390625 c 4
|
||||
854.889648438 82.8798828125 825.509765625 39.3095703125 788.099609375 1.900390625 c 4
|
||||
750.690429688 -35.509765625 707.120117188 -64.8896484375 658.599609375 -85.41015625 c 4
|
||||
608.360351562 -106.66015625 554.990234375 -117.440429688 500 -117.440429688 c 4
|
||||
500 655.709960938 m 4
|
||||
298.349609375 655.709960938 134.290039062 491.66015625 134.290039062 290 c 4
|
||||
134.290039062 88.33984375 298.33984375 -75.7099609375 500 -75.7099609375 c 4
|
||||
701.66015625 -75.7099609375 865.709960938 88.349609375 865.709960938 290 c 4
|
||||
865.709960938 491.650390625 701.66015625 655.709960938 500 655.709960938 c 4
|
||||
EndSplineSet
|
||||
Validated: 5
|
||||
EndChar
|
||||
@@ -30101,7 +30101,7 @@ SplineSet
|
||||
79 -59.400390625 120 -102.200195312 170.799804688 -102.200195312 c 2
|
||||
838.200195312 -102.200195312 l 2
|
||||
EndSplineSet
|
||||
Validated: 524321
|
||||
Validated: 33
|
||||
EndChar
|
||||
|
||||
StartChar: uni23F6
|
||||
@@ -30171,7 +30171,7 @@ SplineSet
|
||||
79 -59.400390625 120 -102.200195312 170.799804688 -102.200195312 c 2
|
||||
838.200195312 -102.200195312 l 1
|
||||
EndSplineSet
|
||||
Validated: 524321
|
||||
Validated: 33
|
||||
EndChar
|
||||
|
||||
StartChar: uni23F7
|
||||
@@ -35271,5 +35271,218 @@ SplineSet
|
||||
EndSplineSet
|
||||
Validated: 1
|
||||
EndChar
|
||||
|
||||
StartChar: uni2446
|
||||
Encoding: 9286 9286 731
|
||||
Width: 1000
|
||||
HStem: 98.667 78.666<441.304 558.479> 298.667 80.666<211.095 321.99 686.039 796.635> 364 81.333<440.808 559.266> 544.667 80.666<210.809 321.868 685.514 796.925>
|
||||
VStem: 104 80<406.859 516.049> 326.667 80<269.844 311.038> 349.333 80<429.563 517.407> 578.667 80<424.535 517.66> 593.333 80.667<270.25 314.708> 824 80<406.439 515.845>
|
||||
LayerCount: 2
|
||||
Fore
|
||||
SplineSet
|
||||
869.333007812 361.333007812 m 1x9840
|
||||
887.333007812 310.666992188 925.333007812 194 915.333007812 116.666992188 c 0
|
||||
902 10.6669921875 842.666992188 -30.6669921875 836 -35.3330078125 c 0
|
||||
832 -38.6669921875 827.333007812 -40 822 -41.3330078125 c 0
|
||||
812 -43.3330078125 802 -44 792 -44 c 0
|
||||
770.666992188 -44 750 -39.3330078125 732.666992188 -30.6669921875 c 0
|
||||
708 -18.6669921875 690 1.3330078125 676 30 c 0
|
||||
654 76 656 148 662 194.666992188 c 1
|
||||
661.333007812 194 658.666992188 194.666992188 655.333007812 195.333007812 c 0
|
||||
627.333007812 138 568 98.6669921875 500 98.6669921875 c 0
|
||||
431.333007812 98.6669921875 372 138.666992188 344 196 c 0
|
||||
340 195.333007812 336 194 334.666992188 194.666992188 c 1
|
||||
342.666992188 135.333007812 344.666992188 73.3330078125 324 30 c 0
|
||||
310 1.3330078125 291.333007812 -18.6669921875 267.333007812 -30.6669921875 c 0
|
||||
241.333007812 -43.3330078125 210 -46.6669921875 178 -40.6669921875 c 0
|
||||
172.666992188 -40 168 -38 164 -35.3330078125 c 0
|
||||
157.333007812 -31.3330078125 98 10.6669921875 84.6669921875 116.666992188 c 0
|
||||
74.6669921875 199.333007812 116 323.333007812 133.333007812 369.333007812 c 1
|
||||
114.666992188 396 104 428 104 462.666992188 c 0
|
||||
104 552 176.666992188 625.333007812 266.666992188 625.333007812 c 0
|
||||
299.333007812 625.333007812 329.333007812 615.333007812 354.666992188 599.333007812 c 1
|
||||
385.333007812 646 436 677.333007812 492.666992188 681.333007812 c 0
|
||||
557.333007812 685.333007812 619.333007812 653.333007812 655.333007812 600 c 1
|
||||
680.666992188 615.333007812 710 624.666992188 741.333007812 624.666992188 c 0
|
||||
830.666992188 624.666992188 904 552 904 462 c 0
|
||||
904 424 891.333007812 389.333007812 869.333007812 361.333007812 c 1x9840
|
||||
741.333007812 544.666992188 m 0
|
||||
695.333007812 544.666992188 658.666992188 507.333007812 658.666992188 462 c 0
|
||||
658.666992188 416.666992188 696 379.333007812 741.333007812 379.333007812 c 0xd940
|
||||
786.666992188 379.333007812 824 416.666992188 824 462 c 0
|
||||
824 507.333007812 786.666992188 544.666992188 741.333007812 544.666992188 c 0
|
||||
498 601.333007812 m 0
|
||||
459.333007812 598.666992188 426 572.666992188 411.333007812 536.666992188 c 0
|
||||
422.666992188 514.666992188 429.333007812 489.333007812 429.333007812 462.666992188 c 0
|
||||
429.333007812 450.666992188 428 439.333007812 426 428.666992188 c 1
|
||||
448 439.333007812 473.333007812 445.333007812 500 445.333007812 c 0xbb40
|
||||
530.666992188 445.333007812 558.666992188 437.333007812 583.333007812 424 c 1
|
||||
580 436 578.666992188 448.666992188 578.666992188 462 c 0
|
||||
578.666992188 490 585.333007812 516 598 539.333007812 c 0
|
||||
580 579.333007812 540 604 498 601.333007812 c 0
|
||||
266.666992188 544.666992188 m 0
|
||||
220.666992188 544.666992188 184 507.333007812 184 462 c 0
|
||||
184 416.666992188 221.333007812 379.333007812 266.666992188 379.333007812 c 0xda40
|
||||
312 379.333007812 349.333007812 416.666992188 349.333007812 462 c 0
|
||||
349.333007812 507.333007812 312 544.666992188 266.666992188 544.666992188 c 0
|
||||
305.333007812 270 m 2
|
||||
310.666992188 271.333007812 318.666992188 273.333007812 326.666992188 274 c 0xdc40
|
||||
326.666992188 287.333007812 328 300 331.333007812 312 c 1
|
||||
311.333007812 303.333007812 290 298.666992188 266.666992188 298.666992188 c 0
|
||||
240.666992188 298.666992188 216 305.333007812 194 316 c 1
|
||||
174.666992188 259.333007812 152.666992188 176 159.333007812 123.333007812 c 0
|
||||
164 82.6669921875 178 56 189.333007812 39.3330078125 c 0
|
||||
198.666992188 26.6669921875 216 20.6669921875 230.666992188 28 c 1
|
||||
234 29.3330078125 244 34.6669921875 254 56 c 0
|
||||
273.333007812 96 260 180 255.333007812 212 c 2
|
||||
255.333007812 212.666992188 l 2
|
||||
251.333007812 236.666992188 267.333007812 259.333007812 293.333007812 266.666992188 c 2
|
||||
305.333007812 270 l 2
|
||||
500 177.333007812 m 0
|
||||
551.333007812 177.333007812 593.333007812 219.333007812 593.333007812 270.666992188 c 0
|
||||
593.333007812 322 551.333007812 364 500 364 c 0xbcc0
|
||||
448.666992188 364 406.666992188 322 406.666992188 270.666992188 c 0
|
||||
406.666992188 219.333007812 448.666992188 177.333007812 500 177.333007812 c 0
|
||||
840.666992188 123.333007812 m 0
|
||||
846.666992188 174.666992188 826 256 808 311.333007812 c 1
|
||||
788 302.666992188 765.333007812 297.333007812 742 297.333007812 c 0
|
||||
715.333007812 297.333007812 690 304 668 315.333007812 c 1
|
||||
671.333007812 302 673.333007812 288 674 274 c 0
|
||||
684 273.333007812 694.666992188 271.333007812 701.333007812 268 c 2
|
||||
708.666992188 264.666992188 l 2
|
||||
729.333007812 254.666992188 741.333007812 234.666992188 738 213.333007812 c 2
|
||||
738 212 l 2
|
||||
734 183.333007812 726.666992188 95.3330078125 746 55.3330078125 c 0
|
||||
756 34 766 29.3330078125 769.333007812 27.3330078125 c 1
|
||||
784 20.6669921875 801.333007812 26 810.666992188 39.3330078125 c 0
|
||||
822 56 835.333007812 82.6669921875 840.666992188 123.333007812 c 0
|
||||
EndSplineSet
|
||||
Validated: 524321
|
||||
EndChar
|
||||
|
||||
StartChar: uni221B
|
||||
Encoding: 8731 8731 732
|
||||
Width: 1000
|
||||
HStem: -209.992 21.2588<741.927 862.934> -160.664 62.5283<723.687 881.174> 85.9395 69.8691<723.687 780.459> 183.879 21.2588<741.929 862.934>
|
||||
VStem: 594.865 21.2588<-62.9303 58.0754> 644.194 75.9316<-81.1715 76.316> 904.145 56.5225<-89.7754 -64.665> 988.736 21.2598<-62.9292 58.0743>
|
||||
LayerCount: 2
|
||||
Fore
|
||||
SplineSet
|
||||
133.1953125 240.114257812 m 1
|
||||
128.731445312 224.2734375 135.630859375 215.740234375 135.630859375 215.740234375 c 1
|
||||
158.787109375 176.336914062 l 1
|
||||
148.629882812 119.875976562 174.627929688 78.4345703125 190.466796875 57.7236328125 c 0
|
||||
206.305664062 37.001953125 310.713867188 -99.0751953125 323.712890625 -114.518554688 c 0
|
||||
336.711914062 -129.954101562 389.11328125 -183.991210938 445.583984375 -142.953125 c 0
|
||||
502.044921875 -101.926757812 483.362304688 -32.052734375 483.362304688 -32.052734375 c 1
|
||||
459.1875 57.931640625 l 1
|
||||
589.7890625 74.3857421875 547.140625 186.911132812 547.140625 186.911132812 c 1
|
||||
601.831054688 241.602539062 l 1
|
||||
601.831054688 241.602539062 714.356445312 198.951171875 730.811523438 329.545898438 c 1
|
||||
820.79296875 305.37890625 l 1
|
||||
820.79296875 305.37890625 890.669921875 286.688476562 931.6953125 343.159179688 c 0
|
||||
972.721679688 399.619140625 918.696289062 452.03125 903.262695312 465.030273438 c 0
|
||||
887.829101562 478.029296875 751.73828125 582.424804688 731.018554688 598.275390625 c 0
|
||||
710.296875 614.114257812 668.864257812 640.114257812 612.404296875 629.965820312 c 1
|
||||
573.001953125 653.122070312 l 1
|
||||
573.001953125 653.122070312 564.466796875 660.03125 548.627929688 655.55859375 c 2
|
||||
548.627929688 655.55859375 543.954101562 661.450195312 532.172851562 654.5390625 c 0
|
||||
520.391601562 647.627929688 493.986328125 630.569335938 477.126953125 596.651367188 c 1
|
||||
477.126953125 596.651367188 474.28515625 591.78125 480.166015625 586.296875 c 1
|
||||
480.166015625 586.296875 474.078125 568.424804688 482.6015625 555.021484375 c 0
|
||||
491.13671875 541.616210938 501.688476562 524.559570312 501.688476562 524.559570312 c 1
|
||||
264.205078125 287.03125 l 1
|
||||
264.205078125 287.03125 247.146484375 297.59375 233.741210938 306.119140625 c 0
|
||||
220.337890625 314.654296875 202.465820312 308.553710938 202.465820312 308.553710938 c 1
|
||||
196.981445312 314.444335938 192.1015625 311.604492188 192.1015625 311.604492188 c 1
|
||||
158.18359375 294.744140625 141.125 268.340820312 134.213867188 256.559570312 c 0
|
||||
127.3046875 244.786132812 133.1953125 240.114257812 133.1953125 240.114257812 c 1
|
||||
829.455078125 781.646484375 m 1
|
||||
829.455078125 781.645507812 l 1
|
||||
792.041015625 795.248046875 760.869140625 792.16796875 741.635742188 772.922851562 c 0
|
||||
733.508789062 764.796875 733.508789062 751.620117188 741.635742188 743.482421875 c 0
|
||||
749.764648438 735.364257812 762.939453125 735.354492188 771.069335938 743.482421875 c 0
|
||||
777.907226562 750.30859375 794.809570312 749.956054688 815.208007812 742.526367188 c 0
|
||||
841.3828125 732.993164062 871.2109375 712.708007812 897.041015625 686.876953125 c 0
|
||||
952.763671875 631.153320312 967.78125 575.046875 953.635742188 560.903320312 c 0
|
||||
945.508789062 552.776367188 945.508789062 539.599609375 953.635742188 531.4609375 c 0
|
||||
957.70703125 527.401367188 963.024414062 525.373046875 968.352539062 525.373046875 c 0
|
||||
973.680664062 525.373046875 979 527.401367188 983.067382812 531.47265625 c 0
|
||||
1019.61816406 568.0234375 995.288085938 647.485351562 926.47265625 716.319335938 c 0
|
||||
896.052734375 746.73046875 861.592773438 769.926757812 829.455078125 781.646484375 c 1
|
||||
748.963867188 663.739257812 m 1
|
||||
748.96484375 663.73828125 l 1
|
||||
755.135742188 669.899414062 792.102539062 663.115234375 832.69140625 622.525390625 c 0
|
||||
873.270507812 581.946289062 880.076171875 544.970703125 873.904296875 538.798828125 c 0
|
||||
865.788085938 530.669921875 865.788085938 517.484375 873.915039062 509.357421875 c 0
|
||||
877.984375 505.297851562 883.303710938 503.268554688 888.631835938 503.268554688 c 0
|
||||
893.958984375 503.268554688 899.2890625 505.297851562 903.356445312 509.3671875 c 0
|
||||
932.717773438 538.74609375 915.375976562 598.71484375 862.123046875 651.959960938 c 0
|
||||
808.888671875 705.224609375 748.888671875 722.555664062 719.528320312 693.184570312 c 0
|
||||
711.401367188 685.056640625 711.401367188 671.879882812 719.528320312 663.743164062 c 0
|
||||
727.661132812 655.600585938 740.825195312 655.62109375 748.963867188 663.739257812 c 1
|
||||
213.166015625 -210 m 1
|
||||
231.399414062 -210 247.083984375 -204.524414062 258.532226562 -193.078125 c 0
|
||||
266.661132812 -184.94921875 266.661132812 -171.772460938 258.532226562 -163.635742188 c 0
|
||||
250.403320312 -155.497070312 237.227539062 -155.506835938 229.098632812 -163.635742188 c 0
|
||||
214.944335938 -177.799804688 158.858398438 -162.770507812 103.127929688 -107.0390625 c 0
|
||||
77.3056640625 -81.208984375 57.01171875 -51.380859375 47.478515625 -25.2060546875 c 0
|
||||
40.046875 -4.818359375 39.6826171875 12.095703125 46.5205078125 18.931640625 c 0
|
||||
54.6494140625 27.0595703125 54.6494140625 40.2353515625 46.5205078125 48.3740234375 c 0
|
||||
38.3935546875 56.5126953125 25.2177734375 56.5009765625 17.0888671875 48.3740234375 c 0
|
||||
-2.1630859375 29.1337890625 -5.2548828125 -2.056640625 8.3583984375 -39.4521484375 c 0
|
||||
20.06640625 -71.5888671875 43.2763671875 -106.049804688 73.6953125 -136.470703125 c 0
|
||||
120.946289062 -183.729492188 173.2109375 -210.008789062 213.166015625 -210 c 1
|
||||
138.03515625 -72.1201171875 m 1
|
||||
160.764648438 -94.8388671875 186.5859375 -112.198242188 210.741210938 -120.9921875 c 0
|
||||
223.53125 -125.655273438 234.375976562 -127.456054688 243.53515625 -127.456054688 c 0
|
||||
262.7890625 -127.456054688 274.487304688 -119.473632812 280.627929688 -113.333007812 c 0
|
||||
288.744140625 -105.204101562 288.744140625 -92.017578125 280.6171875 -83.890625 c 0
|
||||
272.490234375 -75.7744140625 259.302734375 -75.7626953125 251.17578125 -83.890625 c 0
|
||||
248.990234375 -86.1083984375 240.174804688 -87.408203125 224.979492188 -81.880859375 c 0
|
||||
206.673828125 -75.2099609375 185.711914062 -60.921875 167.458007812 -42.67578125 c 0
|
||||
149.212890625 -24.4306640625 134.924804688 -3.458984375 128.252929688 14.845703125 c 0
|
||||
122.7265625 30.01953125 124.02734375 38.8251953125 126.245117188 41.041015625 c 0
|
||||
134.374023438 49.16796875 134.374023438 62.34375 126.245117188 70.4833984375 c 0
|
||||
118.116210938 78.6220703125 104.940429688 78.6103515625 96.8134765625 70.4833984375 c 0
|
||||
87.748046875 61.4169921875 74.6875 40.279296875 89.1416015625 0.5966796875 c 0
|
||||
97.9560546875 -23.5703125 115.315429688 -49.400390625 138.03515625 -72.1201171875 c 1
|
||||
802.430664062 155.80859375 m 0
|
||||
715.083007812 155.80859375 644.194335938 84.919921875 644.194335938 -2.427734375 c 0
|
||||
644.194335938 -89.775390625 715.083007812 -160.6640625 802.430664062 -160.6640625 c 0
|
||||
889.778320312 -160.6640625 960.666992188 -89.775390625 960.666992188 -2.427734375 c 0
|
||||
960.666992188 84.919921875 889.778320312 155.80859375 802.430664062 155.80859375 c 0
|
||||
904.14453125 -98.1357421875 m 1
|
||||
720.125976562 -98.1357421875 l 1
|
||||
720.125976562 85.939453125 l 1
|
||||
780.458984375 85.939453125 l 1
|
||||
780.458984375 -64.6650390625 l 1
|
||||
904.14453125 -64.6650390625 l 1
|
||||
904.14453125 -98.1357421875 l 1
|
||||
802.430664062 -209.9921875 m 0
|
||||
830.4453125 -209.9921875 857.633789062 -204.500976562 883.227539062 -193.674804688 c 0
|
||||
907.9453125 -183.221679688 930.141601562 -168.25390625 949.19921875 -149.196289062 c 0
|
||||
968.2578125 -130.138671875 983.224609375 -107.942382812 993.678710938 -83.2236328125 c 0
|
||||
1004.50390625 -57.6298828125 1009.99609375 -30.44140625 1009.99609375 -2.427734375 c 0
|
||||
1009.99609375 25.5869140625 1004.50390625 52.775390625 993.678710938 78.369140625 c 0
|
||||
983.224609375 103.087890625 968.2578125 125.284179688 949.19921875 144.341796875 c 0
|
||||
930.141601562 163.399414062 907.9453125 178.3671875 883.227539062 188.8203125 c 0
|
||||
857.6328125 199.646484375 830.4453125 205.137695312 802.430664062 205.137695312 c 0
|
||||
774.416015625 205.137695312 747.227539062 199.646484375 721.633789062 188.8203125 c 0
|
||||
696.916015625 178.3671875 674.719726562 163.399414062 655.662109375 144.341796875 c 0
|
||||
636.603515625 125.284179688 621.63671875 103.087890625 611.182617188 78.369140625 c 0
|
||||
600.357421875 52.775390625 594.865234375 25.5869140625 594.865234375 -2.427734375 c 0
|
||||
594.865234375 -30.44140625 600.357421875 -57.6298828125 611.182617188 -83.2236328125 c 0
|
||||
621.63671875 -107.942382812 636.603515625 -130.138671875 655.662109375 -149.196289062 c 0
|
||||
674.719726562 -168.25390625 696.916015625 -183.221679688 721.633789062 -193.674804688 c 0
|
||||
747.228515625 -204.500976562 774.411132812 -209.9921875 802.430664062 -209.9921875 c 0
|
||||
802.430664062 183.87890625 m 0
|
||||
905.1640625 183.87890625 988.736328125 100.299804688 988.736328125 -2.427734375 c 0
|
||||
988.736328125 -105.155273438 905.1640625 -188.733398438 802.430664062 -188.733398438 c 0
|
||||
699.697265625 -188.733398438 616.124023438 -105.161132812 616.124023438 -2.427734375 c 0
|
||||
616.124023438 100.305664062 699.703125 183.87890625 802.430664062 183.87890625 c 0
|
||||
EndSplineSet
|
||||
Validated: 524325
|
||||
EndChar
|
||||
EndChars
|
||||
EndSplineFont
|
||||
|
||||
Vendored
+217
@@ -0,0 +1,217 @@
|
||||
# 3.2.0 (2024-12-30)
|
||||
|
||||
Additions to the library API:
|
||||
|
||||
- Added support for Vulkan 1.4.
|
||||
- Added support for VK_KHR_external_memory_win32 extension - `VMA_ALLOCATOR_CREATE_KHR_EXTERNAL_MEMORY_WIN32_BIT` flag, `vmaGetMemoryWin32Handle` function, and a whole new documentation chapter about it (#442).
|
||||
|
||||
Other changes:
|
||||
|
||||
- Fixed thread safety issue (#451).
|
||||
- Many other bug fixes and improvements in the library code, documentation, sample app, Cmake script, mostly to improve compatibility with various compilers and GPUs.
|
||||
|
||||
# 3.1.0 (2024-05-27)
|
||||
|
||||
This release gathers fixes and improvements made during many months of continuous development on the main branch, mostly based on issues and pull requests on GitHub.
|
||||
|
||||
Additions to the library API:
|
||||
|
||||
- Added convenience functions `vmaCopyMemoryToAllocation`, `vmaCopyAllocationToMemory`.
|
||||
- Added functions `vmaCreateAliasingBuffer2`, `vmaCreateAliasingImage2` that offer creating a buffer/image in an existing allocation with additional `allocationLocalOffset`.
|
||||
- Added function `vmaGetAllocationInfo2`, structure `VmaAllocationInfo2` that return additional information about an allocation, useful for interop with other APIs (#383, #340).
|
||||
- Added callback `VmaDefragmentationInfo::pfnBreakCallback` that allows breaking long execution of `vmaBeginDefragmentation`.
|
||||
Also added `PFN_vmaCheckDefragmentationBreakFunction`, `VmaDefragmentationInfo::pBreakCallbackUserData`.
|
||||
- Added support for VK_KHR_maintenance4 extension - `VMA_ALLOCATOR_CREATE_KHR_MAINTENANCE4_BIT` flag (#397).
|
||||
- Added support for VK_KHR_maintenance5 extension - `VMA_ALLOCATOR_CREATE_KHR_MAINTENANCE5_BIT` flag (#411).
|
||||
|
||||
Other changes:
|
||||
|
||||
- Changes in debug and configuration macros:
|
||||
- Split macros into separate `VMA_DEBUG_LOG` and `VMA_DEBUG_LOG_FORMAT` (#297).
|
||||
- Added macros `VMA_ASSERT_LEAK`, `VMA_LEAK_LOG_FORMAT` separate from normal `VMA_ASSERT`, `VMA_DEBUG_LOG_FORMAT` (#379, #385).
|
||||
- Added macro `VMA_EXTENDS_VK_STRUCT` (#347).
|
||||
- Countless bug fixes and improvements in the code and documentation, mostly to improve compatibility with various compilers and GPUs, including:
|
||||
- Fixed missing `#include` that resulted in compilation error about `snprintf` not declared on some compilers (#312).
|
||||
- Fixed main memory type selection algorithm for GPUs that have no `HOST_CACHED` memory type, like Raspberry Pi (#362).
|
||||
- Major changes in Cmake script.
|
||||
- Fixes in GpuMemDumpVis.py script.
|
||||
|
||||
# 3.0.1 (2022-05-26)
|
||||
|
||||
- Fixes in defragmentation algorithm.
|
||||
- Fixes in GpuMemDumpVis.py regarding image height calculation.
|
||||
- Other bug fixes, optimizations, and improvements in the code and documentation.
|
||||
|
||||
# 3.0.0 (2022-03-25)
|
||||
|
||||
It has been a long time since the previous official release, so hopefully everyone has been using the latest code from "master" branch, which is always maintained in a good state, not the old version. For completeness, here is the list of changes since v2.3.0. The major version number has changed, so there are some compatibility-breaking changes, but the basic API stays the same and is mostly backward-compatible.
|
||||
|
||||
Major features added (some compatibility-breaking):
|
||||
|
||||
- Added new API for selecting preferred memory type: flags `VMA_MEMORY_USAGE_AUTO`, `VMA_MEMORY_USAGE_AUTO_PREFER_DEVICE`, `VMA_MEMORY_USAGE_AUTO_PREFER_HOST`, `VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT`, `VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT`, `VMA_ALLOCATION_CREATE_HOST_ACCESS_ALLOW_TRANSFER_INSTEAD_BIT`. Old values like `VMA_MEMORY_USAGE_GPU_ONLY` still work as before, for backward compatibility, but are not recommended.
|
||||
- Added new defragmentation API and algorithm, replacing the old one. See structure `VmaDefragmentationInfo`, `VmaDefragmentationMove`, `VmaDefragmentationPassMoveInfo`, `VmaDefragmentationStats`, function `vmaBeginDefragmentation`, `vmaEndDefragmentation`, `vmaBeginDefragmentationPass`, `vmaEndDefragmentationPass`.
|
||||
- Redesigned API for statistics, replacing the old one. See structures: `VmaStatistics`, `VmaDetailedStatistics`, `VmaTotalStatistics`. `VmaBudget`, functions: `vmaGetHeapBudgets`, `vmaCalculateStatistics`, `vmaGetPoolStatistics`, `vmaCalculatePoolStatistics`, `vmaGetVirtualBlockStatistics`, `vmaCalculateVirtualBlockStatistics`.
|
||||
- Added "Virtual allocator" feature - possibility to use core allocation algorithms for allocation of custom memory, not necessarily Vulkan device memory. See functions like `vmaCreateVirtualBlock`, `vmaDestroyVirtualBlock` and many more.
|
||||
- `VmaAllocation` now keeps both `void* pUserData` and `char* pName`. Added function `vmaSetAllocationName`, member `VmaAllocationInfo::pName`. Flag `VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT` is now deprecated.
|
||||
- Clarified and cleaned up various ways of importing Vulkan functions. See macros `VMA_STATIC_VULKAN_FUNCTIONS`, `VMA_DYNAMIC_VULKAN_FUNCTIONS`, structure `VmaVulkanFunctions`. Added members `VmaVulkanFunctions::vkGetInstanceProcAddr`, `vkGetDeviceProcAddr`, which are now required when using `VMA_DYNAMIC_VULKAN_FUNCTIONS`.
|
||||
|
||||
Removed (compatibility-breaking):
|
||||
|
||||
- Removed whole "lost allocations" feature. Removed from the interface: `VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT`, `VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT`, `vmaCreateLostAllocation`, `vmaMakePoolAllocationsLost`, `vmaTouchAllocation`, `VmaAllocatorCreateInfo::frameInUseCount`, `VmaPoolCreateInfo::frameInUseCount`.
|
||||
- Removed whole "record & replay" feature. Removed from the API: `VmaAllocatorCreateInfo::pRecordSettings`, `VmaRecordSettings`, `VmaRecordFlagBits`, `VmaRecordFlags`. Removed VmaReplay application.
|
||||
- Removed "buddy" algorithm - removed flag `VMA_POOL_CREATE_BUDDY_ALGORITHM_BIT`.
|
||||
|
||||
Minor but compatibility-breaking changes:
|
||||
|
||||
- Changes in `ALLOCATION_CREATE_STRATEGY` flags. Removed flags: `VMA_ALLOCATION_CREATE_STRATEGY_MIN_FRAGMENTATION_BIT`, `VMA_ALLOCATION_CREATE_STRATEGY_WORST_FIT_BIT`, `VMA_VIRTUAL_ALLOCATION_CREATE_STRATEGY_MIN_FRAGMENTATION_BIT`, which were aliases to other existing flags.
|
||||
- Added a member `void* pUserData` to `VmaDeviceMemoryCallbacks`. Updated `PFN_vmaAllocateDeviceMemoryFunction`, `PFN_vmaFreeDeviceMemoryFunction` to use the new `pUserData` member.
|
||||
- Removed function `vmaResizeAllocation` that was already deprecated.
|
||||
|
||||
Other major changes:
|
||||
|
||||
- Added new features to custom pools: support for dedicated allocations, new member `VmaPoolCreateInfo::pMemoryAllocateNext`, `minAllocationAlignment`.
|
||||
- Added support for Vulkan 1.2, 1.3.
|
||||
- Added support for VK_KHR_buffer_device_address extension - flag `VMA_ALLOCATOR_CREATE_BUFFER_DEVICE_ADDRESS_BIT`.
|
||||
- Added support for VK_EXT_memory_priority extension - flag `VMA_ALLOCATOR_CREATE_EXT_MEMORY_PRIORITY_BIT`, members `VmaAllocationCreateInfo::priority`, `VmaPoolCreateInfo::priority`.
|
||||
- Added support for VK_AMD_device_coherent_memory extension - flag `VMA_ALLOCATOR_CREATE_AMD_DEVICE_COHERENT_MEMORY_BIT`.
|
||||
- Added member `VmaAllocatorCreateInfo::pTypeExternalMemoryHandleTypes`.
|
||||
- Added function `vmaGetAllocatorInfo`, structure `VmaAllocatorInfo`.
|
||||
- Added functions `vmaFlushAllocations`, `vmaInvalidateAllocations` for multiple allocations at once.
|
||||
- Added flag `VMA_ALLOCATION_CREATE_CAN_ALIAS_BIT`.
|
||||
- Added function `vmaCreateBufferWithAlignment`.
|
||||
- Added convenience function `vmaGetAllocationMemoryProperties`.
|
||||
- Added convenience functions: `vmaCreateAliasingBuffer`, `vmaCreateAliasingImage`.
|
||||
|
||||
Other minor changes:
|
||||
|
||||
- Implemented Two-Level Segregated Fit (TLSF) allocation algorithm, replacing previous default one. It is much faster, especially when freeing many allocations at once or when `bufferImageGranularity` is large.
|
||||
- Renamed debug macro `VMA_DEBUG_ALIGNMENT` to `VMA_MIN_ALIGNMENT`.
|
||||
- Added CMake support - CMakeLists.txt files. Removed Premake support.
|
||||
- Changed `vmaInvalidateAllocation` and `vmaFlushAllocation` to return `VkResult`.
|
||||
- Added nullability annotations for Clang: `VMA_NULLABLE`, `VMA_NOT_NULL`, `VMA_NULLABLE_NON_DISPATCHABLE`, `VMA_NOT_NULL_NON_DISPATCHABLE`, `VMA_LEN_IF_NOT_NULL`.
|
||||
- JSON dump format has changed.
|
||||
- Countless fixes and improvements, including performance optimizations, compatibility with various platforms and compilers, documentation.
|
||||
|
||||
# 2.3.0 (2019-12-04)
|
||||
|
||||
Major release after a year of development in "master" branch and feature branches. Notable new features: supporting Vulkan 1.1, supporting query for memory budget.
|
||||
|
||||
Major changes:
|
||||
|
||||
- Added support for Vulkan 1.1.
|
||||
- Added member `VmaAllocatorCreateInfo::vulkanApiVersion`.
|
||||
- When Vulkan 1.1 is used, there is no need to enable VK_KHR_dedicated_allocation or VK_KHR_bind_memory2 extensions, as they are promoted to Vulkan itself.
|
||||
- Added support for query for memory budget and staying within the budget.
|
||||
- Added function `vmaGetBudget`, structure `VmaBudget`. This can also serve as simple statistics, more efficient than `vmaCalculateStats`.
|
||||
- By default the budget it is estimated based on memory heap sizes. It may be queried from the system using VK_EXT_memory_budget extension if you use `VMA_ALLOCATOR_CREATE_EXT_MEMORY_BUDGET_BIT` flag and `VmaAllocatorCreateInfo::instance` member.
|
||||
- Added flag `VMA_ALLOCATION_CREATE_WITHIN_BUDGET_BIT` that fails an allocation if it would exceed the budget.
|
||||
- Added new memory usage options:
|
||||
- `VMA_MEMORY_USAGE_CPU_COPY` for memory that is preferably not `DEVICE_LOCAL` but not guaranteed to be `HOST_VISIBLE`.
|
||||
- `VMA_MEMORY_USAGE_GPU_LAZILY_ALLOCATED` for memory that is `LAZILY_ALLOCATED`.
|
||||
- Added support for VK_KHR_bind_memory2 extension:
|
||||
- Added `VMA_ALLOCATION_CREATE_DONT_BIND_BIT` flag that lets you create both buffer/image and allocation, but don't bind them together.
|
||||
- Added flag `VMA_ALLOCATOR_CREATE_KHR_BIND_MEMORY2_BIT`, functions `vmaBindBufferMemory2`, `vmaBindImageMemory2` that let you specify additional local offset and `pNext` pointer while binding.
|
||||
- Added functions `vmaSetPoolName`, `vmaGetPoolName` that let you assign string names to custom pools. JSON dump file format and VmaDumpVis tool is updated to show these names.
|
||||
- Defragmentation is legal only on buffers and images in `VK_IMAGE_TILING_LINEAR`. This is due to the way it is currently implemented in the library and the restrictions of the Vulkan specification. Clarified documentation in this regard. See discussion in #59.
|
||||
|
||||
Minor changes:
|
||||
|
||||
- Made `vmaResizeAllocation` function deprecated, always returning failure.
|
||||
- Made changes in the internal algorithm for the choice of memory type. Be careful! You may now get a type that is not `HOST_VISIBLE` or `HOST_COHERENT` if it's not stated as always ensured by some `VMA_MEMORY_USAGE_*` flag.
|
||||
- Extended VmaReplay application with more detailed statistics printed at the end.
|
||||
- Added macros `VMA_CALL_PRE`, `VMA_CALL_POST` that let you decorate declarations of all library functions if you want to e.g. export/import them as dynamically linked library.
|
||||
- Optimized `VmaAllocation` objects to be allocated out of an internal free-list allocator. This makes allocation and deallocation causing 0 dynamic CPU heap allocations on average.
|
||||
- Updated recording CSV file format version to 1.8, to support new functions.
|
||||
- Many additions and fixes in documentation. Many compatibility fixes for various compilers and platforms. Other internal bugfixes, optimizations, updates, refactoring...
|
||||
|
||||
# 2.2.0 (2018-12-13)
|
||||
|
||||
Major release after many months of development in "master" branch and feature branches. Notable new features: defragmentation of GPU memory, buddy algorithm, convenience functions for sparse binding.
|
||||
|
||||
Major changes:
|
||||
|
||||
- New, more powerful defragmentation:
|
||||
- Added structure `VmaDefragmentationInfo2`, functions `vmaDefragmentationBegin`, `vmaDefragmentationEnd`.
|
||||
- Added support for defragmentation of GPU memory.
|
||||
- Defragmentation of CPU memory now uses `memmove`, so it can move data to overlapping regions.
|
||||
- Defragmentation of CPU memory is now available for memory types that are `HOST_VISIBLE` but not `HOST_COHERENT`.
|
||||
- Added structure member `VmaVulkanFunctions::vkCmdCopyBuffer`.
|
||||
- Major internal changes in defragmentation algorithm.
|
||||
- VmaReplay: added parameters: `--DefragmentAfterLine`, `--DefragmentationFlags`.
|
||||
- Old interface (structure `VmaDefragmentationInfo`, function `vmaDefragment`) is now deprecated.
|
||||
- Added buddy algorithm, available for custom pools - flag `VMA_POOL_CREATE_BUDDY_ALGORITHM_BIT`.
|
||||
- Added convenience functions for multiple allocations and deallocations at once, intended for sparse binding resources - functions `vmaAllocateMemoryPages`, `vmaFreeMemoryPages`.
|
||||
- Added function that tries to resize existing allocation in place: `vmaResizeAllocation`.
|
||||
- Added flags for allocation strategy: `VMA_ALLOCATION_CREATE_STRATEGY_BEST_FIT_BIT`, `VMA_ALLOCATION_CREATE_STRATEGY_WORST_FIT_BIT`, `VMA_ALLOCATION_CREATE_STRATEGY_FIRST_FIT_BIT`, and their aliases: `VMA_ALLOCATION_CREATE_STRATEGY_MIN_MEMORY_BIT`, `VMA_ALLOCATION_CREATE_STRATEGY_MIN_TIME_BIT`, `VMA_ALLOCATION_CREATE_STRATEGY_MIN_FRAGMENTATION_BIT`.
|
||||
|
||||
Minor changes:
|
||||
|
||||
- Changed behavior of allocation functions to return `VK_ERROR_VALIDATION_FAILED_EXT` when trying to allocate memory of size 0, create buffer with size 0, or image with one of the dimensions 0.
|
||||
- VmaReplay: Added support for Windows end of lines.
|
||||
- Updated recording CSV file format version to 1.5, to support new functions.
|
||||
- Internal optimization: using read-write mutex on some platforms.
|
||||
- Many additions and fixes in documentation. Many compatibility fixes for various compilers. Other internal bugfixes, optimizations, refactoring, added more internal validation...
|
||||
|
||||
# 2.1.0 (2018-09-10)
|
||||
|
||||
Minor bugfixes.
|
||||
|
||||
# 2.1.0-beta.1 (2018-08-27)
|
||||
|
||||
Major release after many months of development in "development" branch and features branches. Many new features added, some bugs fixed. API stays backward-compatible.
|
||||
|
||||
Major changes:
|
||||
|
||||
- Added linear allocation algorithm, accessible for custom pools, that can be used as free-at-once, stack, double stack, or ring buffer. See "Linear allocation algorithm" documentation chapter.
|
||||
- Added `VMA_POOL_CREATE_LINEAR_ALGORITHM_BIT`, `VMA_ALLOCATION_CREATE_UPPER_ADDRESS_BIT`.
|
||||
- Added feature to record sequence of calls to the library to a file and replay it using dedicated application. See documentation chapter "Record and replay".
|
||||
- Recording: added `VmaAllocatorCreateInfo::pRecordSettings`.
|
||||
- Replaying: added VmaReplay project.
|
||||
- Recording file format: added document "docs/Recording file format.md".
|
||||
- Improved support for non-coherent memory.
|
||||
- Added functions: `vmaFlushAllocation`, `vmaInvalidateAllocation`.
|
||||
- `nonCoherentAtomSize` is now respected automatically.
|
||||
- Added `VmaVulkanFunctions::vkFlushMappedMemoryRanges`, `vkInvalidateMappedMemoryRanges`.
|
||||
- Improved debug features related to detecting incorrect mapped memory usage. See documentation chapter "Debugging incorrect memory usage".
|
||||
- Added debug macro `VMA_DEBUG_DETECT_CORRUPTION`, functions `vmaCheckCorruption`, `vmaCheckPoolCorruption`.
|
||||
- Added debug macro `VMA_DEBUG_INITIALIZE_ALLOCATIONS` to initialize contents of allocations with a bit pattern.
|
||||
- Changed behavior of `VMA_DEBUG_MARGIN` macro - it now adds margin also before first and after last allocation in a block.
|
||||
- Changed format of JSON dump returned by `vmaBuildStatsString` (not backward compatible!).
|
||||
- Custom pools and memory blocks now have IDs that don't change after sorting.
|
||||
- Added properties: "CreationFrameIndex", "LastUseFrameIndex", "Usage".
|
||||
- Changed VmaDumpVis tool to use these new properties for better coloring.
|
||||
- Changed behavior of `vmaGetAllocationInfo` and `vmaTouchAllocation` to update `allocation.lastUseFrameIndex` even if allocation cannot become lost.
|
||||
|
||||
Minor changes:
|
||||
|
||||
- Changes in custom pools:
|
||||
- Added new structure member `VmaPoolStats::blockCount`.
|
||||
- Changed behavior of `VmaPoolCreateInfo::blockSize` = 0 (default) - it now means that pool may use variable block sizes, just like default pools do.
|
||||
- Improved logic of `vmaFindMemoryTypeIndex` for some cases, especially integrated GPUs.
|
||||
- VulkanSample application: Removed dependency on external library MathFu. Added own vector and matrix structures.
|
||||
- Changes that improve compatibility with various platforms, including: Visual Studio 2012, 32-bit code, C compilers.
|
||||
- Changed usage of "VK_KHR_dedicated_allocation" extension in the code to be optional, driven by macro `VMA_DEDICATED_ALLOCATION`, for compatibility with Android.
|
||||
- Many additions and fixes in documentation, including description of new features, as well as "Validation layer warnings".
|
||||
- Other bugfixes.
|
||||
|
||||
# 2.0.0 (2018-03-19)
|
||||
|
||||
A major release with many compatibility-breaking changes.
|
||||
|
||||
Notable new features:
|
||||
|
||||
- Introduction of `VmaAllocation` handle that you must retrieve from allocation functions and pass to deallocation functions next to normal `VkBuffer` and `VkImage`.
|
||||
- Introduction of `VmaAllocationInfo` structure that you can retrieve from `VmaAllocation` handle to access parameters of the allocation (like `VkDeviceMemory` and offset) instead of retrieving them directly from allocation functions.
|
||||
- Support for reference-counted mapping and persistently mapped allocations - see `vmaMapMemory`, `VMA_ALLOCATION_CREATE_MAPPED_BIT`.
|
||||
- Support for custom memory pools - see `VmaPool` handle, `VmaPoolCreateInfo` structure, `vmaCreatePool` function.
|
||||
- Support for defragmentation (compaction) of allocations - see function `vmaDefragment` and related structures.
|
||||
- Support for "lost allocations" - see appropriate chapter on documentation Main Page.
|
||||
|
||||
# 1.0.1 (2017-07-04)
|
||||
|
||||
- Fixes for Linux GCC compilation.
|
||||
- Changed "CONFIGURATION SECTION" to contain #ifndef so you can define these macros before including this header, not necessarily change them in the file.
|
||||
|
||||
# 1.0.0 (2017-06-16)
|
||||
|
||||
First public release.
|
||||
Vendored
+196
@@ -0,0 +1,196 @@
|
||||
# Vulkan Memory Allocator
|
||||
|
||||
Easy to integrate Vulkan memory allocation library.
|
||||
|
||||
**Documentation:** Browse online: [Vulkan Memory Allocator](https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/) (generated from Doxygen-style comments in [include/vk_mem_alloc.h](include/vk_mem_alloc.h))
|
||||
|
||||
**License:** MIT. See [LICENSE.txt](LICENSE.txt)
|
||||
|
||||
**Changelog:** See [CHANGELOG.md](CHANGELOG.md)
|
||||
|
||||
**Product page:** [Vulkan Memory Allocator on GPUOpen](https://gpuopen.com/gaming-product/vulkan-memory-allocator/)
|
||||
|
||||
**Build status:**
|
||||
|
||||
- Windows: [](https://ci.appveyor.com/project/adam-sawicki-amd/vulkanmemoryallocator/branch/master)
|
||||
- Linux: [](https://app.travis-ci.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator)
|
||||
|
||||
[](http://isitmaintained.com/project/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator "Average time to resolve an issue")
|
||||
|
||||
# Problem
|
||||
|
||||
Memory allocation and resource (buffer and image) creation in Vulkan is difficult (comparing to older graphics APIs, like D3D11 or OpenGL) for several reasons:
|
||||
|
||||
- It requires a lot of boilerplate code, just like everything else in Vulkan, because it is a low-level and high-performance API.
|
||||
- There is additional level of indirection: `VkDeviceMemory` is allocated separately from creating `VkBuffer`/`VkImage` and they must be bound together.
|
||||
- Driver must be queried for supported memory heaps and memory types. Different GPU vendors provide different types of it.
|
||||
- It is recommended to allocate bigger chunks of memory and assign parts of them to particular resources, as there is a limit on maximum number of memory blocks that can be allocated.
|
||||
|
||||
# Features
|
||||
|
||||
This library can help game developers to manage memory allocations and resource creation by offering some higher-level functions:
|
||||
|
||||
1. Functions that help to choose correct and optimal memory type based on intended usage of the memory.
|
||||
- Required or preferred traits of the memory are expressed using higher-level description comparing to Vulkan flags.
|
||||
2. Functions that allocate memory blocks, reserve and return parts of them (`VkDeviceMemory` + offset + size) to the user.
|
||||
- Library keeps track of allocated memory blocks, used and unused ranges inside them, finds best matching unused ranges for new allocations, respects all the rules of alignment and buffer/image granularity.
|
||||
3. Functions that can create an image/buffer, allocate memory for it and bind them together - all in one call.
|
||||
|
||||
Additional features:
|
||||
|
||||
- Well-documented - description of all functions and structures provided, along with chapters that contain general description and example code.
|
||||
- Thread-safety: Library is designed to be used in multithreaded code. Access to a single device memory block referred by different buffers and textures (binding, mapping) is synchronized internally. Memory mapping is reference-counted.
|
||||
- Configuration: Fill optional members of `VmaAllocatorCreateInfo` structure to provide custom CPU memory allocator, pointers to Vulkan functions and other parameters.
|
||||
- Customization and integration with custom engines: Predefine appropriate macros to provide your own implementation of all external facilities used by the library like assert, mutex, atomic.
|
||||
- Support for memory mapping, reference-counted internally. Support for persistently mapped memory: Just allocate with appropriate flag and access the pointer to already mapped memory.
|
||||
- Support for non-coherent memory. Functions that flush/invalidate memory. `nonCoherentAtomSize` is respected automatically.
|
||||
- Support for resource aliasing (overlap).
|
||||
- Support for sparse binding and sparse residency: Convenience functions that allocate or free multiple memory pages at once.
|
||||
- Custom memory pools: Create a pool with desired parameters (e.g. fixed or limited maximum size) and allocate memory out of it.
|
||||
- Linear allocator: Create a pool with linear algorithm and use it for much faster allocations and deallocations in free-at-once, stack, double stack, or ring buffer fashion.
|
||||
- Support for Vulkan 1.0...1.4.
|
||||
- Support for extensions (and equivalent functionality included in new Vulkan versions):
|
||||
- VK_KHR_dedicated_allocation: Just enable it and it will be used automatically by the library.
|
||||
- VK_KHR_bind_memory2.
|
||||
- VK_KHR_maintenance4.
|
||||
- VK_KHR_maintenance5, including `VkBufferUsageFlags2CreateInfoKHR`.
|
||||
- VK_EXT_memory_budget: Used internally if available to query for current usage and budget. If not available, it falls back to an estimation based on memory heap sizes.
|
||||
- VK_KHR_buffer_device_address: Flag `VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT_KHR` is automatically added to memory allocations where needed.
|
||||
- VK_EXT_memory_priority: Set `priority` of allocations or custom pools and it will be set automatically using this extension.
|
||||
- VK_AMD_device_coherent_memory.
|
||||
- VK_KHR_external_memory_win32.
|
||||
- Defragmentation of GPU and CPU memory: Let the library move data around to free some memory blocks and make your allocations better compacted.
|
||||
- Statistics: Obtain brief or detailed statistics about the amount of memory used, unused, number of allocated blocks, number of allocations etc. - globally, per memory heap, and per memory type.
|
||||
- Debug annotations: Associate custom `void* pUserData` and debug `char* pName` with each allocation.
|
||||
- JSON dump: Obtain a string in JSON format with detailed map of internal state, including list of allocations, their string names, and gaps between them.
|
||||
- Convert this JSON dump into a picture to visualize your memory. See [tools/GpuMemDumpVis](tools/GpuMemDumpVis/README.md).
|
||||
- Debugging incorrect memory usage: Enable initialization of all allocated memory with a bit pattern to detect usage of uninitialized or freed memory. Enable validation of a magic number after every allocation to detect out-of-bounds memory corruption.
|
||||
- Support for interoperability with OpenGL.
|
||||
- Virtual allocator: Interface for using core allocation algorithm to allocate any custom data, e.g. pieces of one large buffer.
|
||||
|
||||
# Prerequisites
|
||||
|
||||
- Self-contained C++ library in single header file. No external dependencies other than standard C and C++ library and of course Vulkan. Some features of C++14 used. STL containers, RTTI, or C++ exceptions are not used.
|
||||
- Public interface in C, in same convention as Vulkan API. Implementation in C++.
|
||||
- Error handling implemented by returning `VkResult` error codes - same way as in Vulkan.
|
||||
- Interface documented using Doxygen-style comments.
|
||||
- Platform-independent, but developed and tested on Windows using Visual Studio. Continuous integration setup for Windows and Linux. Used also on Android, MacOS, and other platforms.
|
||||
|
||||
# Example
|
||||
|
||||
Basic usage of this library is very simple. Advanced features are optional. After you created global `VmaAllocator` object, a complete code needed to create a buffer may look like this:
|
||||
|
||||
```cpp
|
||||
VkBufferCreateInfo bufferInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO };
|
||||
bufferInfo.size = 65536;
|
||||
bufferInfo.usage = VK_BUFFER_USAGE_VERTEX_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT;
|
||||
|
||||
VmaAllocationCreateInfo allocInfo = {};
|
||||
allocInfo.usage = VMA_MEMORY_USAGE_AUTO;
|
||||
|
||||
VkBuffer buffer;
|
||||
VmaAllocation allocation;
|
||||
vmaCreateBuffer(allocator, &bufferInfo, &allocInfo, &buffer, &allocation, nullptr);
|
||||
```
|
||||
|
||||
With this one function call:
|
||||
|
||||
1. `VkBuffer` is created.
|
||||
2. `VkDeviceMemory` block is allocated if needed.
|
||||
3. An unused region of the memory block is bound to this buffer.
|
||||
|
||||
`VmaAllocation` is an object that represents memory assigned to this buffer. It can be queried for parameters like `VkDeviceMemory` handle and offset.
|
||||
|
||||
# How to build
|
||||
|
||||
On Windows it is recommended to use [CMake GUI](https://cmake.org/runningcmake/).
|
||||
|
||||
Alternatively you can generate/open a Visual Studio from the command line:
|
||||
|
||||
```sh
|
||||
# By default CMake picks the newest version of Visual Studio it can use
|
||||
cmake -S . -B build -D VMA_BUILD_SAMPLES=ON
|
||||
cmake --open build
|
||||
```
|
||||
|
||||
On Linux:
|
||||
|
||||
```sh
|
||||
cmake -S . -B build
|
||||
# Since VMA has no source files, you can skip to installation immediately
|
||||
cmake --install build --prefix build/install
|
||||
```
|
||||
|
||||
## How to use
|
||||
|
||||
After calling either `find_package` or `add_subdirectory` simply link the library.
|
||||
This automatically handles configuring the include directory. Example:
|
||||
|
||||
```cmake
|
||||
find_package(VulkanMemoryAllocator CONFIG REQUIRED)
|
||||
target_link_libraries(YourGameEngine PRIVATE GPUOpen::VulkanMemoryAllocator)
|
||||
```
|
||||
|
||||
For more info on using CMake visit the official [CMake documentation](https://cmake.org/cmake/help/latest/index.html).
|
||||
|
||||
## Building using vcpkg
|
||||
|
||||
You can download and install VulkanMemoryAllocator using the [vcpkg](https://github.com/Microsoft/vcpkg) dependency manager:
|
||||
|
||||
git clone https://github.com/Microsoft/vcpkg.git
|
||||
cd vcpkg
|
||||
./bootstrap-vcpkg.sh
|
||||
./vcpkg integrate install
|
||||
./vcpkg install vulkan-memory-allocator
|
||||
|
||||
The VulkanMemoryAllocator port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.
|
||||
|
||||
# Binaries
|
||||
|
||||
The release comes with precompiled binary executable for "VulkanSample" application which contains test suite. It is compiled using Visual Studio 2022, so it requires appropriate libraries to work, including "MSVCP140.dll", "VCRUNTIME140.dll", "VCRUNTIME140_1.dll". If the launch fails with error message telling about those files missing, please download and install [Microsoft Visual C++ Redistributable](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads), "X64" version.
|
||||
|
||||
# Read more
|
||||
|
||||
See **[Documentation](https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/)**.
|
||||
|
||||
# Software using this library
|
||||
|
||||
- **[Blender](https://www.blender.org)**
|
||||
- **[Qt Project](https://github.com/qt)**
|
||||
- **[Baldur's Gate III](https://www.mobygames.com/game/150689/baldurs-gate-iii/credits/windows/?autoplatform=true)**
|
||||
- **[Cyberpunk 2077](https://www.mobygames.com/game/128136/cyberpunk-2077/credits/windows/?autoplatform=true)**
|
||||
- **[X-Plane](https://x-plane.com/)**
|
||||
- **[Detroit: Become Human](https://gpuopen.com/learn/porting-detroit-3/)**
|
||||
- **[Vulkan Samples](https://github.com/LunarG/VulkanSamples)** - official Khronos Vulkan samples. License: Apache-style.
|
||||
- **[GFXReconstruct](https://github.com/LunarG/gfxreconstruct)** - a tools for the capture and replay of graphics API calls. License: MIT.
|
||||
- **[Anvil](https://github.com/GPUOpen-LibrariesAndSDKs/Anvil)** - cross-platform framework for Vulkan. License: MIT.
|
||||
- **[Filament](https://github.com/google/filament)** - physically based rendering engine for Android, Windows, Linux and macOS, from Google. Apache License 2.0.
|
||||
- **[Atypical Games - proprietary game engine](https://developer.samsung.com/galaxy-gamedev/gamedev-blog/infinitejet.html)**
|
||||
- **[Flax Engine](https://flaxengine.com/)**
|
||||
- **[Godot Engine](https://github.com/godotengine/godot/)** - multi-platform 2D and 3D game engine. License: MIT.
|
||||
- **[Lightweight Java Game Library (LWJGL)](https://www.lwjgl.org/)** - includes binding of the library for Java. License: BSD.
|
||||
- **[LightweightVK](https://github.com/corporateshark/lightweightvk)** - lightweight C++ bindless Vulkan 1.3 wrapper. License: MIT.
|
||||
- **[PowerVR SDK](https://github.com/powervr-graphics/Native_SDK)** - C++ cross-platform 3D graphics SDK, from Imagination. License: MIT.
|
||||
- **[Skia](https://github.com/google/skia)** - complete 2D graphic library for drawing Text, Geometries, and Images, from Google.
|
||||
- **[The Forge](https://github.com/ConfettiFX/The-Forge)** - cross-platform rendering framework. Apache License 2.0.
|
||||
- **[VK9](https://github.com/disks86/VK9)** - Direct3D 9 compatibility layer using Vulkan. Zlib license.
|
||||
- **[vkDOOM3](https://github.com/DustinHLand/vkDOOM3)** - Vulkan port of GPL DOOM 3 BFG Edition. License: GNU GPL.
|
||||
- **[vkQuake2](https://github.com/kondrak/vkQuake2)** - vanilla Quake 2 with Vulkan support. License: GNU GPL.
|
||||
- **[Vulkan Best Practice for Mobile Developers](https://github.com/ARM-software/vulkan_best_practice_for_mobile_developers)** from ARM. License: MIT.
|
||||
- **[RPCS3](https://github.com/RPCS3/rpcs3)** - PlayStation 3 emulator/debugger. License: GNU GPLv2.
|
||||
- **[PPSSPP](https://github.com/hrydgard/ppsspp)** - Playstation Portable emulator/debugger. License: GNU GPLv2+.
|
||||
- **[Wicked Engine](https://github.com/turanszkij/WickedEngine)** - 3D engine with modern graphics
|
||||
|
||||
[Many other projects on GitHub](https://github.com/search?q=AMD_VULKAN_MEMORY_ALLOCATOR_H&type=Code) and some game development studios that use Vulkan in their games.
|
||||
|
||||
# See also
|
||||
|
||||
- **[D3D12 Memory Allocator](https://github.com/GPUOpen-LibrariesAndSDKs/D3D12MemoryAllocator)** - equivalent library for Direct3D 12. License: MIT.
|
||||
- **[Awesome Vulkan](https://github.com/vinjn/awesome-vulkan)** - a curated list of awesome Vulkan libraries, debuggers and resources.
|
||||
- **[vcpkg](https://github.com/Microsoft/vcpkg)** dependency manager from Microsoft also offers a port of this library.
|
||||
- **[VulkanMemoryAllocator-Hpp](https://github.com/YaaZ/VulkanMemoryAllocator-Hpp)** - C++ binding for this library. License: CC0-1.0.
|
||||
- **[PyVMA](https://github.com/realitix/pyvma)** - Python wrapper for this library. Author: Jean-Sébastien B. (@realitix). License: Apache 2.0.
|
||||
- **[vk-mem](https://github.com/gwihlidal/vk-mem-rs)** - Rust binding for this library. Author: Graham Wihlidal. License: Apache 2.0 or MIT.
|
||||
- **[Haskell bindings](https://hackage.haskell.org/package/VulkanMemoryAllocator)**, **[github](https://github.com/expipiplus1/vulkan/tree/master/VulkanMemoryAllocator)** - Haskell bindings for this library. Author: Ellie Hermaszewska (@expipiplus1). License BSD-3-Clause.
|
||||
- **[vma_sample_sdl](https://github.com/rextimmy/vma_sample_sdl)** - SDL port of the sample app of this library (with the goal of running it on multiple platforms, including MacOS). Author: @rextimmy. License: MIT.
|
||||
- **[vulkan-malloc](https://github.com/dylanede/vulkan-malloc)** - Vulkan memory allocation library for Rust. Based on version 1 of this library. Author: Dylan Ede (@dylanede). License: MIT / Apache 2.0.
|
||||
+11
-15
@@ -25,7 +25,7 @@
|
||||
|
||||
/** \mainpage Vulkan Memory Allocator
|
||||
|
||||
<b>Version 3.1.0</b>
|
||||
<b>Version 3.2.0</b>
|
||||
|
||||
Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All rights reserved. \n
|
||||
License: MIT \n
|
||||
@@ -133,7 +133,9 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#if !defined(VMA_VULKAN_VERSION)
|
||||
#if defined(VK_VERSION_1_3)
|
||||
#if defined(VK_VERSION_1_4)
|
||||
#define VMA_VULKAN_VERSION 1004000
|
||||
#elif defined(VK_VERSION_1_3)
|
||||
#define VMA_VULKAN_VERSION 1003000
|
||||
#elif defined(VK_VERSION_1_2)
|
||||
#define VMA_VULKAN_VERSION 1002000
|
||||
@@ -1121,7 +1123,7 @@ typedef struct VmaAllocatorCreateInfo
|
||||
|
||||
It must be a value in the format as created by macro `VK_MAKE_VERSION` or a constant like: `VK_API_VERSION_1_1`, `VK_API_VERSION_1_0`.
|
||||
The patch version number specified is ignored. Only the major and minor versions are considered.
|
||||
Only versions 1.0, 1.1, 1.2, 1.3 are supported by the current implementation.
|
||||
Only versions 1.0...1.4 are supported by the current implementation.
|
||||
Leaving it initialized to zero is equivalent to `VK_API_VERSION_1_0`.
|
||||
It must match the Vulkan version used by the application and supported on the selected physical device,
|
||||
so it must be no higher than `VkApplicationInfo::apiVersion` passed to `vkCreateInstance`
|
||||
@@ -12977,23 +12979,17 @@ VmaAllocator_T::VmaAllocator_T(const VmaAllocatorCreateInfo* pCreateInfo) :
|
||||
VMA_ASSERT(0 && "VMA_ALLOCATOR_CREATE_BUFFER_DEVICE_ADDRESS_BIT is set but required extension or Vulkan 1.2 is not available in your Vulkan header or its support in VMA has been disabled by a preprocessor macro.");
|
||||
}
|
||||
#endif
|
||||
#if VMA_VULKAN_VERSION < 1004000
|
||||
VMA_ASSERT(m_VulkanApiVersion < VK_MAKE_VERSION(1, 4, 0) && "vulkanApiVersion >= VK_API_VERSION_1_4 but required Vulkan version is disabled by preprocessor macros.");
|
||||
#endif
|
||||
#if VMA_VULKAN_VERSION < 1003000
|
||||
if(m_VulkanApiVersion >= VK_MAKE_VERSION(1, 3, 0))
|
||||
{
|
||||
VMA_ASSERT(0 && "vulkanApiVersion >= VK_API_VERSION_1_3 but required Vulkan version is disabled by preprocessor macros.");
|
||||
}
|
||||
VMA_ASSERT(m_VulkanApiVersion < VK_MAKE_VERSION(1, 3, 0) && "vulkanApiVersion >= VK_API_VERSION_1_3 but required Vulkan version is disabled by preprocessor macros.");
|
||||
#endif
|
||||
#if VMA_VULKAN_VERSION < 1002000
|
||||
if(m_VulkanApiVersion >= VK_MAKE_VERSION(1, 2, 0))
|
||||
{
|
||||
VMA_ASSERT(0 && "vulkanApiVersion >= VK_API_VERSION_1_2 but required Vulkan version is disabled by preprocessor macros.");
|
||||
}
|
||||
VMA_ASSERT(m_VulkanApiVersion < VK_MAKE_VERSION(1, 2, 0) && "vulkanApiVersion >= VK_API_VERSION_1_2 but required Vulkan version is disabled by preprocessor macros.");
|
||||
#endif
|
||||
#if VMA_VULKAN_VERSION < 1001000
|
||||
if(m_VulkanApiVersion >= VK_MAKE_VERSION(1, 1, 0))
|
||||
{
|
||||
VMA_ASSERT(0 && "vulkanApiVersion >= VK_API_VERSION_1_1 but required Vulkan version is disabled by preprocessor macros.");
|
||||
}
|
||||
VMA_ASSERT(m_VulkanApiVersion < VK_MAKE_VERSION(1, 1, 0) && "vulkanApiVersion >= VK_API_VERSION_1_1 but required Vulkan version is disabled by preprocessor macros.");
|
||||
#endif
|
||||
#if !(VMA_MEMORY_PRIORITY)
|
||||
if(m_UseExtMemoryPriority)
|
||||
|
||||
+11
-15
@@ -25,7 +25,7 @@
|
||||
|
||||
/** \mainpage Vulkan Memory Allocator
|
||||
|
||||
<b>Version 3.1.0</b>
|
||||
<b>Version 3.2.0</b>
|
||||
|
||||
Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All rights reserved. \n
|
||||
License: MIT \n
|
||||
@@ -133,7 +133,9 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#if !defined(VMA_VULKAN_VERSION)
|
||||
#if defined(VK_VERSION_1_3)
|
||||
#if defined(VK_VERSION_1_4)
|
||||
#define VMA_VULKAN_VERSION 1004000
|
||||
#elif defined(VK_VERSION_1_3)
|
||||
#define VMA_VULKAN_VERSION 1003000
|
||||
#elif defined(VK_VERSION_1_2)
|
||||
#define VMA_VULKAN_VERSION 1002000
|
||||
@@ -1121,7 +1123,7 @@ typedef struct VmaAllocatorCreateInfo
|
||||
|
||||
It must be a value in the format as created by macro `VK_MAKE_VERSION` or a constant like: `VK_API_VERSION_1_1`, `VK_API_VERSION_1_0`.
|
||||
The patch version number specified is ignored. Only the major and minor versions are considered.
|
||||
Only versions 1.0, 1.1, 1.2, 1.3 are supported by the current implementation.
|
||||
Only versions 1.0...1.4 are supported by the current implementation.
|
||||
Leaving it initialized to zero is equivalent to `VK_API_VERSION_1_0`.
|
||||
It must match the Vulkan version used by the application and supported on the selected physical device,
|
||||
so it must be no higher than `VkApplicationInfo::apiVersion` passed to `vkCreateInstance`
|
||||
@@ -12977,23 +12979,17 @@ VmaAllocator_T::VmaAllocator_T(const VmaAllocatorCreateInfo* pCreateInfo) :
|
||||
VMA_ASSERT(0 && "VMA_ALLOCATOR_CREATE_BUFFER_DEVICE_ADDRESS_BIT is set but required extension or Vulkan 1.2 is not available in your Vulkan header or its support in VMA has been disabled by a preprocessor macro.");
|
||||
}
|
||||
#endif
|
||||
#if VMA_VULKAN_VERSION < 1004000
|
||||
VMA_ASSERT(m_VulkanApiVersion < VK_MAKE_VERSION(1, 4, 0) && "vulkanApiVersion >= VK_API_VERSION_1_4 but required Vulkan version is disabled by preprocessor macros.");
|
||||
#endif
|
||||
#if VMA_VULKAN_VERSION < 1003000
|
||||
if(m_VulkanApiVersion >= VK_MAKE_VERSION(1, 3, 0))
|
||||
{
|
||||
VMA_ASSERT(0 && "vulkanApiVersion >= VK_API_VERSION_1_3 but required Vulkan version is disabled by preprocessor macros.");
|
||||
}
|
||||
VMA_ASSERT(m_VulkanApiVersion < VK_MAKE_VERSION(1, 3, 0) && "vulkanApiVersion >= VK_API_VERSION_1_3 but required Vulkan version is disabled by preprocessor macros.");
|
||||
#endif
|
||||
#if VMA_VULKAN_VERSION < 1002000
|
||||
if(m_VulkanApiVersion >= VK_MAKE_VERSION(1, 2, 0))
|
||||
{
|
||||
VMA_ASSERT(0 && "vulkanApiVersion >= VK_API_VERSION_1_2 but required Vulkan version is disabled by preprocessor macros.");
|
||||
}
|
||||
VMA_ASSERT(m_VulkanApiVersion < VK_MAKE_VERSION(1, 2, 0) && "vulkanApiVersion >= VK_API_VERSION_1_2 but required Vulkan version is disabled by preprocessor macros.");
|
||||
#endif
|
||||
#if VMA_VULKAN_VERSION < 1001000
|
||||
if(m_VulkanApiVersion >= VK_MAKE_VERSION(1, 1, 0))
|
||||
{
|
||||
VMA_ASSERT(0 && "vulkanApiVersion >= VK_API_VERSION_1_1 but required Vulkan version is disabled by preprocessor macros.");
|
||||
}
|
||||
VMA_ASSERT(m_VulkanApiVersion < VK_MAKE_VERSION(1, 1, 0) && "vulkanApiVersion >= VK_API_VERSION_1_1 but required Vulkan version is disabled by preprocessor macros.");
|
||||
#endif
|
||||
#if !(VMA_MEMORY_PRIORITY)
|
||||
if(m_UseExtMemoryPriority)
|
||||
|
||||
+206
-194
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -1051,6 +1051,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
03000000b40400000a01000000000000,Sega Saturn,a:b0,b:b1,back:b5,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,guide:b2,leftshoulder:b6,rightshoulder:b7,start:b8,x:b3,y:b4,platform:Mac OS X,
|
||||
030000003512000021ab000000000000,SFC30 Joystick,a:b1,b:b0,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Mac OS X,
|
||||
0300000000f00000f100000000000000,SNES RetroPort,a:b2,b:b3,back:b4,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b5,rightshoulder:b7,start:b6,x:b0,y:b1,platform:Mac OS X,
|
||||
03000000bc2000000155000000010000,SNK NEOGEO Arcade Stick Pro,a:b1,b:b4,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b2,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b11,x:b0,y:b3,platform:Mac OS X,
|
||||
030000004c050000a00b000000000000,Sony DualShock 4 Adapter,a:b1,b:b2,back:b13,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Mac OS X,
|
||||
030000004c050000cc09000000000000,Sony DualShock 4 V2,a:b1,b:b2,back:b13,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Mac OS X,
|
||||
03000000666600006706000088020000,Sony PlayStation Adapter,a:b2,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,rightx:a2,righty:a3,start:b11,x:b3,y:b0,platform:Mac OS X,
|
||||
@@ -1324,7 +1325,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
030000000d0f00008501000015010000,Hori Switch Split Pad Pro,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
030000000d0f00006e00000011010000,Horipad 4 PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
|
||||
030000000d0f00006600000011010000,Horipad 4 PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Linux,
|
||||
030000000d0f0000ee00000011010000,Horipad Mini 4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
|
||||
030000000d0f0000ee00000011010000,Horipad Mini 4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b13,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
|
||||
030000000d0f0000c100000011010000,Horipad Nintendo Switch Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
|
||||
030000000d0f00006700000001010000,Horipad One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
050000000d0f0000f600000001000000,Horipad Switch Pro Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,
|
||||
@@ -1516,6 +1517,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
03000000d62000000240000001010000,PowerA Xbox One Spectra Infinity,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
03000000d62000000f20000001010000,PowerA Xbox Series Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b7,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
03000000d62000000b20000001010000,PowerA Xbox Series X Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
03000000d62000000540000001010000,PowerA Advantage Xbox Series X Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
030000006d040000d2ca000011010000,Precision Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000250900000017000010010000,PS/SS/N64 Adapter,a:b1,b:b2,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,leftshoulder:b5,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b7,rightx:a2~,righty:a3,start:b8,platform:Linux,
|
||||
03000000ff1100004133000010010000,PS2 Controller,a:b2,b:b1,back:b8,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,start:b9,x:b3,y:b0,platform:Linux,
|
||||
@@ -1609,6 +1611,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
03000000a30600001005000000010000,Saitek P150,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b7,lefttrigger:b6,rightshoulder:b2,righttrigger:b5,x:b3,y:b4,platform:Linux,
|
||||
03000000a30600000701000000010000,Saitek P220,a:b2,b:b3,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,lefttrigger:b7,rightshoulder:b4,righttrigger:b5,x:b0,y:b1,platform:Linux,
|
||||
03000000a30600000cff000010010000,Saitek P2500 Force Rumble,a:b2,b:b3,back:b11,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a2,start:b10,x:b0,y:b1,platform:Linux,
|
||||
03000000a30600000d5f000010010000,Saitek P2600,a:b1,b:b2,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b11,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a3,righty:a2,start:b8,x:b0,y:b3,platform:Linux,
|
||||
03000000a30600000c04000011010000,Saitek P2900,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b12,x:b0,y:b3,platform:Linux,
|
||||
03000000a306000018f5000010010000,Saitek P3200 Rumble,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000300f00001201000010010000,Saitek P380,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Linux,
|
||||
|
||||
Executable
+422
@@ -0,0 +1,422 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# PCSX2 - PS2 Emulator for PCs
|
||||
# Copyright (C) 2024 PCSX2 Dev Team
|
||||
#
|
||||
# PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
# of the GNU General Public License as published by the Free Software Found-
|
||||
# ation, either version 3 of the License, or (at your option) any later version.
|
||||
#
|
||||
# PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
# If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
import sys
|
||||
import os
|
||||
import re
|
||||
from subprocess import Popen, PIPE
|
||||
from os.path import exists
|
||||
|
||||
gamecount = [0]
|
||||
|
||||
# =================================================================================================
|
||||
|
||||
def deletionChoice(source_extension): # Choose to delete source files
|
||||
|
||||
yesno = {
|
||||
"n" : 0,
|
||||
"no" : 0,
|
||||
"y" : 1,
|
||||
"yes" : 1,
|
||||
}
|
||||
|
||||
print("╟-------------------------------------------------------------------------------╢")
|
||||
print(f"║ Do you want to delete the original {source_extension.upper()} files as they are converted?")
|
||||
choice = input("║ Type Y or N then press ENTER: ").lower()
|
||||
|
||||
if (not choice in yesno):
|
||||
exitInvalidOption()
|
||||
|
||||
return (yesno[choice])
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
def blockSizeChoice(is_cd, decompressing): # Choose block size
|
||||
|
||||
if (decompressing):
|
||||
return 0
|
||||
|
||||
sizes = {
|
||||
"1" : 16384,
|
||||
"2" : 131072,
|
||||
"3" : 262144,
|
||||
} if not is_cd else {
|
||||
"1": 17136,
|
||||
"2": 132192,
|
||||
"3": 264384,
|
||||
}
|
||||
|
||||
print("╟-------------------------------------------------------------------------------╢")
|
||||
print("║ Please pick the block size you would like to use:")
|
||||
print("║")
|
||||
print("║ 1 - 16 kB (bigger files, faster access/less CPU, choose this if unsure)")
|
||||
print("║ 2 - 128 kB (balanced)")
|
||||
print("║ 3 - 256 kB (smaller files, slower access/more CPU)")
|
||||
print("║")
|
||||
blocksize = input("║ Type the number corresponding to your selection then press ENTER: ")
|
||||
|
||||
if (not blocksize in sizes):
|
||||
exitInvalidOption()
|
||||
|
||||
return (sizes[blocksize])
|
||||
|
||||
# =================================================================================================
|
||||
|
||||
def checkSuccess(compressing, fname, extension, error_code): # Ensure file created properly
|
||||
|
||||
target_fname = f"{fname}.{extension}"
|
||||
if (error_code):
|
||||
|
||||
print("╠===============================================================================╣")
|
||||
|
||||
if (compressing):
|
||||
print(f"║ Compression to {extension.upper()} failed for the following:{(37 - len(extension)) * ' '}║")
|
||||
else:
|
||||
print(f"║ Extraction to {extension.upper()} failed for the following:{(38 - len(extension)) * ' '}║")
|
||||
|
||||
print(f"║ {target_fname}{(77 - len(target_fname)) * ' '}║")
|
||||
print("╚===============================================================================╝")
|
||||
|
||||
sys.exit(1)
|
||||
|
||||
print(f"║ {target_fname} created.{(69 - len(target_fname)) * ' '}║")
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
def checkProgramMissing(program):
|
||||
|
||||
if (sys.platform.startswith('win32') and exists(f"./{program}.exe")):
|
||||
return # Windows
|
||||
|
||||
else: # Linux, macOS
|
||||
from shutil import which
|
||||
if (which(program) is not None):
|
||||
return
|
||||
|
||||
print("╠===============================================================================╗")
|
||||
print(f"║ {program} failed, {program} is missing.{(39 - (len(program) * 2)) * ' '}║")
|
||||
print("╚===============================================================================╝")
|
||||
sys.exit(1)
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
def checkBinCueMismatch(bin_files, cue_files): # Ensure all bins and cues match
|
||||
|
||||
if (len(bin_files) != len(cue_files)): # Ensure numerical parity
|
||||
exitBinCueMismatch()
|
||||
|
||||
for fname in bin_files: # Ensure filename parity
|
||||
if (f"{fname[:-4]}.cue" not in cue_files):
|
||||
exitBinCueMismatch()
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
def checkDuplicates(source_files, target_extensions, crash_protection_type=0):
|
||||
|
||||
dupe_options = {
|
||||
"s" : 0,
|
||||
"skip" : 0,
|
||||
"o" : 1,
|
||||
"overwrite" : 1,
|
||||
}
|
||||
|
||||
dupe_files = []
|
||||
dupe_names = []
|
||||
target_files = []
|
||||
|
||||
for extension in target_extensions:
|
||||
target_files[len(target_files):] = returnFilteredPwdContents(extension)
|
||||
|
||||
for fname in source_files:
|
||||
for extension in target_extensions:
|
||||
target_fname = f"{fname[:-4]}.{extension}"
|
||||
if (target_fname in target_files):
|
||||
dupe_files.append(target_fname)
|
||||
|
||||
match crash_protection_type:
|
||||
case 0:
|
||||
pass
|
||||
case 1: # Skip any dupe files no matter what
|
||||
[dupe_names.append(fname[:-4]) for fname in dupe_files if fname[:-4] not in dupe_names]
|
||||
return dupe_names
|
||||
case 2: # Only skip if intermediate .iso present
|
||||
[dupe_names.append(fname[:-4]) for fname in dupe_files if fname[:-4] not in dupe_names and fname[-4:] == ".iso"]
|
||||
case _:
|
||||
pass
|
||||
|
||||
if (not dupe_files):
|
||||
return dupe_names
|
||||
|
||||
print("╟-------------------------------------------------------------------------------╢")
|
||||
print("║ The following files were found which would be overwritten:")
|
||||
|
||||
for fname in dupe_files:
|
||||
print(f"║ - {fname}")
|
||||
|
||||
print("║")
|
||||
print("║ You may choose to OVERWRITE or SKIP all of these.")
|
||||
if (crash_protection_type == 2):
|
||||
# chdman CLI just crashes trying to overwrite a .iso file
|
||||
print("║ NOTE: chdman cannot overwrite .iso files, which are used as an intermediate format.")
|
||||
print("║ These will be skipped regardless.")
|
||||
choice = input("║ Press 'O' to overwrite or 'S' to skip and press ENTER: ").lower()
|
||||
|
||||
if (choice in dupe_options):
|
||||
if (not dupe_options[choice]): # Skip
|
||||
[dupe_names.append(fname[:-4]) for fname in dupe_files if fname[:-4] not in dupe_names]
|
||||
return dupe_names
|
||||
else:
|
||||
exitInvalidOption()
|
||||
|
||||
# =================================================================================================
|
||||
|
||||
def printInitialStatus(decompressing, target_fname):
|
||||
|
||||
if (gamecount[0] != 0):
|
||||
print("╟-------------------------------------------------------------------------------╢")
|
||||
gamecount[0] += 1
|
||||
|
||||
if (decompressing):
|
||||
print(f"║ Extracting to {target_fname}... ({gamecount[0]}){(58 - len(target_fname) - len(str(gamecount[0]))) * ' '}║")
|
||||
else:
|
||||
print(f"║ Compressing to {target_fname}... ({gamecount[0]}){(57 - len(target_fname) - len(str(gamecount[0]))) * ' '}║")
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
def printSkip(target_fname):
|
||||
|
||||
if (gamecount[0] != 0):
|
||||
print("╟-------------------------------------------------------------------------------╢")
|
||||
gamecount[0] += 1
|
||||
print(f"║ Skipping creation of {target_fname}{(57 - len(target_fname)) * ' '}║")
|
||||
|
||||
# =================================================================================================
|
||||
|
||||
def createCommandList(mode, source_fname, target_fname, blocksize=0):
|
||||
|
||||
match mode:
|
||||
case 1:
|
||||
return [["maxcso", f"--block={blocksize}", source_fname]]
|
||||
case 2:
|
||||
return [["chdman", "createraw", "-us", "2048", "-hs", f"{blocksize}", "-f", "-i", source_fname, "-o", target_fname]]
|
||||
case 3:
|
||||
return [["chdman", "createcd", "-hs", f"{blocksize}", "-i", source_fname, "-o", f"{source_fname[:-4]}.chd"]]
|
||||
case 4:
|
||||
return [["maxcso", "--decompress", source_fname],
|
||||
["chdman", "createraw", "-us", "2048", "-hs", f"{blocksize}", "-f", "-i", f"{source_fname[:-4]}.iso", "-o", f"{source_fname[:-4]}.chd"]]
|
||||
case 5:
|
||||
return [["chdman", "extractraw", "-i", source_fname, "-o", f"{source_fname[:-4]}.iso"],
|
||||
["maxcso", f"--block={blocksize}", f"{source_fname[:-4]}.iso"]]
|
||||
case 6:
|
||||
return [["chdman", "extractraw", "-i", source_fname, "-o", target_fname]]
|
||||
case 7:
|
||||
return [["chdman", "extractcd", "-i", source_fname, "-o", target_fname]]
|
||||
case 8:
|
||||
return [["maxcso", "--decompress", source_fname]]
|
||||
case _:
|
||||
print("You have somehow chosen an invalid mode, and this was not correctly caught by the program.\nPlease report this as a bug.")
|
||||
sys.exit(1)
|
||||
|
||||
# =================================================================================================
|
||||
|
||||
def returnFilteredPwdContents(file_extension): # Get files in pwd with extension
|
||||
|
||||
extension_pattern = r".*\." + file_extension.lower()
|
||||
extension_reg = re.compile(extension_pattern)
|
||||
return [fname for fname in os.listdir('.') if extension_reg.match(fname)]
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
def deleteFile(fname): # Delete a file in pwd
|
||||
|
||||
print(f"║ Deleting {fname}...{(66 - len(fname)) * ' '}║")
|
||||
os.remove(f"./{fname}")
|
||||
|
||||
# =================================================================================================
|
||||
|
||||
def exitInvalidOption():
|
||||
|
||||
print("╠===============================================================================╗")
|
||||
print("║ Invalid option. ║")
|
||||
print("╚===============================================================================╝")
|
||||
sys.exit(1)
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
def exitBinCueMismatch():
|
||||
|
||||
print("╠===============================================================================╗")
|
||||
print("║ All BIN files must have a matching CUE. ║")
|
||||
print("╚===============================================================================╝")
|
||||
sys.exit(1)
|
||||
|
||||
# =================================================================================================
|
||||
# /////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
# =================================================================================================
|
||||
|
||||
options = { # Options listings
|
||||
1 : "Convert ISO to CSO",
|
||||
2 : "Convert ISO to CHD",
|
||||
3 : "Convert CUE/BIN to CHD",
|
||||
4 : "Convert CSO to CHD",
|
||||
5 : "Convert DVD CHD to CSO",
|
||||
6 : "Extract DVD CHD to ISO",
|
||||
7 : "Extract CD CHD to CUE/BIN",
|
||||
8 : "Extract CSO to ISO",
|
||||
9 : "Exit script",
|
||||
}
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
sources = { # Source file extensions
|
||||
1 : "iso",
|
||||
2 : "iso",
|
||||
3 : "cue/bin",
|
||||
4 : "cso",
|
||||
5 : "chd",
|
||||
6 : "chd",
|
||||
7 : "chd",
|
||||
8 : "cso",
|
||||
}
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
targets = { # Target file extensions
|
||||
1 : ["cso"],
|
||||
2 : ["chd"],
|
||||
3 : ["chd"],
|
||||
4 : ["iso", "chd"],
|
||||
5 : ["iso", "cso"],
|
||||
6 : ["iso"],
|
||||
7 : ["cue", "bin"],
|
||||
8 : ["iso"],
|
||||
}
|
||||
|
||||
# # -------------------------------------------------------------------------------------------------
|
||||
|
||||
reqs = { # Selection dependencies
|
||||
1 : ["maxcso"],
|
||||
2 : ["chdman"],
|
||||
3 : ["chdman"],
|
||||
4 : ["maxcso", "chdman"],
|
||||
5 : ["maxcso", "chdman"],
|
||||
6 : ["chdman"],
|
||||
7 : ["chdman"],
|
||||
8 : ["maxcso"],
|
||||
}
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
print("╔===============================================================================╗")
|
||||
print("║ CSO/CHD/ISO/CUEBIN Conversion by Refraction, RedDevilus and TheTechnician27 ║")
|
||||
print("║ (Version Jul 16 2024) ║")
|
||||
print("╠===============================================================================╣")
|
||||
print("║ ║")
|
||||
print("║ PLEASE NOTE: This will affect all files in this folder! ║")
|
||||
print("║ Be sure to run this from the same directory as the files you wish to convert. ║")
|
||||
print("║ ║")
|
||||
|
||||
for number, message in options.items():
|
||||
print("║ ", number, " - ", message, f"{(70 - len(message)) * ' '}║")
|
||||
|
||||
print("║ ║")
|
||||
print("╠===============================================================================╝")
|
||||
#print("║")
|
||||
mode = input("║ Type the number corresponding to your selection then press ENTER: ")
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
try:
|
||||
mode = int(mode)
|
||||
|
||||
except ValueError:
|
||||
exitInvalidOption()
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
if (mode < 9 and mode > 0):
|
||||
|
||||
for program in reqs[mode]: # Check for dependencies
|
||||
checkProgramMissing(program)
|
||||
|
||||
delete = deletionChoice(sources[mode]) # Choose to delete source files
|
||||
blocksize = blockSizeChoice(mode == 3, mode > 5) # Choose block size if compressing
|
||||
|
||||
match mode:
|
||||
case 3:
|
||||
bin_files = returnFilteredPwdContents("bin") # Get all BIN files in pwd
|
||||
source_files = returnFilteredPwdContents("cue") # Get all CUE files in pwd
|
||||
checkBinCueMismatch(bin_files, source_files)
|
||||
dupe_list = checkDuplicates(source_files, targets[mode], 1)
|
||||
case 5:
|
||||
source_files = returnFilteredPwdContents(sources[mode]) # Get source files in pwd
|
||||
dupe_list = checkDuplicates(source_files, targets[mode], 2)
|
||||
case 6:
|
||||
source_files = returnFilteredPwdContents(sources[mode]) # Get source files in pwd
|
||||
dupe_list = checkDuplicates(source_files, targets[mode], 1)
|
||||
case _:
|
||||
source_files = returnFilteredPwdContents(sources[mode]) # Get source files in pwd
|
||||
dupe_list = checkDuplicates(source_files, targets[mode])
|
||||
|
||||
|
||||
print("╠===============================================================================╗")
|
||||
|
||||
# ---------------------------------------------------------------------------------------------
|
||||
|
||||
for fname in source_files:
|
||||
|
||||
target_fname = f"{fname[:-4]}.{targets[mode][0]}"
|
||||
commands = createCommandList(mode, fname, target_fname, blocksize)
|
||||
if (fname[:-4] in dupe_list):
|
||||
printSkip(target_fname)
|
||||
continue
|
||||
|
||||
printInitialStatus(mode > 5, f"{fname[:-4]}.{targets[mode][-1]}")
|
||||
|
||||
for step, command in enumerate (commands):
|
||||
|
||||
process = Popen(commands[step], stdout=PIPE, stderr=PIPE) # Execute process
|
||||
stdout, stderr = process.communicate() # Suppress output
|
||||
checkSuccess(mode < 6, fname[:-4], # Ensure target creation
|
||||
targets[mode][step], process.returncode)
|
||||
|
||||
if (step == 1): # Delete intermediate file
|
||||
deleteFile(f"{fname[:-4]}.iso")
|
||||
|
||||
if (delete): # Delete source requested
|
||||
deleteFile(fname)
|
||||
if (mode == 3):
|
||||
deleteFile(f"{fname[:-4]}.bin")
|
||||
|
||||
# ===== EXIT SCRIPT ===============================================================================
|
||||
|
||||
elif (mode == 9):
|
||||
print("╠===============================================================================╗")
|
||||
print("║ Goodbye! :) ║")
|
||||
print("╚===============================================================================╝")
|
||||
sys.exit(0)
|
||||
|
||||
# ===== EXIT SCRIPT WITH ERROR ====================================================================
|
||||
|
||||
else:
|
||||
exitInvalidOption()
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
print("╠===============================================================================╣")
|
||||
print("║ Process complete! ║")
|
||||
print("╚===============================================================================╝")
|
||||
sys.exit(0)
|
||||
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: 2002-2024 PCSX2 Dev Team
|
||||
// SPDX-FileCopyrightText: 2002-2025 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: GPL-3.0+
|
||||
|
||||
#include "common/Pcsx2Types.h"
|
||||
@@ -22,6 +22,8 @@
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
#include <dbus/dbus.h>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
// Returns 0 on failure (not supported by the operating system).
|
||||
u64 GetPhysicalMemory()
|
||||
@@ -101,6 +103,7 @@ static bool SetScreensaverInhibitDBus(const bool inhibit_requested, const char*
|
||||
DBusMessage* message = nullptr;
|
||||
DBusMessage* response = nullptr;
|
||||
DBusMessageIter message_itr;
|
||||
char* desktop_session = nullptr;
|
||||
|
||||
ScopedGuard cleanup = [&]() {
|
||||
if (dbus_error_is_set(&error_dbus))
|
||||
@@ -122,7 +125,17 @@ static bool SetScreensaverInhibitDBus(const bool inhibit_requested, const char*
|
||||
s_cookie = 0;
|
||||
s_comparison_connection = connection;
|
||||
}
|
||||
message = dbus_message_new_method_call("org.freedesktop.ScreenSaver", "/org/freedesktop/ScreenSaver", "org.freedesktop.ScreenSaver", bus_method);
|
||||
|
||||
desktop_session = std::getenv("DESKTOP_SESSION");
|
||||
if (desktop_session && std::strncmp(desktop_session, "mate", 4) == 0)
|
||||
{
|
||||
message = dbus_message_new_method_call("org.mate.ScreenSaver", "/org/mate/ScreenSaver", "org.mate.ScreenSaver", bus_method);
|
||||
}
|
||||
else
|
||||
{
|
||||
message = dbus_message_new_method_call("org.freedesktop.ScreenSaver", "/org/freedesktop/ScreenSaver", "org.freedesktop.ScreenSaver", bus_method);
|
||||
}
|
||||
|
||||
if (!message)
|
||||
return false;
|
||||
// Initialize an append iterator for the message, gets freed with the message.
|
||||
|
||||
@@ -1224,22 +1224,35 @@ const xRegister32
|
||||
#ifdef _WIN32
|
||||
xPUSH(rdi);
|
||||
xPUSH(rsi);
|
||||
xSUB(rsp, 32); // Windows calling convention specifies additional space for the callee to spill registers
|
||||
m_offset += 48;
|
||||
#endif
|
||||
m_offset += 16;
|
||||
|
||||
// Align for movaps, in addition to any following instructions
|
||||
stackAlign(m_offset, true);
|
||||
|
||||
xSUB(rsp, 16 * 10);
|
||||
for (u32 i = 6; i < 16; i++)
|
||||
xMOVAPS(ptr128[rsp + (i - 6) * 16], xRegisterSSE(i));
|
||||
xSUB(rsp, 32); // Windows calling convention specifies additional space for the callee to spill registers
|
||||
#else
|
||||
// Align for any following instructions
|
||||
stackAlign(m_offset, true);
|
||||
#endif
|
||||
}
|
||||
|
||||
xScopedStackFrame::~xScopedStackFrame()
|
||||
{
|
||||
stackAlign(m_offset, false);
|
||||
|
||||
// Restore the register context
|
||||
#ifdef _WIN32
|
||||
xADD(rsp, 32);
|
||||
for (u32 i = 6; i < 16; i++)
|
||||
xMOVAPS(xRegisterSSE::GetInstance(i), ptr[rsp + (i - 6) * 16]);
|
||||
xADD(rsp, 16 * 10);
|
||||
|
||||
stackAlign(m_offset, false);
|
||||
xPOP(rsi);
|
||||
xPOP(rdi);
|
||||
#else
|
||||
stackAlign(m_offset, false);
|
||||
#endif
|
||||
xPOP(r15);
|
||||
xPOP(r14);
|
||||
|
||||
@@ -114,7 +114,7 @@ def check_regression_test(baselinedir, testdir, name):
|
||||
if not os.path.isfile(path2):
|
||||
print("--- Frame %u for %s is missing in test set" % (framenum, name))
|
||||
write("<h1>{}</h1>".format(name))
|
||||
write("--- Frame %u for %s is missing in test set" % (framenum, name))
|
||||
write("<pre>--- Frame %u for %s is missing in test set</pre>" % (framenum, name))
|
||||
return False
|
||||
|
||||
if not compare_frames(path1, path2):
|
||||
|
||||
@@ -336,7 +336,7 @@ void CpuWidget::onVMPaused()
|
||||
}
|
||||
else
|
||||
{
|
||||
m_ui.disassemblyWidget->gotoAddress(m_cpu.getPC(), false);
|
||||
m_ui.disassemblyWidget->gotoProgramCounterOnPause();
|
||||
}
|
||||
|
||||
reloadCPUWidgets();
|
||||
|
||||
@@ -656,6 +656,12 @@ void DisassemblyWidget::customMenuRequested(QPoint pos)
|
||||
connect(action, &QAction::triggered, this, &DisassemblyWidget::contextGoToAddress);
|
||||
contextMenu->addAction(action = new QAction(tr("Go to in Memory View"), this));
|
||||
connect(action, &QAction::triggered, this, [this]() { gotoInMemory(m_selectedAddressStart); });
|
||||
|
||||
contextMenu->addAction(action = new QAction(tr("Go to PC on Pause"), this));
|
||||
action->setCheckable(true);
|
||||
action->setChecked(m_goToProgramCounterOnPause);
|
||||
connect(action, &QAction::triggered, this, [this](bool value) { m_goToProgramCounterOnPause = value; });
|
||||
|
||||
contextMenu->addSeparator();
|
||||
contextMenu->addAction(action = new QAction(tr("Add Function"), this));
|
||||
connect(action, &QAction::triggered, this, &DisassemblyWidget::contextAddFunction);
|
||||
@@ -822,6 +828,12 @@ void DisassemblyWidget::gotoAddressAndSetFocus(u32 address)
|
||||
gotoAddress(address, true);
|
||||
}
|
||||
|
||||
void DisassemblyWidget::gotoProgramCounterOnPause()
|
||||
{
|
||||
if (m_goToProgramCounterOnPause)
|
||||
gotoAddress(m_cpu->getPC(), false);
|
||||
}
|
||||
|
||||
void DisassemblyWidget::gotoAddress(u32 address, bool should_set_focus)
|
||||
{
|
||||
const u32 destAddress = address & ~3;
|
||||
|
||||
@@ -59,6 +59,7 @@ public slots:
|
||||
void contextShowOpcode();
|
||||
|
||||
void gotoAddressAndSetFocus(u32 address);
|
||||
void gotoProgramCounterOnPause();
|
||||
void gotoAddress(u32 address, bool should_set_focus);
|
||||
|
||||
void setDemangle(bool demangle) { m_demangleFunctions = demangle; };
|
||||
@@ -82,6 +83,7 @@ private:
|
||||
|
||||
bool m_demangleFunctions = true;
|
||||
bool m_showInstructionOpcode = true;
|
||||
bool m_goToProgramCounterOnPause = true;
|
||||
DisassemblyManager m_disassemblyManager;
|
||||
|
||||
inline QString DisassemblyStringFromAddress(u32 address, QFont font, u32 pc, bool selected);
|
||||
|
||||
@@ -460,8 +460,8 @@ std::vector<std::unique_ptr<SymbolTreeNode>> SymbolTreeModel::populateChildren(
|
||||
|
||||
for (const ccc::ast::StructOrUnion::FlatField& field : fields)
|
||||
{
|
||||
if (symbol)
|
||||
parent_handle = ccc::NodeHandle(*symbol, nullptr);
|
||||
if (field.symbol)
|
||||
parent_handle = ccc::NodeHandle(*field.symbol, nullptr);
|
||||
|
||||
SymbolTreeLocation field_location = location.addOffset(field.base_offset + field.node->offset_bytes);
|
||||
if (field_location.type == SymbolTreeLocation::NONE)
|
||||
|
||||
@@ -1346,9 +1346,8 @@ void MainWindow::onGameListEntryContextMenuRequested(const QPoint& point)
|
||||
if (action->isEnabled())
|
||||
{
|
||||
connect(action, &QAction::triggered, [entry]() {
|
||||
SettingsWindow::openGamePropertiesDialog(entry, entry->title,
|
||||
(entry->type != GameList::EntryType::ELF) ? entry->serial : std::string(),
|
||||
entry->crc);
|
||||
SettingsWindow::openGamePropertiesDialog(entry,
|
||||
entry->title, entry->serial, entry->crc, entry->type == GameList::EntryType::ELF);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1564,7 +1563,7 @@ void MainWindow::onViewGamePropertiesActionTriggered()
|
||||
if (entry)
|
||||
{
|
||||
SettingsWindow::openGamePropertiesDialog(
|
||||
entry, entry->title, s_current_elf_override.isEmpty() ? entry->serial : std::string(), entry->crc);
|
||||
entry, entry->title, entry->serial, entry->crc, !s_current_elf_override.isEmpty());
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1580,12 +1579,12 @@ void MainWindow::onViewGamePropertiesActionTriggered()
|
||||
if (s_current_elf_override.isEmpty())
|
||||
{
|
||||
SettingsWindow::openGamePropertiesDialog(
|
||||
nullptr, s_current_title.toStdString(), s_current_disc_serial.toStdString(), s_current_disc_crc);
|
||||
nullptr, s_current_title.toStdString(), s_current_disc_serial.toStdString(), s_current_disc_crc, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
SettingsWindow::openGamePropertiesDialog(
|
||||
nullptr, s_current_title.toStdString(), std::string(), s_current_disc_crc);
|
||||
nullptr, s_current_title.toStdString(), std::string(), s_current_disc_crc, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ ControllerSettingsWindow::ControllerSettingsWindow()
|
||||
connect(m_ui.buttonBox, &QDialogButtonBox::rejected, this, &ControllerSettingsWindow::close);
|
||||
connect(m_ui.newProfile, &QPushButton::clicked, this, &ControllerSettingsWindow::onNewProfileClicked);
|
||||
connect(m_ui.applyProfile, &QPushButton::clicked, this, &ControllerSettingsWindow::onApplyProfileClicked);
|
||||
connect(m_ui.renameProfile, &QPushButton::clicked, this, &ControllerSettingsWindow::onRenameProfileClicked);
|
||||
connect(m_ui.deleteProfile, &QPushButton::clicked, this, &ControllerSettingsWindow::onDeleteProfileClicked);
|
||||
connect(m_ui.mappingSettings, &QPushButton::clicked, this, &ControllerSettingsWindow::onMappingSettingsClicked);
|
||||
connect(m_ui.restoreDefaults, &QPushButton::clicked, this, &ControllerSettingsWindow::onRestoreDefaultsClicked);
|
||||
@@ -176,6 +177,48 @@ void ControllerSettingsWindow::onApplyProfileClicked()
|
||||
switchProfile({});
|
||||
}
|
||||
|
||||
void ControllerSettingsWindow::onRenameProfileClicked()
|
||||
{
|
||||
const QString profile_name(QInputDialog::getText(this, tr("Rename Input Profile"),
|
||||
tr("Enter the new name for the input profile:").arg(m_profile_name)));
|
||||
|
||||
if (profile_name.isEmpty())
|
||||
return;
|
||||
|
||||
std::string old_profile_name(m_profile_name.toStdString());
|
||||
std::string old_profile_path(VMManager::GetInputProfilePath(m_profile_name.toStdString()));
|
||||
std::string profile_path(VMManager::GetInputProfilePath(profile_name.toStdString()));
|
||||
if (FileSystem::FileExists(profile_path.c_str()))
|
||||
{
|
||||
QMessageBox::critical(this, tr("Error"), tr("A profile with the name '%1' already exists.").arg(profile_name));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!FileSystem::RenamePath(old_profile_path.c_str(), profile_path.c_str()))
|
||||
{
|
||||
QMessageBox::critical(this, tr("Error"), tr("Failed to rename '%1'.").arg(QString::fromStdString(old_profile_path)));
|
||||
return;
|
||||
}
|
||||
|
||||
FileSystem::FindResultsArray files;
|
||||
FileSystem::FindFiles(EmuFolders::GameSettings.c_str(), "*", FILESYSTEM_FIND_FILES, &files);
|
||||
for (const auto& game_settings : files)
|
||||
{
|
||||
std::string game_settings_path(game_settings.FileName.c_str());
|
||||
std::unique_ptr<INISettingsInterface> update_sif(std::make_unique<INISettingsInterface>(std::move(game_settings_path)));
|
||||
|
||||
update_sif->Load();
|
||||
|
||||
if (!old_profile_name.compare(update_sif->GetStringValue("EmuCore", "InputProfileName")))
|
||||
{
|
||||
update_sif->SetStringValue("EmuCore", "InputProfileName", profile_name.toUtf8());
|
||||
}
|
||||
}
|
||||
|
||||
refreshProfileList();
|
||||
switchProfile({profile_name});
|
||||
}
|
||||
|
||||
void ControllerSettingsWindow::onDeleteProfileClicked()
|
||||
{
|
||||
if (QMessageBox::question(this, tr("Delete Input Profile"),
|
||||
@@ -451,6 +494,7 @@ void ControllerSettingsWindow::createWidgets()
|
||||
}
|
||||
|
||||
m_ui.applyProfile->setEnabled(isEditingProfile());
|
||||
m_ui.renameProfile->setEnabled(isEditingProfile());
|
||||
m_ui.deleteProfile->setEnabled(isEditingProfile());
|
||||
m_ui.restoreDefaults->setEnabled(isEditingGlobalSettings());
|
||||
}
|
||||
|
||||
@@ -76,6 +76,7 @@ private Q_SLOTS:
|
||||
void onCurrentProfileChanged(int index);
|
||||
void onNewProfileClicked();
|
||||
void onApplyProfileClicked();
|
||||
void onRenameProfileClicked();
|
||||
void onDeleteProfileClicked();
|
||||
void onMappingSettingsClicked();
|
||||
void onRestoreDefaultsClicked();
|
||||
|
||||
@@ -113,6 +113,16 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="renameProfile">
|
||||
<property name="text">
|
||||
<string>Rename Profile</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="pencil-line"/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="deleteProfile">
|
||||
<property name="text">
|
||||
|
||||
@@ -151,6 +151,14 @@ void DebugSettingsWidget::onDrawDumpingChanged()
|
||||
m_ui.saveFrame->setEnabled(enabled);
|
||||
m_ui.saveTexture->setEnabled(enabled);
|
||||
m_ui.saveDepth->setEnabled(enabled);
|
||||
m_ui.startDraw->setEnabled(enabled);
|
||||
m_ui.dumpCount->setEnabled(enabled);
|
||||
m_ui.hwDumpDirectory->setEnabled(enabled);
|
||||
m_ui.hwDumpBrowse->setEnabled(enabled);
|
||||
m_ui.hwDumpOpen->setEnabled(enabled);
|
||||
m_ui.swDumpDirectory->setEnabled(enabled);
|
||||
m_ui.swDumpBrowse->setEnabled(enabled);
|
||||
m_ui.swDumpOpen->setEnabled(enabled);
|
||||
}
|
||||
|
||||
#ifdef PCSX2_DEVBUILD
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="saveRT">
|
||||
<property name="text">
|
||||
<string>Save RT</string>
|
||||
@@ -181,7 +181,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="saveTexture">
|
||||
<property name="text">
|
||||
<string>Save Texture</string>
|
||||
|
||||
@@ -56,6 +56,7 @@ GameCheatSettingsWidget::GameCheatSettingsWidget(SettingsWindow* dialog, QWidget
|
||||
m_model_proxy->setFilterFixedString(text);
|
||||
m_ui.cheatList->expandAll();
|
||||
});
|
||||
connect(m_dialog, &SettingsWindow::discSerialChanged, this, &GameCheatSettingsWidget::reloadList);
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.allCRCsCheckbox, tr("Show Cheats For All CRCs"), tr("Checked"),
|
||||
tr("Toggles scanning patch files for all CRCs of the game. With this enabled available patches for the game serial with different CRCs will also be loaded."));
|
||||
@@ -124,7 +125,7 @@ void GameCheatSettingsWidget::updateListEnabled()
|
||||
m_ui.enableAll->setEnabled(cheats_enabled);
|
||||
m_ui.disableAll->setEnabled(cheats_enabled);
|
||||
m_ui.reloadCheats->setEnabled(cheats_enabled);
|
||||
m_ui.allCRCsCheckbox->setEnabled(cheats_enabled);
|
||||
m_ui.allCRCsCheckbox->setEnabled(cheats_enabled && !m_dialog->getSerial().empty());
|
||||
m_ui.searchText->setEnabled(cheats_enabled);
|
||||
}
|
||||
|
||||
@@ -210,6 +211,7 @@ void GameCheatSettingsWidget::reloadList()
|
||||
|
||||
m_parent_map.clear();
|
||||
m_model->removeRows(0, m_model->rowCount());
|
||||
m_ui.allCRCsCheckbox->setEnabled(!m_dialog->getSerial().empty() && m_ui.cheatList->isEnabled());
|
||||
|
||||
for (const Patch::PatchInfo& pi : m_patches)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <algorithm>
|
||||
|
||||
GamePatchDetailsWidget::GamePatchDetailsWidget(std::string name, const std::string& author,
|
||||
const std::string& description, bool enabled, SettingsWindow* dialog, QWidget* parent)
|
||||
const std::string& description, bool tristate, Qt::CheckState checkState, SettingsWindow* dialog, QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, m_dialog(dialog)
|
||||
, m_name(name)
|
||||
@@ -30,7 +30,8 @@ GamePatchDetailsWidget::GamePatchDetailsWidget(std::string name, const std::stri
|
||||
.arg(description.empty() ? tr("No description provided.") : QString::fromStdString(description)));
|
||||
|
||||
pxAssert(dialog->getSettingsInterface());
|
||||
m_ui.enabled->setChecked(enabled);
|
||||
m_ui.enabled->setTristate(tristate);
|
||||
m_ui.enabled->setCheckState(checkState);
|
||||
connect(m_ui.enabled, &QCheckBox::checkStateChanged, this, &GamePatchDetailsWidget::onEnabledStateChanged);
|
||||
}
|
||||
|
||||
@@ -40,9 +41,25 @@ void GamePatchDetailsWidget::onEnabledStateChanged(int state)
|
||||
{
|
||||
SettingsInterface* si = m_dialog->getSettingsInterface();
|
||||
if (state == Qt::Checked)
|
||||
si->AddToStringList("Patches", "Enable", m_name.c_str());
|
||||
{
|
||||
si->AddToStringList(Patch::PATCHES_CONFIG_SECTION, Patch::PATCH_ENABLE_CONFIG_KEY, m_name.c_str());
|
||||
si->RemoveFromStringList(Patch::PATCHES_CONFIG_SECTION, Patch::PATCH_DISABLE_CONFIG_KEY, m_name.c_str());
|
||||
}
|
||||
else
|
||||
si->RemoveFromStringList("Patches", "Enable", m_name.c_str());
|
||||
{
|
||||
si->RemoveFromStringList(Patch::PATCHES_CONFIG_SECTION, Patch::PATCH_ENABLE_CONFIG_KEY, m_name.c_str());
|
||||
if (m_ui.enabled->isTristate())
|
||||
{
|
||||
if (state == Qt::Unchecked)
|
||||
{
|
||||
si->AddToStringList(Patch::PATCHES_CONFIG_SECTION, Patch::PATCH_DISABLE_CONFIG_KEY, m_name.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
si->RemoveFromStringList(Patch::PATCHES_CONFIG_SECTION, Patch::PATCH_DISABLE_CONFIG_KEY, m_name.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
si->Save();
|
||||
g_emu_thread->reloadGameSettings();
|
||||
@@ -56,12 +73,15 @@ GamePatchSettingsWidget::GamePatchSettingsWidget(SettingsWindow* dialog, QWidget
|
||||
m_ui.scrollArea->setFrameShadow(QFrame::Sunken);
|
||||
|
||||
setUnlabeledPatchesWarningVisibility(false);
|
||||
setGlobalWsPatchNoteVisibility(false);
|
||||
setGlobalNiPatchNoteVisibility(false);
|
||||
|
||||
SettingsInterface* sif = m_dialog->getSettingsInterface();
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.allCRCsCheckbox, "EmuCore", "ShowPatchesForAllCRCs", false);
|
||||
|
||||
connect(m_ui.reload, &QPushButton::clicked, this, &GamePatchSettingsWidget::onReloadClicked);
|
||||
connect(m_ui.allCRCsCheckbox, &QCheckBox::checkStateChanged, this, &GamePatchSettingsWidget::reloadList);
|
||||
connect(m_dialog, &SettingsWindow::discSerialChanged, this, &GamePatchSettingsWidget::reloadList);
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.allCRCsCheckbox, tr("Show Patches For All CRCs"), tr("Checked"),
|
||||
tr("Toggles scanning patch files for all CRCs of the game. With this enabled available patches for the game serial with different CRCs will also be loaded."));
|
||||
@@ -88,15 +108,24 @@ void GamePatchSettingsWidget::disableAllPatches()
|
||||
|
||||
void GamePatchSettingsWidget::reloadList()
|
||||
{
|
||||
const SettingsInterface* si = m_dialog->getSettingsInterface();
|
||||
// Patches shouldn't have any unlabelled patch groups, because they're new.
|
||||
u32 number_of_unlabeled_patches = 0;
|
||||
bool showAllCRCS = m_ui.allCRCsCheckbox->isChecked();
|
||||
std::vector<Patch::PatchInfo> patches = Patch::GetPatchInfo(m_dialog->getSerial(), m_dialog->getDiscCRC(), false, showAllCRCS, &number_of_unlabeled_patches);
|
||||
std::vector<std::string> enabled_list =
|
||||
m_dialog->getSettingsInterface()->GetStringList(Patch::PATCHES_CONFIG_SECTION, Patch::PATCH_ENABLE_CONFIG_KEY);
|
||||
si->GetStringList(Patch::PATCHES_CONFIG_SECTION, Patch::PATCH_ENABLE_CONFIG_KEY);
|
||||
std::vector<std::string> disabled_list =
|
||||
si->GetStringList(Patch::PATCHES_CONFIG_SECTION, Patch::PATCH_DISABLE_CONFIG_KEY);
|
||||
|
||||
const bool ws_patches_enabled_globally = m_dialog->getEffectiveBoolValue("EmuCore", "EnableWideScreenPatches", false);
|
||||
const bool ni_patches_enabled_globally = m_dialog->getEffectiveBoolValue("EmuCore", "EnableNoInterlacingPatches", false);
|
||||
|
||||
setUnlabeledPatchesWarningVisibility(number_of_unlabeled_patches > 0);
|
||||
setGlobalWsPatchNoteVisibility(ws_patches_enabled_globally);
|
||||
setGlobalNiPatchNoteVisibility(ni_patches_enabled_globally);
|
||||
delete m_ui.scrollArea->takeWidget();
|
||||
m_ui.allCRCsCheckbox->setEnabled(!m_dialog->getSerial().empty());
|
||||
|
||||
QWidget* container = new QWidget(m_ui.scrollArea);
|
||||
QVBoxLayout* layout = new QVBoxLayout(container);
|
||||
@@ -106,7 +135,7 @@ void GamePatchSettingsWidget::reloadList()
|
||||
{
|
||||
bool first = true;
|
||||
|
||||
for (Patch::PatchInfo& pi : patches)
|
||||
for (const Patch::PatchInfo& pi : patches)
|
||||
{
|
||||
if (!first)
|
||||
{
|
||||
@@ -120,9 +149,35 @@ void GamePatchSettingsWidget::reloadList()
|
||||
first = false;
|
||||
}
|
||||
|
||||
const bool enabled = (std::find(enabled_list.begin(), enabled_list.end(), pi.name) != enabled_list.end());
|
||||
const bool is_on_enable_list = std::find(enabled_list.begin(), enabled_list.end(), pi.name) != enabled_list.end();
|
||||
const bool is_on_disable_list = std::find(disabled_list.begin(), disabled_list.end(), pi.name) != disabled_list.end();
|
||||
const bool globally_toggleable_option = Patch::IsGloballyToggleablePatch(pi);
|
||||
|
||||
Qt::CheckState check_state;
|
||||
if (!globally_toggleable_option)
|
||||
{
|
||||
// Normal patches
|
||||
check_state = is_on_enable_list && !is_on_disable_list ? Qt::CheckState::Checked : Qt::CheckState::Unchecked;
|
||||
}
|
||||
else
|
||||
{
|
||||
// WS/NI patches
|
||||
if (is_on_disable_list)
|
||||
{
|
||||
check_state = Qt::CheckState::Unchecked;
|
||||
}
|
||||
else if (is_on_enable_list)
|
||||
{
|
||||
check_state = Qt::CheckState::Checked;
|
||||
}
|
||||
else
|
||||
{
|
||||
check_state = Qt::CheckState::PartiallyChecked;
|
||||
}
|
||||
}
|
||||
|
||||
GamePatchDetailsWidget* it =
|
||||
new GamePatchDetailsWidget(std::move(pi.name), pi.author, pi.description, enabled, m_dialog, container);
|
||||
new GamePatchDetailsWidget(std::move(pi.name), pi.author, pi.description, globally_toggleable_option, check_state, m_dialog, container);
|
||||
layout->addWidget(it);
|
||||
}
|
||||
}
|
||||
@@ -141,3 +196,13 @@ void GamePatchSettingsWidget::setUnlabeledPatchesWarningVisibility(bool visible)
|
||||
{
|
||||
m_ui.unlabeledPatchWarning->setVisible(visible);
|
||||
}
|
||||
|
||||
void GamePatchSettingsWidget::setGlobalWsPatchNoteVisibility(bool visible)
|
||||
{
|
||||
m_ui.globalWsPatchState->setVisible(visible);
|
||||
}
|
||||
|
||||
void GamePatchSettingsWidget::setGlobalNiPatchNoteVisibility(bool visible)
|
||||
{
|
||||
m_ui.globalNiPatchState->setVisible(visible);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ class GamePatchDetailsWidget : public QWidget
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
GamePatchDetailsWidget(std::string name, const std::string& author, const std::string& description, bool enabled,
|
||||
GamePatchDetailsWidget(std::string name, const std::string& author, const std::string& description, bool tristate, Qt::CheckState checkState,
|
||||
SettingsWindow* dialog, QWidget* parent);
|
||||
~GamePatchDetailsWidget();
|
||||
|
||||
@@ -50,6 +50,8 @@ private Q_SLOTS:
|
||||
private:
|
||||
void reloadList();
|
||||
void setUnlabeledPatchesWarningVisibility(bool visible);
|
||||
void setGlobalWsPatchNoteVisibility(bool visible);
|
||||
void setGlobalNiPatchNoteVisibility(bool visible);
|
||||
|
||||
Ui::GamePatchSettingsWidget m_ui;
|
||||
SettingsWindow* m_dialog;
|
||||
|
||||
@@ -38,6 +38,29 @@
|
||||
<property name="text">
|
||||
<string>Any patches bundled with PCSX2 for this game will be disabled since you have unlabeled patches loaded.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="globalWsPatchState">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>Widescreen patches are currently <span style=" font-weight:600;">ENABLED</span> globally.</p></body></html></string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="globalNiPatchState">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>No-Interlacing patches are currently <span style=" font-weight:600;">ENABLED</span> globally.</p></body></html></string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
||||
@@ -156,7 +156,15 @@ void GameSummaryWidget::onDiscPathChanged(const QString& value)
|
||||
|
||||
// force rescan of elf to update the serial
|
||||
g_main_window->rescanFile(m_entry_path);
|
||||
repopulateCurrentDetails();
|
||||
|
||||
auto lock = GameList::GetLock();
|
||||
const GameList::Entry* entry = GameList::GetEntryForPath(m_entry_path.c_str());
|
||||
if (entry)
|
||||
{
|
||||
populateDetails(entry);
|
||||
m_dialog->setSerial(entry->serial);
|
||||
m_ui.checkWiki->setEnabled(!entry->serial.empty());
|
||||
}
|
||||
}
|
||||
|
||||
void GameSummaryWidget::onDiscPathBrowseClicked()
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <QtWidgets/QMessageBox>
|
||||
|
||||
#include "pcsx2/Host.h"
|
||||
#include "pcsx2/Patch.h"
|
||||
#include "pcsx2/GS/GS.h"
|
||||
#include "pcsx2/GS/GSCapture.h"
|
||||
#include "pcsx2/GS/GSUtil.h"
|
||||
@@ -88,6 +89,8 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.interlacing, "EmuCore/GS", "deinterlace_mode", DEFAULT_INTERLACE_MODE);
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(
|
||||
sif, m_ui.bilinearFiltering, "EmuCore/GS", "linear_present_mode", static_cast<int>(GSPostBilinearMode::BilinearSmooth));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.widescreenPatches, "EmuCore", "EnableWideScreenPatches", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.noInterlacingPatches, "EmuCore", "EnableNoInterlacingPatches", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.integerScaling, "EmuCore/GS", "IntegerScaling", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.PCRTCOffsets, "EmuCore/GS", "pcrtc_offsets", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.PCRTCOverscan, "EmuCore/GS", "pcrtc_overscan", false);
|
||||
@@ -319,22 +322,61 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
|
||||
}
|
||||
#endif
|
||||
|
||||
// Prompt user to get rid of widescreen/no-interlace config from the ini if the user has enabled them before.
|
||||
if ((m_dialog->getBoolValue("EmuCore", "EnableWideScreenPatches", false) == true ||
|
||||
m_dialog->getBoolValue("EmuCore", "EnableWideScreenPatches", false) == true) &&
|
||||
!m_dialog->containsSettingValue("UI", "UserHasDeniedWSPatchWarning"))
|
||||
// Get rid of widescreen/no-interlace checkboxes from per-game settings, and migrate them to Patches if necessary.
|
||||
if (m_dialog->isPerGameSettings())
|
||||
{
|
||||
if (QMessageBox::question(QtUtils::GetRootWidget(this), tr("Remove Unsupported Settings"),
|
||||
tr("You previously had the <strong>Enable Widescreen Patches</strong> or <strong>Enable No-Interlacing Patches</strong> options enabled.<br><br>"
|
||||
"We no longer provide these options, instead <strong>you should go to the \"Patches\" section on the per-game settings, and explicitly enable the patches that you want.</strong><br><br>"
|
||||
"Do you want to remove these options from your configuration now?"),
|
||||
QMessageBox::Yes, QMessageBox::No) == QMessageBox::Yes)
|
||||
SettingsInterface* si = m_dialog->getSettingsInterface();
|
||||
bool needs_save = false;
|
||||
|
||||
if (si->ContainsValue("EmuCore", "EnableWideScreenPatches"))
|
||||
{
|
||||
m_dialog->removeSettingValue("EmuCore", "EnableWideScreenPatches");
|
||||
m_dialog->removeSettingValue("EmuCore", "EnableNoInterlacingPatches");
|
||||
const bool ws_enabled = si->GetBoolValue("EmuCore", "EnableWideScreenPatches");
|
||||
si->DeleteValue("EmuCore", "EnableWideScreenPatches");
|
||||
|
||||
const char* WS_PATCH_NAME = "Widescreen 16:9";
|
||||
if (ws_enabled)
|
||||
{
|
||||
si->AddToStringList(Patch::PATCHES_CONFIG_SECTION, Patch::PATCH_ENABLE_CONFIG_KEY, WS_PATCH_NAME);
|
||||
si->RemoveFromStringList(Patch::PATCHES_CONFIG_SECTION, Patch::PATCH_DISABLE_CONFIG_KEY, WS_PATCH_NAME);
|
||||
}
|
||||
else
|
||||
{
|
||||
si->AddToStringList(Patch::PATCHES_CONFIG_SECTION, Patch::PATCH_DISABLE_CONFIG_KEY, WS_PATCH_NAME);
|
||||
si->RemoveFromStringList(Patch::PATCHES_CONFIG_SECTION, Patch::PATCH_ENABLE_CONFIG_KEY, WS_PATCH_NAME);
|
||||
}
|
||||
needs_save = true;
|
||||
}
|
||||
else
|
||||
m_dialog->setBoolSettingValue("UI", "UserHasDeniedWSPatchWarning", true);
|
||||
|
||||
if (si->ContainsValue("EmuCore", "EnableNoInterlacingPatches"))
|
||||
{
|
||||
const bool ni_enabled = si->GetBoolValue("EmuCore", "EnableNoInterlacingPatches");
|
||||
si->DeleteValue("EmuCore", "EnableNoInterlacingPatches");
|
||||
|
||||
const char* NI_PATCH_NAME = "No-Interlacing";
|
||||
if (ni_enabled)
|
||||
{
|
||||
si->AddToStringList(Patch::PATCHES_CONFIG_SECTION, Patch::PATCH_ENABLE_CONFIG_KEY, NI_PATCH_NAME);
|
||||
si->RemoveFromStringList(Patch::PATCHES_CONFIG_SECTION, Patch::PATCH_DISABLE_CONFIG_KEY, NI_PATCH_NAME);
|
||||
}
|
||||
else
|
||||
{
|
||||
si->AddToStringList(Patch::PATCHES_CONFIG_SECTION, Patch::PATCH_DISABLE_CONFIG_KEY, NI_PATCH_NAME);
|
||||
si->RemoveFromStringList(Patch::PATCHES_CONFIG_SECTION, Patch::PATCH_ENABLE_CONFIG_KEY, NI_PATCH_NAME);
|
||||
}
|
||||
needs_save = true;
|
||||
}
|
||||
|
||||
if (needs_save)
|
||||
{
|
||||
m_dialog->saveAndReloadGameSettings();
|
||||
}
|
||||
|
||||
m_ui.displayGridLayout->removeWidget(m_ui.widescreenPatches);
|
||||
m_ui.displayGridLayout->removeWidget(m_ui.noInterlacingPatches);
|
||||
m_ui.widescreenPatches->deleteLater();
|
||||
m_ui.noInterlacingPatches->deleteLater();
|
||||
m_ui.widescreenPatches = nullptr;
|
||||
m_ui.noInterlacingPatches = nullptr;
|
||||
}
|
||||
|
||||
// Hide advanced options by default.
|
||||
@@ -427,6 +469,12 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
|
||||
|
||||
// Display tab
|
||||
{
|
||||
dialog->registerWidgetHelp(m_ui.widescreenPatches, tr("Enable Widescreen Patches"), tr("Unchecked"),
|
||||
tr("Automatically loads and applies widescreen patches on game start. Can cause issues."));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.noInterlacingPatches, tr("Enable No-Interlacing Patches"), tr("Unchecked"),
|
||||
tr("Automatically loads and applies no-interlacing patches on game start. Can cause issues."));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.DisableInterlaceOffset, tr("Disable Interlace Offset"), tr("Unchecked"),
|
||||
tr("Disables interlacing offset which may reduce blurring in some situations."));
|
||||
|
||||
|
||||
@@ -404,28 +404,28 @@
|
||||
</item>
|
||||
<item row="8" column="0" colspan="2">
|
||||
<layout class="QGridLayout" name="displayGridLayout">
|
||||
<item row="0" column="1">
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="integerScaling">
|
||||
<property name="text">
|
||||
<string>Integer Scaling</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="PCRTCOverscan">
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="widescreenPatches">
|
||||
<property name="text">
|
||||
<string>Show Overscan</string>
|
||||
<string>Apply Widescreen Patches</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="noInterlacingPatches">
|
||||
<property name="text">
|
||||
<string>Apply No-Interlacing Patches</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="PCRTCOffsets">
|
||||
<property name="text">
|
||||
<string>Screen Offsets</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="PCRTCAntiBlur">
|
||||
<property name="text">
|
||||
<string>Anti-Blur</string>
|
||||
@@ -435,13 +435,27 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="DisableInterlaceOffset">
|
||||
<property name="text">
|
||||
<string>Disable Interlace Offset</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="PCRTCOffsets">
|
||||
<property name="text">
|
||||
<string>Screen Offsets</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="PCRTCOverscan">
|
||||
<property name="text">
|
||||
<string>Show Overscan</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
@@ -2111,7 +2125,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0" colspan="2">
|
||||
<layout class="QGridLayout" name="advancedOptionsGrid">
|
||||
<layout class="QGridLayout" name="gridLayout_9">
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="disableMailboxPresentation">
|
||||
<property name="text">
|
||||
|
||||
@@ -447,6 +447,12 @@ void SettingsWindow::setWindowTitle(const QString& title)
|
||||
QWidget::setWindowTitle(QStringLiteral("%1 [%2]").arg(title, m_filename));
|
||||
}
|
||||
|
||||
void SettingsWindow::setSerial(std::string serial)
|
||||
{
|
||||
m_serial = std::move(serial);
|
||||
emit discSerialChanged();
|
||||
}
|
||||
|
||||
bool SettingsWindow::getEffectiveBoolValue(const char* section, const char* key, bool default_value) const
|
||||
{
|
||||
bool value;
|
||||
@@ -649,9 +655,9 @@ void SettingsWindow::saveAndReloadGameSettings()
|
||||
g_emu_thread->reloadGameSettings();
|
||||
}
|
||||
|
||||
void SettingsWindow::openGamePropertiesDialog(const GameList::Entry* game, const std::string_view title, std::string serial, u32 disc_crc)
|
||||
void SettingsWindow::openGamePropertiesDialog(const GameList::Entry* game, const std::string_view title, std::string serial, u32 disc_crc, bool is_elf)
|
||||
{
|
||||
std::string filename = VMManager::GetGameSettingsPath(serial, disc_crc);
|
||||
std::string filename = VMManager::GetGameSettingsPath(!is_elf ? serial : std::string_view(), disc_crc);
|
||||
|
||||
// check for an existing dialog with this filename
|
||||
for (SettingsWindow* dialog : s_open_game_properties_dialogs)
|
||||
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
u32 disc_crc, QString filename = QString());
|
||||
~SettingsWindow();
|
||||
|
||||
static void openGamePropertiesDialog(const GameList::Entry* game, const std::string_view title, std::string serial, u32 disc_crc);
|
||||
static void openGamePropertiesDialog(const GameList::Entry* game, const std::string_view title, std::string serial, u32 disc_crc, bool is_elf);
|
||||
static void closeGamePropertiesDialogs();
|
||||
|
||||
SettingsInterface* getSettingsInterface() const;
|
||||
@@ -72,6 +72,7 @@ public:
|
||||
bool eventFilter(QObject* object, QEvent* event) override;
|
||||
|
||||
void setWindowTitle(const QString& title);
|
||||
void setSerial(std::string serial);
|
||||
|
||||
QString getCategory() const;
|
||||
void setCategory(const char* category);
|
||||
@@ -96,7 +97,7 @@ public:
|
||||
void saveAndReloadGameSettings();
|
||||
|
||||
Q_SIGNALS:
|
||||
void settingsResetToDefaults();
|
||||
void discSerialChanged();
|
||||
|
||||
private Q_SLOTS:
|
||||
void onCategoryCurrentRowChanged(int row);
|
||||
|
||||
File diff suppressed because one or more lines are too long
+2142
-2064
File diff suppressed because it is too large
Load Diff
+2216
-2138
File diff suppressed because it is too large
Load Diff
+2141
-2063
File diff suppressed because it is too large
Load Diff
+2141
-2063
File diff suppressed because it is too large
Load Diff
+2682
-2604
File diff suppressed because it is too large
Load Diff
+2141
-2063
File diff suppressed because it is too large
Load Diff
+2275
-2197
File diff suppressed because it is too large
Load Diff
+2141
-2063
File diff suppressed because it is too large
Load Diff
+2884
-2803
File diff suppressed because it is too large
Load Diff
+2213
-2135
File diff suppressed because it is too large
Load Diff
+2155
-2077
File diff suppressed because it is too large
Load Diff
+2157
-2079
File diff suppressed because it is too large
Load Diff
+2376
-2298
File diff suppressed because it is too large
Load Diff
+2176
-2098
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+2282
-2203
File diff suppressed because it is too large
Load Diff
+2141
-2063
File diff suppressed because it is too large
Load Diff
+2141
-2063
File diff suppressed because it is too large
Load Diff
+2335
-2255
File diff suppressed because it is too large
Load Diff
+2244
-2166
File diff suppressed because it is too large
Load Diff
+2144
-2066
File diff suppressed because it is too large
Load Diff
+2185
-2107
File diff suppressed because it is too large
Load Diff
+2156
-2078
File diff suppressed because it is too large
Load Diff
+2195
-2117
File diff suppressed because it is too large
Load Diff
+2143
-2065
File diff suppressed because it is too large
Load Diff
+2141
-2063
File diff suppressed because it is too large
Load Diff
+2248
-2170
File diff suppressed because it is too large
Load Diff
+2143
-2065
File diff suppressed because it is too large
Load Diff
+2143
-2065
File diff suppressed because it is too large
Load Diff
+2149
-2071
File diff suppressed because it is too large
Load Diff
+2165
-2087
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+2141
-2063
File diff suppressed because it is too large
Load Diff
+2236
-2158
File diff suppressed because it is too large
Load Diff
+2141
-2063
File diff suppressed because it is too large
Load Diff
+6617
-6538
File diff suppressed because it is too large
Load Diff
+2576
-2498
File diff suppressed because it is too large
Load Diff
+2205
-2127
File diff suppressed because it is too large
Load Diff
+2141
-2063
File diff suppressed because it is too large
Load Diff
+2142
-2064
File diff suppressed because it is too large
Load Diff
+2325
-2247
File diff suppressed because it is too large
Load Diff
+32
-32
@@ -300,7 +300,7 @@ std::string Achievements::GetGameHash(const std::string& elf_path)
|
||||
Error error;
|
||||
if (!cdvdLoadElf(&elfo, elf_path, false, &error))
|
||||
{
|
||||
Console.Error(fmt::format("(Achievements) Failed to read ELF '{}' on disc: {}", elf_path, error.GetDescription()));
|
||||
Console.Error(fmt::format("Achievements: Failed to read ELF '{}' on disc: {}", elf_path, error.GetDescription()));
|
||||
return {};
|
||||
}
|
||||
|
||||
@@ -441,7 +441,7 @@ bool Achievements::Initialize()
|
||||
const std::string api_token = Host::GetBaseStringSettingValue("Achievements", "Token");
|
||||
if (!username.empty() && !api_token.empty())
|
||||
{
|
||||
Console.WriteLn("(Achievements) Attempting login with user '%s'...", username.c_str());
|
||||
Console.WriteLn("Achievements: Attempting login with user '%s'...", username.c_str());
|
||||
s_login_request =
|
||||
rc_client_begin_login_with_token(s_client, username.c_str(), api_token.c_str(), ClientLoginWithTokenCallback, nullptr);
|
||||
}
|
||||
@@ -608,7 +608,7 @@ void Achievements::EnsureCacheDirectoriesExist()
|
||||
|
||||
void Achievements::ClientMessageCallback(const char* message, const rc_client_t* client)
|
||||
{
|
||||
Console.WriteLn("(Achievements) %s", message);
|
||||
Console.WriteLn("Achievements: %s", message);
|
||||
}
|
||||
|
||||
uint32_t Achievements::ClientReadMemory(uint32_t address, uint8_t* buffer, uint32_t num_bytes, rc_client_t* client)
|
||||
@@ -865,7 +865,7 @@ void Achievements::IdentifyGame(u32 disc_crc, u32 crc)
|
||||
// bail out if we're not logged in, just save the hash
|
||||
if (!IsLoggedInOrLoggingIn())
|
||||
{
|
||||
Console.WriteLn(Color_StrongYellow, "(Achievements) Skipping load game because we're not logged in.");
|
||||
Console.WriteLn(Color_StrongYellow, "Achievements: Skipping load game because we're not logged in.");
|
||||
DisableHardcoreMode();
|
||||
return;
|
||||
}
|
||||
@@ -908,7 +908,7 @@ void Achievements::ClientLoadGameCallback(int result, const char* error_message,
|
||||
if (result == RC_NO_GAME_LOADED)
|
||||
{
|
||||
// Unknown game.
|
||||
Console.WriteLn(Color_StrongYellow, "(Achievements) Unknown game '%s', disabling achievements.", s_game_hash.c_str());
|
||||
Console.WriteLn(Color_StrongYellow, "Achievements: Unknown game '%s', disabling achievements.", s_game_hash.c_str());
|
||||
DisableHardcoreMode();
|
||||
return;
|
||||
}
|
||||
@@ -1083,7 +1083,7 @@ void Achievements::HandleUnlockEvent(const rc_client_event_t* event)
|
||||
const rc_client_achievement_t* cheevo = event->achievement;
|
||||
pxAssert(cheevo);
|
||||
|
||||
Console.WriteLn("(Achievements) Achievement %s (%u) for game %u unlocked", cheevo->title, cheevo->id, s_game_id);
|
||||
Console.WriteLn("Achievements: Achievement %s (%u) for game %u unlocked", cheevo->title, cheevo->id, s_game_id);
|
||||
UpdateGameSummary();
|
||||
|
||||
if (EmuConfig.Achievements.Notifications)
|
||||
@@ -1109,7 +1109,7 @@ void Achievements::HandleUnlockEvent(const rc_client_event_t* event)
|
||||
|
||||
void Achievements::HandleGameCompleteEvent(const rc_client_event_t* event)
|
||||
{
|
||||
Console.WriteLn("(Achievements) Game %u complete", s_game_id);
|
||||
Console.WriteLn("Achievements: Game %u complete", s_game_id);
|
||||
UpdateGameSummary();
|
||||
|
||||
if (EmuConfig.Achievements.Notifications)
|
||||
@@ -1133,7 +1133,7 @@ void Achievements::HandleGameCompleteEvent(const rc_client_event_t* event)
|
||||
|
||||
void Achievements::HandleLeaderboardStartedEvent(const rc_client_event_t* event)
|
||||
{
|
||||
DevCon.WriteLn("(Achievements) Leaderboard %u (%s) started", event->leaderboard->id, event->leaderboard->title);
|
||||
DevCon.WriteLn("Achievements: Leaderboard %u (%s) started", event->leaderboard->id, event->leaderboard->title);
|
||||
|
||||
if (EmuConfig.Achievements.LeaderboardNotifications)
|
||||
{
|
||||
@@ -1152,7 +1152,7 @@ void Achievements::HandleLeaderboardStartedEvent(const rc_client_event_t* event)
|
||||
|
||||
void Achievements::HandleLeaderboardFailedEvent(const rc_client_event_t* event)
|
||||
{
|
||||
DevCon.WriteLn("(Achievements) Leaderboard %u (%s) failed", event->leaderboard->id, event->leaderboard->title);
|
||||
DevCon.WriteLn("Achievements: Leaderboard %u (%s) failed", event->leaderboard->id, event->leaderboard->title);
|
||||
|
||||
if (EmuConfig.Achievements.LeaderboardNotifications)
|
||||
{
|
||||
@@ -1171,7 +1171,7 @@ void Achievements::HandleLeaderboardFailedEvent(const rc_client_event_t* event)
|
||||
|
||||
void Achievements::HandleLeaderboardSubmittedEvent(const rc_client_event_t* event)
|
||||
{
|
||||
Console.WriteLn("(Achievements) Leaderboard %u (%s) submitted", event->leaderboard->id, event->leaderboard->title);
|
||||
Console.WriteLn("Achievements: Leaderboard %u (%s) submitted", event->leaderboard->id, event->leaderboard->title);
|
||||
|
||||
if (EmuConfig.Achievements.LeaderboardNotifications)
|
||||
{
|
||||
@@ -1203,7 +1203,7 @@ void Achievements::HandleLeaderboardSubmittedEvent(const rc_client_event_t* even
|
||||
|
||||
void Achievements::HandleLeaderboardScoreboardEvent(const rc_client_event_t* event)
|
||||
{
|
||||
Console.WriteLn("(Achievements) Leaderboard %u scoreboard rank %u of %u", event->leaderboard_scoreboard->leaderboard_id,
|
||||
Console.WriteLn("Achievements: Leaderboard %u scoreboard rank %u of %u", event->leaderboard_scoreboard->leaderboard_id,
|
||||
event->leaderboard_scoreboard->new_rank, event->leaderboard_scoreboard->num_entries);
|
||||
|
||||
if (EmuConfig.Achievements.LeaderboardNotifications)
|
||||
@@ -1234,7 +1234,7 @@ void Achievements::HandleLeaderboardScoreboardEvent(const rc_client_event_t* eve
|
||||
void Achievements::HandleLeaderboardTrackerShowEvent(const rc_client_event_t* event)
|
||||
{
|
||||
DevCon.WriteLn(
|
||||
"(Achievements) Showing leaderboard tracker: %u: %s", event->leaderboard_tracker->id, event->leaderboard_tracker->display);
|
||||
"Achievements: Showing leaderboard tracker: %u: %s", event->leaderboard_tracker->id, event->leaderboard_tracker->display);
|
||||
|
||||
LeaderboardTrackerIndicator indicator;
|
||||
indicator.tracker_id = event->leaderboard_tracker->id;
|
||||
@@ -1251,7 +1251,7 @@ void Achievements::HandleLeaderboardTrackerHideEvent(const rc_client_event_t* ev
|
||||
if (it == s_active_leaderboard_trackers.end())
|
||||
return;
|
||||
|
||||
DevCon.WriteLn("(Achievements) Hiding leaderboard tracker: %u", id);
|
||||
DevCon.WriteLn("Achievements: Hiding leaderboard tracker: %u", id);
|
||||
it->active = false;
|
||||
it->show_hide_time.Reset();
|
||||
}
|
||||
@@ -1265,7 +1265,7 @@ void Achievements::HandleLeaderboardTrackerUpdateEvent(const rc_client_event_t*
|
||||
return;
|
||||
|
||||
DevCon.WriteLn(
|
||||
"(Achievements) Updating leaderboard tracker: %u: %s", event->leaderboard_tracker->id, event->leaderboard_tracker->display);
|
||||
"Achievements: Updating leaderboard tracker: %u: %s", event->leaderboard_tracker->id, event->leaderboard_tracker->display);
|
||||
|
||||
it->text = event->leaderboard_tracker->display;
|
||||
it->active = true;
|
||||
@@ -1288,7 +1288,7 @@ void Achievements::HandleAchievementChallengeIndicatorShowEvent(const rc_client_
|
||||
indicator.active = true;
|
||||
s_active_challenge_indicators.push_back(std::move(indicator));
|
||||
|
||||
DevCon.WriteLn("(Achievements) Show challenge indicator for %u (%s)", event->achievement->id, event->achievement->title);
|
||||
DevCon.WriteLn("Achievements: Show challenge indicator for %u (%s)", event->achievement->id, event->achievement->title);
|
||||
}
|
||||
|
||||
void Achievements::HandleAchievementChallengeIndicatorHideEvent(const rc_client_event_t* event)
|
||||
@@ -1298,14 +1298,14 @@ void Achievements::HandleAchievementChallengeIndicatorHideEvent(const rc_client_
|
||||
if (it == s_active_challenge_indicators.end())
|
||||
return;
|
||||
|
||||
DevCon.WriteLn("(Achievements) Hide challenge indicator for %u (%s)", event->achievement->id, event->achievement->title);
|
||||
DevCon.WriteLn("Achievements: Hide challenge indicator for %u (%s)", event->achievement->id, event->achievement->title);
|
||||
it->show_hide_time.Reset();
|
||||
it->active = false;
|
||||
}
|
||||
|
||||
void Achievements::HandleAchievementProgressIndicatorShowEvent(const rc_client_event_t* event)
|
||||
{
|
||||
DevCon.WriteLn("(Achievements) Showing progress indicator: %u (%s): %s", event->achievement->id, event->achievement->title,
|
||||
DevCon.WriteLn("Achievements: Showing progress indicator: %u (%s): %s", event->achievement->id, event->achievement->title,
|
||||
event->achievement->measured_progress);
|
||||
|
||||
if (!s_active_progress_indicator.has_value())
|
||||
@@ -1323,14 +1323,14 @@ void Achievements::HandleAchievementProgressIndicatorHideEvent(const rc_client_e
|
||||
if (!s_active_progress_indicator.has_value())
|
||||
return;
|
||||
|
||||
DevCon.WriteLn("(Achievements) Hiding progress indicator");
|
||||
DevCon.WriteLn("Achievements: Hiding progress indicator");
|
||||
s_active_progress_indicator->show_hide_time.Reset();
|
||||
s_active_progress_indicator->active = false;
|
||||
}
|
||||
|
||||
void Achievements::HandleAchievementProgressIndicatorUpdateEvent(const rc_client_event_t* event)
|
||||
{
|
||||
DevCon.WriteLn("(Achievements) Updating progress indicator: %u (%s): %s", event->achievement->id, event->achievement->title,
|
||||
DevCon.WriteLn("Achievements: Updating progress indicator: %u (%s): %s", event->achievement->id, event->achievement->title,
|
||||
event->achievement->measured_progress);
|
||||
s_active_progress_indicator->achievement = event->achievement;
|
||||
s_active_progress_indicator->active = true;
|
||||
@@ -1341,13 +1341,13 @@ void Achievements::HandleServerErrorEvent(const rc_client_event_t* event)
|
||||
std::string message = fmt::format(TRANSLATE_FS("Achievements", "Server error in {0}:\n{1}"),
|
||||
event->server_error->api ? event->server_error->api : "UNKNOWN",
|
||||
event->server_error->error_message ? event->server_error->error_message : "UNKNOWN");
|
||||
Console.Error("(Achievements) %s", message.c_str());
|
||||
Console.Error("Achievements: %s", message.c_str());
|
||||
Host::AddOSDMessage(std::move(message), Host::OSD_ERROR_DURATION);
|
||||
}
|
||||
|
||||
void Achievements::HandleServerDisconnectedEvent(const rc_client_event_t* event)
|
||||
{
|
||||
Console.Warning("(Achievements) Server disconnected.");
|
||||
Console.Warning("Achievements: Server disconnected.");
|
||||
|
||||
MTGS::RunOnGSThread([]() {
|
||||
if (ImGuiManager::InitializeFullscreenUI())
|
||||
@@ -1360,7 +1360,7 @@ void Achievements::HandleServerDisconnectedEvent(const rc_client_event_t* event)
|
||||
|
||||
void Achievements::HandleServerReconnectedEvent(const rc_client_event_t* event)
|
||||
{
|
||||
Console.Warning("(Achievements) Server reconnected.");
|
||||
Console.Warning("Achievements: Server reconnected.");
|
||||
|
||||
MTGS::RunOnGSThread([]() {
|
||||
if (ImGuiManager::InitializeFullscreenUI())
|
||||
@@ -1385,7 +1385,7 @@ void Achievements::ResetClient()
|
||||
if (!IsActive())
|
||||
return;
|
||||
|
||||
Console.WriteLn("(Achievements) Reset client");
|
||||
Console.WriteLn("Achievements: Reset client");
|
||||
rc_client_reset(s_client);
|
||||
}
|
||||
|
||||
@@ -1811,11 +1811,11 @@ void Achievements::Logout()
|
||||
if (HasActiveGame())
|
||||
ClearGameInfo();
|
||||
|
||||
Console.WriteLn("(Achievements) Logging out...");
|
||||
Console.WriteLn("Achievements: Logging out...");
|
||||
rc_client_logout(s_client);
|
||||
}
|
||||
|
||||
Console.WriteLn("(Achievements) Clearing credentials...");
|
||||
Console.WriteLn("Achievements: Clearing credentials...");
|
||||
Host::RemoveBaseSettingValue("Achievements", "Username");
|
||||
Host::RemoveBaseSettingValue("Achievements", "Token");
|
||||
Host::RemoveBaseSettingValue("Achievements", "LoginTimestamp");
|
||||
@@ -1961,7 +1961,7 @@ void Achievements::DrawGameOverlays()
|
||||
|
||||
if (!indicator.active && opacity <= 0.01f)
|
||||
{
|
||||
DevCon.WriteLn("(Achievements) Remove challenge indicator");
|
||||
DevCon.WriteLn("Achievements: Remove challenge indicator");
|
||||
it = s_active_challenge_indicators.erase(it);
|
||||
}
|
||||
else
|
||||
@@ -2004,7 +2004,7 @@ void Achievements::DrawGameOverlays()
|
||||
|
||||
if (!indicator.active && opacity <= 0.01f)
|
||||
{
|
||||
DevCon.WriteLn("(Achievements) Remove progress indicator");
|
||||
DevCon.WriteLn("Achievements: Remove progress indicator");
|
||||
s_active_progress_indicator.reset();
|
||||
}
|
||||
|
||||
@@ -2046,7 +2046,7 @@ void Achievements::DrawGameOverlays()
|
||||
|
||||
if (!indicator.active && opacity <= 0.01f)
|
||||
{
|
||||
DevCon.WriteLn("(Achievements) Remove tracker indicator");
|
||||
DevCon.WriteLn("Achievements: Remove tracker indicator");
|
||||
it = s_active_leaderboard_trackers.erase(it);
|
||||
}
|
||||
else
|
||||
@@ -2151,7 +2151,7 @@ bool Achievements::PrepareAchievementsWindow()
|
||||
RC_CLIENT_ACHIEVEMENT_LIST_GROUPING_PROGRESS /*RC_CLIENT_ACHIEVEMENT_LIST_GROUPING_LOCK_STATE*/);
|
||||
if (!s_achievement_list)
|
||||
{
|
||||
Console.Error("(Achievements) rc_client_create_achievement_list() returned null");
|
||||
Console.Error("Achievements: rc_client_create_achievement_list() returned null");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2489,7 +2489,7 @@ bool Achievements::PrepareLeaderboardsWindow()
|
||||
s_leaderboard_list = rc_client_create_leaderboard_list(client, RC_CLIENT_LEADERBOARD_LIST_GROUPING_NONE);
|
||||
if (!s_leaderboard_list)
|
||||
{
|
||||
Console.Error("(Achievements) rc_client_create_leaderboard_list() returned null");
|
||||
Console.Error("Achievements: rc_client_create_leaderboard_list() returned null");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2920,7 +2920,7 @@ void Achievements::DrawLeaderboardListEntry(const rc_client_leaderboard_t* lboar
|
||||
|
||||
void Achievements::OpenLeaderboard(const rc_client_leaderboard_t* lboard)
|
||||
{
|
||||
Console.WriteLn("(Achievements) Opening leaderboard '%s' (%u)", lboard->title, lboard->id);
|
||||
Console.WriteLn("Achievements: Opening leaderboard '%s' (%u)", lboard->title, lboard->id);
|
||||
|
||||
CloseLeaderboard();
|
||||
|
||||
@@ -2974,7 +2974,7 @@ void Achievements::FetchNextLeaderboardEntries()
|
||||
for (rc_client_leaderboard_entry_list_t* list : s_leaderboard_entry_lists)
|
||||
start += list->num_entries;
|
||||
|
||||
Console.WriteLn("(Achievements) Fetching entries %u to %u", start, start + LEADERBOARD_ALL_FETCH_SIZE);
|
||||
Console.WriteLn("Achievements: Fetching entries %u to %u", start, start + LEADERBOARD_ALL_FETCH_SIZE);
|
||||
|
||||
if (s_leaderboard_fetch_handle)
|
||||
rc_client_abort_async(s_client, s_leaderboard_fetch_handle);
|
||||
|
||||
+25
-10
@@ -23,10 +23,11 @@ namespace
|
||||
// When this happens, the cache still fills with the data and when it gets evicted the data is lost.
|
||||
// We don't emulate memory access on a logic level, so we need to ensure that we don't try to load/store to a non-existant physical address.
|
||||
// This fixes the Find My Own Way demo.
|
||||
bool validPFN = true;
|
||||
|
||||
// The lower parts of a cache tags structure is as follows:
|
||||
// 31 - 12: The physical address cache tag.
|
||||
// 11 - 7: Unused.
|
||||
// 11: Used by PCSX2 to indicate if the physical address is valid.
|
||||
// 10 - 7: Unused.
|
||||
// 6: Dirty flag.
|
||||
// 5: Valid flag.
|
||||
// 4: LRF flag - least recently filled flag.
|
||||
@@ -39,7 +40,8 @@ namespace
|
||||
VALID_FLAG = 0x20,
|
||||
LRF_FLAG = 0x10,
|
||||
LOCK_FLAG = 0x8,
|
||||
ALL_FLAGS = 0xFFF
|
||||
ALL_FLAGS = 0x7FF,
|
||||
ALL_BITS = 0xFFF
|
||||
};
|
||||
|
||||
int flags() const
|
||||
@@ -65,23 +67,36 @@ namespace
|
||||
void clearLocked() { rawValue &= ~LOCK_FLAG; }
|
||||
void toggleLRF() { rawValue ^= LRF_FLAG; }
|
||||
|
||||
uptr addr() const { return rawValue & ~ALL_FLAGS; }
|
||||
uptr addr() const { return rawValue & ~ALL_BITS; }
|
||||
|
||||
void setAddr(uptr addr)
|
||||
{
|
||||
rawValue &= ALL_FLAGS;
|
||||
rawValue |= (addr & ~ALL_FLAGS);
|
||||
rawValue &= ALL_BITS;
|
||||
rawValue |= (addr & ~ALL_BITS);
|
||||
}
|
||||
|
||||
bool matches(uptr other) const
|
||||
{
|
||||
return isValid() && addr() == (other & ~ALL_FLAGS);
|
||||
return isValid() && addr() == (other & ~ALL_BITS);
|
||||
}
|
||||
|
||||
void clear()
|
||||
{
|
||||
rawValue &= LRF_FLAG;
|
||||
}
|
||||
|
||||
constexpr bool isValidPFN() const
|
||||
{
|
||||
return rawValue & 0x800;
|
||||
}
|
||||
|
||||
constexpr void setValidPFN(bool valid)
|
||||
{
|
||||
if (valid)
|
||||
rawValue |= 0x800;
|
||||
else
|
||||
rawValue &= ~0x800;
|
||||
}
|
||||
};
|
||||
|
||||
struct CacheLine
|
||||
@@ -103,7 +118,7 @@ namespace
|
||||
uptr target = addr();
|
||||
|
||||
CACHE_LOG("Write back at %zx", target);
|
||||
if (tag.validPFN)
|
||||
if (tag.isValidPFN())
|
||||
*reinterpret_cast<CacheData*>(target) = data;
|
||||
tag.clearDirty();
|
||||
}
|
||||
@@ -113,7 +128,7 @@ namespace
|
||||
pxAssertMsg(!tag.isDirtyAndValid(), "Loaded a value into cache without writing back the old one!");
|
||||
|
||||
tag.setAddr(ppf);
|
||||
if (!tag.validPFN)
|
||||
if (!tag.isValidPFN())
|
||||
{
|
||||
// Reading from invalid physical addresses seems to return 0 on hardware
|
||||
std::memset(&data, 0, sizeof(data));
|
||||
@@ -238,7 +253,7 @@ static int getFreeCache(u32 mem, int* way, bool validPFN)
|
||||
|
||||
CacheLine line = cache.lineAt(setIdx, newWay);
|
||||
line.writeBackIfNeeded();
|
||||
line.tag.validPFN = validPFN;
|
||||
line.tag.setValidPFN(validPFN);
|
||||
line.load(ppf);
|
||||
line.tag.toggleLRF();
|
||||
}
|
||||
|
||||
@@ -1268,6 +1268,8 @@ struct Pcsx2Config
|
||||
EnablePatches : 1, // enables patch detection and application
|
||||
EnableCheats : 1, // enables cheat detection and application
|
||||
EnablePINE : 1, // enables inter-process communication
|
||||
EnableWideScreenPatches : 1,
|
||||
EnableNoInterlacingPatches : 1,
|
||||
EnableFastBoot : 1,
|
||||
EnableFastBootFastForward : 1,
|
||||
EnableThreadPinning : 1,
|
||||
|
||||
+1
-1
@@ -403,7 +403,7 @@ void UpdateVSyncRate(bool force)
|
||||
vSyncInfoCalc(&vSyncInfo, frames_per_second, total_scanlines);
|
||||
|
||||
if (video_mode_initialized)
|
||||
Console.WriteLn(Color_Green, "(UpdateVSyncRate) Mode Changed to %s.", ReportVideoMode());
|
||||
Console.WriteLn(Color_Green, "UpdateVSyncRate: Mode Changed to %s.", ReportVideoMode());
|
||||
|
||||
if (custom && video_mode_initialized)
|
||||
Console.WriteLn(Color_StrongGreen, " ... with user configured refresh rate: %.02f Hz", vertical_frequency);
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ MULTI_ISA_UNSHARED_IMPL;
|
||||
u64 __noinline CURRENT_ISA::GSXXH3_64_Long(const void* data, size_t len)
|
||||
{
|
||||
// XXH marks its function that calls this noinline, and it would be silly to stack noinline functions, so call the internal function directly
|
||||
return XXH3_hashLong_64b_internal(data, len, XXH3_kSecret, sizeof(XXH3_kSecret), XXH3_accumulate_512, XXH3_scrambleAcc);
|
||||
return XXH3_hashLong_64b_internal(data, len, XXH3_kSecret, sizeof(XXH3_kSecret), XXH3_accumulate, XXH3_scrambleAcc);
|
||||
}
|
||||
|
||||
u32 CURRENT_ISA::GSXXH3_64_Update(void* state, const void* data, size_t len)
|
||||
|
||||
@@ -112,7 +112,7 @@ bool GSDevice11::Create(GSVSyncMode vsync_mode, bool allow_present_throttle)
|
||||
{
|
||||
Host::ReportErrorAsync("GS",
|
||||
fmt::format(
|
||||
TRANSLATE_FS("GS", "Failed to create D3D device: 0x{:08X}. A GPU which supports Direct3D Feature Level 10.0 is required."),
|
||||
TRANSLATE_FS("GS", "Failed to create D3D11 device: 0x{:08X}. A GPU which supports Direct3D Feature Level 10.0 is required."),
|
||||
hr));
|
||||
return false;
|
||||
}
|
||||
@@ -149,10 +149,10 @@ bool GSDevice11::Create(GSVSyncMode vsync_mode, bool allow_present_throttle)
|
||||
if (m_dev.try_query_to(&dxgi_device) && SUCCEEDED(dxgi_device->GetParent(IID_PPV_ARGS(dxgi_adapter.put()))))
|
||||
{
|
||||
m_name = D3D::GetAdapterName(dxgi_adapter.get());
|
||||
Console.WriteLn(fmt::format("D3D Adapter: {}", m_name));
|
||||
Console.WriteLn(fmt::format("D3D11: Adapter: {}", m_name));
|
||||
}
|
||||
else
|
||||
Console.Error("Failed to obtain D3D adapter name.");
|
||||
Console.Error("D3D11: Failed to obtain adapter name.");
|
||||
|
||||
BOOL allow_tearing_supported = false;
|
||||
hr = m_dxgi_factory->CheckFeatureSupport(
|
||||
@@ -172,7 +172,7 @@ bool GSDevice11::Create(GSVSyncMode vsync_mode, bool allow_present_throttle)
|
||||
m_annotation = m_ctx.try_query<ID3DUserDefinedAnnotation>();
|
||||
|
||||
if (!m_shader_cache.Open(m_feature_level, GSConfig.UseDebugDevice))
|
||||
Console.Warning("Shader cache failed to open.");
|
||||
Console.Warning("D3D11: Shader cache failed to open.");
|
||||
|
||||
{
|
||||
// HACK: check AMD
|
||||
@@ -341,7 +341,7 @@ bool GSDevice11::Create(GSVSyncMode vsync_mode, bool allow_present_throttle)
|
||||
bd.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
|
||||
if (FAILED(m_dev->CreateBuffer(&bd, nullptr, m_vb.put())))
|
||||
{
|
||||
Console.Error("Failed to create vertex buffer.");
|
||||
Console.Error("D3D11: Failed to create vertex buffer.");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -349,7 +349,7 @@ bool GSDevice11::Create(GSVSyncMode vsync_mode, bool allow_present_throttle)
|
||||
bd.BindFlags = D3D11_BIND_INDEX_BUFFER;
|
||||
if (FAILED(m_dev->CreateBuffer(&bd, nullptr, m_ib.put())))
|
||||
{
|
||||
Console.Error("Failed to create index buffer.");
|
||||
Console.Error("D3D11: Failed to create index buffer.");
|
||||
return false;
|
||||
}
|
||||
IASetIndexBuffer(m_ib.get());
|
||||
@@ -363,7 +363,7 @@ bool GSDevice11::Create(GSVSyncMode vsync_mode, bool allow_present_throttle)
|
||||
|
||||
if (FAILED(m_dev->CreateBuffer(&bd, nullptr, m_expand_vb.put())))
|
||||
{
|
||||
Console.Error("Failed to create expand vertex buffer.");
|
||||
Console.Error("D3D11: Failed to create expand vertex buffer.");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -371,7 +371,7 @@ bool GSDevice11::Create(GSVSyncMode vsync_mode, bool allow_present_throttle)
|
||||
D3D11_SRV_DIMENSION_BUFFER, DXGI_FORMAT_UNKNOWN, 0, VERTEX_BUFFER_SIZE / sizeof(GSVertex));
|
||||
if (FAILED(m_dev->CreateShaderResourceView(m_expand_vb.get(), &vb_srv_desc, m_expand_vb_srv.put())))
|
||||
{
|
||||
Console.Error("Failed to create expand vertex buffer SRV.");
|
||||
Console.Error("D3D11: Failed to create expand vertex buffer SRV.");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -388,7 +388,7 @@ bool GSDevice11::Create(GSVSyncMode vsync_mode, bool allow_present_throttle)
|
||||
const D3D11_SUBRESOURCE_DATA srd = {expand_data.get()};
|
||||
if (FAILED(m_dev->CreateBuffer(&bd, &srd, m_expand_ib.put())))
|
||||
{
|
||||
Console.Error("Failed to create expand index buffer.");
|
||||
Console.Error("D3D11: Failed to create expand index buffer.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -440,7 +440,7 @@ bool GSDevice11::Create(GSVSyncMode vsync_mode, bool allow_present_throttle)
|
||||
|
||||
if (FAILED(m_dev->CreateBuffer(&bd, nullptr, m_vs_cb.put())))
|
||||
{
|
||||
Console.Error("Failed to create vertex shader constant buffer.");
|
||||
Console.Error("D3D11: Failed to create vertex shader constant buffer.");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -452,7 +452,7 @@ bool GSDevice11::Create(GSVSyncMode vsync_mode, bool allow_present_throttle)
|
||||
|
||||
if (FAILED(m_dev->CreateBuffer(&bd, nullptr, m_ps_cb.put())))
|
||||
{
|
||||
Console.Error("Failed to create pixel shader constant buffer.");
|
||||
Console.Error("D3D11: Failed to create pixel shader constant buffer.");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -511,7 +511,7 @@ bool GSDevice11::Create(GSVSyncMode vsync_mode, bool allow_present_throttle)
|
||||
if (m_feature_level < D3D_FEATURE_LEVEL_11_0)
|
||||
{
|
||||
Host::AddIconOSDMessage("d3d11_feature_level_warning", ICON_FA_EXCLAMATION_TRIANGLE,
|
||||
TRANSLATE_SV("GS", "The Direct3D renderer is running at feature level 10.0. This is an UNSUPPORTED configuration.\n"
|
||||
TRANSLATE_SV("GS", "The Direct3D11 renderer is running at feature level 10.0. This is an UNSUPPORTED configuration.\n"
|
||||
"Do not request support, please upgrade your hardware/drivers first."),
|
||||
Host::OSD_WARNING_DURATION);
|
||||
}
|
||||
@@ -594,7 +594,7 @@ void GSDevice11::SetFeatures(IDXGIAdapter1* adapter)
|
||||
if (SUCCEEDED(m_dev->CheckFeatureSupport(D3D11_FEATURE_D3D11_OPTIONS2, &options, sizeof(options))) &&
|
||||
!options.TypedUAVLoadAdditionalFormats)
|
||||
{
|
||||
Console.Warning("Disabling VS expand due to potentially buggy NVIDIA driver.");
|
||||
Console.Warning("D3D11: Disabling VS expand due to potentially buggy NVIDIA driver.");
|
||||
m_features.vs_expand = false;
|
||||
}
|
||||
}
|
||||
@@ -616,7 +616,7 @@ void GSDevice11::SetVSyncMode(GSVSyncMode mode, bool allow_present_throttle)
|
||||
// Using mailbox-style no-allow-tearing causes tearing in exclusive fullscreen.
|
||||
if (mode == GSVSyncMode::Mailbox && m_is_exclusive_fullscreen)
|
||||
{
|
||||
WARNING_LOG("Using FIFO instead of Mailbox vsync due to exclusive fullscreen.");
|
||||
WARNING_LOG("D3D11: Using FIFO instead of Mailbox vsync due to exclusive fullscreen.");
|
||||
mode = GSVSyncMode::FIFO;
|
||||
}
|
||||
|
||||
@@ -632,7 +632,7 @@ void GSDevice11::SetVSyncMode(GSVSyncMode mode, bool allow_present_throttle)
|
||||
{
|
||||
DestroySwapChain();
|
||||
if (!CreateSwapChain())
|
||||
pxFailRel("Failed to recreate swap chain after vsync change.");
|
||||
pxFailRel("D3D11: Failed to recreate swap chain after vsync change.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -669,7 +669,7 @@ bool GSDevice11::CreateSwapChain()
|
||||
// Using mailbox-style no-allow-tearing causes tearing in exclusive fullscreen.
|
||||
if (m_vsync_mode == GSVSyncMode::Mailbox && m_is_exclusive_fullscreen)
|
||||
{
|
||||
WARNING_LOG("Using FIFO instead of Mailbox vsync due to exclusive fullscreen.");
|
||||
WARNING_LOG("D3D11: Using FIFO instead of Mailbox vsync due to exclusive fullscreen.");
|
||||
m_vsync_mode = GSVSyncMode::FIFO;
|
||||
}
|
||||
}
|
||||
@@ -709,12 +709,12 @@ bool GSDevice11::CreateSwapChain()
|
||||
fs_desc.Scaling = fullscreen_mode.Scaling;
|
||||
fs_desc.Windowed = FALSE;
|
||||
|
||||
Console.WriteLn("Creating a %dx%d exclusive fullscreen swap chain", fs_sd_desc.Width, fs_sd_desc.Height);
|
||||
Console.WriteLn("D3D11: Creating a %dx%d exclusive fullscreen swap chain", fs_sd_desc.Width, fs_sd_desc.Height);
|
||||
hr = m_dxgi_factory->CreateSwapChainForHwnd(
|
||||
m_dev.get(), window_hwnd, &fs_sd_desc, &fs_desc, fullscreen_output.get(), m_swap_chain.put());
|
||||
if (FAILED(hr))
|
||||
{
|
||||
Console.Warning("Failed to create fullscreen swap chain, trying windowed.");
|
||||
Console.Warning("D3D11: Failed to create fullscreen swap chain, trying windowed.");
|
||||
m_is_exclusive_fullscreen = false;
|
||||
m_using_allow_tearing = m_allow_tearing_supported && m_using_flip_model_swap_chain;
|
||||
}
|
||||
@@ -722,7 +722,7 @@ bool GSDevice11::CreateSwapChain()
|
||||
|
||||
if (!m_is_exclusive_fullscreen)
|
||||
{
|
||||
Console.WriteLn("Creating a %dx%d %s windowed swap chain", swap_chain_desc.Width, swap_chain_desc.Height,
|
||||
Console.WriteLn("D3D11: Creating a %dx%d %s windowed swap chain", swap_chain_desc.Width, swap_chain_desc.Height,
|
||||
m_using_flip_model_swap_chain ? "flip-discard" : "discard");
|
||||
hr = m_dxgi_factory->CreateSwapChainForHwnd(
|
||||
m_dev.get(), window_hwnd, &swap_chain_desc, nullptr, nullptr, m_swap_chain.put());
|
||||
@@ -730,7 +730,7 @@ bool GSDevice11::CreateSwapChain()
|
||||
|
||||
if (FAILED(hr) && m_using_flip_model_swap_chain)
|
||||
{
|
||||
Console.Warning("Failed to create a flip-discard swap chain, trying discard.");
|
||||
Console.Warning("D3D11: Failed to create a flip-discard swap chain, trying discard.");
|
||||
swap_chain_desc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
|
||||
swap_chain_desc.Flags = 0;
|
||||
m_using_flip_model_swap_chain = false;
|
||||
@@ -740,7 +740,7 @@ bool GSDevice11::CreateSwapChain()
|
||||
m_dev.get(), window_hwnd, &swap_chain_desc, nullptr, nullptr, m_swap_chain.put());
|
||||
if (FAILED(hr))
|
||||
{
|
||||
Console.Error("CreateSwapChainForHwnd failed: 0x%08X", hr);
|
||||
Console.Error("D3D11: CreateSwapChainForHwnd failed: 0x%08X", hr);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -752,11 +752,11 @@ bool GSDevice11::CreateSwapChain()
|
||||
{
|
||||
hr = swap_chain_factory->MakeWindowAssociation(window_hwnd, DXGI_MWA_NO_WINDOW_CHANGES);
|
||||
if (FAILED(hr))
|
||||
Console.ErrorFmt("MakeWindowAssociation() to disable ALT+ENTER failed: {}", Error::CreateHResult(hr).GetDescription());
|
||||
Console.ErrorFmt("D3D11: MakeWindowAssociation() to disable ALT+ENTER failed: {}", Error::CreateHResult(hr).GetDescription());
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.ErrorFmt("GetParent() on swap chain to get factory failed: {}", Error::CreateHResult(hr).GetDescription());
|
||||
Console.ErrorFmt("D3D11: GetParent() on swap chain to get factory failed: {}", Error::CreateHResult(hr).GetDescription());
|
||||
}
|
||||
|
||||
if (!CreateSwapChainRTV())
|
||||
@@ -777,7 +777,7 @@ bool GSDevice11::CreateSwapChainRTV()
|
||||
HRESULT hr = m_swap_chain->GetBuffer(0, IID_PPV_ARGS(backbuffer.put()));
|
||||
if (FAILED(hr))
|
||||
{
|
||||
Console.Error("GetBuffer for RTV failed: 0x%08X", hr);
|
||||
Console.Error("D3D11: GetBuffer for RTV failed: 0x%08X", hr);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -789,14 +789,14 @@ bool GSDevice11::CreateSwapChainRTV()
|
||||
hr = m_dev->CreateRenderTargetView(backbuffer.get(), &rtv_desc, m_swap_chain_rtv.put());
|
||||
if (FAILED(hr))
|
||||
{
|
||||
Console.Error("CreateRenderTargetView for swap chain failed: 0x%08X", hr);
|
||||
Console.Error("D3D11: CreateRenderTargetView for swap chain failed: 0x%08X", hr);
|
||||
m_swap_chain_rtv.reset();
|
||||
return false;
|
||||
}
|
||||
|
||||
m_window_info.surface_width = backbuffer_desc.Width;
|
||||
m_window_info.surface_height = backbuffer_desc.Height;
|
||||
DevCon.WriteLn("Swap chain buffer size: %ux%u", m_window_info.surface_width, m_window_info.surface_height);
|
||||
DevCon.WriteLn("D3D11: Swap chain buffer size: %ux%u", m_window_info.surface_width, m_window_info.surface_height);
|
||||
|
||||
if (m_window_info.type == WindowInfo::Type::Win32)
|
||||
{
|
||||
@@ -838,7 +838,7 @@ bool GSDevice11::UpdateWindow()
|
||||
|
||||
if (m_window_info.type != WindowInfo::Type::Surfaceless && !CreateSwapChain())
|
||||
{
|
||||
Console.WriteLn("Failed to create swap chain on updated window");
|
||||
Console.WriteLn("D3D11: Failed to create swap chain on updated window");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -911,7 +911,7 @@ void GSDevice11::ResizeWindow(s32 new_window_width, s32 new_window_height, float
|
||||
HRESULT hr = m_swap_chain->ResizeBuffers(
|
||||
0, 0, 0, DXGI_FORMAT_UNKNOWN, m_using_allow_tearing ? DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING : 0);
|
||||
if (FAILED(hr))
|
||||
Console.Error("ResizeBuffers() failed: 0x%08X", hr);
|
||||
Console.Error("D3D11: ResizeBuffers() failed: 0x%08X", hr);
|
||||
|
||||
if (!CreateSwapChainRTV())
|
||||
pxFailRel("Failed to recreate swap chain RTV after resize");
|
||||
@@ -1031,7 +1031,7 @@ void GSDevice11::PopTimestampQuery()
|
||||
|
||||
if (disjoint.Disjoint)
|
||||
{
|
||||
DevCon.WriteLn("GPU timing disjoint, resetting.");
|
||||
DevCon.WriteLn("D3D11: GPU timing disjoint, resetting.");
|
||||
m_read_timestamp_query = 0;
|
||||
m_write_timestamp_query = 0;
|
||||
m_waiting_timestamp_queries = 0;
|
||||
@@ -1217,7 +1217,7 @@ GSTexture* GSDevice11::CreateSurface(GSTexture::Type type, int width, int height
|
||||
HRESULT hr = m_dev->CreateTexture2D(&desc, nullptr, texture.put());
|
||||
if (FAILED(hr))
|
||||
{
|
||||
Console.Error("DX11: Failed to allocate %dx%d surface", width, height);
|
||||
Console.Error("D3D11: Failed to allocate %dx%d surface", width, height);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -1630,7 +1630,7 @@ void GSDevice11::DoFXAA(GSTexture* sTex, GSTexture* dTex)
|
||||
const std::optional<std::string> shader = ReadShaderSource("shaders/common/fxaa.fx");
|
||||
if (!shader.has_value())
|
||||
{
|
||||
Console.Error("FXAA shader is missing");
|
||||
Console.Error("D3D11: FXAA shader is missing");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1957,7 +1957,7 @@ bool GSDevice11::CreateCASShaders()
|
||||
m_cas.cs_upscale = m_shader_cache.GetComputeShader(m_dev.get(), cas_source.value(), nullptr, "main");
|
||||
if (!m_cas.cs_sharpen || !m_cas.cs_upscale)
|
||||
{
|
||||
Console.Error("Failed to create CAS compute shaders.");
|
||||
Console.Error("D3D11: Failed to create CAS compute shaders.");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1996,7 +1996,7 @@ bool GSDevice11::CreateImGuiResources()
|
||||
const std::optional<std::string> hlsl = ReadShaderSource("shaders/dx11/imgui.fx");
|
||||
if (!hlsl.has_value())
|
||||
{
|
||||
Console.Error("Failed to read imgui.fx");
|
||||
Console.Error("D3D11: Failed to read imgui.fx");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2013,7 +2013,7 @@ bool GSDevice11::CreateImGuiResources()
|
||||
std::size(layout), hlsl.value(), nullptr, "vs_main") ||
|
||||
!(m_imgui.ps = m_shader_cache.GetPixelShader(m_dev.get(), hlsl.value(), nullptr, "ps_main")))
|
||||
{
|
||||
Console.Error("Failed to compile ImGui shaders");
|
||||
Console.Error("D3D11: Failed to compile ImGui shaders");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2029,7 +2029,7 @@ bool GSDevice11::CreateImGuiResources()
|
||||
hr = m_dev->CreateBlendState(&blend_desc, m_imgui.bs.put());
|
||||
if (FAILED(hr))
|
||||
{
|
||||
Console.Error("CreateImGuiResources(): CreateBlendState() failed: %08X", hr);
|
||||
Console.Error("D3D11: CreateImGuiResources(): CreateBlendState() failed: %08X", hr);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2040,7 +2040,7 @@ bool GSDevice11::CreateImGuiResources()
|
||||
hr = m_dev->CreateBuffer(&buffer_desc, nullptr, m_imgui.vs_cb.put());
|
||||
if (FAILED(hr))
|
||||
{
|
||||
Console.Error("CreateImGuiResources(): CreateBlendState() failed: %08X", hr);
|
||||
Console.Error("D3D11: CreateImGuiResources(): CreateBlendState() failed: %08X", hr);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2566,7 +2566,7 @@ void GSDevice11::RenderHW(GSHWDrawConfig& config)
|
||||
{
|
||||
if (!IASetExpandVertexBuffer(config.verts, sizeof(*config.verts), config.nverts))
|
||||
{
|
||||
Console.Error("Failed to upload structured vertices (%u)", config.nverts);
|
||||
Console.Error("D3D11: Failed to upload structured vertices (%u)", config.nverts);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2576,7 +2576,7 @@ void GSDevice11::RenderHW(GSHWDrawConfig& config)
|
||||
{
|
||||
if (!IASetVertexBuffer(config.verts, sizeof(*config.verts), config.nverts))
|
||||
{
|
||||
Console.Error("Failed to upload vertices (%u)", config.nverts);
|
||||
Console.Error("D3D11: Failed to upload vertices (%u)", config.nverts);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -2591,7 +2591,7 @@ void GSDevice11::RenderHW(GSHWDrawConfig& config)
|
||||
{
|
||||
if (!IASetIndexBuffer(config.indices, config.nindices))
|
||||
{
|
||||
Console.Error("Failed to upload indices (%u)", config.nindices);
|
||||
Console.Error("D3D11: Failed to upload indices (%u)", config.nindices);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ GSDevice12::ComPtr<ID3D12RootSignature> GSDevice12::CreateRootSignature(const D3
|
||||
m_device->CreateRootSignature(0, blob->GetBufferPointer(), blob->GetBufferSize(), IID_PPV_ARGS(rs.put()));
|
||||
if (FAILED(hr))
|
||||
{
|
||||
Console.Error("CreateRootSignature() failed: %08X", hr);
|
||||
Console.Error("D3D12: CreateRootSignature() failed: %08X", hr);
|
||||
return {};
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@ bool GSDevice12::CreateDevice(u32& vendor_id)
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.Error("Debug layer requested but not available.");
|
||||
Console.Error("D3D12: Debug layer requested but not available.");
|
||||
enable_debug_layer = false;
|
||||
}
|
||||
}
|
||||
@@ -185,7 +185,7 @@ bool GSDevice12::CreateDevice(u32& vendor_id)
|
||||
hr = D3D12CreateDevice(m_adapter.get(), isIntel ? D3D_FEATURE_LEVEL_12_0 : D3D_FEATURE_LEVEL_11_0, IID_PPV_ARGS(&m_device));
|
||||
if (FAILED(hr))
|
||||
{
|
||||
Console.Error("Failed to create D3D12 device: %08X", hr);
|
||||
Console.Error("D3D12: Failed to create device: %08X", hr);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ bool GSDevice12::CreateDevice(u32& vendor_id)
|
||||
{
|
||||
const LUID luid(m_device->GetAdapterLuid());
|
||||
if (FAILED(m_dxgi_factory->EnumAdapterByLuid(luid, IID_PPV_ARGS(m_adapter.put()))))
|
||||
Console.Error("Failed to get lookup adapter by device LUID");
|
||||
Console.Error("D3D12: Failed to get lookup adapter by device LUID");
|
||||
}
|
||||
|
||||
if (enable_debug_layer)
|
||||
@@ -226,7 +226,7 @@ bool GSDevice12::CreateDevice(u32& vendor_id)
|
||||
hr = m_device->CreateCommandQueue(&queue_desc, IID_PPV_ARGS(&m_command_queue));
|
||||
if (FAILED(hr))
|
||||
{
|
||||
Console.Error("Failed to create command queue: %08X", hr);
|
||||
Console.Error("D3D12: Failed to create command queue: %08X", hr);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -240,21 +240,21 @@ bool GSDevice12::CreateDevice(u32& vendor_id)
|
||||
hr = D3D12MA::CreateAllocator(&allocatorDesc, m_allocator.put());
|
||||
if (FAILED(hr))
|
||||
{
|
||||
Console.Error("D3D12MA::CreateAllocator() failed with HRESULT %08X", hr);
|
||||
Console.Error("D3D12: CreateAllocator() failed with HRESULT %08X", hr);
|
||||
return false;
|
||||
}
|
||||
|
||||
hr = m_device->CreateFence(m_completed_fence_value, D3D12_FENCE_FLAG_NONE, IID_PPV_ARGS(&m_fence));
|
||||
if (FAILED(hr))
|
||||
{
|
||||
Console.Error("Failed to create fence: %08X", hr);
|
||||
Console.Error("D3D12: Failed to create fence: %08X", hr);
|
||||
return false;
|
||||
}
|
||||
|
||||
m_fence_event = CreateEvent(nullptr, FALSE, FALSE, nullptr);
|
||||
if (m_fence_event == NULL)
|
||||
{
|
||||
Console.Error("Failed to create fence event: %08X", GetLastError());
|
||||
Console.Error("D3D12: Failed to create fence event: %08X", GetLastError());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -312,7 +312,7 @@ bool GSDevice12::CreateCommandLists()
|
||||
nullptr, IID_PPV_ARGS(res.command_lists[i].put()));
|
||||
if (FAILED(hr))
|
||||
{
|
||||
Console.Error("Failed to create command list: %08X", hr);
|
||||
Console.Error("D3D12: Failed to create command list: %08X", hr);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -325,13 +325,13 @@ bool GSDevice12::CreateCommandLists()
|
||||
|
||||
if (!res.descriptor_allocator.Create(m_device.get(), D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV, MAX_GPU_SRVS))
|
||||
{
|
||||
Console.Error("Failed to create per frame descriptor allocator");
|
||||
Console.Error("D3D12: Failed to create per frame descriptor allocator");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!res.sampler_allocator.Create(m_device.get(), MAX_GPU_SAMPLERS))
|
||||
{
|
||||
Console.Error("Failed to create per frame sampler allocator");
|
||||
Console.Error("D3D12: Failed to create per frame sampler allocator");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -378,7 +378,7 @@ void GSDevice12::MoveToNextCommandList()
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.Warning("Map() for timestamp query failed: %08X", hr);
|
||||
Console.Warning("D3D12: Map() for timestamp query failed: %08X", hr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -432,7 +432,7 @@ bool GSDevice12::ExecuteCommandList(WaitType wait_for_completion)
|
||||
hr = res.command_lists[0]->Close();
|
||||
if (FAILED(hr))
|
||||
{
|
||||
Console.Error("Closing init command list failed with HRESULT %08X", hr);
|
||||
Console.Error("D3D12: Closing init command list failed with HRESULT %08X", hr);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -441,7 +441,7 @@ bool GSDevice12::ExecuteCommandList(WaitType wait_for_completion)
|
||||
hr = res.command_lists[1]->Close();
|
||||
if (FAILED(hr))
|
||||
{
|
||||
Console.Error("Closing main command list failed with HRESULT %08X", hr);
|
||||
Console.Error("D3D12: Closing main command list failed with HRESULT %08X", hr);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -581,7 +581,7 @@ bool GSDevice12::CreateTimestampQuery()
|
||||
HRESULT hr = m_device->CreateQueryHeap(&desc, IID_PPV_ARGS(m_timestamp_query_heap.put()));
|
||||
if (FAILED(hr))
|
||||
{
|
||||
Console.Error("CreateQueryHeap() for timestamp failed with %08X", hr);
|
||||
Console.Error("D3D12: CreateQueryHeap() for timestamp failed with %08X", hr);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -592,7 +592,7 @@ bool GSDevice12::CreateTimestampQuery()
|
||||
m_timestamp_query_allocation.put(), IID_PPV_ARGS(m_timestamp_query_buffer.put()));
|
||||
if (FAILED(hr))
|
||||
{
|
||||
Console.Error("CreateResource() for timestamp failed with %08X", hr);
|
||||
Console.Error("D3D12: CreateResource() for timestamp failed with %08X", hr);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -600,7 +600,7 @@ bool GSDevice12::CreateTimestampQuery()
|
||||
hr = m_command_queue->GetTimestampFrequency(&frequency);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
Console.Error("GetTimestampFrequency() failed: %08X", hr);
|
||||
Console.Error("D3D12: GetTimestampFrequency() failed: %08X", hr);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -691,7 +691,7 @@ bool GSDevice12::Create(GSVSyncMode vsync_mode, bool allow_present_throttle)
|
||||
|
||||
if (!CheckFeatures(vendor_id))
|
||||
{
|
||||
Console.Error("Your GPU does not support the required D3D12 features.");
|
||||
Console.Error("D3D12: Your GPU does not support the required D3D12 features.");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -715,7 +715,7 @@ bool GSDevice12::Create(GSVSyncMode vsync_mode, bool allow_present_throttle)
|
||||
}
|
||||
|
||||
if (!m_shader_cache.Open(m_feature_level, GSConfig.UseDebugDevice))
|
||||
Console.Warning("Shader cache failed to open.");
|
||||
Console.Warning("D3D12: Shader cache failed to open.");
|
||||
|
||||
if (!CreateNullTexture())
|
||||
{
|
||||
@@ -769,7 +769,7 @@ void GSDevice12::SetVSyncMode(GSVSyncMode mode, bool allow_present_throttle)
|
||||
// Using mailbox-style no-allow-tearing causes tearing in exclusive fullscreen.
|
||||
if (mode == GSVSyncMode::Mailbox && m_is_exclusive_fullscreen)
|
||||
{
|
||||
WARNING_LOG("Using FIFO instead of Mailbox vsync due to exclusive fullscreen.");
|
||||
WARNING_LOG("D3D12: Using FIFO instead of Mailbox vsync due to exclusive fullscreen.");
|
||||
mode = GSVSyncMode::FIFO;
|
||||
}
|
||||
|
||||
@@ -822,7 +822,7 @@ bool GSDevice12::CreateSwapChain()
|
||||
// Using mailbox-style no-allow-tearing causes tearing in exclusive fullscreen.
|
||||
if (m_vsync_mode == GSVSyncMode::Mailbox && m_is_exclusive_fullscreen)
|
||||
{
|
||||
WARNING_LOG("Using FIFO instead of Mailbox vsync due to exclusive fullscreen.");
|
||||
WARNING_LOG("D3D12: Using FIFO instead of Mailbox vsync due to exclusive fullscreen.");
|
||||
m_vsync_mode = GSVSyncMode::FIFO;
|
||||
}
|
||||
}
|
||||
@@ -859,12 +859,12 @@ bool GSDevice12::CreateSwapChain()
|
||||
fs_desc.Scaling = fullscreen_mode.Scaling;
|
||||
fs_desc.Windowed = FALSE;
|
||||
|
||||
Console.WriteLn("Creating a %dx%d exclusive fullscreen swap chain", fs_sd_desc.Width, fs_sd_desc.Height);
|
||||
Console.WriteLn("D3D12: Creating a %dx%d exclusive fullscreen swap chain", fs_sd_desc.Width, fs_sd_desc.Height);
|
||||
hr = m_dxgi_factory->CreateSwapChainForHwnd(m_command_queue.get(), window_hwnd, &fs_sd_desc,
|
||||
&fs_desc, fullscreen_output.get(), m_swap_chain.put());
|
||||
if (FAILED(hr))
|
||||
{
|
||||
Console.Warning("Failed to create fullscreen swap chain, trying windowed.");
|
||||
Console.Warning("D3D12: Failed to create fullscreen swap chain, trying windowed.");
|
||||
m_is_exclusive_fullscreen = false;
|
||||
m_using_allow_tearing = m_allow_tearing_supported;
|
||||
}
|
||||
@@ -872,12 +872,12 @@ bool GSDevice12::CreateSwapChain()
|
||||
|
||||
if (!m_is_exclusive_fullscreen)
|
||||
{
|
||||
Console.WriteLn("Creating a %dx%d windowed swap chain", swap_chain_desc.Width, swap_chain_desc.Height);
|
||||
Console.WriteLn("D3D12: Creating a %dx%d windowed swap chain", swap_chain_desc.Width, swap_chain_desc.Height);
|
||||
hr = m_dxgi_factory->CreateSwapChainForHwnd(
|
||||
m_command_queue.get(), window_hwnd, &swap_chain_desc, nullptr, nullptr, m_swap_chain.put());
|
||||
|
||||
if (FAILED(hr))
|
||||
Console.Warning("Failed to create windowed swap chain.");
|
||||
Console.Warning("D3D12: Failed to create windowed swap chain.");
|
||||
}
|
||||
|
||||
// MWA needs to be called on the correct factory.
|
||||
@@ -887,11 +887,11 @@ bool GSDevice12::CreateSwapChain()
|
||||
{
|
||||
hr = swap_chain_factory->MakeWindowAssociation(window_hwnd, DXGI_MWA_NO_WINDOW_CHANGES);
|
||||
if (FAILED(hr))
|
||||
Console.ErrorFmt("MakeWindowAssociation() to disable ALT+ENTER failed: {}", Error::CreateHResult(hr).GetDescription());
|
||||
Console.ErrorFmt("D3D12: MakeWindowAssociation() to disable ALT+ENTER failed: {}", Error::CreateHResult(hr).GetDescription());
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.ErrorFmt("GetParent() on swap chain to get factory failed: {}", Error::CreateHResult(hr).GetDescription());
|
||||
Console.ErrorFmt("D3D12: GetParent() on swap chain to get factory failed: {}", Error::CreateHResult(hr).GetDescription());
|
||||
}
|
||||
|
||||
if (!CreateSwapChainRTV())
|
||||
@@ -926,7 +926,7 @@ bool GSDevice12::CreateSwapChainRTV()
|
||||
hr = m_swap_chain->GetBuffer(i, IID_PPV_ARGS(backbuffer.put()));
|
||||
if (FAILED(hr))
|
||||
{
|
||||
Console.Error("GetBuffer for RTV failed: 0x%08X", hr);
|
||||
Console.Error("D3D12: GetBuffer for RTV failed: 0x%08X", hr);
|
||||
m_swap_chain_buffers.clear();
|
||||
return false;
|
||||
}
|
||||
@@ -946,7 +946,7 @@ bool GSDevice12::CreateSwapChainRTV()
|
||||
|
||||
m_window_info.surface_width = swap_chain_desc.BufferDesc.Width;
|
||||
m_window_info.surface_height = swap_chain_desc.BufferDesc.Height;
|
||||
DevCon.WriteLn("Swap chain buffer size: %ux%u", m_window_info.surface_width, m_window_info.surface_height);
|
||||
DevCon.WriteLn("D3D12: Swap chain buffer size: %ux%u", m_window_info.surface_width, m_window_info.surface_height);
|
||||
|
||||
if (m_window_info.type == WindowInfo::Type::Win32)
|
||||
{
|
||||
@@ -998,7 +998,7 @@ bool GSDevice12::UpdateWindow()
|
||||
|
||||
if (m_window_info.type != WindowInfo::Type::Surfaceless && !CreateSwapChain())
|
||||
{
|
||||
Console.WriteLn("Failed to create swap chain on updated window");
|
||||
Console.WriteLn("D3D12: Failed to create swap chain on updated window");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1066,7 +1066,7 @@ void GSDevice12::ResizeWindow(s32 new_window_width, s32 new_window_height, float
|
||||
HRESULT hr = m_swap_chain->ResizeBuffers(
|
||||
0, 0, 0, DXGI_FORMAT_UNKNOWN, m_using_allow_tearing ? DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING : 0);
|
||||
if (FAILED(hr))
|
||||
Console.Error("ResizeBuffers() failed: 0x%08X", hr);
|
||||
Console.Error("D3D12: ResizeBuffers() failed: 0x%08X", hr);
|
||||
|
||||
if (!CreateSwapChainRTV())
|
||||
pxFailRel("Failed to recreate swap chain RTV after resize");
|
||||
@@ -1931,7 +1931,7 @@ bool GSDevice12::CompileCASPipelines()
|
||||
m_cas_sharpen_pipeline = cpb.Create(m_device.get(), m_shader_cache, false);
|
||||
if (!m_cas_upscale_pipeline || !m_cas_sharpen_pipeline)
|
||||
{
|
||||
Console.Error("Failed to create CAS pipelines");
|
||||
Console.Error("D3D12: Failed to create CAS pipelines");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1943,7 +1943,7 @@ bool GSDevice12::CompileImGuiPipeline()
|
||||
const std::optional<std::string> hlsl = ReadShaderSource("shaders/dx11/imgui.fx");
|
||||
if (!hlsl.has_value())
|
||||
{
|
||||
Console.Error("Failed to read imgui.fx");
|
||||
Console.Error("D3D12: Failed to read imgui.fx");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1951,7 +1951,7 @@ bool GSDevice12::CompileImGuiPipeline()
|
||||
const ComPtr<ID3DBlob> ps = m_shader_cache.GetPixelShader(hlsl.value(), nullptr, "ps_main");
|
||||
if (!vs || !ps)
|
||||
{
|
||||
Console.Error("Failed to compile ImGui shaders");
|
||||
Console.Error("D3D12: Failed to compile ImGui shaders");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1972,7 +1972,7 @@ bool GSDevice12::CompileImGuiPipeline()
|
||||
m_imgui_pipeline = gpb.Create(m_device.get(), m_shader_cache, false);
|
||||
if (!m_imgui_pipeline)
|
||||
{
|
||||
Console.Error("Failed to compile ImGui pipeline");
|
||||
Console.Error("D3D12: Failed to compile ImGui pipeline");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2015,7 +2015,7 @@ void GSDevice12::RenderImGui()
|
||||
// just skip if we run out.. we can't resume the present render pass :/
|
||||
if (!GetSamplerAllocator().LookupSingle(&m_utility_sampler_gpu, m_linear_sampler_cpu))
|
||||
{
|
||||
Console.Warning("Skipping ImGui draw because of no descriptors");
|
||||
Console.Warning("D3D12: Skipping ImGui draw because of no descriptors");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -2032,7 +2032,7 @@ void GSDevice12::RenderImGui()
|
||||
const u32 size = sizeof(ImDrawVert) * static_cast<u32>(cmd_list->VtxBuffer.Size);
|
||||
if (!m_vertex_stream_buffer.ReserveMemory(size, sizeof(ImDrawVert)))
|
||||
{
|
||||
Console.Warning("Skipping ImGui draw because of no vertex buffer space");
|
||||
Console.Warning("D3D12: Skipping ImGui draw because of no vertex buffer space");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2072,7 +2072,7 @@ void GSDevice12::RenderImGui()
|
||||
|
||||
if (!GetTextureGroupDescriptors(&m_utility_texture_gpu, &handle, 1))
|
||||
{
|
||||
Console.Warning("Skipping ImGui draw because of no descriptors");
|
||||
Console.Warning("D3D12: Skipping ImGui draw because of no descriptors");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -2103,7 +2103,7 @@ bool GSDevice12::DoCAS(
|
||||
if (!GetTextureGroupDescriptors(&sTexDH, &sTex12->GetSRVDescriptor(), 1) ||
|
||||
!GetTextureGroupDescriptors(&dTexDH, &dTex12->GetUAVDescriptor(), 1))
|
||||
{
|
||||
Console.Error("Failed to allocate CAS descriptors.");
|
||||
Console.Error("D3D12: Failed to allocate CAS descriptors.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -3567,7 +3567,7 @@ bool GSDevice12::ApplyTFXState(bool already_execed)
|
||||
{
|
||||
if (already_execed)
|
||||
{
|
||||
Console.Error("Failed to reserve vertex uniform space");
|
||||
Console.Error("D3D12: Failed to reserve vertex uniform space");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3588,7 +3588,7 @@ bool GSDevice12::ApplyTFXState(bool already_execed)
|
||||
{
|
||||
if (already_execed)
|
||||
{
|
||||
Console.Error("Failed to reserve pixel uniform space");
|
||||
Console.Error("D3D12: Failed to reserve pixel uniform space");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3846,7 +3846,7 @@ void GSDevice12::RenderHW(GSHWDrawConfig& config)
|
||||
date_image = SetupPrimitiveTrackingDATE(config, pipe);
|
||||
if (!date_image)
|
||||
{
|
||||
Console.WriteLn("Failed to allocate DATE image, aborting draw.");
|
||||
Console.WriteLn("D3D12: Failed to allocate DATE image, aborting draw.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -3874,7 +3874,7 @@ void GSDevice12::RenderHW(GSHWDrawConfig& config)
|
||||
hdr_rt = static_cast<GSTexture12*>(CreateRenderTarget(rtsize.x, rtsize.y, GSTexture::Format::HDRColor, false));
|
||||
if (!hdr_rt)
|
||||
{
|
||||
Console.WriteLn("Failed to allocate HDR render target, aborting draw.");
|
||||
Console.WriteLn("D3D12: Failed to allocate HDR render target, aborting draw.");
|
||||
if (date_image)
|
||||
Recycle(date_image);
|
||||
return;
|
||||
|
||||
@@ -952,11 +952,11 @@ GSVector2i GSRendererHW::GetValidSize(const GSTextureCache::Source* tex)
|
||||
return GSVector2i(width, height);
|
||||
}
|
||||
|
||||
GSVector2i GSRendererHW::GetTargetSize(const GSTextureCache::Source* tex)
|
||||
GSVector2i GSRendererHW::GetTargetSize(const GSTextureCache::Source* tex, const bool can_expand)
|
||||
{
|
||||
const GSVector2i valid_size = GetValidSize(tex);
|
||||
|
||||
return g_texture_cache->GetTargetSize(m_cached_ctx.FRAME.Block(), m_cached_ctx.FRAME.FBW, m_cached_ctx.FRAME.PSM, valid_size.x, valid_size.y);
|
||||
return g_texture_cache->GetTargetSize(m_cached_ctx.FRAME.Block(), m_cached_ctx.FRAME.FBW, m_cached_ctx.FRAME.PSM, valid_size.x, valid_size.y, can_expand);
|
||||
}
|
||||
|
||||
bool GSRendererHW::IsPossibleChannelShuffle() const
|
||||
@@ -2549,11 +2549,11 @@ void GSRendererHW::Draw()
|
||||
}
|
||||
}
|
||||
const bool possible_shuffle = !no_rt && (((shuffle_target && GSLocalMemory::m_psm[m_cached_ctx.FRAME.PSM].bpp == 16) || (m_cached_ctx.FRAME.Block() == m_cached_ctx.TEX0.TBP0 && ((m_cached_ctx.TEX0.PSM & 0x6) || m_cached_ctx.FRAME.PSM != m_cached_ctx.TEX0.PSM))) || IsPossibleChannelShuffle());
|
||||
const bool need_aem_color = GSLocalMemory::m_psm[m_cached_ctx.TEX0.PSM].trbpp <= 24 && GSLocalMemory::m_psm[m_cached_ctx.TEX0.PSM].pal == 0 && m_context->ALPHA.C == 0 && m_env.TEXA.AEM;
|
||||
const bool need_aem_color = GSLocalMemory::m_psm[m_cached_ctx.TEX0.PSM].trbpp <= 24 && GSLocalMemory::m_psm[m_cached_ctx.TEX0.PSM].pal == 0 && ((PRIM->ABE && m_context->ALPHA.C == 0) || IsDiscardingDstAlpha()) && m_draw_env->TEXA.AEM;
|
||||
const u32 color_mask = (m_vt.m_max.c > GSVector4i::zero()).mask();
|
||||
const bool texture_function_color = m_cached_ctx.TEX0.TFX == TFX_DECAL || (color_mask & 0xFFF) || (m_cached_ctx.TEX0.TFX > TFX_DECAL && (color_mask & 0xF000));
|
||||
const bool texture_function_alpha = m_cached_ctx.TEX0.TFX != TFX_MODULATE || (color_mask & 0xF000);
|
||||
const bool req_color = texture_function_color && (!PRIM->ABE || (PRIM->ABE && (IsUsingCsInBlend() || need_aem_color))) && (possible_shuffle || (m_cached_ctx.FRAME.FBMSK & (fm_mask & 0x00FFFFFF)) != (fm_mask & 0x00FFFFFF));
|
||||
const bool req_color = (texture_function_color && (!PRIM->ABE || (PRIM->ABE && IsUsingCsInBlend())) && (possible_shuffle || (m_cached_ctx.FRAME.FBMSK & (fm_mask & 0x00FFFFFF)) != (fm_mask & 0x00FFFFFF))) || need_aem_color;
|
||||
const bool alpha_used = (GSUtil::GetChannelMask(m_context->TEX0.PSM) == 0x8 || (m_context->TEX0.TCC && texture_function_alpha)) && ((PRIM->ABE && IsUsingAsInBlend()) || (m_cached_ctx.TEST.ATE && m_cached_ctx.TEST.ATST > ATST_ALWAYS) || (possible_shuffle || (m_cached_ctx.FRAME.FBMSK & (fm_mask & 0xFF000000)) != (fm_mask & 0xFF000000)));
|
||||
const bool req_alpha = (GSUtil::GetChannelMask(m_context->TEX0.PSM) & 0x8) && alpha_used;
|
||||
|
||||
@@ -2612,8 +2612,14 @@ void GSRendererHW::Draw()
|
||||
}
|
||||
}
|
||||
|
||||
// Urban Reign trolls by scissoring a draw to a target at 0x0-0x117F to 378x449 which ends up the size being rounded up to 640x480
|
||||
// causing the buffer to expand to around 0x1400, which makes a later framebuffer at 0x1180 to fail to be created correctly.
|
||||
// We can cheese this by checking if the Z is masked and the resultant colour is going to be black anyway.
|
||||
const bool output_black = PRIM->ABE && ((m_context->ALPHA.A == 1 && m_context->ALPHA.B == 0 && GetAlphaMinMax().min >= 128) || m_context->ALPHA.IsBlack()) && m_draw_env->COLCLAMP.CLAMP == 1;
|
||||
const bool can_expand = !(m_cached_ctx.ZBUF.ZMSK && output_black);
|
||||
|
||||
// Estimate size based on the scissor rectangle and height cache.
|
||||
const GSVector2i t_size = GetTargetSize(src);
|
||||
const GSVector2i t_size = GetTargetSize(src, can_expand);
|
||||
const GSVector4i t_size_rect = GSVector4i::loadh(t_size);
|
||||
|
||||
// Ensure draw rect is clamped to framebuffer size. Necessary for updating valid area.
|
||||
@@ -3404,20 +3410,18 @@ void GSRendererHW::Draw()
|
||||
|
||||
std::string s;
|
||||
|
||||
if (GSConfig.SaveRT && s_n >= GSConfig.SaveN)
|
||||
if (rt && GSConfig.SaveRT && s_n >= GSConfig.SaveN)
|
||||
{
|
||||
s = GetDrawDumpPath("%05d_f%lld_rt1_%05x_%s.bmp", s_n, frame, m_cached_ctx.FRAME.Block(), psm_str(m_cached_ctx.FRAME.PSM));
|
||||
s = GetDrawDumpPath("%05d_f%lld_rt1_%05x_(%05x)_%s.bmp", s_n, frame, m_cached_ctx.FRAME.Block(), rt->m_TEX0.TBP0, psm_str(m_cached_ctx.FRAME.PSM));
|
||||
|
||||
if (rt)
|
||||
rt->m_texture->Save(s);
|
||||
rt->m_texture->Save(s);
|
||||
}
|
||||
|
||||
if (GSConfig.SaveDepth && s_n >= GSConfig.SaveN)
|
||||
if (ds && GSConfig.SaveDepth && s_n >= GSConfig.SaveN)
|
||||
{
|
||||
s = GetDrawDumpPath("%05d_f%lld_rz1_%05x_%s.bmp", s_n, frame, m_cached_ctx.ZBUF.Block(), psm_str(m_cached_ctx.ZBUF.PSM));
|
||||
s = GetDrawDumpPath("%05d_f%lld_rz1_%05x_(%05x)_%s.bmp", s_n, frame, m_cached_ctx.ZBUF.Block(), ds->m_TEX0.TBP0, psm_str(m_cached_ctx.ZBUF.PSM));
|
||||
|
||||
if (ds)
|
||||
ds->m_texture->Save(s);
|
||||
ds->m_texture->Save(s);
|
||||
}
|
||||
|
||||
if (GSConfig.SaveL > 0 && (s_n - GSConfig.SaveN) > GSConfig.SaveL)
|
||||
@@ -3429,6 +3433,8 @@ void GSRendererHW::Draw()
|
||||
if (rt)
|
||||
rt->m_last_draw = s_n;
|
||||
|
||||
if (ds)
|
||||
ds->m_last_draw = s_n;
|
||||
#ifdef DISABLE_HW_TEXTURE_CACHE
|
||||
if (rt)
|
||||
g_texture_cache->Read(rt, real_rect);
|
||||
@@ -7272,7 +7278,8 @@ bool GSRendererHW::IsDiscardingDstRGB()
|
||||
bool GSRendererHW::IsDiscardingDstAlpha() const
|
||||
{
|
||||
return ((!PRIM->ABE || m_context->ALPHA.C != 1) && // not using Ad
|
||||
((m_cached_ctx.FRAME.FBMSK & GSLocalMemory::m_psm[m_cached_ctx.FRAME.PSM].fmsk) & 0xFF000000u) == 0); // alpha isn't masked
|
||||
((m_cached_ctx.FRAME.FBMSK & GSLocalMemory::m_psm[m_cached_ctx.FRAME.PSM].fmsk) & 0xFF000000u) == 0) && // alpha isn't masked
|
||||
(!m_cached_ctx.TEST.ATE || !(m_cached_ctx.TEST.ATST == ATST_NEVER && m_cached_ctx.TEST.AFAIL == AFAIL_RGB_ONLY && m_cached_ctx.FRAME.PSM == PSMCT32)); // No alpha test or no rbg only
|
||||
}
|
||||
|
||||
// Like PrimitiveCoversWithoutGaps but with texture coordinates.
|
||||
@@ -7406,9 +7413,10 @@ ClearType GSRendererHW::IsConstantDirectWriteMemClear()
|
||||
&& !(m_draw_env->SCANMSK.MSK & 2) && !m_cached_ctx.TEST.ATE // no alpha test
|
||||
&& !m_cached_ctx.TEST.DATE // no destination alpha test
|
||||
&& (!m_cached_ctx.TEST.ZTE || m_cached_ctx.TEST.ZTST == ZTST_ALWAYS) // no depth test
|
||||
&& (m_vt.m_eq.rgba == 0xFFFF || m_vertex.next == 2)) // constant color write
|
||||
&& (m_vt.m_eq.rgba == 0xFFFF || m_vertex.next == 2) // constant color write
|
||||
&& (!PRIM->FGE || m_vt.m_min.p.w == 255.0f)) // No fog effect
|
||||
{
|
||||
if (PRIM->ABE && (!m_context->ALPHA.IsOpaque() || m_cached_ctx.FRAME.FBMSK))
|
||||
if ((PRIM->ABE && !m_context->ALPHA.IsOpaque()) || (m_cached_ctx.FRAME.FBMSK & GSLocalMemory::m_psm[m_cached_ctx.FRAME.PSM].fmsk))
|
||||
return ClearWithDraw;
|
||||
|
||||
return NormalClear;
|
||||
|
||||
@@ -214,7 +214,7 @@ public:
|
||||
void MergeSprite(GSTextureCache::Source* tex);
|
||||
float GetTextureScaleFactor() override;
|
||||
GSVector2i GetValidSize(const GSTextureCache::Source* tex = nullptr);
|
||||
GSVector2i GetTargetSize(const GSTextureCache::Source* tex = nullptr);
|
||||
GSVector2i GetTargetSize(const GSTextureCache::Source* tex = nullptr, const bool can_expand = true);
|
||||
|
||||
void Reset(bool hardware_reset) override;
|
||||
void UpdateSettings(const Pcsx2Config::GSOptions& old_config) override;
|
||||
|
||||
@@ -2569,7 +2569,7 @@ bool GSTextureCache::PreloadTarget(GIFRegTEX0 TEX0, const GSVector2i& size, cons
|
||||
{
|
||||
const GSVector4i save_rect = preserve_target ? newrect : eerect;
|
||||
|
||||
if(!hw_clear)
|
||||
if (!hw_clear)
|
||||
dst->UpdateValidity(save_rect);
|
||||
GL_INS("Preloading the RT DATA from updated GS Memory");
|
||||
AddDirtyRectTarget(dst, save_rect, TEX0.PSM, TEX0.TBW, rgba, GSLocalMemory::m_psm[TEX0.PSM].trbpp >= 16);
|
||||
@@ -2605,12 +2605,14 @@ bool GSTextureCache::PreloadTarget(GIFRegTEX0 TEX0, const GSVector2i& size, cons
|
||||
auto j = i;
|
||||
Target* t = *j;
|
||||
|
||||
if (dst != t && t->m_TEX0.TBW == dst->m_TEX0.TBW && t->m_TEX0.PSM == dst->m_TEX0.PSM && t->m_TEX0.TBW > 4)
|
||||
if (dst != t && t->m_TEX0.PSM == dst->m_TEX0.PSM/* && t->m_TEX0.TBW == dst->m_TEX0.TBW*/)
|
||||
if (t->Overlaps(dst->m_TEX0.TBP0, dst->m_TEX0.TBW, dst->m_TEX0.PSM, dst->m_valid))
|
||||
{
|
||||
const u32 buffer_width = std::max(1U, dst->m_TEX0.TBW);
|
||||
|
||||
// If the two targets are misaligned, it's likely a relocation, so we can just kill the old target.
|
||||
// Kill targets that are overlapping new targets, but ignore the copy if the old target is dirty because we favour GS memory.
|
||||
if (((((t->m_TEX0.TBP0 - dst->m_TEX0.TBP0) >> 5) % dst->m_TEX0.TBW) != 0) && !t->m_dirty.empty())
|
||||
if (((((t->m_TEX0.TBP0 - dst->m_TEX0.TBP0) >> 5) % buffer_width) != 0) && !t->m_dirty.empty())
|
||||
{
|
||||
InvalidateSourcesFromTarget(t);
|
||||
i = list.erase(j);
|
||||
@@ -2629,64 +2631,84 @@ bool GSTextureCache::PreloadTarget(GIFRegTEX0 TEX0, const GSVector2i& size, cons
|
||||
return hw_clear.value_or(false);
|
||||
}
|
||||
// The new texture is behind it but engulfs the whole thing, shrink the new target so it grows in the HW Draw resize.
|
||||
else if (dst->m_TEX0.TBP0 < t->m_TEX0.TBP0 && (dst->UnwrappedEndBlock() + 1) > t->m_TEX0.TBP0 && dst->m_TEX0.TBP0 < (t->UnwrappedEndBlock() + 1))
|
||||
else if (dst->m_TEX0.TBP0 < t->m_TEX0.TBP0 && (dst->UnwrappedEndBlock() + 1) > t->m_TEX0.TBP0)
|
||||
{
|
||||
const int rt_pages = ((t->UnwrappedEndBlock() + 1) - t->m_TEX0.TBP0) >> 5;
|
||||
const int overlapping_pages = std::min(rt_pages, static_cast<int>((dst->UnwrappedEndBlock() + 1) - t->m_TEX0.TBP0) >> 5);
|
||||
const int overlapping_pages_height = (overlapping_pages / dst->m_TEX0.TBW) * GSLocalMemory::m_psm[t->m_TEX0.PSM].pgs.y;
|
||||
const int overlapping_pages_height = ((overlapping_pages + (buffer_width - 1)) / buffer_width) * GSLocalMemory::m_psm[t->m_TEX0.PSM].pgs.y;
|
||||
|
||||
if (overlapping_pages_height == 0 || (overlapping_pages % dst->m_TEX0.TBW))
|
||||
if (overlapping_pages_height == 0 || (overlapping_pages % buffer_width))
|
||||
{
|
||||
// No overlap top copy or the widths don't match.
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
|
||||
const int dst_offset_width = (((t->m_TEX0.TBP0 - dst->m_TEX0.TBP0) >> 5) % dst->m_TEX0.TBW) * GSLocalMemory::m_psm[t->m_TEX0.PSM].pgs.x;
|
||||
const int dst_offset_height = ((((t->m_TEX0.TBP0 - dst->m_TEX0.TBP0) >> 5) / dst->m_TEX0.TBW) * GSLocalMemory::m_psm[t->m_TEX0.PSM].pgs.y);
|
||||
const int dst_offset_height = ((((t->m_TEX0.TBP0 - dst->m_TEX0.TBP0) >> 5) / buffer_width) * GSLocalMemory::m_psm[t->m_TEX0.PSM].pgs.y);
|
||||
const int texture_height = (dst->m_TEX0.TBW == t->m_TEX0.TBW) ? (dst_offset_height + t->m_valid.w) : (dst_offset_height + overlapping_pages_height);
|
||||
|
||||
if (texture_height > dst->m_unscaled_size.y && !dst->ResizeTexture(dst->m_unscaled_size.x, texture_height, true))
|
||||
{
|
||||
// Resize failed, probably ran out of VRAM, better luck next time. Fall back to CPU.
|
||||
DevCon.Warning("Failed to resize target on preload? Draw %d", GSState::s_n);
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
|
||||
const int dst_offset_width = (((t->m_TEX0.TBP0 - dst->m_TEX0.TBP0) >> 5) % buffer_width) * GSLocalMemory::m_psm[t->m_TEX0.PSM].pgs.x;
|
||||
const int dst_offset_scaled_width = dst_offset_width * dst->m_scale;
|
||||
const int dst_offset_scaled_height = dst_offset_height * dst->m_scale;
|
||||
const GSVector4i dst_rect_scale = GSVector4i(t->m_valid.x, dst_offset_height, t->m_valid.z, dst_offset_height + overlapping_pages_height);
|
||||
const GSVector4i dst_rect_scale = GSVector4i(t->m_valid.x, dst_offset_height, t->m_valid.z, texture_height);
|
||||
|
||||
if (((!hw_clear && (preserve_target || preload)) || dst_rect_scale.rintersect(draw_rect).rempty()) && dst->GetScale() == t->GetScale())
|
||||
{
|
||||
const int copy_width = ((t->m_texture->GetWidth()) > (dst->m_texture->GetWidth()) ? (dst->m_texture->GetWidth()) : t->m_texture->GetWidth()) - dst_offset_scaled_width;
|
||||
const int copy_height = overlapping_pages_height * t->m_scale;
|
||||
int copy_width = ((t->m_texture->GetWidth()) > (dst->m_texture->GetWidth()) ? (dst->m_texture->GetWidth()) : t->m_texture->GetWidth()) - dst_offset_scaled_width;
|
||||
int copy_height = (texture_height - dst_offset_height) * t->m_scale;
|
||||
|
||||
GL_INS("RT double buffer copy from FBP 0x%x, %dx%d => %d,%d", t->m_TEX0.TBP0, copy_width, copy_height, 0, dst_offset_scaled_height);
|
||||
|
||||
// Clear the dirty first
|
||||
t->Update();
|
||||
dst->Update();
|
||||
|
||||
// Clamp it if it gets too small, shouldn't happen but stranger things have happened.
|
||||
if (copy_width < 0)
|
||||
{
|
||||
copy_width = 0;
|
||||
}
|
||||
|
||||
// Invalidate has been moved to after DrawPrims(), because we might kill the current sources' backing.
|
||||
if (!t->m_valid_rgb || !(t->m_valid_alpha_high || t->m_valid_alpha_low) || t->m_scale != dst->m_scale)
|
||||
{
|
||||
const GSVector4 src_rect = GSVector4(0, 0, copy_width, copy_height) / (GSVector4(t->m_texture->GetSize()).xyxy());
|
||||
const GSVector4 dst_rect = GSVector4(dst_offset_scaled_width, dst_offset_scaled_height, dst_offset_scaled_width + copy_width, dst_offset_scaled_width + copy_height);
|
||||
const GSVector4 dst_rect = GSVector4(dst_offset_scaled_width, dst_offset_scaled_height, dst_offset_scaled_width + copy_width, dst_offset_scaled_height + copy_height);
|
||||
g_gs_device->StretchRect(t->m_texture, src_rect, dst->m_texture, dst_rect, t->m_valid_rgb, t->m_valid_rgb, t->m_valid_rgb, t->m_valid_alpha_high || t->m_valid_alpha_low);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Invalidate has been moved to after DrawPrims(), because we might kill the current sources' backing.
|
||||
if ((copy_width + dst_offset_scaled_width) > (dst->m_unscaled_size.x * dst->m_scale) || (copy_height + dst_offset_scaled_height) > (dst->m_unscaled_size.y * dst->m_scale))
|
||||
{
|
||||
copy_width = std::min(copy_width, static_cast<int>((dst->m_unscaled_size.x * dst->m_scale) - dst_offset_scaled_width));
|
||||
copy_height = std::min(copy_height, static_cast<int>((dst->m_unscaled_size.y * dst->m_scale) - dst_offset_scaled_height));
|
||||
}
|
||||
|
||||
g_gs_device->CopyRect(t->m_texture, dst->m_texture, GSVector4i(0, 0, copy_width, copy_height), dst_offset_scaled_width, dst_offset_scaled_height);
|
||||
}
|
||||
}
|
||||
|
||||
if ((overlapping_pages < rt_pages) || (src && src->m_target && src->m_from_target == t))
|
||||
// src is using this target, so point it at the new copy.
|
||||
if (src && src->m_target && src->m_from_target == t)
|
||||
{
|
||||
// This should never happen as we're making a new target so the src should never be something it overlaps, but just incase..
|
||||
GSVector4i new_valid = t->m_valid;
|
||||
new_valid.y = std::max(new_valid.y - overlapping_pages_height, 0);
|
||||
new_valid.w = std::max(new_valid.w - overlapping_pages_height, 0);
|
||||
t->m_TEX0.TBP0 += (overlapping_pages_height / GSLocalMemory::m_psm[t->m_TEX0.PSM].pgs.y) << 5;
|
||||
t->ResizeValidity(new_valid);
|
||||
src->m_from_target = dst;
|
||||
src->m_texture = dst->m_texture;
|
||||
src->m_region.SetY(src->m_region.GetMinY() + dst_offset_height, src->m_region.GetMaxY() + dst_offset_height);
|
||||
src->m_region.SetX(src->m_region.GetMinX() + dst_offset_width, src->m_region.GetMaxX() + dst_offset_width);
|
||||
}
|
||||
else
|
||||
{
|
||||
InvalidateSourcesFromTarget(t);
|
||||
i = list.erase(j);
|
||||
delete t;
|
||||
}
|
||||
return hw_clear.value_or(false);
|
||||
|
||||
InvalidateSourcesFromTarget(t);
|
||||
i = list.erase(j);
|
||||
delete t;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
i++;
|
||||
@@ -3736,6 +3758,19 @@ bool GSTextureCache::Move(u32 SBP, u32 SBW, u32 SPSM, int sx, int sy, u32 DBP, u
|
||||
if (alpha_only && (!dst || GSLocalMemory::m_psm[dst->m_TEX0.PSM].bpp != 32))
|
||||
return false;
|
||||
|
||||
// Beware of the case where a game might create a larger texture by moving a bunch of chunks around.
|
||||
if (dst && DBP == SBP && dy > dst->m_unscaled_size.y)
|
||||
{
|
||||
const u32 new_DBP = DBP + (((dy / GSLocalMemory::m_psm[dst->m_TEX0.PSM].pgs.y) * DBW) << 5);
|
||||
|
||||
dst = nullptr;
|
||||
|
||||
DBP = new_DBP;
|
||||
dy = 0;
|
||||
|
||||
dst = GetExactTarget(DBP, DBW, dpsm_s.depth ? DepthStencil : RenderTarget, DBP);
|
||||
}
|
||||
|
||||
// Beware of the case where a game might create a larger texture by moving a bunch of chunks around.
|
||||
// We use dx/dy == 0 and the TBW check as a safeguard to make sure these go through to local memory.
|
||||
// We can also recreate the target if it's previously been created in the height cache with a valid size.
|
||||
@@ -4182,7 +4217,7 @@ GSTextureCache::Target* GSTextureCache::FindOverlappingTarget(u32 BP, u32 BW, u3
|
||||
return FindOverlappingTarget(BP, end_bp);
|
||||
}
|
||||
|
||||
GSVector2i GSTextureCache::GetTargetSize(u32 bp, u32 fbw, u32 psm, s32 min_width, s32 min_height)
|
||||
GSVector2i GSTextureCache::GetTargetSize(u32 bp, u32 fbw, u32 psm, s32 min_width, s32 min_height, bool can_expand)
|
||||
{
|
||||
TargetHeightElem search = {};
|
||||
search.bp = bp;
|
||||
@@ -4196,14 +4231,17 @@ GSVector2i GSTextureCache::GetTargetSize(u32 bp, u32 fbw, u32 psm, s32 min_width
|
||||
TargetHeightElem& elem = const_cast<TargetHeightElem&>(*it);
|
||||
if (elem.bits == search.bits)
|
||||
{
|
||||
if (elem.width < min_width || elem.height < min_height)
|
||||
if (can_expand)
|
||||
{
|
||||
DbgCon.WriteLn("Expand size at %x %u %u from %ux%u to %ux%u", bp, fbw, psm, elem.width, elem.height,
|
||||
min_width, min_height);
|
||||
}
|
||||
if (elem.width < min_width || elem.height < min_height)
|
||||
{
|
||||
DbgCon.WriteLn("Expand size at %x %u %u from %ux%u to %ux%u", bp, fbw, psm, elem.width, elem.height,
|
||||
min_width, min_height);
|
||||
}
|
||||
|
||||
elem.width = std::max(elem.width, min_width);
|
||||
elem.height = std::max(elem.height, min_height);
|
||||
elem.width = std::max(elem.width, min_width);
|
||||
elem.height = std::max(elem.height, min_height);
|
||||
}
|
||||
|
||||
m_target_heights.MoveFront(it.Index());
|
||||
elem.age = 0;
|
||||
@@ -4211,7 +4249,7 @@ GSVector2i GSTextureCache::GetTargetSize(u32 bp, u32 fbw, u32 psm, s32 min_width
|
||||
}
|
||||
}
|
||||
|
||||
DbgCon.WriteLn("New size at %x %u %u: %ux%u", bp, fbw, psm, min_width, min_height);
|
||||
DbgCon.WriteLn("New size at %x %u %u: %ux%u draw %d", bp, fbw, psm, min_width, min_height, GSState::s_n);
|
||||
m_target_heights.push_front(search);
|
||||
return GSVector2i(min_width, min_height);
|
||||
}
|
||||
|
||||
@@ -504,7 +504,7 @@ public:
|
||||
Target* FindOverlappingTarget(u32 BP, u32 end_bp) const;
|
||||
Target* FindOverlappingTarget(u32 BP, u32 BW, u32 PSM, GSVector4i rc) const;
|
||||
|
||||
GSVector2i GetTargetSize(u32 bp, u32 fbw, u32 psm, s32 min_width, s32 min_height);
|
||||
GSVector2i GetTargetSize(u32 bp, u32 fbw, u32 psm, s32 min_width, s32 min_height, bool can_expand = true);
|
||||
bool HasTargetInHeightCache(u32 bp, u32 fbw, u32 psm, u32 max_age = std::numeric_limits<u32>::max(), bool move_front = true);
|
||||
bool Has32BitTarget(u32 bp);
|
||||
|
||||
|
||||
@@ -170,13 +170,13 @@ bool GSDeviceOGL::Create(GSVSyncMode vsync_mode, bool allow_present_throttle)
|
||||
m_gl_context = GLContext::Create(m_window_info, &error);
|
||||
if (!m_gl_context)
|
||||
{
|
||||
Console.ErrorFmt("Failed to create any GL context: {}", error.GetDescription());
|
||||
Console.ErrorFmt("GL: Failed to create any context: {}", error.GetDescription());
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_gl_context->MakeCurrent())
|
||||
{
|
||||
Console.Error("Failed to make GL context current");
|
||||
Console.Error("GL: Failed to make context current");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -196,11 +196,11 @@ bool GSDeviceOGL::Create(GSVSyncMode vsync_mode, bool allow_present_throttle)
|
||||
if (!GSConfig.DisableShaderCache)
|
||||
{
|
||||
if (!m_shader_cache.Open())
|
||||
Console.Warning("Shader cache failed to open.");
|
||||
Console.Warning("GL: Shader cache failed to open.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLn("Not using shader cache.");
|
||||
Console.WriteLn("GL: Not using shader cache.");
|
||||
}
|
||||
|
||||
// because of fbo bindings below...
|
||||
@@ -544,7 +544,7 @@ bool GSDeviceOGL::Create(GSVSyncMode vsync_mode, bool allow_present_throttle)
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.Error("Failed to create texture upload buffer. Using slow path.");
|
||||
Console.Error("GL: Failed to create texture upload buffer. Using slow path.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -617,17 +617,17 @@ bool GSDeviceOGL::CheckFeatures(bool& buggy_pbo)
|
||||
if (std::strstr(vendor, "Advanced Micro Devices") || std::strstr(vendor, "ATI Technologies Inc.") ||
|
||||
std::strstr(vendor, "ATI"))
|
||||
{
|
||||
Console.WriteLn(Color_StrongRed, "OGL: AMD GPU detected.");
|
||||
Console.WriteLn(Color_StrongRed, "GL: AMD GPU detected.");
|
||||
//vendor_id_amd = true;
|
||||
}
|
||||
else if (std::strstr(vendor, "NVIDIA Corporation"))
|
||||
{
|
||||
Console.WriteLn(Color_StrongGreen, "OGL: NVIDIA GPU detected.");
|
||||
Console.WriteLn(Color_StrongGreen, "GL: NVIDIA GPU detected.");
|
||||
vendor_id_nvidia = true;
|
||||
}
|
||||
else if (std::strstr(vendor, "Intel"))
|
||||
{
|
||||
Console.WriteLn(Color_StrongBlue, "OGL: Intel GPU detected.");
|
||||
Console.WriteLn(Color_StrongBlue, "GL: Intel GPU detected.");
|
||||
//vendor_id_intel = true;
|
||||
}
|
||||
|
||||
@@ -706,13 +706,13 @@ bool GSDeviceOGL::CheckFeatures(bool& buggy_pbo)
|
||||
// using the normal texture update routines and letting the driver take care of it.
|
||||
buggy_pbo = !GLAD_GL_VERSION_4_4 && !GLAD_GL_ARB_buffer_storage && !GLAD_GL_EXT_buffer_storage;
|
||||
if (buggy_pbo)
|
||||
Console.Warning("Not using PBOs for texture uploads because buffer_storage is unavailable.");
|
||||
Console.Warning("GL: Not using PBOs for texture uploads because buffer_storage is unavailable.");
|
||||
|
||||
// Give the user the option to disable PBO usage for downloads.
|
||||
// Most drivers seem to be faster with PBO.
|
||||
m_disable_download_pbo = Host::GetBoolSettingValue("EmuCore/GS", "DisableGLDownloadPBO", false);
|
||||
if (m_disable_download_pbo)
|
||||
Console.Warning("Not using PBOs for texture downloads, this may reduce performance.");
|
||||
Console.Warning("GL: Not using PBOs for texture downloads, this may reduce performance.");
|
||||
|
||||
// optional features based on context
|
||||
m_features.broken_point_sampler = false;
|
||||
@@ -751,7 +751,7 @@ bool GSDeviceOGL::CheckFeatures(bool& buggy_pbo)
|
||||
const bool buggy_vs_expand =
|
||||
vendor_id_nvidia && (!GLAD_GL_ARB_bindless_texture && !GLAD_GL_NV_bindless_texture);
|
||||
if (buggy_vs_expand)
|
||||
Console.Warning("Disabling vertex shader expand due to broken NVIDIA driver.");
|
||||
Console.Warning("GL: Disabling vertex shader expand due to broken NVIDIA driver.");
|
||||
|
||||
if (GLAD_GL_ARB_shader_storage_buffer_object)
|
||||
{
|
||||
@@ -762,7 +762,7 @@ bool GSDeviceOGL::CheckFeatures(bool& buggy_pbo)
|
||||
GLAD_GL_ARB_gpu_shader5);
|
||||
}
|
||||
if (!m_features.vs_expand)
|
||||
Console.Warning("Vertex expansion is not supported. This will reduce performance.");
|
||||
Console.Warning("GL: Vertex expansion is not supported. This will reduce performance.");
|
||||
|
||||
GLint point_range[2] = {};
|
||||
glGetIntegerv(GL_ALIASED_POINT_SIZE_RANGE, point_range);
|
||||
@@ -774,7 +774,7 @@ bool GSDeviceOGL::CheckFeatures(bool& buggy_pbo)
|
||||
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_texture_size);
|
||||
m_max_texture_size = std::max(1024u, static_cast<u32>(max_texture_size));
|
||||
|
||||
Console.WriteLn("Using %s for point expansion, %s for line expansion and %s for sprite expansion.",
|
||||
Console.WriteLn("GL: Using %s for point expansion, %s for line expansion and %s for sprite expansion.",
|
||||
m_features.point_expand ? "hardware" : (m_features.vs_expand ? "vertex expanding" : "UNSUPPORTED"),
|
||||
m_features.line_expand ? "hardware" : (m_features.vs_expand ? "vertex expanding" : "UNSUPPORTED"),
|
||||
m_features.vs_expand ? "vertex expanding" : "CPU");
|
||||
@@ -798,7 +798,7 @@ void GSDeviceOGL::SetSwapInterval()
|
||||
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
|
||||
|
||||
if (!m_gl_context->SetSwapInterval(interval))
|
||||
WARNING_LOG("Failed to set swap interval to {}", interval);
|
||||
WARNING_LOG("GL: Failed to set swap interval to {}", interval);
|
||||
|
||||
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, current_fbo);
|
||||
}
|
||||
@@ -881,7 +881,7 @@ bool GSDeviceOGL::UpdateWindow()
|
||||
|
||||
if (!m_gl_context->ChangeSurface(m_window_info))
|
||||
{
|
||||
Console.Error("Failed to change surface");
|
||||
Console.Error("GL: Failed to change surface");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -920,7 +920,7 @@ void GSDeviceOGL::DestroySurface()
|
||||
{
|
||||
m_window_info = {};
|
||||
if (!m_gl_context->ChangeSurface(m_window_info))
|
||||
Console.Error("Failed to switch to surfaceless");
|
||||
Console.Error("GL: Failed to switch to surfaceless");
|
||||
}
|
||||
|
||||
std::string GSDeviceOGL::GetDriverInfo() const
|
||||
@@ -1336,7 +1336,7 @@ std::string GSDeviceOGL::GenGlslHeader(const std::string_view entry, GLenum type
|
||||
|
||||
std::string GSDeviceOGL::GetVSSource(VSSelector sel)
|
||||
{
|
||||
DevCon.WriteLn("Compiling new vertex shader with selector 0x%" PRIX64, sel.key);
|
||||
DevCon.WriteLn("GL: Compiling new vertex shader with selector 0x%" PRIX64, sel.key);
|
||||
|
||||
std::string macro = fmt::format("#define VS_FST {}\n", static_cast<u32>(sel.fst))
|
||||
+ fmt::format("#define VS_IIP {}\n", static_cast<u32>(sel.iip))
|
||||
@@ -1350,7 +1350,7 @@ std::string GSDeviceOGL::GetVSSource(VSSelector sel)
|
||||
|
||||
std::string GSDeviceOGL::GetPSSource(const PSSelector& sel)
|
||||
{
|
||||
DevCon.WriteLn("Compiling new pixel shader with selector 0x%" PRIX64 "%08X", sel.key_hi, sel.key_lo);
|
||||
DevCon.WriteLn("GL: Compiling new pixel shader with selector 0x%" PRIX64 "%08X", sel.key_hi, sel.key_lo);
|
||||
|
||||
std::string macro = fmt::format("#define PS_FST {}\n", sel.fst)
|
||||
+ fmt::format("#define PS_WMS {}\n", sel.wms)
|
||||
@@ -1834,7 +1834,7 @@ bool GSDeviceOGL::CompileFXAAProgram()
|
||||
const std::optional<std::string> shader = ReadShaderSource("shaders/common/fxaa.fx");
|
||||
if (!shader.has_value())
|
||||
{
|
||||
Console.Error("Failed to read fxaa.fs");
|
||||
Console.Error("GL: Failed to read fxaa.fs");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1842,7 +1842,7 @@ bool GSDeviceOGL::CompileFXAAProgram()
|
||||
std::optional<GLProgram> prog = m_shader_cache.GetProgram(m_convert.vs, ps);
|
||||
if (!prog.has_value())
|
||||
{
|
||||
Console.Error("Failed to compile FXAA fragment shader");
|
||||
Console.Error("GL: Failed to compile FXAA fragment shader");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2065,7 +2065,7 @@ bool GSDeviceOGL::CreateImGuiProgram()
|
||||
const std::optional<std::string> glsl = ReadShaderSource("shaders/opengl/imgui.glsl");
|
||||
if (!glsl.has_value())
|
||||
{
|
||||
Console.Error("Failed to read imgui.glsl");
|
||||
Console.Error("GL: Failed to read imgui.glsl");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2074,7 +2074,7 @@ bool GSDeviceOGL::CreateImGuiProgram()
|
||||
GetShaderSource("ps_main", GL_FRAGMENT_SHADER, glsl.value()));
|
||||
if (!prog.has_value())
|
||||
{
|
||||
Console.Error("Failed to compile imgui shaders");
|
||||
Console.Error("GL: Failed to compile imgui shaders");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@ bool GSDeviceVK::SelectInstanceExtensions(ExtensionList* extension_list, const W
|
||||
|
||||
if (extension_count == 0)
|
||||
{
|
||||
Console.Error("Vulkan: No extensions supported by instance.");
|
||||
Console.Error("VK: No extensions supported by instance.");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -170,13 +170,13 @@ bool GSDeviceVK::SelectInstanceExtensions(ExtensionList* extension_list, const W
|
||||
[name](const VkExtensionProperties& properties) { return !strcmp(name, properties.extensionName); }) !=
|
||||
available_extension_list.end())
|
||||
{
|
||||
DevCon.WriteLn("Enabling extension: %s", name);
|
||||
DevCon.WriteLn("VK: Enabling extension: %s", name);
|
||||
extension_list->push_back(name);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (required)
|
||||
Console.Error("Vulkan: Missing required extension %s.", name);
|
||||
Console.Error("VK: Missing required extension %s.", name);
|
||||
|
||||
return false;
|
||||
};
|
||||
@@ -204,7 +204,7 @@ bool GSDeviceVK::SelectInstanceExtensions(ExtensionList* extension_list, const W
|
||||
|
||||
// VK_EXT_debug_utils
|
||||
if (enable_debug_utils && !SupportsExtension(VK_EXT_DEBUG_UTILS_EXTENSION_NAME, false))
|
||||
Console.Warning("Vulkan: Debug report requested, but extension is not available.");
|
||||
Console.Warning("VK: Debug report requested, but extension is not available.");
|
||||
|
||||
oe->vk_ext_swapchain_maintenance1 = (wi.type != WindowInfo::Type::Surfaceless &&
|
||||
SupportsExtension(VK_EXT_SURFACE_MAINTENANCE_1_EXTENSION_NAME, false));
|
||||
@@ -231,7 +231,7 @@ GSDeviceVK::GPUList GSDeviceVK::EnumerateGPUs(VkInstance instance)
|
||||
res = vkEnumeratePhysicalDevices(instance, &gpu_count, physical_devices.data());
|
||||
if (res == VK_INCOMPLETE)
|
||||
{
|
||||
Console.Warning("First vkEnumeratePhysicalDevices() call returned %zu devices, but second returned %u",
|
||||
Console.Warning("VK: First vkEnumeratePhysicalDevices() call returned %zu devices, but second returned %u",
|
||||
physical_devices.size(), gpu_count);
|
||||
}
|
||||
else if (res != VK_SUCCESS)
|
||||
@@ -254,7 +254,7 @@ GSDeviceVK::GPUList GSDeviceVK::EnumerateGPUs(VkInstance instance)
|
||||
if (VK_API_VERSION_VARIANT(props.apiVersion) == 0 && VK_API_VERSION_MAJOR(props.apiVersion) <= 1 &&
|
||||
VK_API_VERSION_MINOR(props.apiVersion) < 1)
|
||||
{
|
||||
Console.Warning(fmt::format("Ignoring Vulkan GPU '{}' because it only claims support for Vulkan {}.{}.{}",
|
||||
Console.Warning(fmt::format("VK: Ignoring GPU '{}' because it only claims support for Vulkan {}.{}.{}",
|
||||
props.deviceName, VK_API_VERSION_MAJOR(props.apiVersion), VK_API_VERSION_MINOR(props.apiVersion),
|
||||
VK_API_VERSION_PATCH(props.apiVersion)));
|
||||
continue;
|
||||
@@ -265,7 +265,7 @@ GSDeviceVK::GPUList GSDeviceVK::EnumerateGPUs(VkInstance instance)
|
||||
res = vkEnumerateDeviceExtensionProperties(device, nullptr, &extension_count, nullptr);
|
||||
if (res != VK_SUCCESS)
|
||||
{
|
||||
Console.Warning(fmt::format("Ignoring Vulkan GPU '{}' because vkEnumerateInstanceExtensionProperties() failed: ",
|
||||
Console.Warning(fmt::format("VK: Ignoring GPU '{}' because vkEnumerateInstanceExtensionProperties() failed: ",
|
||||
props.deviceName, Vulkan::VkResultToString(res)));
|
||||
continue;
|
||||
}
|
||||
@@ -283,7 +283,7 @@ GSDeviceVK::GPUList GSDeviceVK::EnumerateGPUs(VkInstance instance)
|
||||
return (std::strcmp(required_extension_name, ext.extensionName) == 0);
|
||||
}) == available_extension_list.end())
|
||||
{
|
||||
Console.Warning(fmt::format("Ignoring Vulkan GPU '{}' because is is missing required extension {}",
|
||||
Console.Warning(fmt::format("VK: Ignoring GPU '{}' because is is missing required extension {}",
|
||||
props.deviceName, required_extension_name));
|
||||
has_missing_extension = true;
|
||||
}
|
||||
@@ -360,7 +360,7 @@ bool GSDeviceVK::SelectDeviceExtensions(ExtensionList* extension_list, bool enab
|
||||
|
||||
if (extension_count == 0)
|
||||
{
|
||||
Console.Error("Vulkan: No extensions supported by device.");
|
||||
Console.Error("VK: No extensions supported by device.");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -377,7 +377,7 @@ bool GSDeviceVK::SelectDeviceExtensions(ExtensionList* extension_list, bool enab
|
||||
if (std::none_of(extension_list->begin(), extension_list->end(),
|
||||
[name](const char* existing_name) { return (std::strcmp(existing_name, name) == 0); }))
|
||||
{
|
||||
DevCon.WriteLn("Enabling extension: %s", name);
|
||||
DevCon.WriteLn("VK: Enabling extension: %s", name);
|
||||
extension_list->push_back(name);
|
||||
}
|
||||
|
||||
@@ -385,7 +385,7 @@ bool GSDeviceVK::SelectDeviceExtensions(ExtensionList* extension_list, bool enab
|
||||
}
|
||||
|
||||
if (required)
|
||||
Console.Error("Vulkan: Missing required extension %s.", name);
|
||||
Console.Error("VK: Missing required extension %s.", name);
|
||||
|
||||
return false;
|
||||
};
|
||||
@@ -531,12 +531,12 @@ bool GSDeviceVK::CreateDevice(VkSurfaceKHR surface, bool enable_validation_layer
|
||||
}
|
||||
if (m_graphics_queue_family_index == queue_family_count)
|
||||
{
|
||||
Console.Error("Vulkan: Failed to find an acceptable graphics queue.");
|
||||
Console.Error("VK: Failed to find an acceptable graphics queue.");
|
||||
return false;
|
||||
}
|
||||
if (surface != VK_NULL_HANDLE && m_present_queue_family_index == queue_family_count)
|
||||
{
|
||||
Console.Error("Vulkan: Failed to find an acceptable present queue.");
|
||||
Console.Error("VK: Failed to find an acceptable present queue.");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -758,7 +758,7 @@ bool GSDeviceVK::ProcessDeviceExtensions()
|
||||
// confirm we actually support it
|
||||
if (push_descriptor_properties.maxPushDescriptors < NUM_TFX_TEXTURES)
|
||||
{
|
||||
Console.Error("maxPushDescriptors (%u) is below required (%u)", push_descriptor_properties.maxPushDescriptors,
|
||||
Console.Error("VK: maxPushDescriptors (%u) is below required (%u)", push_descriptor_properties.maxPushDescriptors,
|
||||
NUM_TFX_TEXTURES);
|
||||
return false;
|
||||
}
|
||||
@@ -766,7 +766,7 @@ bool GSDeviceVK::ProcessDeviceExtensions()
|
||||
if (!line_rasterization_feature.bresenhamLines)
|
||||
{
|
||||
// See note in SelectDeviceExtensions().
|
||||
Console.Error("bresenhamLines is not supported.");
|
||||
Console.Error("VK: bresenhamLines is not supported.");
|
||||
#ifndef __APPLE__
|
||||
return false;
|
||||
#else
|
||||
@@ -870,7 +870,7 @@ bool GSDeviceVK::CreateAllocator()
|
||||
|
||||
if (heap_size_limits[type.heapIndex] == VK_WHOLE_SIZE)
|
||||
{
|
||||
Console.Warning("Disabling allocation from upload heap #%u (%.2f MB) due to debug device.",
|
||||
Console.Warning("VK: Disabling allocation from upload heap #%u (%.2f MB) due to debug device.",
|
||||
type.heapIndex, static_cast<float>(heap.size) / 1048576.0f);
|
||||
heap_size_limits[type.heapIndex] = 0;
|
||||
has_upload_heap = true;
|
||||
@@ -1447,22 +1447,22 @@ VKAPI_ATTR VkBool32 VKAPI_CALL DebugMessengerCallback(VkDebugUtilsMessageSeverit
|
||||
{
|
||||
if (severity & VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT)
|
||||
{
|
||||
Console.Error("Vulkan debug report: (%s) %s",
|
||||
Console.Error("VK: debug report: (%s) %s",
|
||||
pCallbackData->pMessageIdName ? pCallbackData->pMessageIdName : "", pCallbackData->pMessage);
|
||||
}
|
||||
else if (severity & (VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT))
|
||||
{
|
||||
Console.Warning("Vulkan debug report: (%s) %s",
|
||||
Console.Warning("VK: debug report: (%s) %s",
|
||||
pCallbackData->pMessageIdName ? pCallbackData->pMessageIdName : "", pCallbackData->pMessage);
|
||||
}
|
||||
else if (severity & VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT)
|
||||
{
|
||||
Console.WriteLn("Vulkan debug report: (%s) %s",
|
||||
Console.WriteLn("VK: debug report: (%s) %s",
|
||||
pCallbackData->pMessageIdName ? pCallbackData->pMessageIdName : "", pCallbackData->pMessage);
|
||||
}
|
||||
else
|
||||
{
|
||||
DevCon.WriteLn("Vulkan debug report: (%s) %s",
|
||||
DevCon.WriteLn("VK: debug report: (%s) %s",
|
||||
pCallbackData->pMessageIdName ? pCallbackData->pMessageIdName : "", pCallbackData->pMessage);
|
||||
}
|
||||
|
||||
@@ -2173,7 +2173,7 @@ bool GSDeviceVK::UpdateWindow()
|
||||
VkSurfaceKHR surface = VKSwapChain::CreateVulkanSurface(m_instance, m_physical_device, &m_window_info);
|
||||
if (surface == VK_NULL_HANDLE)
|
||||
{
|
||||
Console.Error("Failed to create new surface for swap chain");
|
||||
Console.Error("VK: Failed to create new surface for swap chain");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2182,7 +2182,7 @@ bool GSDeviceVK::UpdateWindow()
|
||||
!(m_swap_chain = VKSwapChain::Create(m_window_info, surface, present_mode,
|
||||
Pcsx2Config::GSOptions::TriStateToOptionalBoolean(GSConfig.ExclusiveFullscreenControl))))
|
||||
{
|
||||
Console.Error("Failed to create swap chain");
|
||||
Console.Error("VK: Failed to create swap chain");
|
||||
VKSwapChain::DestroyVulkanSurface(m_instance, &m_window_info, surface);
|
||||
return false;
|
||||
}
|
||||
@@ -2210,7 +2210,7 @@ void GSDeviceVK::ResizeWindow(s32 new_window_width, s32 new_window_height, float
|
||||
if (!m_swap_chain->ResizeSwapChain(new_window_width, new_window_height, new_window_scale))
|
||||
{
|
||||
// AcquireNextImage() will fail, and we'll recreate the surface.
|
||||
Console.Error("Failed to resize swap chain. Next present will fail.");
|
||||
Console.Error("VK: Failed to resize swap chain. Next present will fail.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2316,10 +2316,10 @@ GSDevice::PresentResult GSDeviceVK::BeginPresent(bool frame_skip)
|
||||
}
|
||||
else if (res == VK_ERROR_SURFACE_LOST_KHR)
|
||||
{
|
||||
Console.Warning("Surface lost, attempting to recreate");
|
||||
Console.Warning("VK: Surface lost, attempting to recreate");
|
||||
if (!m_swap_chain->RecreateSurface(m_window_info))
|
||||
{
|
||||
Console.Error("Failed to recreate surface after loss");
|
||||
Console.Error("VK: Failed to recreate surface after loss");
|
||||
ExecuteCommandBuffer(false);
|
||||
return PresentResult::FrameSkipped;
|
||||
}
|
||||
@@ -2494,7 +2494,7 @@ bool GSDeviceVK::CreateDeviceAndSwapChain()
|
||||
return false;
|
||||
}
|
||||
|
||||
ERROR_LOG("Vulkan validation/debug layers requested but are unavailable. Creating non-debug device.");
|
||||
ERROR_LOG("VK: validation/debug layers requested but are unavailable. Creating non-debug device.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2624,7 +2624,7 @@ bool GSDeviceVK::CheckFeatures()
|
||||
m_features.vs_expand = !GSConfig.DisableVertexShaderExpand;
|
||||
|
||||
if (!m_features.texture_barrier)
|
||||
Console.Warning("Texture buffers are disabled. This may break some graphical effects.");
|
||||
Console.Warning("VK: Texture buffers are disabled. This may break some graphical effects.");
|
||||
|
||||
// Test for D32S8 support.
|
||||
{
|
||||
@@ -2670,7 +2670,7 @@ bool GSDeviceVK::CheckFeatures()
|
||||
vkGetPhysicalDeviceFormatProperties(m_physical_device, vkfmt, &props);
|
||||
if ((props.optimalTilingFeatures & bits) != bits)
|
||||
{
|
||||
Host::ReportFormattedErrorAsync("Vulkan Renderer Unavailable",
|
||||
Host::ReportFormattedErrorAsync("VK: Renderer Unavailable",
|
||||
"Required format %u is missing bits, you may need to update your driver. (vk:%u, has:0x%x, needs:0x%x)",
|
||||
fmt, static_cast<unsigned>(vkfmt), props.optimalTilingFeatures, bits);
|
||||
return false;
|
||||
@@ -4387,14 +4387,14 @@ bool GSDeviceVK::CompileImGuiPipeline()
|
||||
const std::optional<std::string> glsl = ReadShaderSource("shaders/vulkan/imgui.glsl");
|
||||
if (!glsl.has_value())
|
||||
{
|
||||
Console.Error("Failed to read imgui.glsl");
|
||||
Console.Error("VK: Failed to read imgui.glsl");
|
||||
return false;
|
||||
}
|
||||
|
||||
VkShaderModule vs = GetUtilityVertexShader(glsl.value(), "vs_main");
|
||||
if (vs == VK_NULL_HANDLE)
|
||||
{
|
||||
Console.Error("Failed to compile ImGui vertex shader");
|
||||
Console.Error("VK: Failed to compile ImGui vertex shader");
|
||||
return false;
|
||||
}
|
||||
ScopedGuard vs_guard([this, &vs]() { vkDestroyShaderModule(m_device, vs, nullptr); });
|
||||
@@ -4402,7 +4402,7 @@ bool GSDeviceVK::CompileImGuiPipeline()
|
||||
VkShaderModule ps = GetUtilityFragmentShader(glsl.value(), "ps_main");
|
||||
if (ps == VK_NULL_HANDLE)
|
||||
{
|
||||
Console.Error("Failed to compile ImGui pixel shader");
|
||||
Console.Error("VK: Failed to compile ImGui pixel shader");
|
||||
return false;
|
||||
}
|
||||
ScopedGuard ps_guard([this, &ps]() { vkDestroyShaderModule(m_device, ps, nullptr); });
|
||||
@@ -4429,7 +4429,7 @@ bool GSDeviceVK::CompileImGuiPipeline()
|
||||
m_imgui_pipeline = gpb.Create(m_device, g_vulkan_shader_cache->GetPipelineCache(), false);
|
||||
if (!m_imgui_pipeline)
|
||||
{
|
||||
Console.Error("Failed to compile ImGui pipeline");
|
||||
Console.Error("VK: Failed to compile ImGui pipeline");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -4474,7 +4474,7 @@ void GSDeviceVK::RenderImGui()
|
||||
const u32 size = sizeof(ImDrawVert) * static_cast<u32>(cmd_list->VtxBuffer.Size);
|
||||
if (!m_vertex_stream_buffer.ReserveMemory(size, sizeof(ImDrawVert)))
|
||||
{
|
||||
Console.Warning("Skipping ImGui draw because of no vertex buffer space");
|
||||
Console.Warning("VK: Skipping ImGui draw because of no vertex buffer space");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4518,7 +4518,7 @@ void GSDeviceVK::RenderBlankFrame()
|
||||
VkResult res = m_swap_chain->AcquireNextImage();
|
||||
if (res != VK_SUCCESS)
|
||||
{
|
||||
Console.Error("Failed to acquire image for blank frame present");
|
||||
Console.Error("VK: Failed to acquire image for blank frame present");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -5021,13 +5021,13 @@ void GSDeviceVK::ExecuteCommandBuffer(bool wait_for_completion, const char* reas
|
||||
const std::string reason_str(StringUtil::StdStringFromFormatV(reason, ap));
|
||||
va_end(ap);
|
||||
|
||||
Console.Warning("Vulkan: Executing command buffer due to '%s'", reason_str.c_str());
|
||||
Console.Warning("VK: Executing command buffer due to '%s'", reason_str.c_str());
|
||||
ExecuteCommandBuffer(wait_for_completion);
|
||||
}
|
||||
|
||||
void GSDeviceVK::ExecuteCommandBufferAndRestartRenderPass(bool wait_for_completion, const char* reason)
|
||||
{
|
||||
Console.Warning("Vulkan: Executing command buffer due to '%s'", reason);
|
||||
Console.Warning("VK: Executing command buffer due to '%s'", reason);
|
||||
|
||||
const VkRenderPass render_pass = m_current_render_pass;
|
||||
const GSVector4i render_pass_area = m_current_render_pass_area;
|
||||
@@ -5344,7 +5344,7 @@ bool GSDeviceVK::ApplyTFXState(bool already_execed)
|
||||
{
|
||||
if (already_execed)
|
||||
{
|
||||
Console.Error("Failed to reserve vertex uniform space");
|
||||
Console.Error("VK: Failed to reserve vertex uniform space");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -5365,7 +5365,7 @@ bool GSDeviceVK::ApplyTFXState(bool already_execed)
|
||||
{
|
||||
if (already_execed)
|
||||
{
|
||||
Console.Error("Failed to reserve pixel uniform space");
|
||||
Console.Error("VK: Failed to reserve pixel uniform space");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -5991,7 +5991,7 @@ void GSDeviceVK::SendHWDraw(const GSHWDrawConfig& config, GSTextureVK* draw_rt,
|
||||
|
||||
#ifdef PCSX2_DEVBUILD
|
||||
if ((one_barrier || full_barrier) && !m_pipeline_selector.ps.IsFeedbackLoop()) [[unlikely]]
|
||||
Console.Warning("GS: Possible unnecessary barrier detected.");
|
||||
Console.Warning("VK: Possible unnecessary barrier detected.");
|
||||
#endif
|
||||
const VkDependencyFlags barrier_flags = GetColorBufferBarrierFlags();
|
||||
if (full_barrier)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user