World: ~250 indirect rectangle-list draws per frame are dropped (topology 17), and the world stays black behind the cutscene #255
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#255
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?
@gw1337x on GitHub · 2026-11-24 01:51 UTC · original
Summary
With indirect execution on, every world frame drops about 246
ExecuteIndirectdraws per frame whose topology is the console's rectangle list (17).State::execute_indirectrefusesDRAW | INDEXEDwhenself.topology == RECTANGLES, because rectangles are expanded on the CPU (primitive::expand_rects) and an indirect draw's vertex count is only known on the GPU.The opening cutscene then shows its intro card and subtitles, with audio, but the picture behind them stays black. As the
primitivemodule notes, the title draws its full-screen passes as rectangles, so these dropped draws are a likely cause of the black picture. That is not proven.Setup
diagbuild ofmaind2a4bae+ #135 + #242 + #230 + #124 + #130, Series X mode, v1.0.2.1Data (diagnostics drop summary, world frames)
That reason averages 246 per frame over the run, and it is the only indirect drop reason the summary names. For scale, a typical world frame line:
So the rectangles are about 250 of the 1,300–2,600 indirect executions dropped per frame. The rest belong to pipelines that have no host pipeline: shaders that don't translate, or that the host refuses.
Possible directions (not tried)
6 * (vertexCount / 3)vertices, and fetch the fourth corner in the vertex shader (v0 + v2 - v1) when the pipeline's inputs allow it.I can rerun with a diagnostics switch if that helps narrow it, e.g. counting which pipelines the dropped rectangle draws use.
@artor410 on GitHub · 2026-11-24 01:55 UTC · original
I'm working on this: non-indexed indirect rectangle draws, with the vertices expanded as the direct path does and the arguments rewritten on the GPU to 6 * (count / 3) vertices in a buffer of their own (the title's records stay untouched). PR soon. It will be tested with synthetic data only, not against the game.
@BastienRodz on GitHub · 2026-11-24 02:07 UTC · original
I'm working on this: non-indexed indirect draws with the rectangle-list topology, expanded on the GPU after the argument clamp. A compute pass of ours writes (v0, v1, v2, v0, v2, v3) per rectangle into list-owned scratch, the fourth corner computed as
primitive::expand_rectsdoes, and rewrites a copy of each record (the title's arguments are not touched). Indexed rectangles stay unsupported, as for direct draws. I'll open a PR when it's tested. No game data used.AI-assisted (Claude Code, Gemini).
@louketa on GitHub · 2026-11-24 03:22 UTC · original
With #346 merged, the topology-17 indirect drops are gone in the world, but the picture behind the opening cutscene stays black (subtitles and voices still play). So the dropped rectangle-list draws are not the cause of the black picture, or not the only cause.
Setup
diagbuild, Series X mode, v1.0.2.1,VICTORY_D3D12_DRED=1maind2a4bae+ #346cee702e+ #333ddb6823+ #307ffa6635+ #32902564c5+ #30964c7188+ #1359dac364+ #1607265593+ #205cbb50b8+ #352f77bd28, merged in that order. #307 + #309 together need one extra match arm inapps/victory/src/translate.rs(Source::Fetchedcounted as loaded,Select/Lanesunreachable likePhi) to compile.World (about 2.5 minutes, 19 summary lines)
indirect kinddrop reason left isindirect kind 1: indexed rectangles not supported, at 0.3/frame. Without #346 it was ~246/frame on the run in this issue.refused [compute cabb87599722e59a]at 9.0/frame), so the remaining loss is spread over many programs.ERRORlines, no device removal orDEVICE_HUNGduring the world run; I closed the title by hand.Static scan of
shaders.rpf(victory translate --list)maind2a4bae: 12,272 of 14,001 vertex and pixel programs emit DXIL.No game data attached.
@tanishq-dubey on GitHub · 2026-11-24 03:33 UTC · original
Independent Linux/Wine 11.22 + RTX 5090 diagnostic run on #282 head
ba9864dwith the previously tested local handle-type, sparse-copy, indirect-budget and self-swap fixes. For one sustained black world frame, a submission-order trace showed the last recorded graphics write to the presented texture was a successfully submitted non-indexed rectangle draw sampling a 3840x2160 intermediate texture. A readback of that input at present time had zero RGB in all saved half-resolution samples; the presented frame samples were 0–2. This is consistent with the image being absent before the final draw, but does not prove it: the input was sampled after the draw and could have changed in between, and the trace does not cover every possible writer. A separate capture showed partial geometry in an off-screen target; its relationship to the final input is unestablished. No game assets or screenshots attached. AI-assisted.@louketa on GitHub · 2026-11-24 03:57 UTC · original · edited 2026-11-24 03:59 UTC
Please don't attach zips with Windows binaries to issues: nobody can review them, and people here shouldn't run them. Could you push the test as a branch or a PR instead? Then it can be read and run from source.
@xiao47576-glitch on GitHub · 2026-11-24 03:54 UTC · original · edited 2026-11-24 04:02 UTC
I ran 18 standalone synthetic tests on Mesa covering indirect rectangle draws, including indexed draws and GPU-written counts. All passed. Windows testing and validation against the linked PR and the opening cutscene are still pending.
@xiao47576-glitch on GitHub · 2026-11-24 04:07 UTC · original
Fair point — I've removed the ZIP from my comment above. I'll push the test as a branch / PR instead so it can be reviewed from source. Thanks for flagging it.
@itsRevela on GitHub · 2026-11-24 04:21 UTC · original
Measurements from inside the opening cutscene, to help pick what to work on next. The setup:
diagfeatures,maind2a4bae.VICTORY_DUMP_TARGETSon the 3 frames after the first one with 1,000 or more draws. Each target is reduced to how much of it differs from its clear value.1. In the cutscene, almost no geometry reaches the depth buffer. With a warm shader cache, about 5% of the 2560x1440 depth buffer differs from its clear value. 10 of the 38 full-resolution targets have any content, and the colour targets the scene would fill stay at their clear values. So the black picture isn't a lighting or tonemapping problem: the scene's geometry isn't drawn.
2. Compare runs with a warm shader cache on both sides. On a cold cache, every new pipeline is still "being made" when the cutscene starts. That drops up to about 2,600 draws a frame on its own. With a cold cache on one side and a warm one on the other, I first credited a change with depth coverage that the cache alone gave.
3. #302 on its own doesn't bring the geometry back. Both builds had a warm cache:
mainmain+ #302an address in an SGPR that is no root parameterThe draws #302 restores are real (dispatches, mostly), but they don't put the scene into the depth buffer by themselves. This says nothing about whether #302 is correct.
4. What still drops draws in the cutscene (warm
main, averaged over the heavy frames):an address in an SGPR that is no root parameter(#302)a descriptor neither loaded nor built(the mesh ones are waterfall loops over per-lane samplers: #307, then the phi case #320 covers)prepare failed (compute false, mesh false)a structured buffer of unknown stride(#193)Beyond those, the frames still drop about 1,500 indirect executions each, and the run ends in the GPU hang from #325 a few seconds to a minute later. The hang comes sooner the more pipelines exist: a warm cache leaves 3 to 20 heavy frames before it.
Counts only: no images or shader data. AI-assisted (Claude Code).
@itsRevela on GitHub · 2026-11-24 04:41 UTC · original
Follow-up with numbers that narrow down where the picture is lost. Same setup as my comment above: warm
mainplus #419 and #500, 3 cutscene frames.I added local diagnostics that log each draw's depth target and whether it ran, and wrapped every mesh dispatch of the captured frames in a D3D12 pipeline-statistics query. The diagnostics aren't in a PR (yet), and these are counts only.
The raster side works. Into the scene's 2560x1440 depth buffer, over 3 frames:
That's about a million shaded pixels a frame from the geometry passes, so the black picture isn't geometry going missing before rasterization. VIctory sets every render target write mask to all, so the writes aren't masked on our side either.
The lighting side is empty. At the end of each frame, with or without #302, every 2560x1440 float target is uniformly zero. That's three R16G16B16A16_FLOAT and three R11G11B10_FLOAT targets. The only full-resolution targets with content are the R10G10B10A2 ones, the UI and letterbox layer.
Most of the compute work is dropped.
So the work still missing is mostly the compute chain after the geometry, plausibly deferred lighting and post-processing. I can't name the passes. That fits #302 restoring compute dispatches without changing the picture: with #302, what's left are other reasons on other programs. In order:
a root UAV or typed root view(7 programs, ~210 draws/frame dropped)an address from a root parameter that is no address(6, ~175)an address not from a root parameter(11, ~130)The picture probably needs all of them together, not any one.
AI-assisted (Claude Code).
@itsRevela on GitHub · 2026-11-24 05:34 UTC · original
Stack test, same setup as above: the five open PRs that merge cleanly together don't bring the picture back. Each build ran with a warm cache, and I captured 3 cutscene frames.
mainno root parameteris almost gone, but those programs now stop at the next case:a root UAV or typed root view(9 programs, ~390 dropped draws/frame);an address from a root parameter that is no address(6, ~210);a structured buffer of unknown stride(6, ~200);a descriptor read from the first lane of a phi(9, ~160).Counts only. AI-assisted (Claude Code).
@LAKSHYA-cmd-tech on GitHub · 2026-11-24 11:00 UTC · original
Verified and merged downstream in https://github.com/LAKSHYA-cmd-tech/VIctory/pull/7 alongside multi-arg indirect command signatures (#757) and raw view descriptor pooling (#704).
Integration note:
@iurysf on GitHub · 2026-11-24 11:21 UTC · original
RTX 4070 data, on top of #493 + #483: the rectangle drops are 256 per frame in the world. #282 brings them to 47 and 12 in two runs (#346: 12 and 204), with no device removal. Most of the remainder fails in
prepareafter the expansion, because the dynamic descriptor slots run out (#688 addresses that). In the captured frames the screen still shows the opening credits, so there is no visible difference yet. Details on #282 and #346. AI-assisted.@Marvisak on GitHub · 2026-11-25 01:45 UTC · original
Automated triage for the maintainers.
The defect this issue reports, indirect rectangle-list draws (topology 17) being refused, is fixed in
mainby commit683ad7a("rectangle lists through a geometry shader"). Rectangle-list draws, indirect ones included, now get a generated geometry shader (crates/victory-shader/src/emit/rect.rs). Incrates/victory-gpu/src/draw.rs,execute_indirectrunsDRAW/INDEXEDrecords with that topology whencompletes_rectangles()says the bound pipeline has the shader. It refuses them only when the pipeline has none. #346 is closed.The black picture behind the cutscene is a separate problem. Measurements in this thread show it remains once the rectangle drops are gone, and that it comes from refused or untranslated compute and lighting work instead. New findings on that belong in a black-world report, not here. Please don't attach binaries or archives to issues; push code as a branch or pull request.
Proposed close (fixed in main,
683ad7a,draw.rsexecute_indirect). This issue will be closed in 48 hours unless the reporter replies or a maintainer removes thetriage: proposed closelabel.Generated by Claude Code