Idea: Fix BC array foliage corruption on RX 580 2048SP and reduce traversal stutter #2520

Open
opened 2026-11-25 10:40:29 +00:00 by Nyzx · 5 comments

The idea

I reproduced the colored speckles and missing foliage from #717 on Longshot v3.2.0 release (source 1f0bf123). A small Vulkan image-creation change restored the Kakariko tree canopy and Kokiri foliage in repeated tests. Could you review it as an opt-in workaround for Windows GCN and consider it for an upcoming release?

System and reproduction

  • Radeon RX 580 2048SP 8 GB (1002:6fdf), AMD Adrenalin 26.5.2 (Vulkan driver 0x800117), Windows 11 Pro build 26300, Ryzen 5 5600X, 16 GB RAM. Vulkan 1.3 used the compute fallback.
  • Load Kakariko as child Link and look at the tree behind the guard near the gate, then check the Kokiri Forest entrance. Colored speckles appeared on foliage and the Kakariko tree canopy was missing in the control. The Kakariko comparisons used the same player position, with camera headings of 141.6° and 142.3°.
  • Visual A/B used windowed 1280 × 720 at 100% render scale, with FSR and frame generation disabled. In the matched A2/B2 comparison, both runs used the same experimental DLL. Static alpha-to-coverage, the shared-workgroup warp route, and the optional GCN compute compiler setting were held constant. Only RX_VK_GCN_STRICT_CUBE changed.

What fixed the foliage

An intermediate workaround reduced the visible speckling, but the tree by the Kakariko guard was still bare and some grass and foliage were missing. We treated the cleaner-looking image as an incomplete result. The final BC array change restored those elements. The matched A/B and attached screenshots verify the restored foliage.

A frame capture identified a draw sampling three 128 × 128 compressed 2D arrays with 88 layers, in BC3, BC5, and BC4. The experimental change omits VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT for ordinary BC-compressed NVN 2D arrays with a layer count that is not a multiple of six, gated to the proprietary AMD Windows driver on GCN. Explicit cube targets, formats, mip levels, and draws are retained. Neither patched run logged a rejected cube-view request. Other scenes could still request a cube view of a subset of layers, so broader validation is needed before making the workaround a default.

In both patched runs the foliage rendered without the original speckles. With a warm cache and the camera still, the corrected build averaged 33.0–33.1 FPS in Kakariko (1% low 29.6–29.9) and 38.8–39.2 FPS in Kokiri (1% low 36.0–36.4). The controls drew different foliage, so these measurements establish the cost of the corrected path, not a quality-matched speedup. Draft #2158 addresses the shared-workgroup warp path. That path was already enabled in the controls, and the array flag result was isolated separately. A community Triforce workaround informed the array-layout experiment.

Stutter when exploring with FSR Quality

The player reports that the worst hitches occur on the first load of an area and during map transitions. A second pass through the same area is noticeably smoother, and by the third pass there are almost no hitches. The third pass was observed during play without frame-time logging. The table reports the two measured passes.

On the corrected copy at 720p with FSR 3.1 Quality and frame generation off, the legacy FSR inputs (RX_VK_FSR3_CHAIN=0) completed movement tests. The default temporal chain stalled during a separate Kakariko test on this copy. The following figures compare repeated scripted walking and camera turns after the cache had accumulated. The initial positions and headings were close, and some subsequent loading transitions differed between runs.

Area Average FPS, first → repeat 1% low, first → repeat Worst frame while moving, first → repeat
Hyrule Field 38.2 → 40.3 5.7 → 22.6 344 → 63 ms
Zora's River 14.8 → 33.6 0.3 → 18.0 5,937 → 58 ms
Gerudo Valley 15.2 → 37.4 0.3 → 23.2 8,356 → 57 ms

Shader and pipeline wait counts fell from 943 to 97 over the respective runs. The repeated route still had a capture gap of about 8 s during a map transition. Both runs returned to Hyrule, then the external test monitor stopped the copy when available RAM fell to about 2.43 GiB while crossing to Kokiri. This is a test-monitor stop, distinct from a game crash.

The experimental startup preparation reached about 13% after 194 seconds and was stopped by the monitor at 2.37 GiB available RAM. It may have warmed part of the AMD driver cache before the replay. A separate earlier 1080p test of the experimental renderer ended with a Windows 0x50 in amdkmdag.sys. The successful visual A/B was at 720p, and the patch's effect on that 1080p failure is unknown.

