Intel GPUs that sample ASTC natively: the texture budget counts those textures 16 to 144 times too big #2333

Closed
opened 2026-11-11 15:09:59 +00:00 by mooki000 · 0 comments
mooki000 commented 2026-11-11 15:09:59 +00:00 (Migrated from github.com)

Hookshot version

main 49f75dc8, built from source

What kind of problem

Something else

What happened

Intel GPUs sample ASTC textures directly, and the texture budget counts each of those textures 16 to 144 times too big. On an Intel UHD 770 the count in Kokiri Forest reached 17.6 GB against the integrated GPU's 2.5 GB budget, while the whole process held 4.8 GB of GPU memory. So the texture cache keeps evicting textures it has room for.

Expected: a count near what the textures take.

The cause, in gpu/vk/vk_texture.cpp create: for an ASTC image that the GPU samples natively the budget counts texels, but with the size of a whole block (16 bytes) for each. A texture with 4x4 blocks counts 16 times its size, one with 12x12 blocks 144 times. GPUs that decode ASTC on upload (NVIDIA and AMD) are not affected.

Where in the game

Kokiri Forest, after loading a save

How often

Every time

Graphics card and driver version

Intel UHD 770, Mesa 26.2.5

CPU, RAM and operating system

i9-13900K, 93 GB, Arch Linux

Changes from the defaults

None

Other software hooked into the game

No, nothing hooked in

hookshot_log.txt

The lines that show it on main: textures 17608 MB (budget 2560 MB) beside 4884 MB used for every allocation of the process together. With the fix the same scene counts 2241 MB (budget 2560 MB).

Claim

I'm working on this: #2288 is open with the fix and its test; it belongs under #999. Open pull requests in the same file: #1569 (the dynamic iGPU budget, which only means something once the count is right), #2198 and #2226 merge cleanly with it; #1892 conflicts with it textually in vk_texture.cpp. By docs/workflow.md: S2 (3) at most, since I measured the count and not what the needless evictions cost in play; reach: Intel GPUs that sample ASTC natively (Tier 2); confidence 1.0 for the count. I can test on Linux with an RTX 4090 (NVIDIA 615.78.08) and an Intel UHD 770 (Mesa 26.2.5), not on Windows or AMD.

### Hookshot version main 49f75dc8, built from source ### What kind of problem Something else ### What happened Intel GPUs sample ASTC textures directly, and the texture budget counts each of those textures 16 to 144 times too big. On an Intel UHD 770 the count in Kokiri Forest reached 17.6 GB against the integrated GPU's 2.5 GB budget, while the whole process held 4.8 GB of GPU memory. So the texture cache keeps evicting textures it has room for. Expected: a count near what the textures take. The cause, in `gpu/vk/vk_texture.cpp` `create`: for an ASTC image that the GPU samples natively the budget counts texels, but with the size of a whole block (16 bytes) for each. A texture with 4x4 blocks counts 16 times its size, one with 12x12 blocks 144 times. GPUs that decode ASTC on upload (NVIDIA and AMD) are not affected. ### Where in the game Kokiri Forest, after loading a save ### How often Every time ### Graphics card and driver version Intel UHD 770, Mesa 26.2.5 ### CPU, RAM and operating system i9-13900K, 93 GB, Arch Linux ### Changes from the defaults None ### Other software hooked into the game No, nothing hooked in ### hookshot_log.txt The lines that show it on main: `textures 17608 MB (budget 2560 MB)` beside `4884 MB used` for every allocation of the process together. With the fix the same scene counts `2241 MB (budget 2560 MB)`. ### Claim I'm working on this: #2288 is open with the fix and its test; it belongs under #999. Open pull requests in the same file: #1569 (the dynamic iGPU budget, which only means something once the count is right), #2198 and #2226 merge cleanly with it; #1892 conflicts with it textually in `vk_texture.cpp`. By `docs/workflow.md`: S2 (3) at most, since I measured the count and not what the needless evictions cost in play; reach: Intel GPUs that sample ASTC natively (Tier 2); confidence 1.0 for the count. I can test on Linux with an RTX 4090 (NVIDIA 615.78.08) and an Intel UHD 770 (Mesa 26.2.5), not on Windows or AMD.
Commenting is not possible because the repository is archived.
No milestone
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Hookshot#2333
No description provided.