Shaders: journal indirect mesh whole-form demand #3796

Open
Prime1997 wants to merge 1 commit from upstream-pr/3796 into main
Prime1997 commented 2026-12-03 15:35:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Prime1997 on 2026-12-03T15:35:14Z.


Two-pass indirect mesh requests the whole compute form without recording the use that warm-start prefetch consults. A previous NVIDIA run counted 269 draws skipped while their whole form was building. Journal the demand before returning the existing ready, late, or failed outcome.

What is in it

  • Record the demand at the two-pass lookup. The existing one-time journal guard deduplicates it.
  • Exercise that lookup with a simulated failed pipeline. It still returns an error and records use for a later warm start.

Tested

  • Windows x64, Rust 1.100.0, debug, head 267b8387449b5e501010bc6352747442ab8b8bcc on upstream main a815de932c4dc8da3b383ca44f4b094aa406fec9.
  • cargo test --locked -p xcl --lib -- --test-threads=1 --nocapture --exact hle::d3d12x::real::dispatch_chain::tests::whole_ready_journals_indirect_demand_even_when_the_whole_failed
  • 1 passed, 0 failed, 0 ignored, 0 skips. The fixture uses no GPU.

Regression run

The paired retail smoke is pending for this draft.

Not tested

Retail rendering, elapsed pipeline waits, AMD, and the full workspace suite.

AI use

OpenAI Codex (GPT-6) investigated the route, wrote the change and fixture, and ran the focused test.

Optional Discord for test coordination and comparison

<!-- greyfinch-sync:ivall/xcl:issue:5629654523 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3796). Originally posted by [Prime1997](https://github.com/Prime1997) on 2026-12-03T15:35:14Z. --- Two-pass indirect mesh requests the whole compute form without recording the use that warm-start prefetch consults. A previous NVIDIA run counted 269 draws skipped while their whole form was building. Journal the demand before returning the existing ready, late, or failed outcome. **What is in it** - Record the demand at the two-pass lookup. The existing one-time journal guard deduplicates it. - Exercise that lookup with a simulated failed pipeline. It still returns an error and records use for a later warm start. **Tested** - Windows x64, Rust 1.100.0, debug, head `267b8387449b5e501010bc6352747442ab8b8bcc` on upstream `main` `a815de932c4dc8da3b383ca44f4b094aa406fec9`. - `cargo test --locked -p xcl --lib -- --test-threads=1 --nocapture --exact hle::d3d12x::real::dispatch_chain::tests::whole_ready_journals_indirect_demand_even_when_the_whole_failed` - 1 passed, 0 failed, 0 ignored, 0 skips. The fixture uses no GPU. **Regression run** The paired retail smoke is pending for this draft. **Not tested** Retail rendering, elapsed pipeline waits, AMD, and the full workspace suite. **AI use** OpenAI Codex (GPT-6) investigated the route, wrote the change and fixture, and ran the focused test. [Optional Discord for test coordination and comparison](https://discord.gg/gK3y7WRRY)
Gevroska commented 2026-12-03 17:42:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Gevroska on 2026-12-03T17:42:44Z.


@Prime1997 I checked what a fresh process does with the mesh demand recorded by 267b8387. In all six head runs, the writer appended the translated mesh producer key exactly once, and a fresh reader found it. The parent (a815de93) appended no mesh key under the same conditions.

On both revisions, mandatory mesh preparation requested the same pieces and whole forms, and queued mesh preparation requested the same two pieces. Seeding the original mesh-container key as well made no difference. As a positive control, a matching classic compute entry did change the requests.

Is the runtime eager build in #3754/#3763 the intended consumer, or should a fresh offline preparation process also request the mesh whole form? I tested this PR on its own and stopped at request selection, before driver pipeline creation.

AI disclosure: OpenAI Codex GPT-6.2 Sol ran the writer/reader comparison. An independent Codex reviewer checked all 12 process pairs and 72 selection results. GPT-6.2 Astra drafted this comment.

I reviewed and approved this comment before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7386942574 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3796#issuecomment-7386942574). Originally posted by [Gevroska](https://github.com/Gevroska) on 2026-12-03T17:42:44Z. --- @Prime1997 I checked what a fresh process does with the mesh demand recorded by `267b8387`. In all six head runs, the writer appended the translated mesh producer key exactly once, and a fresh reader found it. The parent (`a815de93`) appended no mesh key under the same conditions. On both revisions, mandatory mesh preparation requested the same pieces and whole forms, and queued mesh preparation requested the same two pieces. Seeding the original mesh-container key as well made no difference. As a positive control, a matching classic compute entry did change the requests. Is the runtime eager build in #3754/#3763 the intended consumer, or should a fresh offline preparation process also request the mesh whole form? I tested this PR on its own and stopped at request selection, before driver pipeline creation. AI disclosure: OpenAI Codex GPT-6.2 Sol ran the writer/reader comparison. An independent Codex reviewer checked all 12 process pairs and 72 selection results. GPT-6.2 Astra drafted this comment. I reviewed and approved this comment before posting.
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/3796:upstream-pr/3796'
git switch 'upstream-pr/3796'

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/3796'
git switch 'upstream-pr/3796'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3796'
git switch 'upstream-pr/3796'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3796'
git switch 'main'
git merge --squash 'upstream-pr/3796'
git switch 'main'
git merge --ff-only 'upstream-pr/3796'
git switch 'main'
git merge 'upstream-pr/3796'
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!3796
No description provided.