Shaders: two-pass passthrough DXIL and the cache dir canonicalization are redone on every PSO build (verification help wanted) #2885

Open
opened 2026-11-26 21:14:04 +00:00 by KOLESNiii · 0 comments
KOLESNiii commented 2026-11-26 21:14:04 +00:00 (Migrated from github.com)
Contributor

Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-26T21:14:04Z.


Could someone verify on Windows whether finish_two_pass_compiled / rect_list_gs rebuilding or re-reading DXIL from disk without a RAM cache, and dxc::compile_cached_in_observed calling std::fs::canonicalize on every lookup, add measurable overhead during world load?

On main at 8b957bec:

  1. finish_two_pass_compiled generates mesh_passthrough_for(&record, ps_inputs.as_deref()) and calls dxc::compile_cached directly on every two-pass MS or GS pipeline build, bypassing ShaderCache and translated/v2. rect_list_gs does the same for rect-list graphics PSOs. Even when the passthrough is already cached on disk, every PSO build regenerates the HLSL string, hashes it, reads the .dxil file from disk, and re-validates the DXIL container.
  2. Inside dxc::compile_cached_in_observed, normalized_cache_dir(dir) calls std::fs::canonicalize(dir) on every invocation (including cache hits and cached_only probes) before checking cached_file(&file).

Please verify on a Windows title run with warm caches how many times finish_two_pass_compiled, rect_list_gs, and normalized_cache_dir execute during world load and how much total CPU time they consume (e.g., whether an in-memory passthrough DXIL cache or caching normalized_cache_dir for dxc::cache_dir() makes a measurable difference).

Duplicate check: screened open issues and PRs (including drafts); no matching report found for mesh_passthrough_for RAM caching or normalized_cache_dir per-call canonicalization.

AI use: Gemini 4 Hydrogen (via Antigravity CLI) inspected the source via Graphify and filed this verification request.

<!-- greyfinch-sync:ivall/xcl:issue:6635184954 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/2885). Originally posted by [KOLESNiii](https://github.com/KOLESNiii) on 2026-11-26T21:14:04Z. --- Could someone verify on Windows whether `finish_two_pass_compiled` / `rect_list_gs` rebuilding or re-reading DXIL from disk without a RAM cache, and `dxc::compile_cached_in_observed` calling `std::fs::canonicalize` on every lookup, add measurable overhead during world load? On `main` at `8b957bec`: 1. `finish_two_pass_compiled` generates `mesh_passthrough_for(&record, ps_inputs.as_deref())` and calls `dxc::compile_cached` directly on every two-pass MS or GS pipeline build, bypassing `ShaderCache` and `translated/v2`. `rect_list_gs` does the same for rect-list graphics PSOs. Even when the passthrough is already cached on disk, every PSO build regenerates the HLSL string, hashes it, reads the `.dxil` file from disk, and re-validates the DXIL container. 2. Inside `dxc::compile_cached_in_observed`, `normalized_cache_dir(dir)` calls `std::fs::canonicalize(dir)` on every invocation (including cache hits and `cached_only` probes) before checking `cached_file(&file)`. - [`finish_two_pass_compiled`](https://github.com/xcl-dev/xcl/blob/8b957bec6f82495aec940944c6bf47faa02db590/crates/xcl/src/gpu/recomp/pso.rs#L1074-L1079) - [`rect_list_gs`](https://github.com/xcl-dev/xcl/blob/8b957bec6f82495aec940944c6bf47faa02db590/crates/xcl/src/gpu/recomp/pso.rs#L1244-L1250) - [`compile_cached_in_observed` / `normalized_cache_dir`](https://github.com/xcl-dev/xcl/blob/8b957bec6f82495aec940944c6bf47faa02db590/crates/xcl/src/gpu/recomp/dxc.rs#L819-L832) Please verify on a Windows title run with warm caches how many times `finish_two_pass_compiled`, `rect_list_gs`, and `normalized_cache_dir` execute during world load and how much total CPU time they consume (e.g., whether an in-memory passthrough DXIL cache or caching `normalized_cache_dir` for `dxc::cache_dir()` makes a measurable difference). Duplicate check: screened open issues and PRs (including drafts); no matching report found for `mesh_passthrough_for` RAM caching or `normalized_cache_dir` per-call canonicalization. AI use: Gemini 4 Hydrogen (via Antigravity CLI) inspected the source via Graphify and filed this verification request.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl#2885
No description provided.