D3D12.X: under Wine the driver blob cache answers a missing name from a listing #3507

Open
Royalflamejlh wants to merge 1 commit from upstream-pr/3507 into main
Royalflamejlh commented 2026-11-30 04:36:32 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-11-30T04:36:32Z.


Edited 2026-12-02: head 2dd74d1a after bmjask's and Foniass's reviews (see Tested).

Under Wine a retail title's process spent most of its file-system time listing the driver blob cache's folder. Wine lists the whole folder for an open of a name that is not there, the title asks the cache for each pipeline's file before it builds it, and the folder holds the blobs of every earlier run. Under Wine, driver_cache::load now answers a missing name from a listing kept in memory. Part of #3067; the same cause as #3506, in the title this time.

What is in it

  • crates/xcl/src/hle/d3d12x/real.rs (driver_cache): Names keeps each folder's file names from one listing, adds what write stores, and lists again at most every 10 s when a name is missing (a preparation worker may have written it since). load asks it first, under under_wine() only: Windows opens the file as before. Six new tests of Names, reload and the listing. shaders.rs: the re-checks after a claim and after the permit wait call reload.

Tested

  • Linux only: Wine 11.21 Staging, vkd3d-proton master 71cae091, RTX 4060 Ti 16 GB (driver 615.71.09), rustc 1.98.0, release build for x86_64-pc-windows-gnu, head 8244a3ba on main f97120dc.
  • Head 2dd74d1a (2026-12-02), after reviews by bmjask and Foniass, rebased onto main 078358a0: a folder that cannot be listed is not trusted (its files are opened); a name whose open finds no file leaves the listing, unless this process wrote a file in that folder since that open; names are compared in lower case, listed and asked alike. cargo test --lib --release -- warm_blobs driver_cache shaders:: under Wine on the CPU only (lavapipe, no card): 124 passed, 1 failed (an_older_process_cannot_remove_a_replacement_blob, as on main), 14 SKIPPED (no device), in 3 of 3 runs. The four new tests fail without their change.
  • Head 716036be (2026-12-01): the re-checks after a claim and after the permit wait open the file (driver_cache::reload) and no longer ask the listing, so a blob the last claim holder wrote is found; the relist runs outside the NAMES lock and adds to the set; no PathBuf a lookup. New test a_reload_finds_a_blob_written_since_the_listing. cargo test --lib -- warm_blobs driver_cache shaders::: 110 passed, 1 failed (an_older_process_cannot_remove_a_replacement_blob, which fails on main under Wine too), 2 SKIPPED. The measurements below are from the head before it and were not repeated.
  • cargo test -p xcl --lib --release -- driver_cache: 20 passed, 1 failed (an_older_process_cannot_remove_a_replacement_blob, which fails the same way on main 9335bc0d under Wine: 19 passed, 1 failed).
  • A retail title on our Linux branch (main f97120dc with other PRs merged, #3067), with and without this commit, 1 launch each, back to back from the same caches, 79,155 files in the folder. strace -c on the title's process for 20 s once it had presented 200 frames:
without with
getdents64 calls 408,089 4,156
time in them, all threads 84.2 s 0.04 s
time in all file calls 86.9 s 0.67 s
opens of the folder in the next 20 s 1,256 16
launch to frame 200 59 s 29 s
  • Before that, perf on the title had about a quarter of its CPU samples in readdir64 and its callers, most on the xcl-pso threads.

Regression run
RTX 5070 Ti 16 GB (driver 621.24), Ryzen 7 9800X3D, Windows 11 Pro 26300, release builds by scripts/smoke.ps1, the same retail title for 60 s each.

main:

xcl-smoke v1
commit: 1c8b551475e1e7bfe48f94448492a4c3544a2e0f
gpu: NVIDIA GeForce RTX 5070 Ti
title: 5330474d
seconds: 60
exit: 0x0
frames shown: 1620 (PresentX 1621)
presents per 2 s (last 3): 61 60 60
device removals: 0
crashes: 0
peak commit: 15476 MB

this PR's head:

xcl-smoke v1
commit: 716036beaf18cc42a9ac48431fe3d93620fbab10
gpu: NVIDIA GeForce RTX 5070 Ti
title: 5330474d
seconds: 60
exit: 0x0
frames shown: 1646 (PresentX 1646)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15617 MB

Not tested

  • Windows: nothing. The new path is not taken there.
  • AMD / RADV.
  • What a listing costs: under Wine it reads each file's attributes (about 240,000 calls for this folder), at most once every 10 s per folder while names are missing. Not timed on its own.
  • A blob another process writes is found up to 10 s late; until then the pipeline is built as if there were none. Both runs above ended in a device removal after 160 to 190 s, with and without this commit, at 16 of 16 GB of video memory.

AI use

  • Claude Code. Claude Fable 5.2 found the cost (perf, strace), wrote the change and the test, made the runs and wrote this description. Claude Opus 5.5 wrote reload, the relist outside the lock and the new test. Claude Opus 5.5 made the changes after bmjask's and Foniass's reviews of 2026-12-02 and their tests.
<!-- greyfinch-sync:ivall/xcl:issue:5559072158 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3507). Originally posted by [Royalflamejlh](https://github.com/Royalflamejlh) on 2026-11-30T04:36:32Z. --- _Edited 2026-12-02: head `2dd74d1a` after bmjask's and Foniass's reviews (see **Tested**)._ Under Wine a retail title's process spent most of its file-system time listing the driver blob cache's folder. Wine lists the whole folder for an open of a name that is not there, the title asks the cache for each pipeline's file before it builds it, and the folder holds the blobs of every earlier run. Under Wine, `driver_cache::load` now answers a missing name from a listing kept in memory. Part of #3067; the same cause as #3506, in the title this time. **What is in it** - `crates/xcl/src/hle/d3d12x/real.rs` (`driver_cache`): `Names` keeps each folder's file names from one listing, adds what `write` stores, and lists again at most every 10 s when a name is missing (a preparation worker may have written it since). `load` asks it first, under `under_wine()` only: Windows opens the file as before. Six new tests of `Names`, `reload` and the listing. `shaders.rs`: the re-checks after a claim and after the permit wait call `reload`. **Tested** - Linux only: Wine 11.21 Staging, vkd3d-proton `master` `71cae091`, RTX 4060 Ti 16 GB (driver 615.71.09), rustc 1.98.0, release build for `x86_64-pc-windows-gnu`, head `8244a3ba` on `main` `f97120dc`. - Head `2dd74d1a` (2026-12-02), after reviews by bmjask and Foniass, rebased onto `main` `078358a0`: a folder that cannot be listed is not trusted (its files are opened); a name whose open finds no file leaves the listing, unless this process wrote a file in that folder since that open; names are compared in lower case, listed and asked alike. `cargo test --lib --release -- warm_blobs driver_cache shaders::` under Wine on the CPU only (lavapipe, no card): 124 passed, 1 failed (`an_older_process_cannot_remove_a_replacement_blob`, as on `main`), 14 SKIPPED (no device), in 3 of 3 runs. The four new tests fail without their change. - Head `716036be` (2026-12-01): the re-checks after a claim and after the permit wait open the file (`driver_cache::reload`) and no longer ask the listing, so a blob the last claim holder wrote is found; the relist runs outside the `NAMES` lock and adds to the set; no `PathBuf` a lookup. New test `a_reload_finds_a_blob_written_since_the_listing`. `cargo test --lib -- warm_blobs driver_cache shaders::`: 110 passed, 1 failed (`an_older_process_cannot_remove_a_replacement_blob`, which fails on `main` under Wine too), 2 SKIPPED. The measurements below are from the head before it and were not repeated. - `cargo test -p xcl --lib --release -- driver_cache`: 20 passed, 1 failed (`an_older_process_cannot_remove_a_replacement_blob`, which fails the same way on `main` `9335bc0d` under Wine: 19 passed, 1 failed). - A retail title on our Linux branch (`main` `f97120dc` with other PRs merged, #3067), with and without this commit, 1 launch each, back to back from the same caches, 79,155 files in the folder. `strace -c` on the title's process for 20 s once it had presented 200 frames: | | without | with | |---|---|---| | `getdents64` calls | 408,089 | 4,156 | | time in them, all threads | 84.2 s | 0.04 s | | time in all file calls | 86.9 s | 0.67 s | | opens of the folder in the next 20 s | 1,256 | 16 | | launch to frame 200 | 59 s | 29 s | - Before that, `perf` on the title had about a quarter of its CPU samples in `readdir64` and its callers, most on the `xcl-pso` threads. **Regression run** RTX 5070 Ti 16 GB (driver 621.24), Ryzen 7 9800X3D, Windows 11 Pro 26300, release builds by `scripts/smoke.ps1`, the same retail title for 60 s each. `main`: ``` xcl-smoke v1 commit: 1c8b551475e1e7bfe48f94448492a4c3544a2e0f gpu: NVIDIA GeForce RTX 5070 Ti title: 5330474d seconds: 60 exit: 0x0 frames shown: 1620 (PresentX 1621) presents per 2 s (last 3): 61 60 60 device removals: 0 crashes: 0 peak commit: 15476 MB ``` this PR's head: ``` xcl-smoke v1 commit: 716036beaf18cc42a9ac48431fe3d93620fbab10 gpu: NVIDIA GeForce RTX 5070 Ti title: 5330474d seconds: 60 exit: 0x0 frames shown: 1646 (PresentX 1646) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15617 MB ``` **Not tested** - Windows: nothing. The new path is not taken there. - AMD / RADV. - What a listing costs: under Wine it reads each file's attributes (about 240,000 calls for this folder), at most once every 10 s per folder while names are missing. Not timed on its own. - A blob another process writes is found up to 10 s late; until then the pipeline is built as if there were none. Both runs above ended in a device removal after 160 to 190 s, with and without this commit, at 16 of 16 GB of video memory. **AI use** - Claude Code. Claude Fable 5.2 found the cost (`perf`, `strace`), wrote the change and the test, made the runs and wrote this description. Claude Opus 5.5 wrote `reload`, the relist outside the lock and the new test. Claude Opus 5.5 made the changes after bmjask's and Foniass's reviews of 2026-12-02 and their tests.
Foniass commented 2026-12-01 08:03:10 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:03:10Z.


Review (head 8244a3ba, diff read, not a merge-check; draft with PR description red, so not built or run):

  • It defeats the claim re-check under Wine. The preparation workers re-check after taking a claim (shaders.rs ~2690, and ~2702 after the permit wait) precisely to see a blob the previous claim holder just wrote. Names::missing (real.rs ~6584) answers "missing" until its listing is 10 s old, so the worker repeats a full driver compile and overwrites a blob already on disk, which the claim exists to prevent. Skipping Names on those re-checks, or dropping the folder's listing when a claim is acquired, would fix it.
  • The relist runs under a global lock: listing the whole folder (about 79k files, ~240k attribute calls by the PR's count) holds the NAMES mutex (~6608), and while pipelines keep missing it can repeat every 10 s, blocking every load caller; its cost isn't measured.
  • Minor: each lookup allocates a PathBuf, and a blob removed by invalidate() stays in the set (one extra open later).
  • Still needed: smoke blocks and a Windows test run (Wine cross-build only so far).

Fine: Windows is gated off with under_wine() (only an empty lock is added in write), the Names test, and the strace measurements.

AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7304811439 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3507#issuecomment-7304811439). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T08:03:10Z. --- Review (head 8244a3ba, diff read, not a merge-check; draft with `PR description` red, so not built or run): - **It defeats the claim re-check under Wine.** The preparation workers re-check after taking a claim (`shaders.rs` ~2690, and ~2702 after the permit wait) precisely to see a blob the previous claim holder just wrote. `Names::missing` (`real.rs` ~6584) answers "missing" until its listing is 10 s old, so the worker repeats a full driver compile and overwrites a blob already on disk, which the claim exists to prevent. Skipping `Names` on those re-checks, or dropping the folder's listing when a claim is acquired, would fix it. - **The relist runs under a global lock:** listing the whole folder (about 79k files, ~240k attribute calls by the PR's count) holds the `NAMES` mutex (~6608), and while pipelines keep missing it can repeat every 10 s, blocking every `load` caller; its cost isn't measured. - Minor: each lookup allocates a `PathBuf`, and a blob removed by `invalidate()` stays in the set (one extra open later). - Still needed: smoke blocks and a Windows test run (Wine cross-build only so far). Fine: Windows is gated off with `under_wine()` (only an empty lock is added in `write`), the `Names` test, and the strace measurements. AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
Royalflamejlh commented 2026-12-01 08:25:58 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-12-01T08:25:58Z.


Thanks, both points are right. Head 716036be:

  • The re-check after a claim: the re-checks after taking a claim and after the permit wait went through the listing, which answers "missing" for 10 s, so a blob the last claim holder had just written was compiled again and overwritten. They now open the file (driver_cache::reload). a_reload_finds_a_blob_written_since_the_listing fails under Wine with load in its place.
  • The relist under the lock: it now runs outside NAMES and adds its names to the set, so other threads answer from the previous listing meanwhile and names written during a relist are kept. Its cost was never timed here; the strace in the description only bounds its system calls.
  • The PathBuf a lookup is gone. invalidate() is left: LoadedBlob holds no path, and the cost is one open of a missing name, as on main.

cargo test --lib -- warm_blobs driver_cache shaders::, RTX 4060 Ti under Wine: 110 passed, 1 failed (an_older_process_cannot_remove_a_replacement_blob, as on main under Wine), 2 SKIPPED. Not run in a title on this head; the Windows suite and the smoke pair are still owed.

AI use: Claude Code. Claude Opus 5.5 checked the points and wrote the changes; Claude Fable 5.2 ran the tests on the card and wrote this reply.

<!-- greyfinch-sync:ivall/xcl:comment:7305309325 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3507#issuecomment-7305309325). Originally posted by [Royalflamejlh](https://github.com/Royalflamejlh) on 2026-12-01T08:25:58Z. --- Thanks, both points are right. Head `716036be`: - **The re-check after a claim:** the re-checks after taking a claim and after the permit wait went through the listing, which answers "missing" for 10 s, so a blob the last claim holder had just written was compiled again and overwritten. They now open the file (`driver_cache::reload`). `a_reload_finds_a_blob_written_since_the_listing` fails under Wine with `load` in its place. - **The relist under the lock:** it now runs outside `NAMES` and adds its names to the set, so other threads answer from the previous listing meanwhile and names written during a relist are kept. Its cost was never timed here; the strace in the description only bounds its system calls. - The `PathBuf` a lookup is gone. `invalidate()` is left: `LoadedBlob` holds no path, and the cost is one open of a missing name, as on `main`. `cargo test --lib -- warm_blobs driver_cache shaders::`, RTX 4060 Ti under Wine: 110 passed, 1 failed (`an_older_process_cannot_remove_a_replacement_blob`, as on `main` under Wine), 2 SKIPPED. Not run in a title on this head; the Windows suite and the smoke pair are still owed. **AI use:** Claude Code. Claude Opus 5.5 checked the points and wrote the changes; Claude Fable 5.2 ran the tests on the card and wrote this reply.
Foniass commented 2026-12-01 08:36:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:36:40Z.


Re-review (head 716036be, diff read, not a merge-check; draft, PR description red). Follow-up to my review of 8244a3ba.

  • Claim re-check: fixed. The claim and permit re-checks in shaders.rs (~2690 / ~2702) now call driver_cache::reload, which opens the file and skips the listing; the other load callers in real.rs are first lookups.
  • Relisting under the lock: fixed. It runs outside NAMES with the timestamp reset first, so one thread relists. A folder's first listing (~79k files) still runs inside the lock (real.rs ~6592).
  • PathBuf per lookup: fixed.
  • Unchanged: a name invalidate() removed stays in the set, so the next lookup opens a missing file (one Wine folder listing until write adds it back); time only.
  • The new test shows reload reads a fresh file, but nothing checks that the re-checks use it.
  • Still missing: the xcl-smoke pair on this head and a Windows suite run.

Fine: relisting adds to the set and never removes from it, and Windows behaves as on main.

AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7305547070 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3507#issuecomment-7305547070). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T08:36:40Z. --- Re-review (head 716036be, diff read, not a merge-check; draft, `PR description` red). Follow-up to my review of 8244a3ba. - **Claim re-check: fixed.** The claim and permit re-checks in `shaders.rs` (~2690 / ~2702) now call `driver_cache::reload`, which opens the file and skips the listing; the other `load` callers in real.rs are first lookups. - **Relisting under the lock: fixed.** It runs outside `NAMES` with the timestamp reset first, so one thread relists. A folder's first listing (~79k files) still runs inside the lock (`real.rs` ~6592). - **PathBuf per lookup: fixed.** - Unchanged: a name `invalidate()` removed stays in the set, so the next lookup opens a missing file (one Wine folder listing until `write` adds it back); time only. - The new test shows `reload` reads a fresh file, but nothing checks that the re-checks use it. - Still missing: the xcl-smoke pair on this head and a Windows suite run. Fine: relisting adds to the set and never removes from it, and Windows behaves as on main. AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
Foniass commented 2026-12-01 10:05:28 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T10:05:28Z.


Triage (#1607) – head 716036b

No open or merged PR makes the same change. #3506 does the same kind of thing for the v1 receipt import in warm_blobs.rs, and #3556 changes blob reuse in build_with_blob; both are separate changes for #3067.
A small point in driver_cache::Names::missing: a folder's first listing runs while the NAMES lock is held, so other xcl-pso threads wait on it once per folder. Only the relist runs outside the lock. Windows behaviour is unchanged (load checks the listing only under under_wine()).
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7307653462 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3507#issuecomment-7307653462). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T10:05:28Z. --- **Triage (#1607)** – head 716036b No open or merged PR makes the same change. #3506 does the same kind of thing for the v1 receipt import in `warm_blobs.rs`, and #3556 changes blob reuse in `build_with_blob`; both are separate changes for #3067. A small point in `driver_cache::Names::missing`: a folder's first listing runs while the `NAMES` lock is held, so other `xcl-pso` threads wait on it once per folder. Only the relist runs outside the lock. Windows behaviour is unchanged (`load` checks the listing only under `under_wine()`). Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
bmjask commented 2026-12-02 09:14:37 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T09:14:37Z.

Review: COMMENTED


Review of 716036be: 4 finding(s). 4 are inline.


These findings come from an AI-assisted review (Claude Code) and focus on correctness. Each is a candidate; please check it before acting on it.

<!-- greyfinch-sync:ivall/xcl:review:6147811197 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3507#pullrequestreview-6147811197). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T09:14:37Z. **Review:** COMMENTED --- Review of `716036be`: 4 finding(s). 4 are inline. --- _These findings come from an AI-assisted review (Claude Code) and focus on correctness. Each is a candidate; please check it before acting on it._
bmjask commented 2026-12-02 09:14:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T09:14:38Z.

Code review location: crates/xcl/src/hle/d3d12x/real.rs; line 6620

@@ -6572,7 +6572,65 @@ pub(crate) mod driver_cache {
         set(FileDispositionInfo, (&basic as *const FILE_DISPOSITION_INFO).cast(), std::mem::size_of_val(&basic) as u32)
     }
 
+    /// The file names of the folders `load` was asked about, from a first listing, with what
+    /// `write` added since. A name missing from a listing older than `NAMES_AGE` has the folder
+    /// listed again and its names added: another process (a preparation worker) may have written the file.
+    #[derive(Default)]
+    struct Names(std::collections::HashMap<PathBuf, (std::collections::HashSet<std::ffi::OsString>, std::time::Instant)>);
+    const NAMES_AGE: std::time::Duration = std::time::Duration::from_secs(10);
+    static NAMES: Mutex<Option<Names>> = Mutex::new(None);
+
+    fn names_in(dir: &Path) -> std::collections::HashSet<std::ffi::OsString> {
+        std::fs::read_dir(dir).into_iter().flatten().flatten().map(|entry| entry.file_name()).collect()
+    }
+
+    impl Names {
+        /// Whether `p` is missing; `None` when its folder is due another listing, for `relisted`.
+        fn missing(&mut self, p: &Path, now: std::time::Instant) -> Option<bool> {
+            let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return Some(false) };
+            if !self.0.contains_key(dir) {
+                self.0.insert(dir.to_path_buf(), (names_in(dir), now));
+            }
+            let (names, listed) = self.0.get_mut(dir).unwrap();
+            if names.contains(name) || now.duration_since(*listed) < NAMES_AGE {
+                return Some(!names.contains(name));
+            }
+            *listed = now;
+            None
+        }
+
+        fn relisted(&mut self, p: &Path, found: std::collections::HashSet<std::ffi::OsString>) -> bool {
+            let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return false };
+            let names = &mut self.0.get_mut(dir).unwrap().0;
+            names.extend(found);
+            !names.contains(name)
+        }
+
+        fn wrote(&mut self, p: &Path) {
+            let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return };
+            if let Some((names, _)) = self.0.get_mut(dir) {
+                names.insert(name.to_os_string());
+            }
+        }
+    }
+
     pub fn load(p: &Path) -> Option<LoadedBlob> {
+        // (Wine lists the whole folder for an open of a name that is not there)
+        if crate::util::under_wine() {
+            let missing = NAMES.lock().unwrap().get_or_insert_default().missing(p, std::time::Instant::now());

The title's runtime call sites (compute_container at ~6253, and ~8130, ~9417, ~9525, ~10947) call load without the reload re-check. Under Wine, a blob another process wrote after the last listing is reported missing for up to NAMES_AGE, and the title compiles the pipeline in the driver. Say a preparation worker writes <hash>.pso 2 s after the title listed driver/, and the title then binds that compute pipeline. load returns None from the listing, compute_container does an uncached driver compile (5-27 s on NVIDIA for large programs), and keep_driver_blob_at then overwrites the worker's file. Before, the open found it. Falling back to an open (or a reload) on a listing miss before compiling would keep that.

<!-- greyfinch-sync:ivall/xcl:review-comment:4767198820 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3507#discussion_r4767198820). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T09:14:38Z. **Code review location:** `crates/xcl/src/hle/d3d12x/real.rs`; line 6620 ~~~~diff @@ -6572,7 +6572,65 @@ pub(crate) mod driver_cache { set(FileDispositionInfo, (&basic as *const FILE_DISPOSITION_INFO).cast(), std::mem::size_of_val(&basic) as u32) } + /// The file names of the folders `load` was asked about, from a first listing, with what + /// `write` added since. A name missing from a listing older than `NAMES_AGE` has the folder + /// listed again and its names added: another process (a preparation worker) may have written the file. + #[derive(Default)] + struct Names(std::collections::HashMap<PathBuf, (std::collections::HashSet<std::ffi::OsString>, std::time::Instant)>); + const NAMES_AGE: std::time::Duration = std::time::Duration::from_secs(10); + static NAMES: Mutex<Option<Names>> = Mutex::new(None); + + fn names_in(dir: &Path) -> std::collections::HashSet<std::ffi::OsString> { + std::fs::read_dir(dir).into_iter().flatten().flatten().map(|entry| entry.file_name()).collect() + } + + impl Names { + /// Whether `p` is missing; `None` when its folder is due another listing, for `relisted`. + fn missing(&mut self, p: &Path, now: std::time::Instant) -> Option<bool> { + let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return Some(false) }; + if !self.0.contains_key(dir) { + self.0.insert(dir.to_path_buf(), (names_in(dir), now)); + } + let (names, listed) = self.0.get_mut(dir).unwrap(); + if names.contains(name) || now.duration_since(*listed) < NAMES_AGE { + return Some(!names.contains(name)); + } + *listed = now; + None + } + + fn relisted(&mut self, p: &Path, found: std::collections::HashSet<std::ffi::OsString>) -> bool { + let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return false }; + let names = &mut self.0.get_mut(dir).unwrap().0; + names.extend(found); + !names.contains(name) + } + + fn wrote(&mut self, p: &Path) { + let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return }; + if let Some((names, _)) = self.0.get_mut(dir) { + names.insert(name.to_os_string()); + } + } + } + pub fn load(p: &Path) -> Option<LoadedBlob> { + // (Wine lists the whole folder for an open of a name that is not there) + if crate::util::under_wine() { + let missing = NAMES.lock().unwrap().get_or_insert_default().missing(p, std::time::Instant::now()); ~~~~ --- The title's runtime call sites (`compute_container` at ~6253, and ~8130, ~9417, ~9525, ~10947) call `load` without the `reload` re-check. Under Wine, a blob another process wrote after the last listing is reported missing for up to NAMES_AGE, and the title compiles the pipeline in the driver. Say a preparation worker writes `<hash>.pso` 2 s after the title listed driver/, and the title then binds that compute pipeline. `load` returns None from the listing, `compute_container` does an uncached driver compile (5-27 s on NVIDIA for large programs), and `keep_driver_blob_at` then overwrites the worker's file. Before, the open found it. Falling back to an open (or a reload) on a listing miss before compiling would keep that.
bmjask commented 2026-12-02 09:14:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T09:14:38Z.

Code review location: crates/xcl/src/hle/d3d12x/real.rs; line 6584

@@ -6572,7 +6572,65 @@ pub(crate) mod driver_cache {
         set(FileDispositionInfo, (&basic as *const FILE_DISPOSITION_INFO).cast(), std::mem::size_of_val(&basic) as u32)
     }
 
+    /// The file names of the folders `load` was asked about, from a first listing, with what
+    /// `write` added since. A name missing from a listing older than `NAMES_AGE` has the folder
+    /// listed again and its names added: another process (a preparation worker) may have written the file.
+    #[derive(Default)]
+    struct Names(std::collections::HashMap<PathBuf, (std::collections::HashSet<std::ffi::OsString>, std::time::Instant)>);
+    const NAMES_AGE: std::time::Duration = std::time::Duration::from_secs(10);
+    static NAMES: Mutex<Option<Names>> = Mutex::new(None);
+
+    fn names_in(dir: &Path) -> std::collections::HashSet<std::ffi::OsString> {
+        std::fs::read_dir(dir).into_iter().flatten().flatten().map(|entry| entry.file_name()).collect()

names_in turns a failed read_dir, or any per-entry error dropped by the second .flatten(), into an empty or partial set, and missing then trusts it for 10 s as a complete listing. A transient error (sharing violation, handle exhaustion, an entry error partway through under Wine) means every blob outside the partial set gets Some(true) for the next 10 s, so each of those pipelines is compiled from scratch and rewritten even though its blob is on disk. On a listing error it should fall back to opening files, not trust the set.

<!-- greyfinch-sync:ivall/xcl:review-comment:4767198831 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3507#discussion_r4767198831). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T09:14:38Z. **Code review location:** `crates/xcl/src/hle/d3d12x/real.rs`; line 6584 ~~~~diff @@ -6572,7 +6572,65 @@ pub(crate) mod driver_cache { set(FileDispositionInfo, (&basic as *const FILE_DISPOSITION_INFO).cast(), std::mem::size_of_val(&basic) as u32) } + /// The file names of the folders `load` was asked about, from a first listing, with what + /// `write` added since. A name missing from a listing older than `NAMES_AGE` has the folder + /// listed again and its names added: another process (a preparation worker) may have written the file. + #[derive(Default)] + struct Names(std::collections::HashMap<PathBuf, (std::collections::HashSet<std::ffi::OsString>, std::time::Instant)>); + const NAMES_AGE: std::time::Duration = std::time::Duration::from_secs(10); + static NAMES: Mutex<Option<Names>> = Mutex::new(None); + + fn names_in(dir: &Path) -> std::collections::HashSet<std::ffi::OsString> { + std::fs::read_dir(dir).into_iter().flatten().flatten().map(|entry| entry.file_name()).collect() ~~~~ --- `names_in` turns a failed `read_dir`, or any per-entry error dropped by the second `.flatten()`, into an empty or partial set, and `missing` then trusts it for 10 s as a complete listing. A transient error (sharing violation, handle exhaustion, an entry error partway through under Wine) means every blob outside the partial set gets `Some(true)` for the next 10 s, so each of those pipelines is compiled from scratch and rewritten even though its blob is on disk. On a listing error it should fall back to opening files, not trust the set.
bmjask commented 2026-12-02 09:14:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T09:14:38Z.

Code review location: crates/xcl/src/hle/d3d12x/real.rs; line 6605

@@ -6572,7 +6572,65 @@ pub(crate) mod driver_cache {
         set(FileDispositionInfo, (&basic as *const FILE_DISPOSITION_INFO).cast(), std::mem::size_of_val(&basic) as u32)
     }
 
+    /// The file names of the folders `load` was asked about, from a first listing, with what
+    /// `write` added since. A name missing from a listing older than `NAMES_AGE` has the folder
+    /// listed again and its names added: another process (a preparation worker) may have written the file.
+    #[derive(Default)]
+    struct Names(std::collections::HashMap<PathBuf, (std::collections::HashSet<std::ffi::OsString>, std::time::Instant)>);
+    const NAMES_AGE: std::time::Duration = std::time::Duration::from_secs(10);
+    static NAMES: Mutex<Option<Names>> = Mutex::new(None);
+
+    fn names_in(dir: &Path) -> std::collections::HashSet<std::ffi::OsString> {
+        std::fs::read_dir(dir).into_iter().flatten().flatten().map(|entry| entry.file_name()).collect()
+    }
+
+    impl Names {
+        /// Whether `p` is missing; `None` when its folder is due another listing, for `relisted`.
+        fn missing(&mut self, p: &Path, now: std::time::Instant) -> Option<bool> {
+            let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return Some(false) };
+            if !self.0.contains_key(dir) {
+                self.0.insert(dir.to_path_buf(), (names_in(dir), now));
+            }
+            let (names, listed) = self.0.get_mut(dir).unwrap();
+            if names.contains(name) || now.duration_since(*listed) < NAMES_AGE {
+                return Some(!names.contains(name));
+            }
+            *listed = now;
+            None
+        }
+
+        fn relisted(&mut self, p: &Path, found: std::collections::HashSet<std::ffi::OsString>) -> bool {
+            let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return false };
+            let names = &mut self.0.get_mut(dir).unwrap().0;
+            names.extend(found);

Names are only ever added (relisted uses extend, wrote inserts). Nothing removes a name when a blob is deleted by LoadedBlob::invalidate, note(false, ..) or another process. If the driver refuses a blob, invalidate deletes it, and the rebuild is under KEEP so no new file is written, every later load of that name passes the listing. reload then opens a missing file, and Wine scans the whole folder on each lookup, the cost this PR removes, now on every lookup of that name. Removing the name in invalidate / note(false, ..) would close it.

<!-- greyfinch-sync:ivall/xcl:review-comment:4767198844 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3507#discussion_r4767198844). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T09:14:38Z. **Code review location:** `crates/xcl/src/hle/d3d12x/real.rs`; line 6605 ~~~~diff @@ -6572,7 +6572,65 @@ pub(crate) mod driver_cache { set(FileDispositionInfo, (&basic as *const FILE_DISPOSITION_INFO).cast(), std::mem::size_of_val(&basic) as u32) } + /// The file names of the folders `load` was asked about, from a first listing, with what + /// `write` added since. A name missing from a listing older than `NAMES_AGE` has the folder + /// listed again and its names added: another process (a preparation worker) may have written the file. + #[derive(Default)] + struct Names(std::collections::HashMap<PathBuf, (std::collections::HashSet<std::ffi::OsString>, std::time::Instant)>); + const NAMES_AGE: std::time::Duration = std::time::Duration::from_secs(10); + static NAMES: Mutex<Option<Names>> = Mutex::new(None); + + fn names_in(dir: &Path) -> std::collections::HashSet<std::ffi::OsString> { + std::fs::read_dir(dir).into_iter().flatten().flatten().map(|entry| entry.file_name()).collect() + } + + impl Names { + /// Whether `p` is missing; `None` when its folder is due another listing, for `relisted`. + fn missing(&mut self, p: &Path, now: std::time::Instant) -> Option<bool> { + let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return Some(false) }; + if !self.0.contains_key(dir) { + self.0.insert(dir.to_path_buf(), (names_in(dir), now)); + } + let (names, listed) = self.0.get_mut(dir).unwrap(); + if names.contains(name) || now.duration_since(*listed) < NAMES_AGE { + return Some(!names.contains(name)); + } + *listed = now; + None + } + + fn relisted(&mut self, p: &Path, found: std::collections::HashSet<std::ffi::OsString>) -> bool { + let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return false }; + let names = &mut self.0.get_mut(dir).unwrap().0; + names.extend(found); ~~~~ --- Names are only ever added (`relisted` uses `extend`, `wrote` inserts). Nothing removes a name when a blob is deleted by `LoadedBlob::invalidate`, `note(false, ..)` or another process. If the driver refuses a blob, `invalidate` deletes it, and the rebuild is under KEEP so no new file is written, every later `load` of that name passes the listing. `reload` then opens a missing file, and Wine scans the whole folder on each lookup, the cost this PR removes, now on every lookup of that name. Removing the name in `invalidate` / `note(false, ..)` would close it.
bmjask commented 2026-12-02 09:14:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T09:14:38Z.

Code review location: crates/xcl/src/hle/d3d12x/real.rs; line 6598

@@ -6572,7 +6572,65 @@ pub(crate) mod driver_cache {
         set(FileDispositionInfo, (&basic as *const FILE_DISPOSITION_INFO).cast(), std::mem::size_of_val(&basic) as u32)
     }
 
+    /// The file names of the folders `load` was asked about, from a first listing, with what
+    /// `write` added since. A name missing from a listing older than `NAMES_AGE` has the folder
+    /// listed again and its names added: another process (a preparation worker) may have written the file.
+    #[derive(Default)]
+    struct Names(std::collections::HashMap<PathBuf, (std::collections::HashSet<std::ffi::OsString>, std::time::Instant)>);
+    const NAMES_AGE: std::time::Duration = std::time::Duration::from_secs(10);
+    static NAMES: Mutex<Option<Names>> = Mutex::new(None);
+
+    fn names_in(dir: &Path) -> std::collections::HashSet<std::ffi::OsString> {
+        std::fs::read_dir(dir).into_iter().flatten().flatten().map(|entry| entry.file_name()).collect()
+    }
+
+    impl Names {
+        /// Whether `p` is missing; `None` when its folder is due another listing, for `relisted`.
+        fn missing(&mut self, p: &Path, now: std::time::Instant) -> Option<bool> {
+            let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return Some(false) };
+            if !self.0.contains_key(dir) {
+                self.0.insert(dir.to_path_buf(), (names_in(dir), now));
+            }
+            let (names, listed) = self.0.get_mut(dir).unwrap();
+            if names.contains(name) || now.duration_since(*listed) < NAMES_AGE {
+                return Some(!names.contains(name));
+            }
+            *listed = now;

Not certain about this one: missing sets *listed = now before the relist has run. Until it finishes and relisted merges it, other threads asking about other missing names get Some(true) from the old set. Thread A starts a relist that takes seconds on 79k files, and thread B asks about y.pso, written by another process 15 s ago. The timestamp looks fresh, so B is told it's missing, compiles in the driver, and doesn't re-check for another 10 s, although A's listing contains it.

<!-- greyfinch-sync:ivall/xcl:review-comment:4767198855 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3507#discussion_r4767198855). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T09:14:38Z. **Code review location:** `crates/xcl/src/hle/d3d12x/real.rs`; line 6598 ~~~~diff @@ -6572,7 +6572,65 @@ pub(crate) mod driver_cache { set(FileDispositionInfo, (&basic as *const FILE_DISPOSITION_INFO).cast(), std::mem::size_of_val(&basic) as u32) } + /// The file names of the folders `load` was asked about, from a first listing, with what + /// `write` added since. A name missing from a listing older than `NAMES_AGE` has the folder + /// listed again and its names added: another process (a preparation worker) may have written the file. + #[derive(Default)] + struct Names(std::collections::HashMap<PathBuf, (std::collections::HashSet<std::ffi::OsString>, std::time::Instant)>); + const NAMES_AGE: std::time::Duration = std::time::Duration::from_secs(10); + static NAMES: Mutex<Option<Names>> = Mutex::new(None); + + fn names_in(dir: &Path) -> std::collections::HashSet<std::ffi::OsString> { + std::fs::read_dir(dir).into_iter().flatten().flatten().map(|entry| entry.file_name()).collect() + } + + impl Names { + /// Whether `p` is missing; `None` when its folder is due another listing, for `relisted`. + fn missing(&mut self, p: &Path, now: std::time::Instant) -> Option<bool> { + let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return Some(false) }; + if !self.0.contains_key(dir) { + self.0.insert(dir.to_path_buf(), (names_in(dir), now)); + } + let (names, listed) = self.0.get_mut(dir).unwrap(); + if names.contains(name) || now.duration_since(*listed) < NAMES_AGE { + return Some(!names.contains(name)); + } + *listed = now; ~~~~ --- Not certain about this one: `missing` sets `*listed = now` before the relist has run. Until it finishes and `relisted` merges it, other threads asking about other missing names get `Some(true)` from the old set. Thread A starts a relist that takes seconds on 79k files, and thread B asks about `y.pso`, written by another process 15 s ago. The timestamp looks fresh, so B is told it's missing, compiles in the driver, and doesn't re-check for another 10 s, although A's listing contains it.
bmjask commented 2026-12-02 14:12:34 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T14:12:34Z.


@Prime1997 could you take a look at this one for review and merge? My automated review notes are above, if any.

<!-- greyfinch-sync:ivall/xcl:comment:7348165967 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3507#issuecomment-7348165967). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T14:12:34Z. --- @Prime1997 could you take a look at this one for review and merge? My automated review notes are above, if any.
Royalflamejlh commented 2026-12-02 20:39:21 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-12-02T20:39:21Z.

Code review location: crates/xcl/src/hle/d3d12x/real.rs; line 6620

@@ -6572,7 +6572,65 @@ pub(crate) mod driver_cache {
         set(FileDispositionInfo, (&basic as *const FILE_DISPOSITION_INFO).cast(), std::mem::size_of_val(&basic) as u32)
     }
 
+    /// The file names of the folders `load` was asked about, from a first listing, with what
+    /// `write` added since. A name missing from a listing older than `NAMES_AGE` has the folder
+    /// listed again and its names added: another process (a preparation worker) may have written the file.
+    #[derive(Default)]
+    struct Names(std::collections::HashMap<PathBuf, (std::collections::HashSet<std::ffi::OsString>, std::time::Instant)>);
+    const NAMES_AGE: std::time::Duration = std::time::Duration::from_secs(10);
+    static NAMES: Mutex<Option<Names>> = Mutex::new(None);
+
+    fn names_in(dir: &Path) -> std::collections::HashSet<std::ffi::OsString> {
+        std::fs::read_dir(dir).into_iter().flatten().flatten().map(|entry| entry.file_name()).collect()
+    }
+
+    impl Names {
+        /// Whether `p` is missing; `None` when its folder is due another listing, for `relisted`.
+        fn missing(&mut self, p: &Path, now: std::time::Instant) -> Option<bool> {
+            let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return Some(false) };
+            if !self.0.contains_key(dir) {
+                self.0.insert(dir.to_path_buf(), (names_in(dir), now));
+            }
+            let (names, listed) = self.0.get_mut(dir).unwrap();
+            if names.contains(name) || now.duration_since(*listed) < NAMES_AGE {
+                return Some(!names.contains(name));
+            }
+            *listed = now;
+            None
+        }
+
+        fn relisted(&mut self, p: &Path, found: std::collections::HashSet<std::ffi::OsString>) -> bool {
+            let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return false };
+            let names = &mut self.0.get_mut(dir).unwrap().0;
+            names.extend(found);
+            !names.contains(name)
+        }
+
+        fn wrote(&mut self, p: &Path) {
+            let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return };
+            if let Some((names, _)) = self.0.get_mut(dir) {
+                names.insert(name.to_os_string());
+            }
+        }
+    }
+
     pub fn load(p: &Path) -> Option<LoadedBlob> {
+        // (Wine lists the whole folder for an open of a name that is not there)
+        if crate::util::under_wine() {
+            let missing = NAMES.lock().unwrap().get_or_insert_default().missing(p, std::time::Instant::now());

True, and on purpose. The description gives it under Not tested: a blob another process writes is found up to 10 s late. Opening the file after a listing miss would bring back what this removes, because under Wine every miss is one listing of the folder (79,155 files in the measured run, 408,089 getdents64 calls in 20 s without the change). The re-checks that exist to see another process's write open the file: after a claim and after the permit wait (shaders.rs:2800, :2812). A late find costs one driver build and a rewrite of the same pipeline's blob, not a wrong blob. Left as is.

<!-- greyfinch-sync:ivall/xcl:review-comment:4775708636 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3507#discussion_r4775708636). Originally posted by [Royalflamejlh](https://github.com/Royalflamejlh) on 2026-12-02T20:39:21Z. **Code review location:** `crates/xcl/src/hle/d3d12x/real.rs`; line 6620 ~~~~diff @@ -6572,7 +6572,65 @@ pub(crate) mod driver_cache { set(FileDispositionInfo, (&basic as *const FILE_DISPOSITION_INFO).cast(), std::mem::size_of_val(&basic) as u32) } + /// The file names of the folders `load` was asked about, from a first listing, with what + /// `write` added since. A name missing from a listing older than `NAMES_AGE` has the folder + /// listed again and its names added: another process (a preparation worker) may have written the file. + #[derive(Default)] + struct Names(std::collections::HashMap<PathBuf, (std::collections::HashSet<std::ffi::OsString>, std::time::Instant)>); + const NAMES_AGE: std::time::Duration = std::time::Duration::from_secs(10); + static NAMES: Mutex<Option<Names>> = Mutex::new(None); + + fn names_in(dir: &Path) -> std::collections::HashSet<std::ffi::OsString> { + std::fs::read_dir(dir).into_iter().flatten().flatten().map(|entry| entry.file_name()).collect() + } + + impl Names { + /// Whether `p` is missing; `None` when its folder is due another listing, for `relisted`. + fn missing(&mut self, p: &Path, now: std::time::Instant) -> Option<bool> { + let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return Some(false) }; + if !self.0.contains_key(dir) { + self.0.insert(dir.to_path_buf(), (names_in(dir), now)); + } + let (names, listed) = self.0.get_mut(dir).unwrap(); + if names.contains(name) || now.duration_since(*listed) < NAMES_AGE { + return Some(!names.contains(name)); + } + *listed = now; + None + } + + fn relisted(&mut self, p: &Path, found: std::collections::HashSet<std::ffi::OsString>) -> bool { + let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return false }; + let names = &mut self.0.get_mut(dir).unwrap().0; + names.extend(found); + !names.contains(name) + } + + fn wrote(&mut self, p: &Path) { + let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return }; + if let Some((names, _)) = self.0.get_mut(dir) { + names.insert(name.to_os_string()); + } + } + } + pub fn load(p: &Path) -> Option<LoadedBlob> { + // (Wine lists the whole folder for an open of a name that is not there) + if crate::util::under_wine() { + let missing = NAMES.lock().unwrap().get_or_insert_default().missing(p, std::time::Instant::now()); ~~~~ --- True, and on purpose. The description gives it under **Not tested**: a blob another process writes is found up to 10 s late. Opening the file after a listing miss would bring back what this removes, because under Wine every miss is one listing of the folder (79,155 files in the measured run, 408,089 `getdents64` calls in 20 s without the change). The re-checks that exist to see another process's write open the file: after a claim and after the permit wait (`shaders.rs:2800`, `:2812`). A late find costs one driver build and a rewrite of the same pipeline's blob, not a wrong blob. Left as is.
Royalflamejlh commented 2026-12-02 20:39:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-12-02T20:39:24Z.

Code review location: crates/xcl/src/hle/d3d12x/real.rs; line 6584

@@ -6572,7 +6572,65 @@ pub(crate) mod driver_cache {
         set(FileDispositionInfo, (&basic as *const FILE_DISPOSITION_INFO).cast(), std::mem::size_of_val(&basic) as u32)
     }
 
+    /// The file names of the folders `load` was asked about, from a first listing, with what
+    /// `write` added since. A name missing from a listing older than `NAMES_AGE` has the folder
+    /// listed again and its names added: another process (a preparation worker) may have written the file.
+    #[derive(Default)]
+    struct Names(std::collections::HashMap<PathBuf, (std::collections::HashSet<std::ffi::OsString>, std::time::Instant)>);
+    const NAMES_AGE: std::time::Duration = std::time::Duration::from_secs(10);
+    static NAMES: Mutex<Option<Names>> = Mutex::new(None);
+
+    fn names_in(dir: &Path) -> std::collections::HashSet<std::ffi::OsString> {
+        std::fs::read_dir(dir).into_iter().flatten().flatten().map(|entry| entry.file_name()).collect()

Right. names_in now returns None when read_dir fails or any entry does. A folder whose first listing fails is not kept, and its files are opened as before. A relist that fails leaves the previous set as it was, and the file asked about is opened. New test a_folder_that_cannot_be_listed_has_its_files_opened, red without it. Head ab684f03.

<!-- greyfinch-sync:ivall/xcl:review-comment:4775709269 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3507#discussion_r4775709269). Originally posted by [Royalflamejlh](https://github.com/Royalflamejlh) on 2026-12-02T20:39:24Z. **Code review location:** `crates/xcl/src/hle/d3d12x/real.rs`; line 6584 ~~~~diff @@ -6572,7 +6572,65 @@ pub(crate) mod driver_cache { set(FileDispositionInfo, (&basic as *const FILE_DISPOSITION_INFO).cast(), std::mem::size_of_val(&basic) as u32) } + /// The file names of the folders `load` was asked about, from a first listing, with what + /// `write` added since. A name missing from a listing older than `NAMES_AGE` has the folder + /// listed again and its names added: another process (a preparation worker) may have written the file. + #[derive(Default)] + struct Names(std::collections::HashMap<PathBuf, (std::collections::HashSet<std::ffi::OsString>, std::time::Instant)>); + const NAMES_AGE: std::time::Duration = std::time::Duration::from_secs(10); + static NAMES: Mutex<Option<Names>> = Mutex::new(None); + + fn names_in(dir: &Path) -> std::collections::HashSet<std::ffi::OsString> { + std::fs::read_dir(dir).into_iter().flatten().flatten().map(|entry| entry.file_name()).collect() ~~~~ --- Right. `names_in` now returns `None` when `read_dir` fails or any entry does. A folder whose first listing fails is not kept, and its files are opened as before. A relist that fails leaves the previous set as it was, and the file asked about is opened. New test `a_folder_that_cannot_be_listed_has_its_files_opened`, red without it. Head `ab684f03`.
Royalflamejlh commented 2026-12-02 20:39:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-12-02T20:39:27Z.

Code review location: crates/xcl/src/hle/d3d12x/real.rs; line 6605

@@ -6572,7 +6572,65 @@ pub(crate) mod driver_cache {
         set(FileDispositionInfo, (&basic as *const FILE_DISPOSITION_INFO).cast(), std::mem::size_of_val(&basic) as u32)
     }
 
+    /// The file names of the folders `load` was asked about, from a first listing, with what
+    /// `write` added since. A name missing from a listing older than `NAMES_AGE` has the folder
+    /// listed again and its names added: another process (a preparation worker) may have written the file.
+    #[derive(Default)]
+    struct Names(std::collections::HashMap<PathBuf, (std::collections::HashSet<std::ffi::OsString>, std::time::Instant)>);
+    const NAMES_AGE: std::time::Duration = std::time::Duration::from_secs(10);
+    static NAMES: Mutex<Option<Names>> = Mutex::new(None);
+
+    fn names_in(dir: &Path) -> std::collections::HashSet<std::ffi::OsString> {
+        std::fs::read_dir(dir).into_iter().flatten().flatten().map(|entry| entry.file_name()).collect()
+    }
+
+    impl Names {
+        /// Whether `p` is missing; `None` when its folder is due another listing, for `relisted`.
+        fn missing(&mut self, p: &Path, now: std::time::Instant) -> Option<bool> {
+            let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return Some(false) };
+            if !self.0.contains_key(dir) {
+                self.0.insert(dir.to_path_buf(), (names_in(dir), now));
+            }
+            let (names, listed) = self.0.get_mut(dir).unwrap();
+            if names.contains(name) || now.duration_since(*listed) < NAMES_AGE {
+                return Some(!names.contains(name));
+            }
+            *listed = now;
+            None
+        }
+
+        fn relisted(&mut self, p: &Path, found: std::collections::HashSet<std::ffi::OsString>) -> bool {
+            let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return false };
+            let names = &mut self.0.get_mut(dir).unwrap().0;
+            names.extend(found);

Right. reload now takes a name out of the listing when its open finds no file (ErrorKind::NotFound, real.rs:6814), whoever deleted it: invalidate, note(false, ..) or another process. Such a name costs one open, and after that the listing answers for it again. New test a_blob_deleted_since_the_listing_is_missing_after_one_open, red without it. Head ab684f03.

<!-- greyfinch-sync:ivall/xcl:review-comment:4775709843 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3507#discussion_r4775709843). Originally posted by [Royalflamejlh](https://github.com/Royalflamejlh) on 2026-12-02T20:39:27Z. **Code review location:** `crates/xcl/src/hle/d3d12x/real.rs`; line 6605 ~~~~diff @@ -6572,7 +6572,65 @@ pub(crate) mod driver_cache { set(FileDispositionInfo, (&basic as *const FILE_DISPOSITION_INFO).cast(), std::mem::size_of_val(&basic) as u32) } + /// The file names of the folders `load` was asked about, from a first listing, with what + /// `write` added since. A name missing from a listing older than `NAMES_AGE` has the folder + /// listed again and its names added: another process (a preparation worker) may have written the file. + #[derive(Default)] + struct Names(std::collections::HashMap<PathBuf, (std::collections::HashSet<std::ffi::OsString>, std::time::Instant)>); + const NAMES_AGE: std::time::Duration = std::time::Duration::from_secs(10); + static NAMES: Mutex<Option<Names>> = Mutex::new(None); + + fn names_in(dir: &Path) -> std::collections::HashSet<std::ffi::OsString> { + std::fs::read_dir(dir).into_iter().flatten().flatten().map(|entry| entry.file_name()).collect() + } + + impl Names { + /// Whether `p` is missing; `None` when its folder is due another listing, for `relisted`. + fn missing(&mut self, p: &Path, now: std::time::Instant) -> Option<bool> { + let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return Some(false) }; + if !self.0.contains_key(dir) { + self.0.insert(dir.to_path_buf(), (names_in(dir), now)); + } + let (names, listed) = self.0.get_mut(dir).unwrap(); + if names.contains(name) || now.duration_since(*listed) < NAMES_AGE { + return Some(!names.contains(name)); + } + *listed = now; + None + } + + fn relisted(&mut self, p: &Path, found: std::collections::HashSet<std::ffi::OsString>) -> bool { + let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return false }; + let names = &mut self.0.get_mut(dir).unwrap().0; + names.extend(found); ~~~~ --- Right. `reload` now takes a name out of the listing when its open finds no file (`ErrorKind::NotFound`, `real.rs:6814`), whoever deleted it: `invalidate`, `note(false, ..)` or another process. Such a name costs one open, and after that the listing answers for it again. New test `a_blob_deleted_since_the_listing_is_missing_after_one_open`, red without it. Head `ab684f03`.
Royalflamejlh commented 2026-12-02 20:39:29 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-12-02T20:39:29Z.

Code review location: crates/xcl/src/hle/d3d12x/real.rs; line 6598

@@ -6572,7 +6572,65 @@ pub(crate) mod driver_cache {
         set(FileDispositionInfo, (&basic as *const FILE_DISPOSITION_INFO).cast(), std::mem::size_of_val(&basic) as u32)
     }
 
+    /// The file names of the folders `load` was asked about, from a first listing, with what
+    /// `write` added since. A name missing from a listing older than `NAMES_AGE` has the folder
+    /// listed again and its names added: another process (a preparation worker) may have written the file.
+    #[derive(Default)]
+    struct Names(std::collections::HashMap<PathBuf, (std::collections::HashSet<std::ffi::OsString>, std::time::Instant)>);
+    const NAMES_AGE: std::time::Duration = std::time::Duration::from_secs(10);
+    static NAMES: Mutex<Option<Names>> = Mutex::new(None);
+
+    fn names_in(dir: &Path) -> std::collections::HashSet<std::ffi::OsString> {
+        std::fs::read_dir(dir).into_iter().flatten().flatten().map(|entry| entry.file_name()).collect()
+    }
+
+    impl Names {
+        /// Whether `p` is missing; `None` when its folder is due another listing, for `relisted`.
+        fn missing(&mut self, p: &Path, now: std::time::Instant) -> Option<bool> {
+            let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return Some(false) };
+            if !self.0.contains_key(dir) {
+                self.0.insert(dir.to_path_buf(), (names_in(dir), now));
+            }
+            let (names, listed) = self.0.get_mut(dir).unwrap();
+            if names.contains(name) || now.duration_since(*listed) < NAMES_AGE {
+                return Some(!names.contains(name));
+            }
+            *listed = now;

True, and on purpose. Setting the time first is what stops every other thread from listing the folder at once, which takes seconds each under Wine at that size. While one relist runs, the others answer from the previous listing, so the 10 s can stretch by as long as that listing takes. It is the same trade as the first point, and the commit message says so ("the other threads answer from the previous one meanwhile"). Left as is.

<!-- greyfinch-sync:ivall/xcl:review-comment:4775710500 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3507#discussion_r4775710500). Originally posted by [Royalflamejlh](https://github.com/Royalflamejlh) on 2026-12-02T20:39:29Z. **Code review location:** `crates/xcl/src/hle/d3d12x/real.rs`; line 6598 ~~~~diff @@ -6572,7 +6572,65 @@ pub(crate) mod driver_cache { set(FileDispositionInfo, (&basic as *const FILE_DISPOSITION_INFO).cast(), std::mem::size_of_val(&basic) as u32) } + /// The file names of the folders `load` was asked about, from a first listing, with what + /// `write` added since. A name missing from a listing older than `NAMES_AGE` has the folder + /// listed again and its names added: another process (a preparation worker) may have written the file. + #[derive(Default)] + struct Names(std::collections::HashMap<PathBuf, (std::collections::HashSet<std::ffi::OsString>, std::time::Instant)>); + const NAMES_AGE: std::time::Duration = std::time::Duration::from_secs(10); + static NAMES: Mutex<Option<Names>> = Mutex::new(None); + + fn names_in(dir: &Path) -> std::collections::HashSet<std::ffi::OsString> { + std::fs::read_dir(dir).into_iter().flatten().flatten().map(|entry| entry.file_name()).collect() + } + + impl Names { + /// Whether `p` is missing; `None` when its folder is due another listing, for `relisted`. + fn missing(&mut self, p: &Path, now: std::time::Instant) -> Option<bool> { + let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return Some(false) }; + if !self.0.contains_key(dir) { + self.0.insert(dir.to_path_buf(), (names_in(dir), now)); + } + let (names, listed) = self.0.get_mut(dir).unwrap(); + if names.contains(name) || now.duration_since(*listed) < NAMES_AGE { + return Some(!names.contains(name)); + } + *listed = now; ~~~~ --- True, and on purpose. Setting the time first is what stops every other thread from listing the folder at once, which takes seconds each under Wine at that size. While one relist runs, the others answer from the previous listing, so the 10 s can stretch by as long as that listing takes. It is the same trade as the first point, and the commit message says so ("the other threads answer from the previous one meanwhile"). Left as is.
bmjask commented 2026-12-02 20:54:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T20:54:44Z.

Review: COMMENTED


Review of ab684f03: 3 finding(s) (3 medium), most severe first.

  1. Medium crates/xcl/src/shaders.rs:2768: see below.
  2. Medium crates/xcl/src/hle/d3d12x/real.rs:6405: see below.
  3. Medium crates/xcl/src/hle/d3d12x/real.rs:6815: reload's NotFound path calls gone() after the open fails without any ordering check, so it can erase a name a concurrent write in the same process just added, and the file then reads as missing until the next relist. (inline)

On lines outside the diff:

  1. Medium crates/xcl/src/shaders.rs:2768: The pre-claim over_cap early return (and the warm_blobs verified shortcut above it) now depends on the listing-backed load, so an over-cap pipeline whose blob another process wrote since the listing is rejected with the size-limit error before the claim path's new reload re-check is reached. Under Wine with XCL_PIPELINE_MAX_KB set, process B writes the blob for over-cap pipeline P. Within 10 s, process A's Pipelines reaches P, load answers None from the old listing, cached.is_none() && over_cap is true, and A returns Err("Compute DXIL exceeds the native pipeline size limit") and counts it as capped, where before it would have loaded B's blob. Doing the reload check before the over-cap rejection would fix it.

  2. Medium crates/xcl/src/hle/d3d12x/real.rs:6405: Runtime cache lookups (compute 6405; graphics 8325, 9614, 9723, 11164) now trust a folder listing up to 10 s old with no reload fallback, so a blob that a preparation worker wrote since the last listing is reported missing and the pipeline is compiled from scratch. Under Wine, with the listing from t=0, a worker writes compute blob X at t=3 and the title asks for X at t=8: missing() returns Some(true), load returns None, and the title does a full driver compile (5–30 s by the module's own notes) instead of using the blob, then writes the same file again. Falling back to a real open when the listing says missing, at least on the runtime path, would keep the speed-up without the misses.


These findings come from an AI-assisted review (Claude Code) and focus on correctness. Each is a candidate; please check it before acting on it.

<!-- greyfinch-sync:ivall/xcl:review:6158844284 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3507#pullrequestreview-6158844284). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T20:54:44Z. **Review:** COMMENTED --- Review of `ab684f03`: 3 finding(s) (3 medium), most severe first. 1. **Medium** `crates/xcl/src/shaders.rs:2768`: see below. 2. **Medium** `crates/xcl/src/hle/d3d12x/real.rs:6405`: see below. 3. **Medium** `crates/xcl/src/hle/d3d12x/real.rs:6815`: `reload`'s NotFound path calls `gone()` after the open fails without any ordering check, so it can erase a name a concurrent `write` in the same process just added, and the file then reads as missing until the next relist. (inline) **On lines outside the diff:** 1. **Medium** `crates/xcl/src/shaders.rs:2768`: The pre-claim `over_cap` early return (and the warm_blobs `verified` shortcut above it) now depends on the listing-backed `load`, so an over-cap pipeline whose blob another process wrote since the listing is rejected with the size-limit error before the claim path's new `reload` re-check is reached. Under Wine with XCL_PIPELINE_MAX_KB set, process B writes the blob for over-cap pipeline P. Within 10 s, process A's `Pipelines` reaches P, `load` answers None from the old listing, `cached.is_none() && over_cap` is true, and A returns Err("Compute DXIL exceeds the native pipeline size limit") and counts it as capped, where before it would have loaded B's blob. Doing the `reload` check before the over-cap rejection would fix it. 2. **Medium** `crates/xcl/src/hle/d3d12x/real.rs:6405`: Runtime cache lookups (compute 6405; graphics 8325, 9614, 9723, 11164) now trust a folder listing up to 10 s old with no `reload` fallback, so a blob that a preparation worker wrote since the last listing is reported missing and the pipeline is compiled from scratch. Under Wine, with the listing from t=0, a worker writes compute blob X at t=3 and the title asks for X at t=8: `missing()` returns Some(true), `load` returns None, and the title does a full driver compile (5–30 s by the module's own notes) instead of using the blob, then writes the same file again. Falling back to a real open when the listing says missing, at least on the runtime path, would keep the speed-up without the misses. --- _These findings come from an AI-assisted review (Claude Code) and focus on correctness. Each is a candidate; please check it before acting on it._
bmjask commented 2026-12-02 20:54:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T20:54:44Z.

Code review location: crates/xcl/src/hle/d3d12x/real.rs; line 6815

@@ -6739,8 +6807,16 @@ pub(crate) mod driver_cache {
                 .custom_flags(FILE_FLAG_OPEN_REPARSE_POINT)
                 .open(p)
         };
-        let (mut file, invalidatable) = open(GENERIC_READ | DELETE).map(|f| (f, true))
-            .or_else(|_| open(GENERIC_READ).map(|f| (f, false))).ok()?;
+        let opened = open(GENERIC_READ | DELETE).map(|f| (f, true)).or_else(|_| open(GENERIC_READ).map(|f| (f, false)));
+        let (mut file, invalidatable) = match opened {
+            Ok(opened) => opened,
+            Err(e) => {
+                if e.kind() == std::io::ErrorKind::NotFound {
+                    if let Some(names) = NAMES.lock().unwrap().as_mut() { names.gone(p); }

Medium: reload's NotFound path calls gone() after the open fails without any ordering check, so it can erase a name a concurrent write in the same process just added, and the file then reads as missing until the next relist. Thread A's open of P fails with NotFound, thread B renames tmp to P and calls wrote(P), then A takes NAMES and calls gone(P). For up to 10 s, load(P) returns Some(true) from missing and rebuilds the pipeline whenever the in-memory blob cache misses. A per-name generation (or rechecking existence under the lock) would prevent it.

<!-- greyfinch-sync:ivall/xcl:review-comment:4775913728 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3507#discussion_r4775913728). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T20:54:44Z. **Code review location:** `crates/xcl/src/hle/d3d12x/real.rs`; line 6815 ~~~~diff @@ -6739,8 +6807,16 @@ pub(crate) mod driver_cache { .custom_flags(FILE_FLAG_OPEN_REPARSE_POINT) .open(p) }; - let (mut file, invalidatable) = open(GENERIC_READ | DELETE).map(|f| (f, true)) - .or_else(|_| open(GENERIC_READ).map(|f| (f, false))).ok()?; + let opened = open(GENERIC_READ | DELETE).map(|f| (f, true)).or_else(|_| open(GENERIC_READ).map(|f| (f, false))); + let (mut file, invalidatable) = match opened { + Ok(opened) => opened, + Err(e) => { + if e.kind() == std::io::ErrorKind::NotFound { + if let Some(names) = NAMES.lock().unwrap().as_mut() { names.gone(p); } ~~~~ --- **Medium**: `reload`'s NotFound path calls `gone()` after the open fails without any ordering check, so it can erase a name a concurrent `write` in the same process just added, and the file then reads as missing until the next relist. Thread A's open of P fails with NotFound, thread B renames tmp to P and calls `wrote(P)`, then A takes NAMES and calls `gone(P)`. For up to 10 s, `load(P)` returns Some(true) from `missing` and rebuilds the pipeline whenever the in-memory blob cache misses. A per-name generation (or rechecking existence under the lock) would prevent it.
Foniass commented 2026-12-02 20:57:06 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-02T20:57:06Z.


Follow-up review of ab684f03, since 716036b (code reading only, not a merge-check; PR description red) · 2 medium, 1 nit

In short: Since 716036be the commit has two additions. A folder whose listing fails is no longer cached, and its files are opened as before. A name whose open returns NotFound, such as a refused blob that was deleted, is removed from the listing. Both come with tests, and the earlier point about invalidate() is fixed. The first listing still runs under the global lock, and the claim re-checks are still untested. The xcl-smoke pair is for 716036be (PR description is red), and Tested has only filtered --lib runs under Wine, no whole-suite run on Windows.

Medium

  1. The first listing of a folder still holds the NAMES lock (still open). Names::missing calls names_in(dir) (real.rs ~6747) while load holds the global NAMES mutex (~6783). With about 79k files under Wine, every xcl-pso thread and the title's own load calls wait on that listing once per folder, and the cost is unmeasured. Fix: do it the way the relist already does: release the lock, list, then insert.

  2. Nothing checks that the claim re-checks use reload (still open).

    • The earlier High finding was fixed by changing load to reload at shaders.rs ~2800 and ~2812.
    • a_reload_finds_a_blob_written_since_the_listing only shows that reload reads a fresh file. If either call site went back to load, no test would fail.

    Fix: add a test at the Pipelines level that writes the blob between the first lookup and the claim re-check.

Nit

  1. The description is stale. What is in it still says "One new test of Names", but there are four. Tested says nothing about this head's changes or their two tests.
Checked and fine
  • Earlier finding fixed: a blob that invalidate() removed stayed in the set. A NotFound open now removes the name through Names::gone (real.rs ~6812-6816), so it costs one open, not one per lookup. Covered by a_blob_deleted_since_the_listing_is_missing_after_one_open.
  • Earlier fixes still hold: the claim and permit re-checks call reload, the relist runs outside NAMES and only adds names, and no PathBuf is built per lookup.
  • If read_dir or any entry fails, names_in returns None. missing then answers Some(false) without caching, so the file is opened. Covered by a_folder_that_cannot_be_listed_has_its_files_opened.
  • gone runs only on NotFound. A delete-pending file or a sharing error leaves the set alone.
  • On Windows nothing changes: load uses NAMES only under Wine.
  • The new tests use separate temp folders. Not a duplicate: #3506 makes the same kind of change for the receipt import.

Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7358572770 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3507#issuecomment-7358572770). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-02T20:57:06Z. --- **Follow-up review** of `ab684f03`, since `716036b` (code reading only, not a merge-check; `PR description` red) · 2 medium, 1 nit **In short:** Since `716036be` the commit has two additions. A folder whose listing fails is no longer cached, and its files are opened as before. A name whose open returns `NotFound`, such as a refused blob that was deleted, is removed from the listing. Both come with tests, and the earlier point about `invalidate()` is fixed. The first listing still runs under the global lock, and the claim re-checks are still untested. The `xcl-smoke` pair is for `716036be` (`PR description` is red), and **Tested** has only filtered `--lib` runs under Wine, no whole-suite run on Windows. #### Medium 1. **The first listing of a folder still holds the `NAMES` lock (still open).** `Names::missing` calls `names_in(dir)` (`real.rs` ~6747) while `load` holds the global `NAMES` mutex (~6783). With about 79k files under Wine, every `xcl-pso` thread and the title's own `load` calls wait on that listing once per folder, and the cost is unmeasured. Fix: do it the way the relist already does: release the lock, list, then insert. 2. **Nothing checks that the claim re-checks use `reload` (still open).** - The earlier High finding was fixed by changing `load` to `reload` at `shaders.rs` ~2800 and ~2812. - `a_reload_finds_a_blob_written_since_the_listing` only shows that `reload` reads a fresh file. If either call site went back to `load`, no test would fail. Fix: add a test at the `Pipelines` level that writes the blob between the first lookup and the claim re-check. #### Nit 3. **The description is stale.** **What is in it** still says "One new test of `Names`", but there are four. **Tested** says nothing about this head's changes or their two tests. <details><summary>Checked and fine</summary> - Earlier finding fixed: a blob that `invalidate()` removed stayed in the set. A `NotFound` open now removes the name through `Names::gone` (`real.rs` ~6812-6816), so it costs one open, not one per lookup. Covered by `a_blob_deleted_since_the_listing_is_missing_after_one_open`. - Earlier fixes still hold: the claim and permit re-checks call `reload`, the relist runs outside `NAMES` and only adds names, and no `PathBuf` is built per lookup. - If `read_dir` or any entry fails, `names_in` returns `None`. `missing` then answers `Some(false)` without caching, so the file is opened. Covered by `a_folder_that_cannot_be_listed_has_its_files_opened`. - `gone` runs only on `NotFound`. A delete-pending file or a sharing error leaves the set alone. - On Windows nothing changes: `load` uses `NAMES` only under Wine. - The new tests use separate temp folders. Not a duplicate: #3506 makes the same kind of change for the receipt import. </details> <sub>Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point.</sub>
Royalflamejlh commented 2026-12-02 21:22:37 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-12-02T21:22:37Z.

Code review location: crates/xcl/src/hle/d3d12x/real.rs; line 6815

@@ -6739,8 +6807,16 @@ pub(crate) mod driver_cache {
                 .custom_flags(FILE_FLAG_OPEN_REPARSE_POINT)
                 .open(p)
         };
-        let (mut file, invalidatable) = open(GENERIC_READ | DELETE).map(|f| (f, true))
-            .or_else(|_| open(GENERIC_READ).map(|f| (f, false))).ok()?;
+        let opened = open(GENERIC_READ | DELETE).map(|f| (f, true)).or_else(|_| open(GENERIC_READ).map(|f| (f, false)));
+        let (mut file, invalidatable) = match opened {
+            Ok(opened) => opened,
+            Err(e) => {
+                if e.kind() == std::io::ErrorKind::NotFound {
+                    if let Some(names) = NAMES.lock().unwrap().as_mut() { names.gone(p); }

Right, that order can happen. write now counts the files this process wrote (WRITES, bumped after the rename and before wrote). reload reads the count before its open, and on NotFound takes the name out only when no write came in between (not_found). New test a_blob_written_while_another_thread_opened_it_stays_listed, red without the check. Head 6a1d82eb.

<!-- greyfinch-sync:ivall/xcl:review-comment:4776248881 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3507#discussion_r4776248881). Originally posted by [Royalflamejlh](https://github.com/Royalflamejlh) on 2026-12-02T21:22:37Z. **Code review location:** `crates/xcl/src/hle/d3d12x/real.rs`; line 6815 ~~~~diff @@ -6739,8 +6807,16 @@ pub(crate) mod driver_cache { .custom_flags(FILE_FLAG_OPEN_REPARSE_POINT) .open(p) }; - let (mut file, invalidatable) = open(GENERIC_READ | DELETE).map(|f| (f, true)) - .or_else(|_| open(GENERIC_READ).map(|f| (f, false))).ok()?; + let opened = open(GENERIC_READ | DELETE).map(|f| (f, true)).or_else(|_| open(GENERIC_READ).map(|f| (f, false))); + let (mut file, invalidatable) = match opened { + Ok(opened) => opened, + Err(e) => { + if e.kind() == std::io::ErrorKind::NotFound { + if let Some(names) = NAMES.lock().unwrap().as_mut() { names.gone(p); } ~~~~ --- Right, that order can happen. `write` now counts the files this process wrote (`WRITES`, bumped after the rename and before `wrote`). `reload` reads the count before its open, and on `NotFound` takes the name out only when no write came in between (`not_found`). New test `a_blob_written_while_another_thread_opened_it_stays_listed`, red without the check. Head `6a1d82eb`.
Royalflamejlh commented 2026-12-02 21:22:54 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-12-02T21:22:54Z.


On the two points outside the diff, at head 6a1d82eb:

  • shaders.rs:2768, the over-cap return before the claim: true, and it costs nothing. The cap is there so that the pass skips a pipeline it should not build. If another process has written that blob in the last 10 s, the blob is on disk for the title either way, and the pass has nothing to build. Left as is.
  • real.rs:6405 and the graphics lookups on the runtime path: this is the same point as the first review's, answered in its thread. A blob written in the last 10 s is missed on purpose. An open after every listing miss is the cost this PR removes. Left as is.

The inline point is answered in its thread.

<!-- greyfinch-sync:ivall/xcl:comment:7359198355 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3507#issuecomment-7359198355). Originally posted by [Royalflamejlh](https://github.com/Royalflamejlh) on 2026-12-02T21:22:54Z. --- On the two points outside the diff, at head `6a1d82eb`: - **`shaders.rs:2768`, the over-cap return before the claim:** true, and it costs nothing. The cap is there so that the pass skips a pipeline it should not build. If another process has written that blob in the last 10 s, the blob is on disk for the title either way, and the pass has nothing to build. Left as is. - **`real.rs:6405` and the graphics lookups on the runtime path:** this is the same point as the first review's, answered in its thread. A blob written in the last 10 s is missed on purpose. An open after every listing miss is the cost this PR removes. Left as is. The inline point is answered in its thread.
Foniass commented 2026-12-02 21:24:13 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-02T21:24:13Z.


Follow-up review of 6a1d82eb, since ab684f03 (code reading only, not a merge-check; PR description red) · 2 medium, 1 nit

In short: This push closes a race in the driver blob cache's listing. An open that finds no file now removes the name only if this process wrote no file since that open (WRITES, not_found in real.rs), so a blob written by another thread meanwhile stays listed. A test covers it. The three earlier points are unchanged. The smoke pair names 716036be.

Medium

  1. The first listing of a folder still holds the NAMES lock (still open). Names::missing calls names_in(dir) while load holds the global NAMES mutex. With about 79k files under Wine, every xcl-pso thread and the title's own load calls wait on that listing once per folder, and the cost is unmeasured. Fix: list the way the relist already does: release the lock, list, then insert.
  2. Nothing checks that the claim re-checks use reload (still open). If either reload call in shaders.rs (~2800, ~2812) went back to load, no test would fail. Add a test at the Pipelines level that writes the blob between the first lookup and the claim re-check.

Nit

  1. The description is stale (still open). What is in it still says "One new test of Names", and there are five now. Tested says nothing about the changes since 716036be.
Checked and fine
  • The new race check: not_found reads WRITES while holding NAMES, and write bumps WRITES before it takes NAMES to add the name. A write that lands after the check re-adds the name through wrote, so it is never lost. A write to an unrelated file only skips one removal, which costs one more open later.
  • a_blob_written_while_another_thread_opened_it_stays_listed replays that order and checks the name stays listed.
  • The earlier fixes (NotFound removes the name, a folder that cannot be listed is not cached, Windows unchanged) still hold.

Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7359229902 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3507#issuecomment-7359229902). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-02T21:24:13Z. --- **Follow-up review** of `6a1d82eb`, since `ab684f03` (code reading only, not a merge-check; `PR description` red) · 2 medium, 1 nit **In short:** This push closes a race in the driver blob cache's listing. An open that finds no file now removes the name only if this process wrote no file since that open (`WRITES`, `not_found` in `real.rs`), so a blob written by another thread meanwhile stays listed. A test covers it. The three earlier points are unchanged. The smoke pair names `716036be`. #### Medium 1. **The first listing of a folder still holds the `NAMES` lock (still open).** `Names::missing` calls `names_in(dir)` while `load` holds the global `NAMES` mutex. With about 79k files under Wine, every `xcl-pso` thread and the title's own `load` calls wait on that listing once per folder, and the cost is unmeasured. Fix: list the way the relist already does: release the lock, list, then insert. 2. **Nothing checks that the claim re-checks use `reload` (still open).** If either `reload` call in `shaders.rs` (~2800, ~2812) went back to `load`, no test would fail. Add a test at the `Pipelines` level that writes the blob between the first lookup and the claim re-check. #### Nit 3. **The description is stale (still open).** **What is in it** still says "One new test of `Names`", and there are five now. **Tested** says nothing about the changes since `716036be`. <details><summary>Checked and fine</summary> - The new race check: `not_found` reads `WRITES` while holding `NAMES`, and `write` bumps `WRITES` before it takes `NAMES` to add the name. A write that lands after the check re-adds the name through `wrote`, so it is never lost. A write to an unrelated file only skips one removal, which costs one more open later. - `a_blob_written_while_another_thread_opened_it_stays_listed` replays that order and checks the name stays listed. - The earlier fixes (`NotFound` removes the name, a folder that cannot be listed is not cached, Windows unchanged) still hold. </details> <sub>Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point.</sub>
Royalflamejlh commented 2026-12-02 21:25:34 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-12-02T21:25:34Z.


@Foniass thanks. At 6a1d82eb:

  • The first listing under the NAMES lock: kept on purpose. It happens once per folder. While it runs, a thread that waits loses at most that one listing. Without the wait it would open its file, and under Wine every open of a missing name is a listing of its own, which is what each thread pays on main. The relist runs outside the lock because it comes back every 10 s. Its trade is that the other threads answer from the old set meanwhile, and here that old set does not exist yet. Not changed.
  • A test that the claim re-checks use reload: this would be a test of Pipelines with a device and a second writer between its two lookups. It is coverage, not a defect, and I have not added it. The two calls are in shaders.rs (~2800, ~2812) and the commit message names them.
  • Description: brought up to date with this head: the five tests, what changed since 716036be, and the smoke pair once it has run.
<!-- greyfinch-sync:ivall/xcl:comment:7359262112 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3507#issuecomment-7359262112). Originally posted by [Royalflamejlh](https://github.com/Royalflamejlh) on 2026-12-02T21:25:34Z. --- @Foniass thanks. At `6a1d82eb`: - **The first listing under the `NAMES` lock:** kept on purpose. It happens once per folder. While it runs, a thread that waits loses at most that one listing. Without the wait it would open its file, and under Wine every open of a missing name is a listing of its own, which is what each thread pays on `main`. The relist runs outside the lock because it comes back every 10 s. Its trade is that the other threads answer from the old set meanwhile, and here that old set does not exist yet. Not changed. - **A test that the claim re-checks use `reload`:** this would be a test of `Pipelines` with a device and a second writer between its two lookups. It is coverage, not a defect, and I have not added it. The two calls are in `shaders.rs` (~2800, ~2812) and the commit message names them. - **Description:** brought up to date with this head: the five tests, what changed since `716036be`, and the smoke pair once it has run.
bmjask commented 2026-12-02 21:40:12 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T21:40:12Z.

Review: COMMENTED


Review of 6a1d82eb: 1 finding(s) (1 medium), most severe first.

Re-review at 6a1d82eb. The over-cap early return and the reload/gone race from the ab684f03 review weren't flagged again; the WRITES counter covers the race. Still open: title-side load callers in real.rs have no reload re-check, so a blob another process wrote within the last 10 s is treated as missing and rebuilt. One new item below.

  1. Medium crates/xcl/src/hle/d3d12x/real.rs:6753: The listing set compares exact OsStrings, but the Wine open it stands in for matches names case-insensitively (sibling #3506 now lowercases its listing for this reason). (inline)

These findings come from an AI-assisted review (Claude Code) and focus on correctness. Each is a candidate; please check it before acting on it.

<!-- greyfinch-sync:ivall/xcl:review:6159497176 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3507#pullrequestreview-6159497176). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T21:40:12Z. **Review:** COMMENTED --- Review of `6a1d82eb`: 1 finding(s) (1 medium), most severe first. Re-review at `6a1d82eb`. The over-cap early return and the `reload`/`gone` race from the `ab684f03` review weren't flagged again; the `WRITES` counter covers the race. Still open: title-side `load` callers in real.rs have no `reload` re-check, so a blob another process wrote within the last 10 s is treated as missing and rebuilt. One new item below. 1. **Medium** `crates/xcl/src/hle/d3d12x/real.rs:6753`: The listing set compares exact `OsString`s, but the Wine open it stands in for matches names case-insensitively (sibling #3506 now lowercases its listing for this reason). (inline) --- _These findings come from an AI-assisted review (Claude Code) and focus on correctness. Each is a candidate; please check it before acting on it._
bmjask commented 2026-12-02 21:40:12 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T21:40:12Z.

Code review location: crates/xcl/src/hle/d3d12x/real.rs; line 6753

@@ -6725,7 +6725,87 @@ pub(crate) mod driver_cache {
         set(FileDispositionInfo, (&basic as *const FILE_DISPOSITION_INFO).cast(), std::mem::size_of_val(&basic) as u32)
     }
 
+    /// The file names of the folders `load` was asked about, from a first listing, with what
+    /// `write` added since. A name missing from a listing older than `NAMES_AGE` has the folder
+    /// listed again and its names added: another process (a preparation worker) may have written the file.
+    #[derive(Default)]
+    struct Names(std::collections::HashMap<PathBuf, (std::collections::HashSet<std::ffi::OsString>, std::time::Instant)>);
+    const NAMES_AGE: std::time::Duration = std::time::Duration::from_secs(10);
+    static NAMES: Mutex<Option<Names>> = Mutex::new(None);
+    /// files this process has written, for `not_found`
+    static WRITES: AtomicU64 = AtomicU64::new(0);
+
+    /// None when the listing fails: then the file is opened.
+    fn names_in(dir: &Path) -> Option<std::collections::HashSet<std::ffi::OsString>> {
+        let entries = std::fs::read_dir(dir).ok()?.collect::<std::io::Result<Vec<_>>>().ok()?;
+        Some(entries.iter().map(|entry| entry.file_name()).collect())
+    }
+
+    impl Names {
+        /// Whether `p` is missing; `None` when its folder is due another listing, for `relisted`.
+        fn missing(&mut self, p: &Path, now: std::time::Instant) -> Option<bool> {
+            let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return Some(false) };
+            if !self.0.contains_key(dir) {
+                let Some(names) = names_in(dir) else { return Some(false) };
+                self.0.insert(dir.to_path_buf(), (names, now));
+            }
+            let (names, listed) = self.0.get_mut(dir).unwrap();
+            if names.contains(name) || now.duration_since(*listed) < NAMES_AGE {

Medium: The listing set compares exact OsStrings, but the Wine open it stands in for matches names case-insensitively (sibling #3506 now lowercases its listing for this reason). A cache file stored on the Linux file system as 0123ABCD...-1f-0.pso (copied or renamed by another tool, or written by an older build) is opened today because Wine folds case. With this PR, names.contains("0123abcd...-1f-0.pso") is false, so the blob is never used and the pipeline is compiled from scratch on every run. Lowercasing both the listing and the lookup, as #3506 does, would keep the old behaviour.

<!-- greyfinch-sync:ivall/xcl:review-comment:4776453846 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3507#discussion_r4776453846). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T21:40:12Z. **Code review location:** `crates/xcl/src/hle/d3d12x/real.rs`; line 6753 ~~~~diff @@ -6725,7 +6725,87 @@ pub(crate) mod driver_cache { set(FileDispositionInfo, (&basic as *const FILE_DISPOSITION_INFO).cast(), std::mem::size_of_val(&basic) as u32) } + /// The file names of the folders `load` was asked about, from a first listing, with what + /// `write` added since. A name missing from a listing older than `NAMES_AGE` has the folder + /// listed again and its names added: another process (a preparation worker) may have written the file. + #[derive(Default)] + struct Names(std::collections::HashMap<PathBuf, (std::collections::HashSet<std::ffi::OsString>, std::time::Instant)>); + const NAMES_AGE: std::time::Duration = std::time::Duration::from_secs(10); + static NAMES: Mutex<Option<Names>> = Mutex::new(None); + /// files this process has written, for `not_found` + static WRITES: AtomicU64 = AtomicU64::new(0); + + /// None when the listing fails: then the file is opened. + fn names_in(dir: &Path) -> Option<std::collections::HashSet<std::ffi::OsString>> { + let entries = std::fs::read_dir(dir).ok()?.collect::<std::io::Result<Vec<_>>>().ok()?; + Some(entries.iter().map(|entry| entry.file_name()).collect()) + } + + impl Names { + /// Whether `p` is missing; `None` when its folder is due another listing, for `relisted`. + fn missing(&mut self, p: &Path, now: std::time::Instant) -> Option<bool> { + let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return Some(false) }; + if !self.0.contains_key(dir) { + let Some(names) = names_in(dir) else { return Some(false) }; + self.0.insert(dir.to_path_buf(), (names, now)); + } + let (names, listed) = self.0.get_mut(dir).unwrap(); + if names.contains(name) || now.duration_since(*listed) < NAMES_AGE { ~~~~ --- **Medium**: The listing set compares exact `OsString`s, but the Wine open it stands in for matches names case-insensitively (sibling #3506 now lowercases its listing for this reason). A cache file stored on the Linux file system as `0123ABCD...-1f-0.pso` (copied or renamed by another tool, or written by an older build) is opened today because Wine folds case. With this PR, `names.contains("0123abcd...-1f-0.pso")` is false, so the blob is never used and the pipeline is compiled from scratch on every run. Lowercasing both the listing and the lookup, as #3506 does, would keep the old behaviour.
Royalflamejlh commented 2026-12-02 21:58:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-12-02T21:58:24Z.

Code review location: crates/xcl/src/hle/d3d12x/real.rs; line 6753

@@ -6725,7 +6725,87 @@ pub(crate) mod driver_cache {
         set(FileDispositionInfo, (&basic as *const FILE_DISPOSITION_INFO).cast(), std::mem::size_of_val(&basic) as u32)
     }
 
+    /// The file names of the folders `load` was asked about, from a first listing, with what
+    /// `write` added since. A name missing from a listing older than `NAMES_AGE` has the folder
+    /// listed again and its names added: another process (a preparation worker) may have written the file.
+    #[derive(Default)]
+    struct Names(std::collections::HashMap<PathBuf, (std::collections::HashSet<std::ffi::OsString>, std::time::Instant)>);
+    const NAMES_AGE: std::time::Duration = std::time::Duration::from_secs(10);
+    static NAMES: Mutex<Option<Names>> = Mutex::new(None);
+    /// files this process has written, for `not_found`
+    static WRITES: AtomicU64 = AtomicU64::new(0);
+
+    /// None when the listing fails: then the file is opened.
+    fn names_in(dir: &Path) -> Option<std::collections::HashSet<std::ffi::OsString>> {
+        let entries = std::fs::read_dir(dir).ok()?.collect::<std::io::Result<Vec<_>>>().ok()?;
+        Some(entries.iter().map(|entry| entry.file_name()).collect())
+    }
+
+    impl Names {
+        /// Whether `p` is missing; `None` when its folder is due another listing, for `relisted`.
+        fn missing(&mut self, p: &Path, now: std::time::Instant) -> Option<bool> {
+            let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return Some(false) };
+            if !self.0.contains_key(dir) {
+                let Some(names) = names_in(dir) else { return Some(false) };
+                self.0.insert(dir.to_path_buf(), (names, now));
+            }
+            let (names, listed) = self.0.get_mut(dir).unwrap();
+            if names.contains(name) || now.duration_since(*listed) < NAMES_AGE {

Changed, as in #3506: names_in now lower-cases each name it lists. The names it is compared with are lower-case already, because driver_cache::name and the graphics name are made with lower-case hex. New test a_blob_stored_in_upper_case_is_listed, red without it. Head 644ed3e7.

<!-- greyfinch-sync:ivall/xcl:review-comment:4776670992 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3507#discussion_r4776670992). Originally posted by [Royalflamejlh](https://github.com/Royalflamejlh) on 2026-12-02T21:58:24Z. **Code review location:** `crates/xcl/src/hle/d3d12x/real.rs`; line 6753 ~~~~diff @@ -6725,7 +6725,87 @@ pub(crate) mod driver_cache { set(FileDispositionInfo, (&basic as *const FILE_DISPOSITION_INFO).cast(), std::mem::size_of_val(&basic) as u32) } + /// The file names of the folders `load` was asked about, from a first listing, with what + /// `write` added since. A name missing from a listing older than `NAMES_AGE` has the folder + /// listed again and its names added: another process (a preparation worker) may have written the file. + #[derive(Default)] + struct Names(std::collections::HashMap<PathBuf, (std::collections::HashSet<std::ffi::OsString>, std::time::Instant)>); + const NAMES_AGE: std::time::Duration = std::time::Duration::from_secs(10); + static NAMES: Mutex<Option<Names>> = Mutex::new(None); + /// files this process has written, for `not_found` + static WRITES: AtomicU64 = AtomicU64::new(0); + + /// None when the listing fails: then the file is opened. + fn names_in(dir: &Path) -> Option<std::collections::HashSet<std::ffi::OsString>> { + let entries = std::fs::read_dir(dir).ok()?.collect::<std::io::Result<Vec<_>>>().ok()?; + Some(entries.iter().map(|entry| entry.file_name()).collect()) + } + + impl Names { + /// Whether `p` is missing; `None` when its folder is due another listing, for `relisted`. + fn missing(&mut self, p: &Path, now: std::time::Instant) -> Option<bool> { + let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return Some(false) }; + if !self.0.contains_key(dir) { + let Some(names) = names_in(dir) else { return Some(false) }; + self.0.insert(dir.to_path_buf(), (names, now)); + } + let (names, listed) = self.0.get_mut(dir).unwrap(); + if names.contains(name) || now.duration_since(*listed) < NAMES_AGE { ~~~~ --- Changed, as in #3506: `names_in` now lower-cases each name it lists. The names it is compared with are lower-case already, because `driver_cache::name` and the graphics name are made with lower-case hex. New test `a_blob_stored_in_upper_case_is_listed`, red without it. Head `644ed3e7`.
Foniass commented 2026-12-02 21:59:15 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-02T21:59:15Z.


Follow-up review of 644ed3e7, since 6a1d82eb (code reading only, not a merge-check; PR description red) · 2 medium, 1 nit

In short: This push compares the listed blob names in lower case, as Wine's open matched them, so a blob stored in another case is still found. A test covers it. The three earlier points are unchanged. The smoke pair names 716036be (PR description is red).

Medium

  1. The first listing of a folder still holds the NAMES lock (still open). Names::missing calls names_in(dir) (real.rs, driver_cache ~278) while load holds the global NAMES mutex. With about 79k files under Wine, every xcl-pso thread and the title's own load calls wait on it once per folder. Fix: list the way the relist already does.
  2. Nothing checks that the claim re-checks use reload (still open). If either reload call in shaders.rs (~2800, ~2812) went back to load, no test would fail.

Nit

  1. The description is stale (still open). What is in it still says "One new test of Names", and there are six now. Tested says nothing about the changes since 716036be.
Checked and fine
  • names_in lowercases each listed name. Every name the cache makes is already lower case: hex in name_for_root_node_with_ext, the pso / chain.pso extensions, the gfx- prefix. So missing, wrote and gone compare like with like.
  • a_blob_stored_in_upper_case_is_listed writes 0123ABCD-1F-0.PSO and finds 0123abcd-1f-0.pso listed.
  • The WRITES race fix from the last push is unchanged.

Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7360063678 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3507#issuecomment-7360063678). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-02T21:59:15Z. --- **Follow-up review** of `644ed3e7`, since `6a1d82eb` (code reading only, not a merge-check; `PR description` red) · 2 medium, 1 nit **In short:** This push compares the listed blob names in lower case, as Wine's open matched them, so a blob stored in another case is still found. A test covers it. The three earlier points are unchanged. The smoke pair names `716036be` (`PR description` is red). #### Medium 1. **The first listing of a folder still holds the `NAMES` lock (still open).** `Names::missing` calls `names_in(dir)` (`real.rs`, `driver_cache` ~278) while `load` holds the global `NAMES` mutex. With about 79k files under Wine, every `xcl-pso` thread and the title's own `load` calls wait on it once per folder. Fix: list the way the relist already does. 2. **Nothing checks that the claim re-checks use `reload` (still open).** If either `reload` call in `shaders.rs` (~2800, ~2812) went back to `load`, no test would fail. #### Nit 3. **The description is stale (still open).** **What is in it** still says "One new test of `Names`", and there are six now. **Tested** says nothing about the changes since `716036be`. <details><summary>Checked and fine</summary> - `names_in` lowercases each listed name. Every name the cache makes is already lower case: hex in `name_for_root_node_with_ext`, the `pso` / `chain.pso` extensions, the `gfx-` prefix. So `missing`, `wrote` and `gone` compare like with like. - `a_blob_stored_in_upper_case_is_listed` writes `0123ABCD-1F-0.PSO` and finds `0123abcd-1f-0.pso` listed. - The `WRITES` race fix from the last push is unchanged. </details> <sub>Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point.</sub>
bmjask commented 2026-12-02 22:21:35 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T22:21:35Z.

Code review location: crates/xcl/src/hle/d3d12x/real.rs; line 6754

@@ -6725,7 +6725,88 @@ pub(crate) mod driver_cache {
         set(FileDispositionInfo, (&basic as *const FILE_DISPOSITION_INFO).cast(), std::mem::size_of_val(&basic) as u32)
     }
 
+    /// The file names of the folders `load` was asked about, from a first listing, with what
+    /// `write` added since. A name missing from a listing older than `NAMES_AGE` has the folder
+    /// listed again and its names added: another process (a preparation worker) may have written the file.
+    #[derive(Default)]
+    struct Names(std::collections::HashMap<PathBuf, (std::collections::HashSet<std::ffi::OsString>, std::time::Instant)>);
+    const NAMES_AGE: std::time::Duration = std::time::Duration::from_secs(10);
+    static NAMES: Mutex<Option<Names>> = Mutex::new(None);
+    /// files this process has written, for `not_found`
+    static WRITES: AtomicU64 = AtomicU64::new(0);
+
+    /// Lower-case, as Wine's open matches them (`name` makes lower-case names); None when the
+    /// listing fails: then the file is opened.
+    fn names_in(dir: &Path) -> Option<std::collections::HashSet<std::ffi::OsString>> {
+        let entries = std::fs::read_dir(dir).ok()?.collect::<std::io::Result<Vec<_>>>().ok()?;
+        Some(entries.iter().map(|entry| entry.file_name().to_ascii_lowercase()).collect())
+    }
+
+    impl Names {
+        /// Whether `p` is missing; `None` when its folder is due another listing, for `relisted`.
+        fn missing(&mut self, p: &Path, now: std::time::Instant) -> Option<bool> {
+            let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return Some(false) };
+            if !self.0.contains_key(dir) {
+                let Some(names) = names_in(dir) else { return Some(false) };
+                self.0.insert(dir.to_path_buf(), (names, now));
+            }
+            let (names, listed) = self.0.get_mut(dir).unwrap();
+            if names.contains(name) || now.duration_since(*listed) < NAMES_AGE {

Medium: Letter case is now handled inconsistently: names_in lowercases the listed names, but missing, wrote and gone use the raw p.file_name(). Any cache path with an upper-case character (a path_override, or a future name format) is never found in the lowercased set, so under Wine load always returns None, the blob on disk is never used, and the pipeline is recompiled every run. wrote then adds the mixed-case name, so the set holds both spellings. Lowercasing in missing/wrote/gone as well would make it consistent.

<!-- greyfinch-sync:ivall/xcl:review-comment:4776929769 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3507#discussion_r4776929769). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T22:21:35Z. **Code review location:** `crates/xcl/src/hle/d3d12x/real.rs`; line 6754 ~~~~diff @@ -6725,7 +6725,88 @@ pub(crate) mod driver_cache { set(FileDispositionInfo, (&basic as *const FILE_DISPOSITION_INFO).cast(), std::mem::size_of_val(&basic) as u32) } + /// The file names of the folders `load` was asked about, from a first listing, with what + /// `write` added since. A name missing from a listing older than `NAMES_AGE` has the folder + /// listed again and its names added: another process (a preparation worker) may have written the file. + #[derive(Default)] + struct Names(std::collections::HashMap<PathBuf, (std::collections::HashSet<std::ffi::OsString>, std::time::Instant)>); + const NAMES_AGE: std::time::Duration = std::time::Duration::from_secs(10); + static NAMES: Mutex<Option<Names>> = Mutex::new(None); + /// files this process has written, for `not_found` + static WRITES: AtomicU64 = AtomicU64::new(0); + + /// Lower-case, as Wine's open matches them (`name` makes lower-case names); None when the + /// listing fails: then the file is opened. + fn names_in(dir: &Path) -> Option<std::collections::HashSet<std::ffi::OsString>> { + let entries = std::fs::read_dir(dir).ok()?.collect::<std::io::Result<Vec<_>>>().ok()?; + Some(entries.iter().map(|entry| entry.file_name().to_ascii_lowercase()).collect()) + } + + impl Names { + /// Whether `p` is missing; `None` when its folder is due another listing, for `relisted`. + fn missing(&mut self, p: &Path, now: std::time::Instant) -> Option<bool> { + let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return Some(false) }; + if !self.0.contains_key(dir) { + let Some(names) = names_in(dir) else { return Some(false) }; + self.0.insert(dir.to_path_buf(), (names, now)); + } + let (names, listed) = self.0.get_mut(dir).unwrap(); + if names.contains(name) || now.duration_since(*listed) < NAMES_AGE { ~~~~ --- **Medium**: Letter case is now handled inconsistently: `names_in` lowercases the listed names, but `missing`, `wrote` and `gone` use the raw `p.file_name()`. Any cache path with an upper-case character (a `path_override`, or a future name format) is never found in the lowercased set, so under Wine `load` always returns None, the blob on disk is never used, and the pipeline is recompiled every run. `wrote` then adds the mixed-case name, so the set holds both spellings. Lowercasing in `missing`/`wrote`/`gone` as well would make it consistent.
bmjask commented 2026-12-02 22:21:35 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T22:21:35Z.

Review: COMMENTED


Review of 644ed3e7: 1 finding(s) (1 medium), most severe first.

Re-review at 644ed3e7. Still open: title-side load callers have no reload fallback, so blobs another process wrote within the last 10 s are rebuilt. And contrary to my 6a1d82eb note, the pre-claim over-cap rejection in shaders.rs:2768 is still reachable from a stale listing. Listed names are now lowercased, but that's only half of the fix (below).

  1. Medium crates/xcl/src/hle/d3d12x/real.rs:6754: Letter case is now handled inconsistently: names_in lowercases the listed names, but missing, wrote and gone use the raw p.file_name(). (inline)

These findings come from an AI-assisted review (Claude Code) and focus on correctness. Each is a candidate; please check it before acting on it.

<!-- greyfinch-sync:ivall/xcl:review:6160069694 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3507#pullrequestreview-6160069694). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T22:21:35Z. **Review:** COMMENTED --- Review of `644ed3e7`: 1 finding(s) (1 medium), most severe first. Re-review at `644ed3e7`. Still open: title-side `load` callers have no `reload` fallback, so blobs another process wrote within the last 10 s are rebuilt. And contrary to my `6a1d82eb` note, the pre-claim over-cap rejection in shaders.rs:2768 is still reachable from a stale listing. Listed names are now lowercased, but that's only half of the fix (below). 1. **Medium** `crates/xcl/src/hle/d3d12x/real.rs:6754`: Letter case is now handled inconsistently: `names_in` lowercases the listed names, but `missing`, `wrote` and `gone` use the raw `p.file_name()`. (inline) --- _These findings come from an AI-assisted review (Claude Code) and focus on correctness. Each is a candidate; please check it before acting on it._
Royalflamejlh commented 2026-12-02 22:39:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-12-02T22:39:01Z.

Code review location: crates/xcl/src/hle/d3d12x/real.rs; line 6754

@@ -6725,7 +6725,88 @@ pub(crate) mod driver_cache {
         set(FileDispositionInfo, (&basic as *const FILE_DISPOSITION_INFO).cast(), std::mem::size_of_val(&basic) as u32)
     }
 
+    /// The file names of the folders `load` was asked about, from a first listing, with what
+    /// `write` added since. A name missing from a listing older than `NAMES_AGE` has the folder
+    /// listed again and its names added: another process (a preparation worker) may have written the file.
+    #[derive(Default)]
+    struct Names(std::collections::HashMap<PathBuf, (std::collections::HashSet<std::ffi::OsString>, std::time::Instant)>);
+    const NAMES_AGE: std::time::Duration = std::time::Duration::from_secs(10);
+    static NAMES: Mutex<Option<Names>> = Mutex::new(None);
+    /// files this process has written, for `not_found`
+    static WRITES: AtomicU64 = AtomicU64::new(0);
+
+    /// Lower-case, as Wine's open matches them (`name` makes lower-case names); None when the
+    /// listing fails: then the file is opened.
+    fn names_in(dir: &Path) -> Option<std::collections::HashSet<std::ffi::OsString>> {
+        let entries = std::fs::read_dir(dir).ok()?.collect::<std::io::Result<Vec<_>>>().ok()?;
+        Some(entries.iter().map(|entry| entry.file_name().to_ascii_lowercase()).collect())
+    }
+
+    impl Names {
+        /// Whether `p` is missing; `None` when its folder is due another listing, for `relisted`.
+        fn missing(&mut self, p: &Path, now: std::time::Instant) -> Option<bool> {
+            let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return Some(false) };
+            if !self.0.contains_key(dir) {
+                let Some(names) = names_in(dir) else { return Some(false) };
+                self.0.insert(dir.to_path_buf(), (names, now));
+            }
+            let (names, listed) = self.0.get_mut(dir).unwrap();
+            if names.contains(name) || now.duration_since(*listed) < NAMES_AGE {

Right. missing, relisted, wrote and gone now lower-case the name they are given, as names_in does, so the set holds one spelling. The case test also asks with an upper-case name now, and it fails without this. Head 2dd74d1a, rebased onto main 078358a0.

Also in this head: the check that keeps a just-written name in the listing now counts writes per folder, not per process. With one count for the process, a write to any other folder could skip a removal; a test that ran beside others showed it once.

<!-- greyfinch-sync:ivall/xcl:review-comment:4777120579 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3507#discussion_r4777120579). Originally posted by [Royalflamejlh](https://github.com/Royalflamejlh) on 2026-12-02T22:39:01Z. **Code review location:** `crates/xcl/src/hle/d3d12x/real.rs`; line 6754 ~~~~diff @@ -6725,7 +6725,88 @@ pub(crate) mod driver_cache { set(FileDispositionInfo, (&basic as *const FILE_DISPOSITION_INFO).cast(), std::mem::size_of_val(&basic) as u32) } + /// The file names of the folders `load` was asked about, from a first listing, with what + /// `write` added since. A name missing from a listing older than `NAMES_AGE` has the folder + /// listed again and its names added: another process (a preparation worker) may have written the file. + #[derive(Default)] + struct Names(std::collections::HashMap<PathBuf, (std::collections::HashSet<std::ffi::OsString>, std::time::Instant)>); + const NAMES_AGE: std::time::Duration = std::time::Duration::from_secs(10); + static NAMES: Mutex<Option<Names>> = Mutex::new(None); + /// files this process has written, for `not_found` + static WRITES: AtomicU64 = AtomicU64::new(0); + + /// Lower-case, as Wine's open matches them (`name` makes lower-case names); None when the + /// listing fails: then the file is opened. + fn names_in(dir: &Path) -> Option<std::collections::HashSet<std::ffi::OsString>> { + let entries = std::fs::read_dir(dir).ok()?.collect::<std::io::Result<Vec<_>>>().ok()?; + Some(entries.iter().map(|entry| entry.file_name().to_ascii_lowercase()).collect()) + } + + impl Names { + /// Whether `p` is missing; `None` when its folder is due another listing, for `relisted`. + fn missing(&mut self, p: &Path, now: std::time::Instant) -> Option<bool> { + let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return Some(false) }; + if !self.0.contains_key(dir) { + let Some(names) = names_in(dir) else { return Some(false) }; + self.0.insert(dir.to_path_buf(), (names, now)); + } + let (names, listed) = self.0.get_mut(dir).unwrap(); + if names.contains(name) || now.duration_since(*listed) < NAMES_AGE { ~~~~ --- Right. `missing`, `relisted`, `wrote` and `gone` now lower-case the name they are given, as `names_in` does, so the set holds one spelling. The case test also asks with an upper-case name now, and it fails without this. Head `2dd74d1a`, rebased onto `main` `078358a0`. Also in this head: the check that keeps a just-written name in the listing now counts writes per folder, not per process. With one count for the process, a write to any other folder could skip a removal; a test that ran beside others showed it once.
Royalflamejlh commented 2026-12-02 22:39:03 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-12-02T22:39:03Z.

Code review location: crates/xcl/src/hle/d3d12x/real.rs; line 6620

@@ -6572,7 +6572,65 @@ pub(crate) mod driver_cache {
         set(FileDispositionInfo, (&basic as *const FILE_DISPOSITION_INFO).cast(), std::mem::size_of_val(&basic) as u32)
     }
 
+    /// The file names of the folders `load` was asked about, from a first listing, with what
+    /// `write` added since. A name missing from a listing older than `NAMES_AGE` has the folder
+    /// listed again and its names added: another process (a preparation worker) may have written the file.
+    #[derive(Default)]
+    struct Names(std::collections::HashMap<PathBuf, (std::collections::HashSet<std::ffi::OsString>, std::time::Instant)>);
+    const NAMES_AGE: std::time::Duration = std::time::Duration::from_secs(10);
+    static NAMES: Mutex<Option<Names>> = Mutex::new(None);
+
+    fn names_in(dir: &Path) -> std::collections::HashSet<std::ffi::OsString> {
+        std::fs::read_dir(dir).into_iter().flatten().flatten().map(|entry| entry.file_name()).collect()
+    }
+
+    impl Names {
+        /// Whether `p` is missing; `None` when its folder is due another listing, for `relisted`.
+        fn missing(&mut self, p: &Path, now: std::time::Instant) -> Option<bool> {
+            let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return Some(false) };
+            if !self.0.contains_key(dir) {
+                self.0.insert(dir.to_path_buf(), (names_in(dir), now));
+            }
+            let (names, listed) = self.0.get_mut(dir).unwrap();
+            if names.contains(name) || now.duration_since(*listed) < NAMES_AGE {
+                return Some(!names.contains(name));
+            }
+            *listed = now;
+            None
+        }
+
+        fn relisted(&mut self, p: &Path, found: std::collections::HashSet<std::ffi::OsString>) -> bool {
+            let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return false };
+            let names = &mut self.0.get_mut(dir).unwrap().0;
+            names.extend(found);
+            !names.contains(name)
+        }
+
+        fn wrote(&mut self, p: &Path) {
+            let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return };
+            if let Some((names, _)) = self.0.get_mut(dir) {
+                names.insert(name.to_os_string());
+            }
+        }
+    }
+
     pub fn load(p: &Path) -> Option<LoadedBlob> {
+        // (Wine lists the whole folder for an open of a name that is not there)
+        if crate::util::under_wine() {
+            let missing = NAMES.lock().unwrap().get_or_insert_default().missing(p, std::time::Instant::now());

Still left as is, for the reason above. An open after every listing miss is one listing of the folder per miss under Wine, which is the cost this PR removes (408,089 getdents64 calls in 20 s against 4,156 with it). A blob up to 10 s old being built once more is the price, and the description says so under Not tested. The over-cap return in shaders.rs is reachable from a stale listing, yes. It skips a pipeline whose blob another process has already written, so the pass has nothing left to build for it.

<!-- greyfinch-sync:ivall/xcl:review-comment:4777120919 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3507#discussion_r4777120919). Originally posted by [Royalflamejlh](https://github.com/Royalflamejlh) on 2026-12-02T22:39:03Z. **Code review location:** `crates/xcl/src/hle/d3d12x/real.rs`; line 6620 ~~~~diff @@ -6572,7 +6572,65 @@ pub(crate) mod driver_cache { set(FileDispositionInfo, (&basic as *const FILE_DISPOSITION_INFO).cast(), std::mem::size_of_val(&basic) as u32) } + /// The file names of the folders `load` was asked about, from a first listing, with what + /// `write` added since. A name missing from a listing older than `NAMES_AGE` has the folder + /// listed again and its names added: another process (a preparation worker) may have written the file. + #[derive(Default)] + struct Names(std::collections::HashMap<PathBuf, (std::collections::HashSet<std::ffi::OsString>, std::time::Instant)>); + const NAMES_AGE: std::time::Duration = std::time::Duration::from_secs(10); + static NAMES: Mutex<Option<Names>> = Mutex::new(None); + + fn names_in(dir: &Path) -> std::collections::HashSet<std::ffi::OsString> { + std::fs::read_dir(dir).into_iter().flatten().flatten().map(|entry| entry.file_name()).collect() + } + + impl Names { + /// Whether `p` is missing; `None` when its folder is due another listing, for `relisted`. + fn missing(&mut self, p: &Path, now: std::time::Instant) -> Option<bool> { + let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return Some(false) }; + if !self.0.contains_key(dir) { + self.0.insert(dir.to_path_buf(), (names_in(dir), now)); + } + let (names, listed) = self.0.get_mut(dir).unwrap(); + if names.contains(name) || now.duration_since(*listed) < NAMES_AGE { + return Some(!names.contains(name)); + } + *listed = now; + None + } + + fn relisted(&mut self, p: &Path, found: std::collections::HashSet<std::ffi::OsString>) -> bool { + let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return false }; + let names = &mut self.0.get_mut(dir).unwrap().0; + names.extend(found); + !names.contains(name) + } + + fn wrote(&mut self, p: &Path) { + let (Some(dir), Some(name)) = (p.parent(), p.file_name()) else { return }; + if let Some((names, _)) = self.0.get_mut(dir) { + names.insert(name.to_os_string()); + } + } + } + pub fn load(p: &Path) -> Option<LoadedBlob> { + // (Wine lists the whole folder for an open of a name that is not there) + if crate::util::under_wine() { + let missing = NAMES.lock().unwrap().get_or_insert_default().missing(p, std::time::Instant::now()); ~~~~ --- Still left as is, for the reason above. An open after every listing miss is one listing of the folder per miss under Wine, which is the cost this PR removes (408,089 `getdents64` calls in 20 s against 4,156 with it). A blob up to 10 s old being built once more is the price, and the description says so under **Not tested**. The over-cap return in `shaders.rs` is reachable from a stale listing, yes. It skips a pipeline whose blob another process has already written, so the pass has nothing left to build for it.
Foniass commented 2026-12-02 22:40:16 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-02T22:40:16Z.


Follow-up review of 2dd74d1a, since 644ed3e7 (code reading only, not a merge-check; PR description red) · 2 medium, 1 nit

In short: This push narrows the race check to the folder: an open that finds no file now removes the name only if no file was written in that folder since the open (a per-folder count in Names), instead of a process-wide count. Lookups, writes and removals now lowercase the name as the listing does. The two medium points and the description nit are unchanged. The smoke pair names 716036be.

Medium

  1. The first listing of a folder still holds the NAMES lock (still open). Names::missing calls names_in(dir) while load holds the global NAMES mutex. With about 79k files under Wine, every xcl-pso thread and the title's own load calls wait on it once per folder.
  2. Nothing checks that the claim re-checks use reload (still open). If either reload call in shaders.rs (~2800, ~2812) went back to load, no test would fail.

Nit

  1. The description is stale (still open). What is in it still says "One new test of Names", and Tested says nothing about the changes since 716036be.
Checked and fine
  • The per-folder count is read and compared under NAMES, and wrote bumps it under the same lock. A write in the folder between the open and not_found keeps the name. A folder listed only after the open gives None then Some(0) and skips the removal, which costs one more open later.
  • missing, relisted, wrote and gone all lowercase p.file_name(), matching names_in. The upper-case lookup is now in the test as well.
  • The race test now reads the count through Names::writes.

Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7361004736 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3507#issuecomment-7361004736). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-02T22:40:16Z. --- **Follow-up review** of `2dd74d1a`, since `644ed3e7` (code reading only, not a merge-check; `PR description` red) · 2 medium, 1 nit **In short:** This push narrows the race check to the folder: an open that finds no file now removes the name only if no file was written in that folder since the open (a per-folder count in `Names`), instead of a process-wide count. Lookups, writes and removals now lowercase the name as the listing does. The two medium points and the description nit are unchanged. The smoke pair names `716036be`. #### Medium 1. **The first listing of a folder still holds the `NAMES` lock (still open).** `Names::missing` calls `names_in(dir)` while `load` holds the global `NAMES` mutex. With about 79k files under Wine, every `xcl-pso` thread and the title's own `load` calls wait on it once per folder. 2. **Nothing checks that the claim re-checks use `reload` (still open).** If either `reload` call in `shaders.rs` (~2800, ~2812) went back to `load`, no test would fail. #### Nit 3. **The description is stale (still open).** **What is in it** still says "One new test of `Names`", and **Tested** says nothing about the changes since `716036be`. <details><summary>Checked and fine</summary> - The per-folder count is read and compared under `NAMES`, and `wrote` bumps it under the same lock. A write in the folder between the open and `not_found` keeps the name. A folder listed only after the open gives `None` then `Some(0)` and skips the removal, which costs one more open later. - `missing`, `relisted`, `wrote` and `gone` all lowercase `p.file_name()`, matching `names_in`. The upper-case lookup is now in the test as well. - The race test now reads the count through `Names::writes`. </details> <sub>Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point.</sub>
Royalflamejlh commented 2026-12-02 22:55:12 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-12-02T22:55:12Z.


@Foniass the two medium points are as answered above, unchanged at 2dd74d1a. The description was brought up to date with this head: What is in it lists the six tests, and Tested has a line for this head. The Windows suite and smoke pair for 2dd74d1a are queued, and they go in when done.

<!-- greyfinch-sync:ivall/xcl:comment:7361330058 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3507#issuecomment-7361330058). Originally posted by [Royalflamejlh](https://github.com/Royalflamejlh) on 2026-12-02T22:55:12Z. --- @Foniass the two medium points are as answered above, unchanged at `2dd74d1a`. The description was brought up to date with this head: **What is in it** lists the six tests, and **Tested** has a line for this head. The Windows suite and smoke pair for `2dd74d1a` are queued, and they go in when done.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/3507:upstream-pr/3507'
git switch 'upstream-pr/3507'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/3507'
git switch 'upstream-pr/3507'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3507'
git switch 'upstream-pr/3507'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3507'
git switch 'main'
git merge --squash 'upstream-pr/3507'
git switch 'main'
git merge --ff-only 'upstream-pr/3507'
git switch 'main'
git merge 'upstream-pr/3507'
git push origin 'main'
Sign in to join this conversation.
No reviewers
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
xcl-dev/xcl!3507
No description provided.