mirror of
https://github.com/ProjectLeonida/mandy.git
synced 2026-12-06 13:08:37 +00:00
The frame is not the card's: with every scissor empty it took as long (97.8 ms against 97.3), with every mesh draw of no group 85.7, with every dispatch left out 77.0 (LEONIDA_AB over the three LEONIDA_EXP_* switches, 9,300 draws a frame, 2026-11-27). A profile of the submitting thread alone (LEONIDA_PROFILE_ONLY, new: 17,711 rounds in 35 s where the 28 busiest threads gave 125) had a quarter of its running time in the system heap. Built with the mimalloc feature the same view takes 78 ms a frame against 93-98, so scripts/build-nvidia.ps1 builds with it. LEONIDA_PLACED_TITLE=1 (off by default): a copy at its place in a list into bytes that flights have declared but no shader wrote lately is taken by title memory at submission, so the fill that reads it in the same submission does not wait for every flight to land (44-48 ms once a frame at the save, named in the frame line now); a landing leaves alone what title memory holds already (LEONIDA_LAND_SAME), so that such a copy is not noted as a shader's write to its page. The wait went from 1.00 to 0.08-0.36 a frame; the frame's length did not change measurably with the system heap in the way. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
28 lines
1.8 KiB
PowerShell
28 lines
1.8 KiB
PowerShell
# Builds the layer the way scripts\play-nvidia.ps1 expects it (the diag profile with diagnostics: the F1 menu,
|
|
# the F3 panel and several NVIDIA settings are diagnostics switches).
|
|
# scripts\build-nvidia.ps1 with DLSS when nvidia-sdk\DLSS is there (Get-NVIDIA-DLSS.cmd fetches it),
|
|
# without it otherwise
|
|
# scripts\build-nvidia.ps1 -NoDlss without DLSS even then
|
|
# scripts\build-nvidia.ps1 -DlssSdk <your checkout of github.com/NVIDIA/DLSS>
|
|
# A build with DLSS links NVIDIA's loader library: it is for your own use, not for passing on.
|
|
param(
|
|
[string]$DlssSdk,
|
|
[switch]$NoDlss
|
|
)
|
|
$root = (Resolve-Path (Join-Path $PSScriptRoot '..')).Path
|
|
if (-not $DlssSdk) { $DlssSdk = Join-Path $root 'nvidia-sdk\DLSS' }
|
|
# mimalloc is the process allocator: with the system heap a quarter of the submitting thread's running time was
|
|
# in the heap (profile of 2026-11-27), and the same view took 95 ms a frame against 78 with it.
|
|
$features = 'diagnostics,mimalloc'
|
|
if (-not $NoDlss -and (Test-Path (Join-Path $DlssSdk 'lib\Windows_x86_64\x64\nvsdk_ngx_d.lib'))) {
|
|
$env:LEONIDA_DLSS_SDK = (Resolve-Path $DlssSdk).Path
|
|
$features = 'diagnostics,dlss,mimalloc'
|
|
Write-Host "Building with DLSS (SDK: $env:LEONIDA_DLSS_SDK)"
|
|
} else {
|
|
Write-Host 'Building without DLSS (Get-NVIDIA-DLSS.cmd fetches its files; without them the picture is stretched to the screen)'
|
|
}
|
|
Push-Location $root
|
|
try { cargo build --locked --profile diag -p leonida --features $features } finally { Pop-Location }
|
|
if ($LASTEXITCODE -eq 0) { Set-Content -Path (Join-Path $root 'target\diag\built-with.txt') -Value $features -Encoding ascii }
|
|
if ($LASTEXITCODE -eq 0) { Write-Host "Built: $(Join-Path $root 'target\diag\leonida.exe'). Next: scripts\play-nvidia.ps1 -Exe <your copy's executable>" }
|