Linux (Arch/CachyOS, RADV): menus run and respond, 333 draws/frame, 2782 indirect draws dropped #879
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory#879
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@mkslzk on GitHub · 2026-11-24 13:16 UTC · original
Linux (Arch/CachyOS, RADV): the menus run and respond, 333 draws/frame, 2782 indirect draws dropped
Reporting a working Linux path and the frame statistics that come with it. No Windows machine was
involved anywhere: the workspace cross-compiles from Linux for
x86_64-pc-windows-msvc.Setup
7.3.5-2-cachyosdxgi.dll(4.9 MB), plus DXVKd3d11.dll,d3d10core.dllWINEDLLOVERRIDES="d3d12=n,b;d3d12core=n,b;dxgi=n,b"cargo xwin build --release -p victory --target x86_64-pc-windows-msvc,ffe310eWhat works
The title boots, the menus render, and they respond to mouse input: we clicked through the UI on
the machine. The frame loop runs stably for minutes and the log ends cleanly (
rc=0after thewindow was closed), no crash.
The project's own GPU tests agree with that on this stack:
Green are device creation, descriptor heaps and rings, null UAV/SRV replacement, placed heaps over
title memory, view lifetimes, texture layouts and pipeline creation.
Frame statistics from the menu (the interesting part)
Two things stand out:
VICTORY_INDIRECToff, that is by design, but itmeans the world cannot draw even if every shader translated. Turning it on is the next step, and
it needs
D3DCompilewithcs_5_1, which Wine'sd3dcompiler_47refuses: the testindirect::tests::argument_clamp_buildsfails for exactly that reason. Microsoft'sredistributable
d3dcompiler_47.dllis the known workaround.is preparation on the host: 3501 ms of copies (68.4 MB) and 600 ms of texture work. On this stack
the bottleneck is the copy path, not the graphics pipeline, which matches the
wineserverobservation in #340.
Only 333 draws reached a host pipeline, and 1312 more had none and none were being built, so the
remaining translated pipeline work is bounded and measurable.
Four things a Linux run needs, none of them documented
an exception inside
vkCreateGraphicsPipelines(also reported in #752).dxgi.dll, not Wine's builtin. Withdxgiresolved to the Wine builtin (252 KB) thetitle aborts after about 5 s with
uncaught exception 0xc0000005atwined3d.dll+0x165f50,called from
dxgi.dll+0x7415; the D3D12 device ends up being created through wined3d. WithDXVK's
dxgi.dll(4.9 MB) the same build runs for minutes.d3d12coreas well asd3d12. With onlyd3d12, Wine loads its own core DLL andstops with
unimplemented function d3d12core.dll.D3D12GetInterface. Seeinglibvkd3d-1.dllinthe log means the same mistake (as diagnosed under #829).
nodrv_CreateWindow ... no driver could be loadedand no window appears. Under KDE on Wayland itneeds
XDG_RUNTIME_DIR=/run/user/<uid>,DISPLAY=:0(XWayland) andXAUTHORITY=$XDG_RUNTIME_DIR/xauth_*.Suggestion
The four points above cost a day to rediscover and are platform facts, not bugs. A short Linux
section in the getting-started docs (prefix DLLs, overrides, session variables) would let every
Linux tester start from a working prefix instead of a black window. Happy to write that section as
a patch to
docs/; I cannot open a pull request from this account, so it would come as an issuecomment or a branch on my fork.
Also:
victory translateover the retail shader pack reports DXIL for 2398 of 3411 vertex/pixelprograms (70 %) and 1513 of 1579 mesh programs (96 %), with the largest failure classes being
"scalar memory read as data" (314), "64-bit image atomic" (246) and "packed input half" (172). That
is where the remaining draws lose their shaders, on Windows and Linux alike.
@mkslzk on GitHub · 2026-11-24 13:20 UTC · original
Follow-up with the shader failures from the same run. These are the classes that actually bound in
the menus (86 shaders without a translation), not the static ranking from
victory translateoverthe whole pack:
The dominant class in the live menu is not the dominant class in the static pack. "An address in
an SGPR that is no root parameter" is 41 % of the 86 live failures, while the static
translateranking is led by "scalar memory read as data" (314 of 1013). Fixing the static top class would not
move the menu; this one would.
Three observations that might be more useful than the counts:
"an address not from a root parameter" (3) and "an address from a phi" (6) are 44 of 86 together:
the shader computes a descriptor address in a way the converter cannot trace back to a root
parameter. One source-level answer would clear half the live failures.
structured buffer of unknown stride(8) looks like a missing piece of type informationrather than an unsupported instruction; the descriptor is there but its element size is not.
115 to 600 ms while buffer copies are 2476 to 5122 ms for 68 to 132 MB per frame. Whatever the
copy path is doing, it costs an order of magnitude more than the texture path on this stack
(RADV,
vkCmdCopyBuffer, 0.2 fps at 4566 ms/frame with the GPU idle at 27.9 ms).If it helps, I can run the same measurement with
VICTORY_LOG=debugon a Windows host forcomparison, so the copy numbers can be attributed to the platform rather than to the title.
@BastienRodz on GitHub · 2026-11-24 13:20 UTC · original
On the 2780 indirect draws: two open PRs together make indirect execution work with Wine's builtin
d3dcompiler_47, without Microsoft's redistributable:D3DCompileis involved;Exorion1er checked the pair on GE-Proton11-12 with the builtin compiler: no
E5005, and the 256rectangle expander shader unavailabledrops per frame went to 0 (#346). WithVICTORY_INDIRECTon and both stacked, your count should show what's left once the clamp is no longer the blocker.AI-assisted (Claude Code).
@mkslzk on GitHub · 2026-11-24 14:35 UTC · original
Measurements from our Linux run, recorded here so nothing gets lost. Everything below is a single run
per configuration on the same machine.
Stack: CachyOS kernel 7.3.5, RX 7900 XT (RDNA3, RADV), Mesa 26.3.1, Vulkan 1.4.363,
Wine 11.22, vkd3d-proton 3.2.0 (Proton Experimental), DXVK
dxgi.dll/d3d11.dll/d3d10core.dll,Microsoft
d3dcompiler_47for the indirect argument clamp, overridesd3d12=n,b;d3d12core=n,b;dxgi=n,b,VICTORY_NO_WATCHDOG=1,VICTORY_LOG=debug.1. Before #844: device loss in the world after 178 s
It came one submission after
slow host submission ms=2053 lists=32with 50 mesh pipelines. The TCPclient is the texture cache, which is the shape of the root-SRV fix in #844.
2. With #844 (
proton-fixes, 9 commits onffe310e): no device loss, but the scene stays darkContinuous world run, more than 10 minutes, zero
GPUVM faultlines, 674 to 4164 draws per frame.The credits overlay renders; the scene behind it does not.
Note
0 being made: the drops are not a build-queue backlog, they are pipelines whose shaders do nottranslate, so the draws have nothing to run with.
3. The classes that fail in the world (not in the menus)
Counted over one world run, one line per shader that failed to translate:
The world's ranking is wave/lane-mask semantics first (86 + 74 + 13 = 173 of 372 failures here),
where the menus were dominated by descriptor addressing. Whoever wants a picture in the world should
start with the mask classes, not with the static
translateranking over the whole pack.4. #834's coalescing patch did not move the copy cost here
Cherry-picked
47b1f3b(xmem coalescing) ontoproton-fixes, rebuilt, same scene:Still seconds, and not proportional to the byte count: 45 MB took 1833 ms while 411 MB took 4516 ms
in another frame. So the cost is dominated by something other than the number of mapping calls, at
least on this path. On our side the next measurement is
VICTORY_GPU_TIMING=1with the diagnosticsbuild, to attribute the copy time to single commands rather than to the whole preparing phase.
5. Where we agree with #844
Their summary matches ours exactly: boot, screens, intro video, start screen, saves, loading, and the
opening of the first mission with credits over a dark scene. That is parity with Windows as far as we
can tell from the tracker, and it is good enough to stop treating the Linux path as experimental.
@mkslzk on GitHub · 2026-11-24 14:49 UTC · original
Frame capture on RADV: the pipeline produces complete, correct images. Recorded because it moves the
question from "does the host path work at all" to "which passes are missing".
Build:
proton-fixes(#844) plus the xmem coalescing cherry-pick,--features diagnostics(frame capture is a diagnostics switch),
VICTORY_CAPTURE+VICTORY_DUMP_TARGETS=1.Captured frames of one run, and what is in them:
So the whole chain works on this stack: clear, UI drawing, texture sampling, tone mapping and colour.
Nothing is wrong with the presentation or the swapchain, and the earlier artefacts were a transient
state, not a systematic error.
What that means for the dark world: the scene is not failing to composite, it is failing to draw. The
same run reports 674 to 4164 draws per frame with 522 to 4425 of them dropped because their shaders
do not translate, and the dominant failing classes in the world are the wave/lane-mask ones
("a select on an untracked mask", 86; "a lane mask holding lanes elsewhere read as data", 74).
Two things that would help us confirm this properly, if anyone has them:
and the account picker match ours pixel for pixel, the host path is at parity, and the dark scene
is a title-level or converter-level problem rather than a host one. We would happily diff them.
dropped that should not be. With
VICTORY_SKIP_PIPELINESwe could try skipping the mask-classpipelines one by one and watch the frame, but without knowing which pipeline draws what, that is
a blind search.
@mkslzk on GitHub · 2026-11-24 18:42 UTC · original
Shader translation: 12840 → 13421 of 14027 (95.7 %)
Work from today on top of
ffe310e, measured withvictory translateover the retail shader pack. Branches are onmkslzk/VIctory(proton-fixes,stride-fix,addr-fix,integrate), since PRs from this account are still limited.What moved
a descriptor read only as dataa structured buffer of unknown stridea descriptor's dword 0/1/3 read as dataan address from a phiHow, in three pieces
1. A window onto descriptor heap memory. A descriptor loaded from a heap has no root parameter pointing at its dwords;
handle()only built handles from root descriptors. The host root signature now always appends one SRV root parameter (TITLE_SPACE, register 0), bound per draw to a buffer holding the heap's bytes.handle()uses it forRootType::Table | ResourceHeap, and the dword reads becomerawBufferLoadat the slot's byte offset. A missingUsedResourceentry is no obstacle: a program that only reads numbers never names the descriptor as a resource.2. The window has to be honest.
record()invictory-gpuwrites[VIEW_TAG, index, generation]over the first three dwords of every descriptor slot it records, so the heap bytes alone would hand a shader the runtime's tag where it expects an address or a format. The copy feeding the window therefore reconstructs those dwords from theViewthe runtime already holds: base address, stride (StructureByteStride, else the format's element, else 4), record count, width/height as split fields, type and last level, depth or layer count.3. Sizes the console computes versus sizes we can rebuild.
descriptor_datarebuilds the dwords a console compiler reads for an image's dimensions from the host view'sgetDimensions. The dwords it cannot rebuild (address low word, format/stride word, last level) now come from the window instead of stopping the program. A descriptor from a root parameter has no window and keeps its refusal.Stride. Three cases, no guessed number: a heap descriptor with metadata uses it; a descriptor built in the code carries its stride in dword 1 bits 29:16 (mask 0x3FFF); with no stride at all the view stays raw and the index is used as a byte address, which is the console's own form for a raw buffer.
Address joins. A phi or
s_cselect_b32over entries of one table range, where every alternative is the table's heap address plus a term without another parameter, is now traced as that table entry.What is left, and what blocks it
Top classes over the pack: 237
a descriptor whose root is not a descriptor, 207an interpolation with computed barycentrics, 195an address in an SGPR that is no root parameter, 158a cross-lane operation outside compute, 108a biased image sample with 16-bit coordinates, 73an address not from a root parameter.The 195 are not statically solvable, and the reason is concrete: user data reaches the pipeline per root parameter only (
pipeline/host.rs,draw.rs::user_value), so a register outside the layout has no value the translator can read. Title memory is reachable from DXIL only through a root SRV the title set, or through the window above.Live run, for context
A capture run of the first cutscene (RADV, RX 7900 XT, vkd3d-proton 3.2) dropped 441-539 draws per frame with 338 shaders refusing to translate: 317 compute, 15 mesh, 6 pixel. 928 compute pipelines did build, so it is not the compute path as a whole. The picture stays black while the audio and subtitles run, which fits a frame whose composition chain is partly dropped.
@Marvisak on GitHub · 2026-11-25 06:50 UTC · original
Automated triage for the maintainers.
Thanks for the detailed Linux run (RX 7900 XT, RADV, vkd3d-proton 3.2,
ffe310e). The pieces are tracked elsewhere:main,crates/victory-gpu/src/indirect.rsmake()still compiles the argument clamp withD3DCompile, which Wine's compiler refuses; tracked in #170 (open PR #1279). #190 and #346 named above were closed without merging.dxgi.dll, thed3d12coreoverride, the session variables): #340 is the request for Linux/Wine documentation; a docs pull request would be welcome there, and pull requests are open to everyone now.The shader-translation work on your
mkslzk/VIctorybranches would need to come as pull requests against currentmainto be reviewed.Generated by Claude Code