fix(vk): keep every large ASTC texture as BC3 on 8 GB cards too #963
No reviewers
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!963
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/astc-bc3-8gb"
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 changed
Large ASTC textures are decoded and kept as BC3 when their blocks are 6 x 6 texels or bigger. The finer ones (4 x 4 and
5 x 5: UI, characters) stay RGBA8 unless they are over 64 MB, which is four times the memory. Issue 519 already makes
cards the driver allows under 6 GB keep every large one as BC3, because a 4 GB laptop card paged and fell to 4 fps.
This raises that line to under 8.5 GB allowed, so 8 GB cards (allowed ~7-7.6 GB) get the same treatment. Cards with
10 GB or more keep the current behaviour. The rule is in
gpu/vk/astc_bc_policy.h.RX_VK_ASTC_BC_ALL=0or=1stilloverrides it on any card.
Why
8 GB cards hit the same wall as the 6 GB ones, just later. On an RX 7700S Laptop (7.1 GB allowed), Hyrule Castle Town's
market held 2.5 GB of decoded ASTC with the VRAM at the driver's limit (
7211 of 7211 MB). The GPU then went from~17 ms to 35-100 ms per frame as the driver paged, and the market ran at ~20 fps.
How it was tested
RX 7700S Laptop (8 GB), Ryzen 7 7735HS, Adrenalin 26.10.1, Windows 11, v2.0.5, with
RX_VK_ASTC_BC_ALL=1(the same paththis PR turns on by default for 8 GB cards):
The player looked for texture problems on characters, signs, the UI and the scenery over both sessions and saw none
(the encoder is the same GPU BC3 path the 6 GB cards and the coarse-block textures already use).
This was measured together with other VRAM fixes (#899, #961), so the fps gain isn't this PR's alone. The memory figure
above is.
Game-free check:
tests/test_astc_bc_policy.pycompilestests/test_astc_bc_policy.cppagainst the rule (unknown,4/6/8 GB cards in, 10/12/16 GB cards out). It also checks that the texture setup still asks the rule and reads the
override. It is listed at the end of
ARGSintests/run_all.pywith--cxx g++.🤖 Generated with Claude Code