victory shaders and shader-info skip files silently and print no skipped count, so the reported totals cannot be compared across reports #29

Closed
opened 2026-11-26 03:31:28 +00:00 by github-bot · 0 comments
Owner

@⁠itsonewi on GitHub · 2026-11-25 23:52 UTC · original

The number victory shaders prints is quoted in several reports as a baseline, and the tool cannot tell you whether it saw every file, so two reports on the same commit cannot be compared.

What is counted, and what is dropped

apps/victory/src/translate.rs:408-415 (precompile, the code behind victory shaders):

for entry in walkdir::WalkDir::new(root).into_iter().filter_map(Result::ok) {
    if !entry.file_type().is_file() || entry.metadata().map_or(0, |m| m.len()) > MAX_FILE {
        continue;
    }
    let Ok(data) = std::fs::read(entry.path()) else {
        continue;
    };

Three separate silences:

  • filter_map(Result::ok) drops every walkdir error: permission denied, a path over MAX_PATH without long-path support, a reparse point it refuses to follow.
  • entry.metadata().map_or(0, ...) turns a metadata failure into length 0, so the file is then tried and skipped at the next line.
  • fs::read failures (locked file, share violation, an AV scanner holding it) are dropped with no line at all.

apps/victory/src/shader.rs:78-99 (shader-info) has the same shape, plus its own let Ok(data) = std::fs::read(path) else { continue } at :90.

The summary (translate.rs:444-448) is only

"{} shaders in the cache, {} do not translate, {:.0} s"

so nothing in the output says how many files were read or skipped — and MAX_FILE is 2 GiB (shader.rs:13), so a big archive is skipped by design and is indistinguishable from a small one that failed.

Why that matters here

  • #1 (RX 6750 XT), #11 (same card) and #12 (RX 6600) all quote 25,689 shaders in the cache, 200 do not translate.
  • #8's tester, on the same base commit 0a43566, quotes 25,782 in the cache.

Ninety-three containers apart. That may be a different dump, or it may be files dropped by one of the three lines above; with the current output there is no way to tell, and the "200 do not translate" figure is being used in this tracker as evidence about cards rather than about dumps.

Suggestion

  • Count the skipped files by reason and print them with the summary: files read N, skipped K (walk error a, unreadable b, over 2 GiB c).
  • Print the skipped names at -v/VICTORY_LOG=debug so a report can show them.
  • In the summary line, say whether discovery completed, so a cache built on a partial scan is not quoted as the baseline.

Not checked

Source reading at 0a43566. I did not run victory shaders here, and I cannot tell which of the two totals above is due to the dump.

AI use

AI-assisted review (source reading). No build, no run, no game files.

**@⁠itsonewi** on GitHub · 2026-11-25 23:52 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/issues/29) The number `victory shaders` prints is quoted in several reports as a baseline, and the tool cannot tell you whether it saw every file, so two reports on the same commit cannot be compared. ## What is counted, and what is dropped `apps/victory/src/translate.rs:408-415` (`precompile`, the code behind `victory shaders`): ```rust for entry in walkdir::WalkDir::new(root).into_iter().filter_map(Result::ok) { if !entry.file_type().is_file() || entry.metadata().map_or(0, |m| m.len()) > MAX_FILE { continue; } let Ok(data) = std::fs::read(entry.path()) else { continue; }; ``` Three separate silences: - `filter_map(Result::ok)` drops every `walkdir` error: permission denied, a path over `MAX_PATH` without long-path support, a reparse point it refuses to follow. - `entry.metadata().map_or(0, ...)` turns a metadata failure into length 0, so the file is then tried and skipped at the next line. - `fs::read` failures (locked file, share violation, an AV scanner holding it) are dropped with no line at all. `apps/victory/src/shader.rs:78-99` (`shader-info`) has the same shape, plus its own `let Ok(data) = std::fs::read(path) else { continue }` at `:90`. The summary (`translate.rs:444-448`) is only ```rust "{} shaders in the cache, {} do not translate, {:.0} s" ``` so nothing in the output says how many files were read or skipped — and `MAX_FILE` is 2 GiB (`shader.rs:13`), so a big archive is skipped by design and is indistinguishable from a small one that failed. ## Why that matters here - #1 (RX 6750 XT), #11 (same card) and #12 (RX 6600) all quote `25,689 shaders in the cache, 200 do not translate`. - #8's tester, on the same base commit `0a43566`, quotes `25,782` in the cache. Ninety-three containers apart. That may be a different dump, or it may be files dropped by one of the three lines above; with the current output there is no way to tell, and the "200 do not translate" figure is being used in this tracker as evidence about cards rather than about dumps. ## Suggestion - Count the skipped files by reason and print them with the summary: `files read N, skipped K (walk error a, unreadable b, over 2 GiB c)`. - Print the skipped names at `-v`/`VICTORY_LOG=debug` so a report can show them. - In the summary line, say whether discovery completed, so a cache built on a partial scan is not quoted as the baseline. ## Not checked Source reading at `0a43566`. I did not run `victory shaders` here, and I cannot tell which of the two totals above is due to the dump. ## AI use AI-assisted review (source reading). No build, no run, no game files.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:31:28 +00:00
github-bot 2026-11-26 08:24:50 +00:00
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/avatarmanz--VIctory-7900XTX#29
No description provided.