Windows 10 runtime, F1 preload fix, AMD FSR download, warm-up restart, MFG Unlocker notice
- Windows 10: every pipeline was refused (E_INVALIDARG) and the game closed within seconds, because Windows 10's own Direct3D 12 stops at shader model 6.5 and the translated shaders are 6.6. victory.exe now exports D3D12SDKVersion = 614 and D3D12SDKPath = .\D3D12\. Where the GPU runs below 6.6, `play` offers Microsoft's D3D12Core.dll (Agility SDK 1.614.1, from nuget.org; pinned SHA-256 and Microsoft signature checked) into D3D12 beside the exe, then checks again and stops with a clear message if it still can't. `victory get-d3d12` does it by hand. The host logs its shader model and runtime file. Windows 11 keeps using its own newer runtime. - F1 > PRELOAD SHADERS: the restart passed the script launcher's -Preload to victory.exe, which refused it, and the window closed at once. It now sets VICTORY_PRELOAD=1, which both launchers read, and a failed restart keeps its window open. - AMD FSR 3 files: offered for download where FSR 3 would be used (`victory get-fsr`, Get-AMD-FSR.cmd, scripts\get-amd-fsr.ps1; pinned hashes, AMD signature). - First start of a new victory.exe: it ran at a flat 14 fps for the whole session and normally from the second start on. The first start now plays 20 s with a notice, marks that exe under %LOCALAPPDATA%\victory\warmed and restarts by itself once (VICTORY_WARMUP_RESTART=0: not done). - RTX 20/30 with DLSS frame generation running (MFG Unlocker as winmm.dll beside the exe): the start notice says it is unlocked by a mod, and the log names DLLs beside victory.exe. - README: the above. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
ca9c75cd6d
commit
10862a6d87
14 files changed
+653
-12
No files matched your search
@@ -0,0 +1,57 @@
|
||||
# Fetches the AMD files FSR 3 frame generation needs (about 30 MB) from AMD's own GitHub (the FidelityFX SDK,
|
||||
# GPUOpen-LibrariesAndSDKs/FidelityFX-SDK) into a fidelityfx folder: by default amd-sdk\FidelityFX\bin here
|
||||
# (git-ignored), where scripts\play-foxhound.ps1 looks for them; `victory get-fsr` names one under
|
||||
# %LOCALAPPDATA%\victory. They are AMD's, under AMD's licence (saved beside them: read it); this repository does
|
||||
# not carry them, so each person gets them from AMD directly. Each file is checked against the SHA-256 of the
|
||||
# copy this fork was tested with, and the game loads them only with AMD's valid signature.
|
||||
param(
|
||||
[string]$Tag = 'v2.4.0',
|
||||
[string]$To = ''
|
||||
)
|
||||
$ProgressPreference = 'SilentlyContinue'
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
|
||||
$bin = if ($To) { $To } else { Join-Path (Resolve-Path (Join-Path $PSScriptRoot '..')).Path 'amd-sdk\FidelityFX\bin' }
|
||||
$base = "https://raw.githubusercontent.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK/$Tag/Kits/FidelityFX"
|
||||
# What the game loads, and the SHA-256 of the copies tested (FidelityFX SDK v2.4.0).
|
||||
$files = [ordered]@{
|
||||
'amd_fidelityfx_loader_dx12.dll' = 'E2191D3C0828BE45EB8AFFD4E3EC0378F2293ADC345B772A7170EDCF3B021ECB'
|
||||
'amd_fidelityfx_framegeneration_dx12.dll' = 'E6843252F58B0341A0D80F6A20BC0D840643EE95BC48C22CAC08745344577BB6'
|
||||
}
|
||||
|
||||
function Get-File([string]$Url, [string]$To) {
|
||||
New-Item -ItemType Directory -Force (Split-Path $To) | Out-Null
|
||||
$part = "$To.part"
|
||||
if (Get-Command curl.exe -ErrorAction SilentlyContinue) {
|
||||
& curl.exe --location --fail --silent --show-error --progress-bar --output $part $Url
|
||||
if ($LASTEXITCODE -ne 0) { Remove-Item $part -ErrorAction SilentlyContinue; throw "could not get $Url" }
|
||||
} else {
|
||||
Invoke-WebRequest -Uri $Url -OutFile $part -UseBasicParsing -ErrorAction Stop
|
||||
}
|
||||
$part
|
||||
}
|
||||
|
||||
Write-Host "AMD FSR 3 frame generation (FidelityFX SDK $Tag), from github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK (about 30 MB):"
|
||||
New-Item -ItemType Directory -Force $bin | Out-Null
|
||||
foreach ($name in $files.Keys) {
|
||||
$to = Join-Path $bin $name
|
||||
if ((Test-Path $to) -and (Get-FileHash $to -Algorithm SHA256).Hash -eq $files[$name]) {
|
||||
Write-Host " $name already there"
|
||||
continue
|
||||
}
|
||||
$part = Get-File "$base/signedbin/$name" $to
|
||||
$hash = (Get-FileHash $part -Algorithm SHA256).Hash
|
||||
if ($hash -ne $files[$name]) {
|
||||
Remove-Item $part -Force
|
||||
throw "$name is not the file this build was tested with (SHA-256 $hash); not kept"
|
||||
}
|
||||
Move-Item $part $to -Force
|
||||
$len = (Get-Item $to).Length
|
||||
Write-Host (" {0} {1}" -f $name, $(if ($len -ge 1MB) { '{0:N1} MB' -f ($len / 1MB) } else { '{0:N0} KB' -f ($len / 1KB) }))
|
||||
}
|
||||
try {
|
||||
$lic = Get-File "$base/docs/license.md" (Join-Path $bin 'amd-fidelityfx-license.md')
|
||||
Move-Item $lic (Join-Path $bin 'amd-fidelityfx-license.md') -Force
|
||||
Write-Host " licence: $(Join-Path $bin 'amd-fidelityfx-license.md')"
|
||||
} catch { Write-Host " (AMD's licence text could not be fetched: $($_.Exception.Message))" }
|
||||
Write-Host ''
|
||||
Write-Host 'Done. They are used from the next start.'
|
||||
@@ -0,0 +1,60 @@
|
||||
# Fetches Microsoft's newer Direct3D 12 runtime (the D3D12 Agility SDK, D3D12Core.dll, from Microsoft's own
|
||||
# NuGet package Microsoft.Direct3D.D3D12, about 22 MB) into a D3D12 folder: by default the one beside
|
||||
# target\release\victory.exe; `victory play` names the one beside itself. Windows 10's own Direct3D 12 stops at
|
||||
# shader model 6.5, and every shader the layer translates is 6.6: without this runtime each pipeline is refused
|
||||
# and the game closes within seconds. victory.exe asks Windows for this runtime (it exports D3D12SDKVersion = 614
|
||||
# and D3D12SDKPath = .\D3D12\); Windows uses it only where its own is older. It is Microsoft's, under Microsoft's
|
||||
# licence (saved beside it: read it); this repository does not carry it. The package and the DLL are checked
|
||||
# against the SHA-256 of the copies this fork was tested with, and the DLL against Microsoft's signature.
|
||||
param(
|
||||
[string]$Version = '1.614.1',
|
||||
[string]$To = ''
|
||||
)
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$ProgressPreference = 'SilentlyContinue'
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
|
||||
$dir = if ($To) { $To } else { Join-Path (Resolve-Path (Join-Path $PSScriptRoot '..')).Path 'target\release\D3D12' }
|
||||
# The SHA-256 of the copies tested (Microsoft.Direct3D.D3D12 1.614.1, D3D12Core.dll 1.614.1.0).
|
||||
$package = '9880AA91602DD51DD6CF7911A2BCA7A2323513B15338573CDE014B3356EEAFF2'
|
||||
$core = '8A23D826B25B4329522FF451CB52B7F2B34D7F2913CFEB878371CE8BD765FE2D'
|
||||
$url = "https://api.nuget.org/v3-flatcontainer/microsoft.direct3d.d3d12/$Version/microsoft.direct3d.d3d12.$Version.nupkg"
|
||||
|
||||
$target = Join-Path $dir 'D3D12Core.dll'
|
||||
if ((Test-Path $target) -and (Get-FileHash $target -Algorithm SHA256).Hash -eq $core) {
|
||||
Write-Host "Microsoft's Direct3D 12 runtime $Version is already in $dir"
|
||||
exit 0
|
||||
}
|
||||
Write-Host "Microsoft's Direct3D 12 runtime $Version (the Agility SDK), from nuget.org (about 22 MB):"
|
||||
New-Item -ItemType Directory -Force $dir | Out-Null
|
||||
$part = Join-Path $dir "microsoft.direct3d.d3d12.$Version.nupkg.part"
|
||||
try {
|
||||
if (Get-Command curl.exe -ErrorAction SilentlyContinue) {
|
||||
& curl.exe --location --fail --silent --show-error --progress-bar --output $part $url
|
||||
if ($LASTEXITCODE -ne 0) { throw "could not get $url" }
|
||||
} else {
|
||||
Invoke-WebRequest -Uri $url -OutFile $part -UseBasicParsing
|
||||
}
|
||||
$hash = (Get-FileHash $part -Algorithm SHA256).Hash
|
||||
if ($hash -ne $package) { throw "the package is not the one this build was tested with (SHA-256 $hash); not kept" }
|
||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||
$zip = [IO.Compression.ZipFile]::OpenRead($part)
|
||||
try {
|
||||
$entry = $zip.Entries | Where-Object FullName -eq 'build/native/bin/x64/D3D12Core.dll'
|
||||
if (-not $entry) { throw 'the package has no build/native/bin/x64/D3D12Core.dll' }
|
||||
$dll = "$target.part"
|
||||
[IO.Compression.ZipFileExtensions]::ExtractToFile($entry, $dll, $true)
|
||||
$lic = $zip.Entries | Where-Object FullName -eq 'LICENSE.txt'
|
||||
if ($lic) { [IO.Compression.ZipFileExtensions]::ExtractToFile($lic, (Join-Path $dir 'microsoft-d3d12-license.txt'), $true) }
|
||||
} finally { $zip.Dispose() }
|
||||
$hash = (Get-FileHash $dll -Algorithm SHA256).Hash
|
||||
if ($hash -ne $core) { Remove-Item $dll -Force; throw "D3D12Core.dll is not the file this build was tested with (SHA-256 $hash); not kept" }
|
||||
$sig = Get-AuthenticodeSignature $dll
|
||||
if ($sig.Status -ne 'Valid' -or $sig.SignerCertificate.Subject -notlike 'CN=Microsoft Corporation,*') {
|
||||
Remove-Item $dll -Force; throw "D3D12Core.dll is not validly signed by Microsoft ($($sig.Status)); not kept"
|
||||
}
|
||||
Move-Item $dll $target -Force
|
||||
} finally {
|
||||
Remove-Item $part -Force -ErrorAction SilentlyContinue
|
||||
}
|
||||
Write-Host (' D3D12Core.dll {0:N1} MB, signed by Microsoft' -f ((Get-Item $target).Length / 1MB))
|
||||
Write-Host " in $dir (licence: microsoft-d3d12-license.txt beside it)"
|
||||
@@ -33,7 +33,7 @@ param(
|
||||
[switch]$NoFrameGenReady,
|
||||
# Which frame generation: auto (DLSS Frame Generation where it runs, else AMD's FSR 3), dlss, or fsr (FSR 3
|
||||
# even on an RTX 40/50; 2X only). FSR 3 needs AMD's FidelityFX DLLs (VICTORY_FIDELITYFX_DIR, else
|
||||
# amd-sdk\FidelityFX\bin here) and, on Series X, DLSS for the upscaling (the title's own takes Series S sizes).
|
||||
# amd-sdk\FidelityFX\bin here, where Get-AMD-FSR.cmd puts them) and, on Series X, DLSS for the upscaling (the title's own takes Series S sizes).
|
||||
[ValidateSet('auto', 'dlss', 'fsr')][string]$FgType = 'auto',
|
||||
# Frames begin every 1/Fps s whatever the title asks (it asks 1/30). 1000, the default: no cap, a frame
|
||||
# begins as soon as the last is done. 30: the title's own rate.
|
||||
@@ -123,6 +123,10 @@ if ($FgType -ne 'dlss' -and ($FrameGen -or -not $NoFrameGenReady)) {
|
||||
# its first 30 s, and in this window) says what runs and why not. On Series X without DLSS it stays off: the
|
||||
# title's own upscaling, which it needs, takes the Series S sizes only.
|
||||
$settings.VICTORY_FSR_FRAMEGEN = '1'; $settings.VICTORY_FIDELITYFX_DIR = $fx
|
||||
if (-not (Test-Path (Join-Path $fx 'amd_fidelityfx_framegeneration_dx12.dll'))) {
|
||||
Write-Host "No AMD FSR 3 files in ${fx}: Get-AMD-FSR.cmd in the repository's folder fetches them from AMD (about"
|
||||
Write-Host '30 MB, once). Needed only on cards without DLSS frame generation, or with FSR 3 chosen in F1.'
|
||||
}
|
||||
if ($FgType -eq 'fsr') { $settings.Remove('VICTORY_FRAMEGEN') }
|
||||
if (-not $settings.VICTORY_FRAMEGEN_X) { $settings.VICTORY_FRAMEGEN_X = if ($FrameGen) { [string]$timesWanted } else { '0' } }
|
||||
if (-not $settings.VICTORY_TEXTURE_ROOM_PERCENT) { $settings.VICTORY_TEXTURE_ROOM_PERCENT = if ($FrameGen) { '80' } else { '86' } }
|
||||
|
||||
Reference in new issue
Block a user