What still needs improvement

The foliage workaround leaves traversal stutter unresolved. Please investigate first-use shader and pipeline waits alongside texture streaming and memory pressure during map changes. A preparation mode bounded by available RAM, reusing pipelines learned during play, would be worth testing on 16 GB systems. A useful validation route is Hyrule Field → Zora's River → Gerudo Valley → Hyrule Field, comparing first and repeated visits with frame generation off. Report the longest transition stalls, frames over 100 ms and 1% lows while moving, and the minimum available RAM.

Anything else

No response

### The idea I reproduced the colored speckles and missing foliage from [#717](https://git.magicbean.dev/MagicBeanDev/Longshot/issues/717) on Longshot **v3.2.0 release** (source `1f0bf123`). A small Vulkan image-creation change restored the Kakariko tree canopy and Kokiri foliage in repeated tests. Could you review it as an opt-in workaround for Windows GCN and consider it for an upcoming release? ## System and reproduction - Radeon RX 580 2048SP 8 GB (`1002:6fdf`), AMD Adrenalin 26.5.2 (Vulkan driver `0x800117`), Windows 11 Pro build 26300, Ryzen 5 5600X, 16 GB RAM. Vulkan 1.3 used the compute fallback. - Load Kakariko as child Link and look at the tree behind the guard near the gate, then check the Kokiri Forest entrance. Colored speckles appeared on foliage and the Kakariko tree canopy was missing in the control. The Kakariko comparisons used the same player position, with camera headings of 141.6° and 142.3°. - Visual A/B used windowed 1280 × 720 at 100% render scale, with FSR and frame generation disabled. In the matched A2/B2 comparison, both runs used the same experimental DLL. Static alpha-to-coverage, the shared-workgroup warp route, and the optional GCN compute compiler setting were held constant. Only `RX_VK_GCN_STRICT_CUBE` changed. ## What fixed the foliage An intermediate workaround reduced the visible speckling, but the tree by the Kakariko guard was still bare and some grass and foliage were missing. We treated the cleaner-looking image as an incomplete result. The final BC array change restored those elements. The matched A/B and attached screenshots verify the restored foliage. A frame capture identified a draw sampling three 128 × 128 compressed 2D arrays with 88 layers, in BC3, BC5, and BC4. The experimental change omits `VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT` for ordinary BC-compressed NVN 2D arrays with a layer count that is not a multiple of six, gated to the proprietary AMD Windows driver on GCN. Explicit cube targets, formats, mip levels, and draws are retained. Neither patched run logged a rejected cube-view request. Other scenes could still request a cube view of a subset of layers, so broader validation is needed before making the workaround a default. In both patched runs the foliage rendered without the original speckles. With a warm cache and the camera still, the corrected build averaged **33.0–33.1 FPS in Kakariko** (1% low 29.6–29.9) and **38.8–39.2 FPS in Kokiri** (1% low 36.0–36.4). The controls drew different foliage, so these measurements establish the cost of the corrected path, not a quality-matched speedup. [Draft #2158](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2158) addresses the shared-workgroup warp path. That path was already enabled in the controls, and the array flag result was isolated separately. A community Triforce workaround informed the array-layout experiment. ## Stutter when exploring with FSR Quality The player reports that the worst hitches occur on the first load of an area and during map transitions. A second pass through the same area is noticeably smoother, and by the third pass there are almost no hitches. The third pass was observed during play without frame-time logging. The table reports the two measured passes. On the corrected copy at 720p with FSR 3.1 Quality and frame generation off, the legacy FSR inputs (`RX_VK_FSR3_CHAIN=0`) completed movement tests. The default temporal chain stalled during a separate Kakariko test on this copy. The following figures compare repeated scripted walking and camera turns after the cache had accumulated. The initial positions and headings were close, and some subsequent loading transitions differed between runs. | Area | Average FPS, first → repeat | 1% low, first → repeat | Worst frame while moving, first → repeat | |---|---:|---:|---:| | Hyrule Field | 38.2 → 40.3 | 5.7 → 22.6 | 344 → 63 ms | | Zora's River | 14.8 → 33.6 | 0.3 → 18.0 | 5,937 → 58 ms | | Gerudo Valley | 15.2 → 37.4 | 0.3 → 23.2 | 8,356 → 57 ms | Shader and pipeline wait counts fell from 943 to 97 over the respective runs. The repeated route still had a capture gap of about 8 s during a map transition. Both runs returned to Hyrule, then the external test monitor stopped the copy when available RAM fell to about 2.43 GiB while crossing to Kokiri. This is a test-monitor stop, distinct from a game crash. The experimental startup preparation reached about 13% after 194 seconds and was stopped by the monitor at 2.37 GiB available RAM. It may have warmed part of the AMD driver cache before the replay. A separate earlier 1080p test of the experimental renderer ended with a Windows `0x50` in `amdkmdag.sys`. The successful visual A/B was at 720p, and the patch's effect on that 1080p failure is unknown. ## What still needs improvement The foliage workaround leaves traversal stutter unresolved. Please investigate first-use shader and pipeline waits alongside texture streaming and memory pressure during map changes. A preparation mode bounded by available RAM, reusing pipelines learned during play, would be worth testing on 16 GB systems. A useful validation route is Hyrule Field → Zora's River → Gerudo Valley → Hyrule Field, comparing first and repeated visits with frame generation off. Report the longest transition stalls, frames over 100 ms and 1% lows while moving, and the minimum available RAM. ### Anything else _No response_
Member

