fix(vk): ASTC-to-BC runs of 8 layers only on RADV and NVIDIA's driver, one layer a run elsewhere (Hyrule Field's grid lines on AMD's Windows driver) #2148
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2148
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:fix/bc-small-runs-amd-windows"
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?
Summary
Fixes #2107. See #2006, #2110.
On AMD's Windows driver, Hyrule Field's ground has had a grid of thin dark lines since #1843. Players of RX 6700 XT and RX 6750 XT cards on 26.10.1 and 26.11.2 have reported it. The stable release is clean, and
RX_VK_BC_SMALL_LAYERS=1removes the lines.Why. On cards without ASTC, the terrain's material arrays (1365 x 1365 x 90) are re-encoded to BC3 in runs of layers. #1843 made the levels of 1024 or less go 8 layers a run, through a small scratch. On AMD's Windows driver, every layer after a run's first comes out wrong at those levels: the same bug
ec89f92eworked around on an RX 6600 by going one layer a run. #2015 tried the copy's layer pitch as the cause. Nightly 680 contains it and still shows the lines (#2107, #2110), so the cause is still not found.The change.
device_policy.hgets a new field,bc_small_runs: runs of 8 only on the drivers they were seen clean on. Those are RADV (RX 9070 XT, RX 6750 XT) and NVIDIA's (RTX 3080 on Windows, #2006's comment). Every other driver goes one layer a run, as before #1843, and the 36 MB small scratch isn't made. That covers AMD's Windows driver, AMDVLK, Intel's, NVK and the rest, which nobody has checked.RX_VK_BC_SMALL_LAYERSstill overrides it, and the start-upvk: policy:block now showsbc_small_runs.To see it on
main: Windows, an RX 6000 card on AMD's driver. Leave the Castle Town gate into Hyrule Field and look across the far ground: its tiles are outlined in dark lines.Read first:
gpu/vk/device_policy.h(bc_small_runs), thengpu/vk/vk_texture.cpp(bc_small_layers).Testing
Tested: not run in the game: opened untested at the request of the person I work for. No GPU I can reach gets the new default: this PC and the lab's RX 580 are both on RADV, where runs stay 8, as on
main.vk_texture.cppcompiles clean (-fsyntax-only) with the build's flags;vk_main.cpptoo. No checks were run on this PC;tests/test_bc_small_scratch.py(the first commit, written to fail onmain: "another driver (AMD's Windows driver: Hyrule Field's grid lines), RX_VK_BC_SMALL_LAYERS=None: 8 layers a run, wanted 1") andtests/test_device_policy.pyare left to CI.Still to test:
bc_small_runs=0in the log'svk: policy: can and measured:line (@Beanstalk test Windows AMD dGPU on Hyrule Field; or #2107's reporter, by hand)bc_small_runs=1and the ground as onmain(@Beanstalk test Linux RADV and Windows NVIDIA on Hyrule Field)Measurements
Nothing new to measure. On RADV and NVIDIA's driver, the work is the same as on
main. Every other driver goes back to whatmaindid before #1843: one layer a run, which #1843 measured at ~50 ms of GPU time per never-put-off terrain array at Hyrule Field's entry, against ~16 ms at 8 layers (RX 9070 XT). That entry cost is the price of correct terrain on those drivers until the cause is found.Risks
On drivers other than RADV and NVIDIA's, entering Hyrule Field holds the GPU for longer again (about 260 ms more GPU work at entry, the same as before #1843), and the 36 MB scratch isn't made.
RX_VK_BC_SMALL_LAYERS=8brings back runs of 8 on any driver; reverting the PR is enough to undo it. Nothing changes in saves,longshot_options.inior the caches. #1987 (WIP) extends multi-layer re-encoding and should follow this policy field.Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named). (not run on this PC; left to CI)main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here. (tests/test_bc_small_scratch.py, the first commit; not yet run both ways)tests/that reads changed source is updated, not weakened. (test_device_policy.py: the new field on every PC, its site)bc_small_runsandbc_small_layers, the switch's row)Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.🤖 Generated with Claude Code
bdc709fa80f63fec8767WIP: fix(vk): ASTC-to-BC runs of 8 layers only on RADV and NVIDIA's driver, one layer a run elsewhere (Hyrule Field's grid lines on AMD's Windows driver)to fix(vk): ASTC-to-BC runs of 8 layers only on RADV and NVIDIA's driver, one layer a run elsewhere (Hyrule Field's grid lines on AMD's Windows driver)