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

Open
opened 2026-11-26 01:41:38 +00:00 by j-fuxa · 0 comments
j-fuxa commented 2026-11-26 01:41:38 +00:00 (Migrated from github.com)
Contributor

Imported from Belobug/VIctory-Belobug-AMD. Originally posted by j-fuxa on 2026-11-26T01:41:38Z.


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.

<!-- greyfinch-sync:Belobug/VIctory-Belobug-AMD:issue:6617580516 --> Imported from [Belobug/VIctory-Belobug-AMD](https://github.com/Belobug/VIctory-Belobug-AMD/issues/218). Originally posted by [j-fuxa](https://github.com/j-fuxa) on 2026-11-26T01:41:38Z. --- 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.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Belobug/VIctory-Belobug-AMD#218
No description provided.