fix(vk): RX 580 2048SP foliage on AMD's Windows driver: BC arrays without cube compatibility, alpha-to-coverage in the pipeline #2821

Merged
HumanBean merged 1 commit from HumanBean/Longshot:fix/bc-array-no-cube into main 2026-11-29 22:20:54 +00:00
Owner

Summary

On an RX 580 2048SP with AMD's Windows driver, foliage drew with coloured speckles and the Kakariko tree canopy was missing (#2520, #717). The reporter's run that restored it had, besides the shared warp already on main from #2158, two changes, and this PR is those two, for AMD's Windows driver on GCN (Polaris, Vega) only. Every other GPU and driver is untouched.

  1. BC arrays without cube compatibility (bc_array_no_cube, no switch). A frame capture showed the draw sampling three 128 x 128 BC arrays of 88 layers (BC3, BC5, BC4). They got VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT because they are square with 6 layers or more, and that driver sampled them wrong with it. On those GPUs a BC 2D array whose layer count is not a multiple of 6 is now made without the bit; explicit cube targets, other formats and multiples of 6 keep it. A cube view of such an image is refused, as an image without the bit always was, and now logged (at most 8 lines). Rule: gpu/vk/cube_compat.h.
  2. Alpha-to-coverage in the pipeline (a2c_in_pipeline). That driver applies the dynamic state even when it says off. RX_VK_A2C_IN_PIPELINE=0 goes back to the dynamic state.

From the patch attached to #2520, cleaned up: its opt-in env reads became device-policy fields (a row in gpu/vk/switches.def for the second), its renames and diagnostic logs are gone. Its third change, building the mesh fallback's compute pipelines without the driver's optimizer, is left out: the issue's A/B held it constant, so nothing shows the foliage needs it, and it costs run time. If the foliage is still wrong with this PR, RX_VK_NOOPT=1 tests it with no new code.

The issue's A/B only isolated (1), with (2) held on; (2) ships because the run that fixed the foliage had it on, and matches a known driver bug (NX2navi issue 67). The traversal stutter in #2520 is not addressed. Read gpu/vk/device_policy.h (the two fields and their rule), vk_main.cpp (dev.eds3_a2c after the policy) and vk_texture.cpp first.

Testing

Tested: tests/test_cube_compat.py (compiles and runs the rule, both ways: the driver's rule on and off) and tests/test_device_policy.py (a new PC, the RX 580 2048SP on AMD's Windows driver, with both fields on; the switch both ways; rule edges: RDNA, RADV on GCN and Linux stay off). Not run in the game: opened without a run at the author's request. On this PC (RTX 3090) the bug cannot show.

Still to test:

  • Windows, AMD GCN (RX 580 / 2048SP): Kakariko's tree behind the gate guard as child Link and the Kokiri Forest entrance, expecting no speckles and the canopy present (the issue's reporter, or @Beanstalk on a GCN card).
  • Windows, AMD GCN: with RX_VK_A2C_IN_PIPELINE=0, expecting the same or a worse picture, which says whether (2) is needed; with RX_VK_NOOPT=1, if the foliage is still wrong (by hand, the reporter).
  • That GPU's log has no cube view of texture ... refused line, expecting none: one would mean a draw cubes an array of non-multiple-of-6 layers, which now gets no view there (by hand).

Measurements

Verdict: not measured. The issue reports 33.0–33.1 fps in Kakariko and 38.8–39.2 fps in Kokiri on its patch, with the fallback built unoptimised, which this PR does not do; the control drew different foliage, so those figures are not a comparison. This is a correctness fix for one GPU family, not a performance change.

Setup: none run for this PR. Expected cost: (1) is an image flag at creation, none at run time; (2) adds alpha-to-coverage to the pipeline key there, so a few more pipeline compiles on those GPUs. Nothing changes on any other GPU.

Risks

