Pipelines: scalar ops s_pack/s_bitreplicate/s_bfm; device method 0x218 read, off by default (VICTORY_LOOSE_COMPUTE=1) #506
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!506
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-506"
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?
@Quicexo28 on GitHub · 2026-11-27 23:41 UTC · original
Quicexo28:feat/loose-compute-pipelines→main· +445 −3 · 6 files · 5 commits · merged 2026-11-29 08:16 UTCCorrected after review (see the comment below)
The first version of this description said that answering device method 0x218 with
E_NOTIMPLleaves the title without the pipeline, and that nothing was worse off with this change. That was wrong: the title then makes the same compute pipeline from a container through method 0x1f0, and those translate far better than the loose parts. Thanks to wildheathen for catching it. The loose compute pipelines are now off by default (VICTORY_LOOSE_COMPUTE=1turns them on); what stays on is the scalar operations and the tools.What this PR does now
s_pack_{ll,lh,hh}_b32_b16,s_bitreplicate_b64_b32,s_bfm_b64. They apply to every program, not only to loose ones (found by putting 600 dumped loose programs through the translator: 20 shaders stopped ats_pack_*, 5 ats_bitreplicate, 1 ats_bfm_b64). Tested on the device against the definitions, over both result dwords.pipeline::create_loose_compute), opt-in: the five (address, size) pairs of the description are the entries of anFSPXpart (kinds 0, 1, 6, 7); they are put into a container with oneACCCpart and go the existing way.fspx_programalso takes root constants now (resource type 2, root type 0, 4 dwords atb500...), which 189 of 600 dumps had.VICTORY_DUMP_PSO=<dir>saves the first 600 calls of each unknown method (the description, then each pair's address, size and bytes), and the log of an unimplemented call shows the first bytes of each part (pairs=).docs/loose-pipelines.md: what is known of 0x218 and of 0x1c8 (not read), and why 0x218 is off.Measured
On one RTX 5070 (driver 610.88), the same scripted start, play sessions of two minutes:
VICTORY_LOOSE_COMPUTE=0(the fallback, now the default)VICTORY_LOOSE_COMPUTE=1So with it on, the 0x1f0 fallback is lost for the loose programs that do not translate. Of 600 dumped loose programs 204 translate (
loose_compute_dumps_translate, needs the dumps,#[ignore]d). The user who ran these sessions also saw the world come out grey with it on; I did not check that this is the cause.Tests
cargo test -p victory-shader: 291 passed.cargo test -p victory-gpu --lib: 435 passed, 2 failed (indirect::tests::host_list_budget_starts_empty_at_each_submission,warp_batch_charges_every_execution), which fail the same onmainat64d4931.mainhas 39 invictory-gpuand a few elsewhere on 1.98.1.Not here
0x1c8 (a graphics pipeline): same shape, six pairs; what is missing is in
docs/loose-pipelines.md. And the follow-up the review suggests for 0x218: answerS_OKonly for a loose program that translates,E_NOTIMPLfor the rest, which needs the translation in the call.🤖 Generated with Claude Code
https://claude.ai/code/session_019EHxy7BaFL4hoYL2bnHQKT
@wildheathen on GitHub · 2026-11-28 01:25 UTC · original
One thing to check before this goes on by default: when 0x218 answers
E_NOTIMPLthe title does not go without the pipeline, it makes it another way.fxceless/victory-fork#113 (the corrected version and its last comment) counted it on an RTX 5080: for each of the 26 root signatures that see 0x218, the number of failed 0x218 calls equals the number of compute pipelines then made from a container through method 0x1f0, signature by signature (2,689 = 2,689 in that run). The same comment tried what this PR does (parts, native program, container, the existing path) and got 228 of 2,689 programs through the translator, against 2,720 of 2,734 for the containers the fallback uses, and did not open a PR for that reason: a 0x218 that succeeds makes the title skip the fallback.
Here 204 of 600 translate. If that fallback holds on this tree too, the other 396 would lose a pipeline they have today (the container's program would have translated), and "Nothing that did not translate before is worse off: those pipelines had none" would not hold.
Two ways I can see to keep what this PR reads without that risk:
S_OKonly when the loose program translates, andE_NOTIMPLotherwise, so the title falls back for the rest (translation would have to happen in the call, or its result be known by then);VICTORY_LOOSE_COMPUTEoff by default until the count is done here: compute pipelines made through 0x1f0 with the switch on against off, and the frame line's "dropped without a host pipeline".I can run that count on an RTX 5080 (3-minute scripted runs, diagnostics build) if it helps. I dumped the descriptions independently tonight (the first 600 distinct ones of a three-minute run: 558 from 0x1c8, 42 from 0x218; calls past 16,384 and 2,048). For 0x218 what I saw matches what is written here as far as I looked: a 28-byte block, a 20-byte block, then the code and a table of tagged 32-byte entries.
Pipelines: device method 0x218 makes compute pipelines from loose FSPX parts (204 of 600 translate); s_pack, s_bitreplicate, s_bfmto Pipelines: scalar ops s_pack/s_bitreplicate/s_bfm; device method 0x218 read, off by default (VICTORY_LOOSE_COMPUTE=1)@Quicexo28 on GitHub · 2026-11-28 02:35 UTC · original
You are right, and it holds on this tree too. I counted it from the logs of two play sessions of the same scripted start on an RTX 5070:
E_NOTIMPL): 765 compute programs translated, 1 not; steady state 116 of 3,575 draws dropped for want of a host pipeline (3 %);So "nothing that did not translate before is worse off" was false: a 0x218 that succeeds makes the title skip the 0x1f0 fallback. I pushed a commit that makes the loose compute pipelines off by default (
VICTORY_LOOSE_COMPUTE=1turns them on), corrected the description and the doc, and kept the scalar operations (s_pack_*,s_bitreplicate,s_bfm_b64), which help the container path too.One thing in the commit message is more than I checked: it says the world came out grey with the loose pipelines on. The person who ran them saw a grey world in such a session, but I did not show that this is the cause; read it as unconfirmed.
I would take the first of your two options as the follow-up (answer
S_OKonly for a loose program that translates,E_NOTIMPLfor the rest), with the translation in the call and the cost of that at load measured. Your count on the 5080 of 0x1f0 pipelines with the switch on against off would be the check I cannot run; if you do run it, I would rather know the numbers before touching this again.@wildheathen on GitHub · 2026-11-28 08:32 UTC · original
Ran it on the RTX 5080 (driver 621.24, 32 GB, Windows 11), head
3453125, diagnostics build, the same 3-minute scripted start twice. Medians of the last 40 seconds in the world:E_NOTIMPL)VICTORY_LOOSE_COMPUTE=1So it holds here as on your 5070: off by default is right. I counted untranslated shaders and dropped draws, not the 0x1f0 creations themselves (the log does not tell them apart). No device removal in either run; one run each.
github-bot referenced this pull request2026-11-28 14:44:08 +00:00
@JeremRuiz on GitHub · 2026-11-28 23:48 UTC · original
The 0x1c8 side, counted: when 0x1c8 answers
E_NOTIMPLthe title makes the pipeline from a stream through 0x2b0, as 0x218 falls back to 0x1f0. So the sentence indocs/loose-pipelines.md"For 0x1c8 nothing was seen to take its place" does not hold, and neither does the log line's "the title goes without this pipeline", for either method.How it was counted. A diagnostics-only counter (not part of this PR, local branch) records each failed 0x1c8 and 0x218 call by root signature (word 0 of the description), and each pipeline created through 0x2b0, 0x50, 0x1f0 and 0x58 by the root signature it names, then logs the table every 5 seconds. Its unit test fails when the 0x2b0 count is taken out. Base: the v2026.11.28.03 release (
f4608f0) with local CPU changes (#1653 among them) that touch neither the device methods nor pipeline creation; the translator fingerprint is the release's.One run to the open world and 38 minutes in it (RTX 3080 Ti, driver 621.40, i5-9600K, Series S profile). Last table:
The title's side, read in the binary (consistent with the count above): 0x1c8 is called only from a worker job that walks the title's pipeline cache entries, and on a failed HRESULT it moves on to the next entry. The graphics creation path looks the pipeline up in that same cache object and, on a miss, builds a 0x2b0-byte stream and calls 0x2b0. 0x218 is called from a lookup helper whose caller calls 0x1f0 when it returns null.
So for 0x1c8 the trade-off is the one this PR found for 0x218: a 0x1c8 that answers
S_OKwould make the title skip a stream path that works today. And 0x1c8 is the harder of the two to read, because it comes with no signature parts and the graphics state is in raw registers. If useful, I can send the counter as a separate diagnostics PR. The other cheap change would be the log line's wording: four reports (#855, #1301, #1374, #586) cite it as missing pipelines.AI use: Claude Code (Claude Opus 5.5) read the binary and the code, wrote the counter and read the logs; I ran the game.