Repository navigation
fix(vk): keep every large ASTC texture as BC3 on 8 GB cards too - #963
Merged
Merged
Conversation
Issue 519 made cards the driver allows under 6 GB keep the finer-block ASTC textures (UI, characters) as BC3 as well, a quarter of RGBA8. 8 GB cards are allowed ~7-7.6 GB and fill up the same way: an RX 7700S (7.1 GB allowed) held 2.5 GB of decoded ASTC in Hyrule Castle Town's market with the VRAM at the limit; with all of them as BC3, at most 1.4-1.6 GB over a session through the same areas, with no visible change in the textures. The line is now 8.5 GB allowed (gpu/vk/astc_bc_policy.h): 8 GB cards in, 10 GB and up as before. RX_VK_ASTC_BC_ALL=0 or 1 still decides on any card. tests/test_astc_bc_policy.py compiles the rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 9, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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