Skip to content

fix(vk): keep every large ASTC texture as BC3 on 8 GB cards too - #963

Merged
NotRexed merged 1 commit into
NotRexed:mainfrom
ZurielAtr:fix/astc-bc3-8gb
Nov 9, 2026
Merged

NotRexed merged 1 commit into
NotRexed:mainfrom
ZurielAtr:fix/astc-bc3-8gb

Conversation

@ZurielAtr

Copy link
Copy Markdown
Contributor

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=0 or =1 still
overrides 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 path
this PR turns on by default for 8 GB cards):

Before With all large ASTC as BC3
Decoded ASTC held, at most 2522 MB (market) 1410-1551 MB (two ~12-minute sessions through field, ranch and market)

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.py compiles tests/test_astc_bc_policy.cpp against 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 ARGS in tests/run_all.py with --cxx g++.

🤖 Generated with Claude Code

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants