Translator: failures are not cached (re-run on every start); array-slice LOD query on the rx9070xt branch #218

Open
opened 2026-11-26 03:38:07 +00:00 by github-bot · 0 comments
Owner

@⁠j-fuxa on GitHub · 2026-11-26 01:41 UTC · original

Two small, separate items.

1. Translation failures are not stored

shader_cache::cached returns the translator's error without writing anything, and a unit test pins it ("Failures are not stored", main 380, rx9070xt 413). A program that does not translate is therefore translated, and fails, again on every start (and in every victory shaders run, since precompile returns the error unstored). In our runs about 114 programs re-failed each start, roughly 100 s of worker time. On your side #48 lists 35 compute programs that do not translate every run ("an address in an SGPR that is no root parameter"), and #121 has a table of refusal reasons.

Suggested: store a small failure record with the reason text under the same key (translator hash, the switches in shader_cache::build, host settings) and return it as an error without translating. That key already says when the record would be stale. Keep out of it errors that are not deterministic refusals (I/O, timeouts).

2. calculateLOD on a texture array (rx9070xt only)

On rx9070xt @ 81ebb7b, image_get_lod (op 81, emit/lower.rs 11096-11111) passes cs[0..3] to calculateLOD. For a 2D array texture cs[2] is the array slice, but the validator wants coordinates beyond the size's dimensions to be undef ("out of bound coord must be undef"). main has the fix: commit fec4d026, lod_dims (12941-12951) used at 10933-10946, with a test at 13072. In our translator the unfixed form failed validation for three G-buffer alpha-clip pixel programs.

We have not run the rx9070xt build. victory translate --validate --list should show whether such programs fail there.

**@⁠j-fuxa** on GitHub · 2026-11-26 01:41 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/issues/218) Two small, separate items. **1. Translation failures are not stored** `shader_cache::cached` returns the translator's error without writing anything, and a unit test pins it ("Failures are not stored", `main` 380, `rx9070xt` 413). A program that does not translate is therefore translated, and fails, again on every start (and in every `victory shaders` run, since `precompile` returns the error unstored). In our runs about 114 programs re-failed each start, roughly 100 s of worker time. On your side #48 lists 35 compute programs that do not translate every run ("an address in an SGPR that is no root parameter"), and #121 has a table of refusal reasons. Suggested: store a small failure record with the reason text under the same key (translator hash, the switches in `shader_cache::build`, host settings) and return it as an error without translating. That key already says when the record would be stale. Keep out of it errors that are not deterministic refusals (I/O, timeouts). **2. `calculateLOD` on a texture array (`rx9070xt` only)** On `rx9070xt` @ 81ebb7b, `image_get_lod` (op 81, `emit/lower.rs` 11096-11111) passes `cs[0..3]` to `calculateLOD`. For a 2D array texture `cs[2]` is the array slice, but the validator wants coordinates beyond the size's dimensions to be undef ("out of bound coord must be undef"). `main` has the fix: commit fec4d026, `lod_dims` (12941-12951) used at 10933-10946, with a test at 13072. In our translator the unfixed form failed validation for three G-buffer alpha-clip pixel programs. We have not run the `rx9070xt` build. `victory translate --validate --list` should show whether such programs fail there.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:38:07 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.