Possibly related, for context:

  • issue #1204 Game: Speckled graphics artifacts on RX 580 in Kokiri Forest — Same RX 580 2048SP speckled foliage corruption; its closure points to #717.
  • issue #1268 Game: 200-470 ms stutters when many new textures arrive: the main thread waits ~0.3 s on a GPU fence after a frame of uploads (RTX 3090, Linux) — Related in-play stutters during texture arrivals, though different GPU/OS and measured cause.
  • PR #1564 perf(vk): defer speculative pipeline probes when a draw needs its shader — Merged shader-load/pipeline-probe change; related to first-use traversal stalls.
  • PR #2228 fix(vk): split non-4-aligned multi-layer BC mip-tail copies on AMD Windows and restore 8-layer runs — Merged AMD Windows BC texture-array handling change, adjacent rendering work but distinct corruption.
Possibly related, for context: - issue #1204 Game: Speckled graphics artifacts on RX 580 in Kokiri Forest — Same RX 580 2048SP speckled foliage corruption; its closure points to #717. - issue #1268 Game: 200-470 ms stutters when many new textures arrive: the main thread waits ~0.3 s on a GPU fence after a frame of uploads (RTX 3090, Linux) — Related in-play stutters during texture arrivals, though different GPU/OS and measured cause. - PR #1564 perf(vk): defer speculative pipeline probes when a draw needs its shader — Merged shader-load/pipeline-probe change; related to first-use traversal stalls. - PR #2228 fix(vk): split non-4-aligned multi-layer BC mip-tail copies on AMD Windows and restore 8-layer runs — Merged AMD Windows BC texture-array handling change, adjacent rendering work but distinct corruption.
Member

From Discord:

Reporter on v3.2.0 (source 1f0bf123), Windows 10 build 19045, RX 590 Series with AMD proprietary driver 26.5.2, Ryzen 7 5700X, 24 GB RAM reports white sparkling/shader-like corruption in Kokiri Forest. Screenshot shows dense white speckles across foliage, ground, and character. Settings include 100% render resolution, AMD FSR 3.1, fullscreen and V-Sync off. Bug report/log attached in Discord; the log lacks the requested HOS_THREAD_TIMES/RX_VK_PASS_TIMING performance-profile measurements if performance investigation is relevant.

