WIP: Opt-in root-buffer indices and per-record indirect root batching; texture-only dispatches keep the argument batch; opt-in SRV load passes #598
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
hle
input
INTEL
lighting
linux-proton
memory
MULDER
needs-info
needs-logs
needs-rebase
NVIDIA
performance
post-merge
pr-diagnostics
pr-docs
pre-merge
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
relevance
high
relevance
low
relevance
medium
relevance
very-high
rendering
report
roadmap-proposal
saves
series-s
shaders
startup
status
blocked-by-rework
status
needs-test-report
status
needs-triage
status
ready-for-review
status
stale
status
superseded
status
wip
tools
ui
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
TrustNo1/Darner!598
Loading…
Reference in a new issue
No description provided.
Delete branch "deama/Darner:pr/5-root-indices-indirect-batching"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Not run in the game on Darner. Ported from a local VIctory-NVIDIA branch (before the rename). The notes below describe that branch.
Contributor role (optional)
What it changes
Seven commits:
Port bounded root-buffer indices and preserve null view-bias semantics
Batch indirect executions with per-record root constants and bounded GPU arguments
Group changing table offsets while preserving heap and fixed-binding boundaries
Port opt-in dominated raw SRV load reuse from xmem
Add opt-in motion of guaranteed invariant raw SRV reads out of loops
gpu: gate argument-clamp reuse after texture-only dispatches
gpu: enable measured texture dispatch argument reuse by default
DARNER_ROOT_BUFFER_INDICES=1(off by default, in the shader cache key): a root SRV or UAV can be a bounded heap view whose index the shader reads from one root constant, instead of a one-view table. A null view keeps the view-bias semantics.DARNER_INDIRECT_ROOTS=1(off by default): indirect executions are batched with per-record root constants and bounded GPU arguments. Changing table offsets are grouped without crossing heap or fixed-binding boundaries. The root writes go through onerecord_roothelper, which also feeds main'sDARNER_ROOT_ARG_SKIPcache, so both switches can be on together. The cache is cleared whenever a batch sets arguments itself.DARNER_INDIRECT_TEXTURE_BATCH(on by default): a compute dispatch that writes only images (no buffer stores, no ambient pass) does not end the clamp batch. Its effect is limited toDARNER_INDIRECT_BATCH=1.darner playnow defaults toDARNER_INDIRECT_BATCH=2, where this does nothing.Shader optimiser, opt-in bits of
DARNER_SHADER_OPT: 512DOM_LOADS(reuse of a dominating raw SRV load, from lobomfz/VIctory-xmem fd19a206) and 1024LOOP_LOADS(guaranteed loop-invariant raw SRV reads leave loops). Main's default (511,WIDEincluded) is unchanged.1023,1535and2047ask for them.How it was tested
5e8ad22a6f5e8ad22a6f(this branch's head), Windows 10 22H2 with its built-in Direct3D 12 (no Shader Model 6.6), Rust 1.98.1:cargo clippy --workspace --all-targets --locked -- -D warnings: passedcargo clippy --workspace --all-targets --all-features --locked -- -D warnings: passedcargo --config 'profile.test.package.darner-shader.opt-level=3' test --workspace --locked --no-fail-fast(the opt-level only speeds up darner-shader's exhaustive float tests): 66 failed, all of which fail on unmodifiedmain(c8258f9556) on this PC too (darner-shader tests that need Shader Model 6.6).maintoo, so its tests were run in batches that survive the abort and compared one by one withmain(main: 1658 pass, 8 fail, 139 need Shader Model 6.6, 81 ignored): no test that passes onmainfails here, none removed; 31 new tests: 13 ignored, 18 pass.cargo xtask policy: ok on the PR 8 head, which contains this branch.DARNER_INDIRECT_TEXTURE_BATCHfor runs withDARNER_INDIRECT_BATCH=1(notdarner play's default). Everything else is opt-in.DARNER_INDIRECT_BATCHmode that run used is not recorded. In this code the switch acts only with mode 1, anddarner playsets 2, so that result may not carry over. Not re-measured on Darner.Checklist
main. No: related root/indirect work, stacked on the PRs below.docs/asset-policy.md.Checked for overlap
DARNER_INDIRECT_RESTfindings), #35 (wide indirect dispatches on Intel), #394 and #292 (constant reads from root SRVs; different problem).WIP: [pr-performance][shaders] Opt-in root-buffer indices and per-record indirect root batching; texture-only dispatches keep the argument batch; opt-in SRV load passesto WIP: Opt-in root-buffer indices and per-record indirect root batching; texture-only dispatches keep the argument batch; opt-in SRV load passesView command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.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.