Add a native D3D12 FSR Ray Regeneration route for gfx1200/gfx1201, using the game's device and queue with embedded HLSL guide preparation and output composition. Preserve the vkd3d compatibility route for RDNA3 and expose explicit route overrides and diagnostics. Improve Windows runtime compatibility: - Retry rejected application-ID initialization with a project identity. - Defer expensive RR backend creation until feature creation. - Recover from transient submission failures without disabling later frames. - Add shared-buffer export fallbacks through explicit heaps and a private device on the same adapter. - Safely evict old RR descriptor sets when input views change. - Treat requested RR presets as hints when a configured model is available. - Expand SR/RR input formats and handle diffuse/specular hit distances, packed normals, depth-stencil resources, and unused FSR guides. Reduce SR overhead by batching output downloads and format conversion under one completion wait. Optimize strict M enc2/tube attention with bounded FP32 accumulation and the original FP64 fallback for ambiguous rounding cases. Extend RDNA4 tooling with gfx1200/gfx1201 native FP8 RR model builds, capability checks, architecture-aware deployment, and experimental K/M kernel paths. Require matching model and runtime arithmetic families. Add optional embedded FSR shader optimizations keyed by shader hash and exact original SPIR-V contents. Preserve reflected metadata and record optimizer provenance, artifact hashes, and cache identity. Simplify Windows installation with automatic backend dependency downloads, download progress and ETA, backed-up absolute OptiScaler library paths, and recovery from interrupted RR model builds. Add build-kernels.bat and a kernels-only build matrix for all eleven registered RDNA targets, with code-object target validation and SHA256 manifests. Expand conversion probes, numerical stress tests, temporal benchmark tooling, installer/deployment tests, and setup documentation. Document synthetic regression and timing results, experimental build options, and remaining RDNA4 hardware validation requirements.
54 lines
3.8 KiB
PowerShell
54 lines
3.8 KiB
PowerShell
[CmdletBinding()]
|
|
param(
|
|
[string[]]$GpuArchitectures,
|
|
[ValidateSet('stable','therock')][string]$RuntimeProfile='therock',
|
|
[string]$ZludaRoot, [string]$DlssDll,
|
|
[switch]$PackageGames,
|
|
[switch]$KernelsOnly,
|
|
[string]$BuildRoot, [string]$OutputRoot, [string]$ArchiveDirectory
|
|
)
|
|
$ErrorActionPreference='Stop'
|
|
# Load the hash function in this scope before invoking child build scripts (PS 5.1).
|
|
Import-Module Microsoft.PowerShell.Utility
|
|
. (Join-Path $PSScriptRoot 'gpu-target.ps1')
|
|
$repo=[IO.Path]::GetFullPath((Join-Path $PSScriptRoot '../..'))
|
|
if (!$GpuArchitectures) { $GpuArchitectures=@(Get-D4RGpuTargets | ForEach-Object { $_.architecture }) }
|
|
foreach ($arch in $GpuArchitectures) { [void](Get-D4RGpuTargetInfo $arch) }
|
|
if (@($GpuArchitectures | Select-Object -Unique).Count -ne $GpuArchitectures.Count) { throw 'Duplicate GPU target.' }
|
|
if (!$BuildRoot) { $BuildRoot=Join-Path $repo $(if ($KernelsOnly) { 'build/windows-kernels' } else { 'build/windows-gpu-coverage' }) }
|
|
if (!$OutputRoot) { $OutputRoot=Join-Path $repo $(if ($KernelsOnly) { 'dist/windows-kernels' } else { 'dist/windows-gpu-coverage' }) }
|
|
if (!$ZludaRoot) { $ZludaRoot=Join-Path $repo 'dist/zluda-windows-final' }
|
|
if ($KernelsOnly -and $PackageGames) { throw 'KernelsOnly cannot package games; game packages also require host DLLs.' }
|
|
if ($ArchiveDirectory -and !$PackageGames) { throw 'ArchiveDirectory requires PackageGames.' }
|
|
if ($PackageGames -and (!$DlssDll -or ![IO.Path]::IsPathRooted($DlssDll) -or !(Test-Path -LiteralPath $DlssDll))) {
|
|
throw 'PackageGames requires an absolute path to your local nvngx_dlss.dll; it will not be redistributed.'
|
|
}
|
|
New-Item -ItemType Directory -Force $BuildRoot | Out-Null
|
|
if ($ArchiveDirectory) { New-Item -ItemType Directory -Force $ArchiveDirectory | Out-Null }
|
|
$results=[Collections.Generic.List[object]]::new()
|
|
foreach ($arch in $GpuArchitectures) {
|
|
$build="$BuildRoot-$arch"; $diag="$OutputRoot-$arch"
|
|
$log=Join-Path $BuildRoot "$arch-build.log"
|
|
Write-Host "Building $arch (compile/package only; no GPU workloads). Log: $log"
|
|
& (Join-Path $PSScriptRoot 'build-windows-rdna4.ps1') -RuntimeProfile $RuntimeProfile -GpuArch $arch `
|
|
-ZludaRoot $ZludaRoot -BuildDirectory $build -InstallDirectory $diag -KernelsOnly:$KernelsOnly *> $log
|
|
$objects=@(Get-ChildItem -LiteralPath $diag -Recurse -Filter '*.hsaco')
|
|
if ($objects.Count -ne 19) { throw "Expected 19 code objects for $arch, found $($objects.Count). See $log" }
|
|
foreach ($object in $objects) { Assert-D4RCodeObjectTarget $object.FullName $arch }
|
|
$row=[ordered]@{architecture=$arch; compiled=$true; kernelsOnly=[bool]$KernelsOnly; codeObjectCount=$objects.Count;
|
|
hardwareTestExecuted=$false; buildDirectory=$build; diagnosticRoot=$diag; log=$log;
|
|
objects=@($objects | ForEach-Object { @{path=$_.FullName; sha256=(Get-FileHash -LiteralPath $_.FullName -Algorithm SHA256).Hash} })}
|
|
if ($PackageGames) {
|
|
$k="$BuildRoot-native-k-$arch"; $m="$BuildRoot-native-m-$arch"; $game="$OutputRoot-game-$arch"
|
|
& (Join-Path $PSScriptRoot 'stage-native-k.ps1') -DlssDll $DlssDll -PackageRoot $diag -GpuArch $arch -OutputDirectory $k
|
|
& (Join-Path $PSScriptRoot 'stage-native-m.ps1') -DlssDll $DlssDll -PackageRoot $diag -GpuArch $arch -OutputDirectory $m
|
|
$packageArgs=@{DiagnosticRoot=$diag; GpuArch=$arch; PackageRoot=$game; ZludaRoot=$ZludaRoot; KernelKRoot=$k; KernelMRoot=$m}
|
|
if ($ArchiveDirectory) { $packageArgs.ArchivePath=Join-Path $ArchiveDirectory "d4r-windows-$arch.zip" }
|
|
& (Join-Path $PSScriptRoot 'package-windows-game.ps1') @packageArgs
|
|
$row.gamePackage=$game
|
|
}
|
|
$results.Add($row)
|
|
$results | ConvertTo-Json -Depth 5 | Set-Content (Join-Path $BuildRoot 'matrix-build.json') -Encoding UTF8
|
|
Write-Host "Compiled $arch; hardware validation remains separate."
|
|
}
|