Profile a single shader hash without timing every pipeline #555

Open
SmallDevBigNothing wants to merge 0 commits from SmallDevBigNothing/Darner:codex/profile-one-shader into Main
Contributor

Refs #83

What it changes

The full pipeline meter can issue thousands of timestamp pairs per frame. That changes the queue heavily enough to distort the shader timings. Accept a full 16-digit shader hash in DARNER_CARD_METER_PIPELINES to time only pipelines carrying that shader. 1 still captures all pipelines. The filtered spans end at the next bind or the end of the list, as before.

How it was tested

Tested a835c99 on an RTX 3060 12 GB with the fast build. Each 65 s take used the same executable, Chapter II save, fixed camera, and a fresh copy of the same Darner cache. Series S at 540p to 1080p, DLSS Performance, FSR 3 ×2, RT off. FPS counts rendered frames.

Pipeline meter Rendered FPS Median frame, ms p95, ms p99, ms
Off, first control 22.50 41.940 49.450 76.420
Filtered to #83's shader 23.67 41.827 49.209 72.695
All pipelines 12.94 75.306 101.910 121.197
Off, second control 22.53 41.556 51.342 81.147

The filter recorded two binds per frame for the selected shader and about 0.02 ms per frame over two 600-frame tables. The full meter recorded 2,382 binds per frame in its gameplay table. The timing includes commands between binds and the result applies to this scene. Zero CSV rows were lost in all four takes.

  • cargo build --locked --profile fast -p darner and cargo test --locked -p darner-gpu --lib cardmeter::tests:: passed (7 tests), with asset policy and git diff --check.
  • Opt-in diagnostics. Full workspace gates and other GPUs were outside this test.

Checklist

  • Tested in the game and with a regression test for exact hash matching.
  • This PR contains one change based on main.
  • The diff follows docs/asset-policy.md.
  • Depends on: none.

Checked for overlap

  • Searched issues and pull requests for the symptom and the changed files.
  • Related: #83 discusses the cost of the same shader. No open PR found adding selective timing in cardmeter.rs.
Refs #83 ## What it changes The full pipeline meter can issue thousands of timestamp pairs per frame. That changes the queue heavily enough to distort the shader timings. Accept a full 16-digit shader hash in `DARNER_CARD_METER_PIPELINES` to time only pipelines carrying that shader. `1` still captures all pipelines. The filtered spans end at the next bind or the end of the list, as before. ## How it was tested Tested `a835c99` on an RTX 3060 12 GB with the fast build. Each 65 s take used the same executable, Chapter II save, fixed camera, and a fresh copy of the same Darner cache. Series S at 540p to 1080p, DLSS Performance, FSR 3 ×2, RT off. FPS counts rendered frames. | Pipeline meter | Rendered FPS | Median frame, ms | p95, ms | p99, ms | |---|---:|---:|---:|---:| | Off, first control | 22.50 | 41.940 | 49.450 | 76.420 | | Filtered to #83's shader | 23.67 | 41.827 | 49.209 | 72.695 | | All pipelines | 12.94 | 75.306 | 101.910 | 121.197 | | Off, second control | 22.53 | 41.556 | 51.342 | 81.147 | The filter recorded two binds per frame for the selected shader and about 0.02 ms per frame over two 600-frame tables. The full meter recorded 2,382 binds per frame in its gameplay table. The timing includes commands between binds and the result applies to this scene. Zero CSV rows were lost in all four takes. - `cargo build --locked --profile fast -p darner` and `cargo test --locked -p darner-gpu --lib cardmeter::tests::` passed (7 tests), with asset policy and `git diff --check`. - Opt-in diagnostics. Full workspace gates and other GPUs were outside this test. ## Checklist - [x] Tested in the game and with a regression test for exact hash matching. - [x] This PR contains one change based on `main`. - [x] The diff follows `docs/asset-policy.md`. - [x] Depends on: none. ## Checked for overlap - [x] Searched issues and pull requests for the symptom and the changed files. - Related: #83 discusses the cost of the same shader. No open PR found adding selective timing in `cardmeter.rs`.
TrustNo1 changed title from [pr-diagnostics][shaders] Profile a single shader hash without timing every pipeline to Profile a single shader hash without timing every pipeline 2026-12-06 03:27:10 +00:00
Owner

Test needed — commit 92eabefd; what to check: The full pipeline meter can issue thousands of timestamp pairs per frame. That changes the queue heavily enough to distort the shader timings. Accept a full 16-digit shader hash in DARNER_CARD_METER_PIPELINES to time only pipelines carrying that shader. 1 still captures all pipelines. The filtered spans end at the next bind or the end of the list, as before.

Evidence to post: card + driver, settings, commit tested, before/after (switch off vs on, two runs each), fps median and p99, and one line saying you looked at the picture.

Reply testing to take this run; it's free again after 24 h with no results.

**Test needed** — commit `92eabefd`; what to check: The full pipeline meter can issue thousands of timestamp pairs per frame. That changes the queue heavily enough to distort the shader timings. Accept a full 16-digit shader hash in `DARNER_CARD_METER_PIPELINES` to time only pipelines carrying that shader. `1` still captures all pipelines. The filtered spans end at the next bind or the end of the list, as before. Evidence to post: card + driver, settings, commit tested, before/after (switch off vs on, two runs each), fps median and p99, and one line saying you looked at the picture. Reply `testing` to take this run; it's free again after 24 h with no results.
This branch is already included in the target branch. There is nothing to merge.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'codex/profile-one-shader:SmallDevBigNothing-codex/profile-one-shader'
git switch 'SmallDevBigNothing-codex/profile-one-shader'

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 'SmallDevBigNothing-codex/profile-one-shader'
git switch 'SmallDevBigNothing-codex/profile-one-shader'
git rebase 'Main'
git switch 'Main'
git merge --ff-only 'SmallDevBigNothing-codex/profile-one-shader'
git switch 'SmallDevBigNothing-codex/profile-one-shader'
git rebase 'Main'
git switch 'Main'
git merge --no-ff 'SmallDevBigNothing-codex/profile-one-shader'
git switch 'Main'
git merge --squash 'SmallDevBigNothing-codex/profile-one-shader'
git switch 'Main'
git merge --ff-only 'SmallDevBigNothing-codex/profile-one-shader'
git switch 'Main'
git merge 'SmallDevBigNothing-codex/profile-one-shader'
git push origin 'Main'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
TrustNo1/Darner!555
No description provided.