fix(play): NVIDIA's shader cache on its Driver Default (1 GB) is raised and offered, not taken for a driver without the setting #264
No reviewers
Labels
No labels
area/build
area/install
area/mods
area/saves
area/tooling
area/ui
area/updates
ci: approved
good first issue
gpu/amd
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
platform/linux
platform/steam-deck
platform/windows
priority
critical
priority
high
priority
low
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/LongshotLauncher!264
Loading…
Reference in a new issue
No description provided.
Delete branch "Mone/LongshotLauncher:fix/nvidia-cache-default"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
On a PC that never changed NVIDIA's Shader Cache Size, the launcher's 10 GB raise (#243) and the home's card never happened: the driver's Driver Default was read as "this driver does not know the setting". That is the most common case, and it left the game building tens of thousands of pipelines again before its title.
What changed
NvApiProfiles.ShaderCachereadsNVAPI_SETTING_NOT_FOUND(-160) for a setting the driver knows (NvAPI_DRS_GetSettingNameFromIdnames it) as its Driver Default: the cache on, and its sizeDriverSettings.DriverDefaultCacheMb(1 GB, the 1025 MB caches players' logs show). Only a setting the driver does not name stays "unknown" (null), as before.DriverSettings.SettingOrDefault, testable without a driver.ShaderCacheShort,RaiseShaderCache, the 4 GB threshold and the 10 GB raise are as they were, and now reach these players.How it was found
RTX 4050 Laptop GPU (with Intel Iris Xe), Windows 11, Shader Cache Size never touched. The game's log at a start after a rebuild:
driver shader cache at the start: 0 MB,driver shader cache: NVIDIA's limit not known,the driver's shader cache has 0 of 44 noted pipelines asked: it lost them, then 40,749 noted pipelines built before the title (~9 minutes). An earlier start had1025 MBat the start; after this one the cache folder was at 1026.6 MB again: held at 1 GB.A read-only probe of the driver:
PS_SHADERDISKCACHE_MAX_SIZE(0x00AC8497) andPS_SHADERDISKCACHE(0x00198FFF) are both inNvAPI_DRS_EnumAvailableSettingIds, andNvAPI_DRS_GetSettingon the global profile answers -160 for both.Testing
Tested
dotnet build LongshotLauncher.slnx -c Release: 0 warnings, 0 errors; the app tests (tests/launcher_app) pass.NvidiaCacheChecks(extended): a set size read as it is; Driver Default read as 1 GB; a setting the driver does not know stays none; Driver Default's 1 GB is offered and raised to 10 GB. Its real-driver read-only check passes on this PC.ShaderCacheShort= 1024.Still to test
SavesChecks, andscripts/translations.pyreports catalog texts left over: both onmainas it is too (clean checkout of6887d57), not from this change.