From [Discord](https://discord.com/channels/1569849200047427645/1575234270878900374/1575234270878900374): Reporter on v3.2.0 (source 1f0bf123), Windows 10 build 19045, RX 590 Series with AMD proprietary driver 26.5.2, Ryzen 7 5700X, 24 GB RAM reports white sparkling/shader-like corruption in Kokiri Forest. Screenshot shows dense white speckles across foliage, ground, and character. Settings include 100% render resolution, AMD FSR 3.1, fullscreen and V-Sync off. Bug report/log attached in Discord; the log lacks the requested HOS_THREAD_TIMES/RX_VK_PASS_TIMING performance-profile measurements if performance investigation is relevant.
Member

From Discord:

Additional Discord report from another RX 590: Longshot v3.2.0 release (source 1f0bf123), KokiriForest_Child, Windows 10 build 19045, Radeon RX 590 Series with AMD proprietary driver 26.5.2, Ryzen 7 5700X, 24 GB RAM. Screenshot shows dense white sparkling corruption across foliage, ground and Link. Settings: 1440x896 output, Handheld profile, FSR 3.1, 100% render resolution, fullscreen, V-Sync off. The log shows a major performance dip during the session; its end reports 38.2 FPS and GPU time 23.1 ms/frame. Attachments were provided in Discord.

From [Discord](https://discord.com/channels/1569849200047427645/1575234270878900374/1575234270878900374): Additional Discord report from another RX 590: Longshot v3.2.0 release (source 1f0bf123), KokiriForest_Child, Windows 10 build 19045, Radeon RX 590 Series with AMD proprietary driver 26.5.2, Ryzen 7 5700X, 24 GB RAM. Screenshot shows dense white sparkling corruption across foliage, ground and Link. Settings: 1440x896 output, Handheld profile, FSR 3.1, 100% render resolution, fullscreen, V-Sync off. The log shows a major performance dip during the session; its end reports 38.2 FPS and GPU time 23.1 ms/frame. Attachments were provided in Discord.
Member

From Discord:

Reporter tested PR #2821 and says the foliage corruption looks fixed, but reports severe freezing/driver timeouts while entering Hyrule Castle and loading pipelines on builds with the PR/nightly change. They say the PC becomes unresponsive or black-screened and report a BSOD; on nightly without the PR, entering Hyrule Castle did not freeze the PC. They also report high RAM use on a 16 GB system. Please request a performance profile for the traversal stalls; no profiling log or GPU/driver details for this reporter were provided in this thread.

From [Discord](https://discord.com/channels/1569849200047427645/1575234270878900374/1576706521151307847): Reporter tested PR #2821 and says the foliage corruption looks fixed, but reports severe freezing/driver timeouts while entering Hyrule Castle and loading pipelines on builds with the PR/nightly change. They say the PC becomes unresponsive or black-screened and report a BSOD; on nightly without the PR, entering Hyrule Castle did not freeze the PC. They also report high RAM use on a 16 GB system. Please request a performance profile for the traversal stalls; no profiling log or GPU/driver details for this reporter were provided in this thread.
Member

From Discord:

Additional test from the reporter on Windows with Radeon RX 580 2048SP, AMD proprietary driver 24.9.1 (per attached launcher log), 16 GB RAM, Longshot nightly-939-cb0a2763. They report foliage corruption is fixed, but after the merged change experience freezes/black screens, driver timeouts/BSOD and inability to enter gameplay; Hyrule Castle entry and pipeline loading are mentioned. Log records 16,309 MB memory and 18,000 MB swap; eight driver faults compiling compute pipelines at 01:29:53; minimum sampled FPS of 1, with 889.69 ms replay at 01:33:31 and 747.78 ms at 01:36:42. Attached log is longshot-launch-2026-11-30.txt in Discord message 1576763145341505659. It does not contain the requested profiling switches HOS_THREAD_TIMES / RX_VK_PASS_TIMING, so a performance profile is still needed to diagnose traversal stalls.

From [Discord](https://discord.com/channels/1569849200047427645/1575234270878900374/1575682880473006101): Additional test from the reporter on Windows with Radeon RX 580 2048SP, AMD proprietary driver 24.9.1 (per attached launcher log), 16 GB RAM, Longshot nightly-939-cb0a2763. They report foliage corruption is fixed, but after the merged change experience freezes/black screens, driver timeouts/BSOD and inability to enter gameplay; Hyrule Castle entry and pipeline loading are mentioned. Log records 16,309 MB memory and 18,000 MB swap; eight driver faults compiling compute pipelines at 01:29:53; minimum sampled FPS of 1, with 889.69 ms replay at 01:33:31 and 747.78 ms at 01:36:42. Attached log is longshot-launch-2026-11-30.txt in Discord message 1576763145341505659. It does not contain the requested profiling switches HOS_THREAD_TIMES / RX_VK_PASS_TIMING, so a performance profile is still needed to diagnose traversal stalls.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
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/Longshot#2520
No description provided.