8 GB cards: the image blocks made at the start (#2438) shrink the texture budget; Market 31-36 fps on main vs 54-56 with RX_VK_IMAGE_PREALLOC=0 #2690
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot#2690
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
What happened
On an 8 GB card, Castle Town Market on current
main(0ec31ff6) runs at about 31-36 fps where v2.1.0 gave 39-46. The image pool's blocks made at the start (#2438) leave the texture budget too small, and the GPU time per frame doubles.RX_VK_IMAGE_PREALLOC=0brings the Market to 54-56 fps on the same build.Measured
Windows 11, RTX 3070 8 GB (driver 610.88), i7-14700KF. Game folder built from
main0ec31ff6, nohookshot_env.txt, withHOS_BENCH=1;RX_VK_IMAGE_BLOCK_MB=32;RX_VK_WB_MAX_KB=1024passed by the bench. Teleport from the Kokiri save, then about 2 minutes standing in each area; arms alternated in one session (D Z Z D Z D).D = defaults: the log says
images from a pool of 32 MB blocks (memory type 1), 24 made at the start.Z =
RX_VK_IMAGE_PREALLOC=0:..., 0 made at the start.Castle Town Market:
Lake Hylia (55.5-58.5 fps) and the Graveyard (55.4-59.0) show no clear difference between the arms.
With the blocks made at the start, the blocks hold 860-1226 MB free while the texture budget sits at 902-965 MB, under the 2.0-2.3 GB of textures the Market keeps; without them, 517-746 MB free and a budget of 1270-1445 MB. So on this card the up-front blocks seem to sit mostly empty and count against the textures.
For reference, v2.1.0 with the same settings (two zone tours that night): Market 46.3 and 39.2 fps, budget 2241 MB at the last VRAM line.
Not checked
RX_VK_IMAGE_BLOCK_MB=32(the 8 GB setting from #887), where the rule gives the cap of 24 blocks (768 MB). With the default 128 MB blocks, 15 % of 8 GB is 9 or 10 blocks (about 1.2 GB); I have not run that.A lower share on cards with 8 GB or less (or none, as before #2438) would avoid it; the stall it removes (
vkAllocateMemory~170 ms on AMD's Windows driver) may not need the same number of blocks on NVIDIA.The same with the default 128 MB blocks (no
RX_VK_IMAGE_BLOCK_MB), so it is not tied to the 32 MB setting. Same card, build and spot;HOS_BENCH=1;RX_VK_WB_MAX_KB=1024only; arms alternated D Z Z D Z D. D logspool of 128 MB blocks (memory type 1), 9 made at the start, Z0 made at the start.Castle Town Market:
D averages 34.2 fps, Z 53.1. With 128 MB blocks the 9 up-front blocks (1152 MB) leave 1.4-1.6 GB free in the blocks and a texture budget of 472-624 MB, lower than with the 32 MB blocks.
Claiming this: reproducing with a capped VRAM budget on a larger NVIDIA card first, then a fix for the share on 8 GB cards.
Same on a second 8 GB card, in Hyrule Field, and the frame-time spikes are where most of it shows.
Windows 11, RTX 3060 Ti 8 GB (driver 32.0.16.2114), Ryzen 5 5600X, 32 GB, 2560x1440 with DLSS. Game folder built from
main5b96a55a. Hyrule Field child, the camera turning for 40 s after a settle;RX_VK_FRAMEGEN=0,HOS_FPS_MAX=240,HOS_AUDIO=0; arms alternated Z D Z D Z D.RX_VK_IMAGE_PREALLOC=0)The pools at the end of a D run and a Z run (the 600-frame lines):
One thing that may help the fix: the blocks are made in
images_pool(), which since the textures' pool (RX_VK_COMPACT, on by default) and the render targets' pool (target_images_pool()) holds only DLSS's, the frame interpolation's and the scratch images: 52 MB in both arms here. So on this tree the 1.1 GB made at the start never takes the images whosevkAllocateMemory#2438 measured (it was measured on v2.0.5-v2.0.12, before both pools); it only sits in the count. The texture budget then falls to ~1 GB, andpool_pressedgives the render-target pool back ("VRAM short: given back"), so render targets are made new about 20 times as often as they are reused, against about 1.4 times without the blocks. That churn and the evictions line up with the spikes.Results and logs are on this PC; happy to run a fix on this card.
github-sync referenced this issue2026-11-12 16:54:48 +00:00