fix(vk): coloured specks on fallback foliage (AMD): the generated vertex stage's outputs start at (0,0,0,1) #1513

Merged
rakefire-impala merged 1 commit from fix/mesh-fallback-colour-specks-vertex-defaults into main 2026-11-10 16:47:00 +00:00
rakefire-impala commented 2026-11-10 05:44:01 +00:00 (Migrated from github.com)

The mesh fallback's generated vertex stage left output components undefined when the mesh program doesn't write them. On AMD's Windows driver the fragment stage read register garbage: coloured specks in Kokiri Forest's bushes. This starts them at (0,0,0,1), as the native mesh stage's outputs do since 6dcf6f1.

Part of splitting up #1023.

Change

Every output generic starts at (0,0,0,1), and the point size at 1, before the record's lines are stored over them. This matches the native mesh stage (6dcf6f1) and a vertex stage's unwritten components.

Risk

It changes every fallback program's SPIR-V, so GPUs without mesh shaders re-translate once on their first start. GPUs with mesh shaders are unaffected.

Tests

tests/test_mesh_fallback.py checks the defaults. The check fails on main without this change.

Tested on

Tested on RX 5500M (RDNA1, 4 GB VRAM, 16 GB RAM), Windows 11, AMD driver; Hookshot main 0c412ad (v2.0.11-383) with these PRs, 2026-11-10
Result Kokiri Forest's bushes and flowers drawn without coloured specks
The mesh fallback's generated vertex stage left output components undefined when the mesh program doesn't write them. On AMD's Windows driver the fragment stage read register garbage: coloured specks in Kokiri Forest's bushes. This starts them at (0,0,0,1), as the native mesh stage's outputs do since 6dcf6f1. Part of splitting up #1023. ## Change Every output generic starts at (0,0,0,1), and the point size at 1, before the record's lines are stored over them. This matches the native mesh stage (6dcf6f1) and a vertex stage's unwritten components. ## Risk It changes every fallback program's SPIR-V, so GPUs without mesh shaders re-translate once on their first start. GPUs with mesh shaders are unaffected. ## Tests `tests/test_mesh_fallback.py` checks the defaults. The check fails on main without this change. ## Tested on | | | |---|---| | Tested on | RX 5500M (RDNA1, 4 GB VRAM, 16 GB RAM), Windows 11, AMD driver; Hookshot main 0c412ad (v2.0.11-383) with these PRs, 2026-11-10 | | Result | Kokiri Forest's bushes and flowers drawn without coloured specks |
hckrman101 (Migrated from github.com) approved these changes 2026-11-10 16:38:53 +00:00
hckrman101 (Migrated from github.com) left a comment

Looks good. The default stores mirror StoreFallbackOutput's addressing (single-component vs access chain with element - first_element), they run before the record's stores so real values still win, and (0,0,0,1) / point size 1 match the native mesh stage. CI is green.

Nit: the test is a source-string match, so it'd break on a harmless reformat of that line, but that is how the rest of test_mesh_fallback.py works.

Looks good. The default stores mirror StoreFallbackOutput's addressing (single-component vs access chain with element - first_element), they run before the record's stores so real values still win, and (0,0,0,1) / point size 1 match the native mesh stage. CI is green. Nit: the test is a source-string match, so it'd break on a harmless reformat of that line, but that is how the rest of test_mesh_fallback.py works.
Commenting is not possible because the repository is archived.
No description provided.