Only AMD's Windows driver on GCN. An array of a layer count that is not a multiple of 6 that a draw views as a cube (or a subset of its layers as a cube array) gets no view there, where it got one before; the log line above shows it if one exists. A revert is enough. Players on other GPUs notice nothing.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says. (not run in the game)
  • mise run test passes (any failure that also fails on main is named). (the two checks above pass; 26 others need the Vulkan headers, not installed on this PC; test_switch_table.py fails only on LONGSHOT_LAUNCHER_STARTUP, a file this PR does not touch)
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A fix: a game-free test that fails on main and passes here.
  • A switch added or changed: it ships at the default the measurements chose, with its row in gpu/vk/switches.def. (RX_VK_A2C_IN_PIPELINE: the default is the configuration the issue's run had, not measured here)
  • A check under tests/ that reads changed source is updated, not weakened.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

🤖 Generated with Claude Code

## Summary On an RX 580 2048SP with AMD's Windows driver, foliage drew with coloured speckles and the Kakariko tree canopy was missing ([#2520](https://git.magicbean.dev/MagicBeanDev/Longshot/issues/2520), [#717](https://git.magicbean.dev/MagicBeanDev/Longshot/issues/717)). The reporter's run that restored it had, besides the shared warp already on `main` from [#2158](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2158), two changes, and this PR is those two, **for AMD's Windows driver on GCN (Polaris, Vega) only**. Every other GPU and driver is untouched. 1. **BC arrays without cube compatibility** (`bc_array_no_cube`, no switch). A frame capture showed the draw sampling three 128 x 128 BC arrays of 88 layers (BC3, BC5, BC4). They got `VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT` because they are square with 6 layers or more, and that driver sampled them wrong with it. On those GPUs a BC 2D array whose layer count is not a multiple of 6 is now made without the bit; explicit cube targets, other formats and multiples of 6 keep it. A cube view of such an image is refused, as an image without the bit always was, and now logged (at most 8 lines). Rule: `gpu/vk/cube_compat.h`. 2. **Alpha-to-coverage in the pipeline** (`a2c_in_pipeline`). That driver applies the dynamic state even when it says off. `RX_VK_A2C_IN_PIPELINE=0` goes back to the dynamic state. From the patch attached to #2520, cleaned up: its opt-in env reads became device-policy fields (a row in `gpu/vk/switches.def` for the second), its renames and diagnostic logs are gone. Its third change, building the mesh fallback's compute pipelines without the driver's optimizer, is **left out**: the issue's A/B held it constant, so nothing shows the foliage needs it, and it costs run time. If the foliage is still wrong with this PR, `RX_VK_NOOPT=1` tests it with no new code. The issue's A/B only isolated (1), with (2) held on; (2) ships because the run that fixed the foliage had it on, and matches a known driver bug (NX2navi issue 67). The traversal stutter in #2520 is not addressed. Read `gpu/vk/device_policy.h` (the two fields and their rule), `vk_main.cpp` (`dev.eds3_a2c` after the policy) and `vk_texture.cpp` first. ## Testing **Tested:** `tests/test_cube_compat.py` (compiles and runs the rule, both ways: the driver's rule on and off) and `tests/test_device_policy.py` (a new PC, the RX 580 2048SP on AMD's Windows driver, with both fields on; the switch both ways; rule edges: RDNA, RADV on GCN and Linux stay off). Not run in the game: opened without a run at the author's request. On this PC (RTX 3090) the bug cannot show. **Still to test:** - Windows, AMD GCN (RX 580 / 2048SP): Kakariko's tree behind the gate guard as child Link and the Kokiri Forest entrance, expecting no speckles and the canopy present (the issue's reporter, or `@Beanstalk` on a GCN card). - Windows, AMD GCN: with `RX_VK_A2C_IN_PIPELINE=0`, expecting the same or a worse picture, which says whether (2) is needed; with `RX_VK_NOOPT=1`, if the foliage is still wrong (by hand, the reporter). - That GPU's log has no `cube view of texture ... refused` line, expecting none: one would mean a draw cubes an array of non-multiple-of-6 layers, which now gets no view there (by hand). ## Measurements **Verdict:** not measured. The issue reports 33.0–33.1 fps in Kakariko and 38.8–39.2 fps in Kokiri on its patch, with the fallback built unoptimised, which this PR does not do; the control drew different foliage, so those figures are not a comparison. This is a correctness fix for one GPU family, not a performance change. Setup: none run for this PR. Expected cost: (1) is an image flag at creation, none at run time; (2) adds alpha-to-coverage to the pipeline key there, so a few more pipeline compiles on those GPUs. Nothing changes on any other GPU. ## Risks Only AMD's Windows driver on GCN. An array of a layer count that is not a multiple of 6 that a draw views as a cube (or a subset of its layers as a cube array) gets no view there, where it got one before; the log line above shows it if one exists. A revert is enough. Players on other GPUs notice nothing. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [ ] Tested on my own PC, in the game for a change the game runs, as Testing says. (not run in the game) - [ ] `mise run test` passes (any failure that also fails on `main` is named). (the two checks above pass; 26 others need the Vulkan headers, not installed on this PC; `test_switch_table.py` fails only on `LONGSHOT_LAUNCHER_STARTUP`, a file this PR does not touch) - [ ] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A fix: a game-free test that fails on `main` and passes here. - [ ] A switch added or changed: it ships at the default the measurements chose, with its row in `gpu/vk/switches.def`. (`RX_VK_A2C_IN_PIPELINE`: the default is the configuration the issue's run had, not measured here) - [x] A check under `tests/` that reads changed source is updated, not weakened. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(vk): a BC 2D array whose layer count is not a multiple of 6 is made without cube compatibility (#2520)
Some checks failed
CI / What the change needs (pull_request) Successful in 13s
CI / Third-party parts and guide screenshots (pull_request) Failing after 19s
PR description / Title and description (pull_request_target) Failing after 10s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 1m35s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
312813ed82
AMD's Windows driver on GCN sampled such arrays wrong with VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT set: coloured speckles and
missing foliage in Kakariko and Kokiri Forest on an RX 580 2048SP (#717, #2520). The rule is the same on every GPU, so no
switch: the bit stays on explicit cube targets, other formats and layer counts that are a multiple of 6. A cube view of
an image made without it is refused and logged.

Based on the patch Nyzx attached to #2520, without its alpha-to-coverage and no-optimizer experiments.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
HumanBean changed title from WIP: fix(vk): a BC 2D array whose layer count is not a multiple of 6 is made without cube compatibility to fix(vk): a BC 2D array whose layer count is not a multiple of 6 is made without cube compatibility 2026-11-29 20:27:37 +00:00
fix(vk): AMD's Windows driver on GCN keeps alpha-to-coverage in the pipeline and builds the mesh fallback without the optimizer (#2520)
Some checks failed
CI / What the change needs (pull_request) Successful in 29s
CI / Third-party parts and guide screenshots (pull_request) Failing after 47s
PR description / Title and description (pull_request_target) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 2m2s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 5m22s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 3m52s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 5m29s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
b160dccadc
The run that restored the RX 580 2048SP's foliage had both on besides the cube change: alpha-to-coverage as pipeline state
(that driver applies the dynamic state even when it says off) and the fallback's compute pipelines built without the
driver's optimizer. Both are device-policy fields, on for AMD's Windows driver on GCN, each with a switch
(RX_VK_A2C_IN_PIPELINE, RX_VK_GCN_FALLBACK_NOOPT). From the patch attached to #2520.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Author
Owner

Added the patch's other two changes, which I had left out wrongly: the issue's A/B held them on, so the run that restored the foliage had them. Alpha-to-coverage kept in the pipeline and the mesh fallback built without the optimizer are now device-policy fields on for AMD's Windows driver on GCN (RX_VK_A2C_IN_PIPELINE, RX_VK_GCN_FALLBACK_NOOPT), with test_device_policy.py covering a new RX 580 2048SP PC. Title and description updated.

Added the patch's other two changes, which I had left out wrongly: the issue's A/B held them on, so the run that restored the foliage had them. Alpha-to-coverage kept in the pipeline and the mesh fallback built without the optimizer are now device-policy fields on for AMD's Windows driver on GCN (RX_VK_A2C_IN_PIPELINE, RX_VK_GCN_FALLBACK_NOOPT), with test_device_policy.py covering a new RX 580 2048SP PC. Title and description updated.
HumanBean changed title from fix(vk): a BC 2D array whose layer count is not a multiple of 6 is made without cube compatibility to fix(vk): RX 580 2048SP foliage on AMD's Windows driver: BC arrays without cube compatibility, alpha-to-coverage in the pipeline 2026-11-29 20:32:09 +00:00
Member
@review
BeanBot left a comment

Recommendation: Request changes. The cube rule can turn valid cube views into dummy textures on every GPU. The GCN workarounds also need hardware testing to establish the fix and their runtime cost.

The change aims to restore foliage on AMD's Windows GCN driver by changing BC image flags and pipeline creation. The cube change also removes a previously supported view on all drivers, while the two additional workarounds add unmeasured pipeline costs.

Blocking (2): must change before merging.

  1. L1 gpu/vk/vk_texture.cpp:3138: Removing cube compatibility for every non-multiple-of-six BC array also removes valid cube views of a subset of its layers. (more on the line) Do: Preserve cube sampling for these arrays, for example by creating a compatible image or a synchronized cube-compatible representation when a cube view is requested, while retaining the affected driver's ordinary-array workaround.
  2. L4: It conflicts with its base branch: bring it up to date (@​fix or @​rebase try first). (for the author)

Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)

  • L2 gpu/vk/vk_texture.cpp:3138: The actual PR has not been run on the affected driver or on the other systems whose image creation changes. (more on the line) Do: Run the named Kakariko and Kokiri cases on Windows GCN against the base and this head, and check representative BC-array and cube rendering on affected Tier 1 Windows, Linux and Steam Deck configurations. (@fix does its part first: Preserve cube-compatible views for arrays that need them, reducing the cross-vendor behavior change.)
  • L3 gpu/vk/vk_draw.cpp:8798: The fallback now disables driver optimization by default on all Windows GCN devices, without an isolated cost or correctness measurement. (more on the line) Do: On Windows GCN, compare interleaved runs with each new switch independently on and off, checking foliage, average and 1% low fps, frame times and pipeline compilation behavior.

@fix can do L1 and L2.

Questions (2) (not confirmed from the code; they don't hold the recommendation)

  • Were the additional Windows platform entries in mise.lock intended as part of this renderer fix?
  • tests/test_cube_compat.py:18: Is there a current image-flag regression that this test misses, rather than a hypothetical future change?

Checks: Failing on this head, which is behind its base, where they pass: CI / Third-party parts and guide screenshots (pull_request), CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request). @rebase (or @fix) brings it up to date and runs them again; not held against it. Cancelled on this head (no result): PR description / Title and description (pull_request_target). Still running: 6 checks.

More: does it help, other systems, switches, what was read

Does it help: Unproven for this head: the reported corrected run used a separate patch, and this PR has not run in the game. Its 33.0–33.1 fps and 38.8–39.2 fps figures have no comparable control drawing the same foliage.

Other systems: The cube rule affects BC images on Windows and Linux across vendors, including ASTC textures converted to BC. The pipeline policy affects AMD proprietary Windows GCN devices; disabling dynamic alpha-to-coverage also disables the graphics pipeline library path. No runs on this head establish behavior on those systems.

Switches: RX_VK_A2C_IN_PIPELINE and RX_VK_GCN_FALLBACK_NOOPT are added, both on for AMD proprietary Windows GCN and off elsewhere, with switch-table rows. Their defaults reproduce the reported fixed configuration, but neither its necessity nor its cost is isolated.

Reviewed: b160dccadc against 6f5f99fce9: Read the repository rules, PR template, standards, commits and complete diff; read the new cube files and test in full and inspected the changed sections and surrounding paths in the larger renderer and policy files. Skimmed mise.lock and the device-policy test changes; the full large renderer files and the rest of the device-policy test were not read in full. The named review checklist and sibling Tooling checkout were absent.; nothing run (a code review).

Checked and fine:

  • Both commits record AI assistance with Co-Authored-By trailers.
  • Both new switches have rows in switches.def, and the policy tests cover their overrides and several driver and OS boundaries.
  • The new bounded log counters use atomics.
  • No shader, renderer API structure, third-party file or apparent game-derived output is changed.

Testing: No code, tests or scripts were run, as requested. The supplied CI checks are still running or have no result.

Overlaps and merge order: Not established from the offline checkout; #2158 is described as already merged.


Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** The cube rule can turn valid cube views into dummy textures on every GPU. The GCN workarounds also need hardware testing to establish the fix and their runtime cost. The change aims to restore foliage on AMD's Windows GCN driver by changing BC image flags and pipeline creation. The cube change also removes a previously supported view on all drivers, while the two additional workarounds add unmeasured pipeline costs. **Blocking (2)**: must change before merging. 1. **L1** `gpu/vk/vk_texture.cpp:3138`: Removing cube compatibility for every non-multiple-of-six BC array also removes valid cube views of a subset of its layers. (more on the line) **Do:** Preserve cube sampling for these arrays, for example by creating a compatible image or a synchronized cube-compatible representation when a cube view is requested, while retaining the affected driver's ordinary-array workaround. 2. **L4**: It conflicts with its base branch: bring it up to date (`@​fix` or `@​rebase` try first). *(for the author)* **Testing before merging (2)** (runs on the systems it can change; it doesn't hold the recommendation) - **L2** `gpu/vk/vk_texture.cpp:3138`: The actual PR has not been run on the affected driver or on the other systems whose image creation changes. (more on the line) **Do:** Run the named Kakariko and Kokiri cases on Windows GCN against the base and this head, and check representative BC-array and cube rendering on affected Tier 1 Windows, Linux and Steam Deck configurations. *(`@fix` does its part first: Preserve cube-compatible views for arrays that need them, reducing the cross-vendor behavior change.)* - **L3** `gpu/vk/vk_draw.cpp:8798`: The fallback now disables driver optimization by default on all Windows GCN devices, without an isolated cost or correctness measurement. (more on the line) **Do:** On Windows GCN, compare interleaved runs with each new switch independently on and off, checking foliage, average and 1% low fps, frame times and pipeline compilation behavior. `@fix` can do L1 and L2. **Questions (2)** (not confirmed from the code; they don't hold the recommendation) - Were the additional Windows platform entries in mise.lock intended as part of this renderer fix? - `tests/test_cube_compat.py:18`: Is there a current image-flag regression that this test misses, rather than a hypothetical future change? **Checks:** Failing on this head, which is behind its base, where they pass: `CI / Third-party parts and guide screenshots (pull_request)`, `CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request)`. `@rebase` (or `@fix`) brings it up to date and runs them again; not held against it. Cancelled on this head (no result): `PR description / Title and description (pull_request_target)`. Still running: 6 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven for this head: the reported corrected run used a separate patch, and this PR has not run in the game. Its 33.0–33.1 fps and 38.8–39.2 fps figures have no comparable control drawing the same foliage. **Other systems:** The cube rule affects BC images on Windows and Linux across vendors, including ASTC textures converted to BC. The pipeline policy affects AMD proprietary Windows GCN devices; disabling dynamic alpha-to-coverage also disables the graphics pipeline library path. No runs on this head establish behavior on those systems. **Switches:** RX_VK_A2C_IN_PIPELINE and RX_VK_GCN_FALLBACK_NOOPT are added, both on for AMD proprietary Windows GCN and off elsewhere, with switch-table rows. Their defaults reproduce the reported fixed configuration, but neither its necessity nor its cost is isolated. **Reviewed:** b160dccadc68 against 6f5f99fce95f: Read the repository rules, PR template, standards, commits and complete diff; read the new cube files and test in full and inspected the changed sections and surrounding paths in the larger renderer and policy files. Skimmed mise.lock and the device-policy test changes; the full large renderer files and the rest of the device-policy test were not read in full. The named review checklist and sibling Tooling checkout were absent.; nothing run (a code review). **Checked and fine:** - Both commits record AI assistance with Co-Authored-By trailers. - Both new switches have rows in switches.def, and the policy tests cover their overrides and several driver and OS boundaries. - The new bounded log counters use atomics. - No shader, renderer API structure, third-party file or apparent game-derived output is changed. **Testing:** No code, tests or scripts were run, as requested. The supplied CI checks are still running or have no result. **Overlaps and merge order:** Not established from the offline checkout; #2158 is described as already merged. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
@ -8796,3 +8796,3 @@
ci.stage = si;
ci.layout = p.layout;
if (dev.task_mesh_fallback || env_on("RX_VK_NOOPT"))
if (dev.task_mesh_fallback || dev.policy.gcn_fallback_no_optimizer || env_on("RX_VK_NOOPT"))
Member

L3 (should fix): The fallback now disables driver optimization by default on all Windows GCN devices, without an isolated cost or correctness measurement.

When: Every mesh-fallback compute pipeline on those devices is compiled without optimization; the reported fps uses that setting but has no comparable run with optimization enabled and the corrected foliage intact.

Do: On Windows GCN, compare interleaved runs with each new switch independently on and off, checking foliage, average and 1% low fps, frame times and pipeline compilation behavior.

**L3** (should fix): The fallback now disables driver optimization by default on all Windows GCN devices, without an isolated cost or correctness measurement. *When:* Every mesh-fallback compute pipeline on those devices is compiled without optimization; the reported fps uses that setting but has no comparable run with optimization enabled and the corrected foliage intact. **Do:** On Windows GCN, compare interleaved runs with each new switch independently on and off, checking foliage, average and 1% low fps, frame times and pipeline compilation behavior.
@ -3136,0 +3135,4 @@
{ // (cube_compat.h: an ordinary BC array whose layers are not a multiple of 6 is no stack of cubes, and AMD's Windows driver on GCN sampled it wrong with the bit)
const bool could_be_cube = x.type == VK_IMAGE_TYPE_2D && x.layers >= 6 && x.width == x.height &&
x.samples == VK_SAMPLE_COUNT_1_BIT;
if (cube_compat::compatible(could_be_cube, d.target == NVN_TEXTURE_TARGET_2D_ARRAY, is_bc(x.format), x.layers)) {
Member

L1 (blocking): Removing cube compatibility for every non-multiple-of-six BC array also removes valid cube views of a subset of its layers.

When: A square seven-layer BC 2D array sampled by a cube shader using its first six layers previously produced a cube view. The image is now created without the flag, texture_view returns null, and texture_view_of binds the dummy instead, on every GPU.

Do: Preserve cube sampling for these arrays, for example by creating a compatible image or a synchronized cube-compatible representation when a cube view is requested, while retaining the affected driver's ordinary-array workaround.

**L1** (blocking): Removing cube compatibility for every non-multiple-of-six BC array also removes valid cube views of a subset of its layers. *When:* A square seven-layer BC 2D array sampled by a cube shader using its first six layers previously produced a cube view. The image is now created without the flag, texture_view returns null, and texture_view_of binds the dummy instead, on every GPU. **Do:** Preserve cube sampling for these arrays, for example by creating a compatible image or a synchronized cube-compatible representation when a cube view is requested, while retaining the affected driver's ordinary-array workaround.
Member

L2 (should fix): The actual PR has not been run on the affected driver or on the other systems whose image creation changes.

When: The reported A/B used an attached patch rather than these commits; it cannot establish that this integration restores the canopy or that changed BC views still render correctly on other drivers.

Do: Run the named Kakariko and Kokiri cases on Windows GCN against the base and this head, and check representative BC-array and cube rendering on affected Tier 1 Windows, Linux and Steam Deck configurations.

**L2** (should fix): The actual PR has not been run on the affected driver or on the other systems whose image creation changes. *When:* The reported A/B used an attached patch rather than these commits; it cannot establish that this integration restores the canopy or that changed BC views still render correctly on other drivers. **Do:** Run the named Kakariko and Kokiri cases on Windows GCN against the base and this head, and check representative BC-array and cube rendering on affected Tier 1 Windows, Linux and Steam Deck configurations.
HumanBean force-pushed fix/bc-array-no-cube from b160dccadc
Some checks failed
CI / What the change needs (pull_request) Successful in 29s
CI / Third-party parts and guide screenshots (pull_request) Failing after 47s
PR description / Title and description (pull_request_target) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 2m2s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 5m22s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 3m52s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 5m29s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
to aee603c135
Some checks failed
CI / What the change needs (pull_request) Successful in 12s
CI / Third-party parts and guide screenshots (pull_request) Failing after 14s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 20s
PR description / Title and description (pull_request_target) Failing after 11s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 3m29s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m6s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 4m41s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 4m52s
CI / Website build and checks (pull_request) Failing after 29s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 16m7s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 35m36s
2026-11-29 22:19:03 +00:00
Compare
Author
Owner

Rebased onto main and pushed one commit; addressing BeanBot's review:

  • L1 (cube views removed on every GPU): agreed. The rule is now a device-policy field, bc_array_no_cube, on only for AMD's Windows driver on GCN (with a2c_in_pipeline); every other driver keeps the bit and its cube views. On those GPUs a cube view of such an array is still refused, so it is logged (8 lines at most) to show if a draw asks for one. I did not build a synchronised cube-compatible copy: nothing seen asks for the view, and it would cost memory and a copy on the driver this is for.
  • L3 (fallback without the optimizer): dropped. The issue's A/B held it constant, so nothing shows it is needed, and it costs run time. RX_VK_NOOPT=1 tests it without code.
  • L2 (not run on the affected driver): still true, and the PR stays WIP. It needs the reporter or a GCN card on the Test Farm; the Still to test list says what to run, including RX_VK_A2C_IN_PIPELINE=0 to check whether that part is needed.
  • mise.lock: a local check run changed it by accident; restored.
  • test_cube_compat.py:18 question: the test now checks the source passes the policy field and logs a refused view only where the policy says so.
Rebased onto `main` and pushed one commit; addressing BeanBot's review: - **L1 (cube views removed on every GPU):** agreed. The rule is now a device-policy field, `bc_array_no_cube`, on only for AMD's Windows driver on GCN (with `a2c_in_pipeline`); every other driver keeps the bit and its cube views. On those GPUs a cube view of such an array is still refused, so it is logged (8 lines at most) to show if a draw asks for one. I did not build a synchronised cube-compatible copy: nothing seen asks for the view, and it would cost memory and a copy on the driver this is for. - **L3 (fallback without the optimizer):** dropped. The issue's A/B held it constant, so nothing shows it is needed, and it costs run time. `RX_VK_NOOPT=1` tests it without code. - **L2 (not run on the affected driver):** still true, and the PR stays WIP. It needs the reporter or a GCN card on the Test Farm; the *Still to test* list says what to run, including `RX_VK_A2C_IN_PIPELINE=0` to check whether that part is needed. - **mise.lock:** a local check run changed it by accident; restored. - **test_cube_compat.py:18 question:** the test now checks the source passes the policy field and logs a refused view only where the policy says so.
HumanBean deleted branch fix/bc-array-no-cube 2026-11-29 22:20:55 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 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!2821
No description provided.