Test report: Win10 19045 + RTX 5060 — #876 clears the black screen, then the descriptor heap caps at count=124518 #887
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#887
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?
@bailu12300 on GitHub · 2026-11-24 13:30 UTC · original
Environment
mainzip + Wasler'sfix/shader-top5(commit66252c0, #728) + #876 branchfix/issue-850-typeless-view(commit5e3c9e2) applied on topD3D12\D3D12Core.dllandD3D12SDKVersion = 614exports (Win10's inbox d3d12 rejects the0xC01root-signature flags outright, which cost us every pipeline before this)b99f876b74d4a77f03af5f878223b27bd647b5c35a79d5decd9f716504239e93What #876 fixed here
Before the typeless remap, every cutscene and the world came out as flat clear colour (
0x20202C) while 451 mesh pipelines were created anddrawnlooked normal; frames took 62 s.After applying #876, the same host renders:
VICE CITY, TWO YEARS AGOwith the Chinese subtitle 【两年前,罪恶城】no host texturecount stays at 0So the typeless view remap is confirmed as the root cause of the black frames (#850) on this host, and it is the first time this machine has drawn anything but a blank screen.
New blocker right after it
Entering the world, frames take 14.7 s, and the CBV/SRV/UAV descriptor heap gets capped:
Then draws start dropping:
with the power-of-two counter reaching
65536, and the title faults:Frame statistics at the fault:
0.1–1.5 fps,3360–5553 draws/frame, 17 GB working set, no device removal (TDR 180 s held).So with
count = 124518title views the heap cannot takecount + DYNAMIC(2^18) — every attempt returns E_INVALIDARG — and the fallback leaves too few dynamic slots for a world frame that keeps thousands of tables alive until its lists reset.Questions
count + DYNAMICrefusal expected on 8 GB NVIDIA parts, i.e. should the dynamic range live in its own shader-visible heap instead of stacked on top of the title's 124518 views?dropped=65536the cumulative counter (it only logs at powers of two), not a single table asking for 65536 slots?MIN_DYNAMICthe intended lever, or does this need the list-lifetime rework?I can rerun a diagnostics build with
VICTORY_D3D12_DEBUG=1,VICTORY_CAPTUREandVICTORY_DUMP_TARGETS=1and attach whatever would help narrow it down.@Xvania7 on GitHub · 2026-11-24 13:38 UTC · original
Great to hear #876 fixed the black screen! The descriptor heap cap at 1.24M is a known D3D12 limit (max 1,000,000). This needs a proper fix (e.g., heap recycling or dynamic unbinding). I am looking into it next.
@MichaelSmithAI on GitHub · 2026-11-24 13:38 UTC · original · edited 2026-11-24 13:41 UTC
Yes to question 2. On upstream
ffe310e,dropped=65536is the cumulative number of draw/dispatch bind attempts that failed for lack of dynamic table slots in the process. It logs at powers of two. That number gives neither the size of one table nor the number of drops in a single frame. CounterFor questions 1 and 3, the reported count and warning point to different branches of the upstream constructor. At 124,518 guest views it first tries 386,662 descriptors (adds 262,144), then 190,054 (adds 65,536). If both requests fail, that path logs “no host descriptor heap.” The million-slot cap warning requires the second request to exceed 1,000,000. Could you share the original unwrapped heap warning lines with the count attached to each, and the exact main ZIP revision or the constructor from the integrated tree? That would distinguish a different heap or build from a failure to allocate within a successfully created heap. Heap constructor
The named #728 commit changes four shader files and leaves the heap constructor intact. Wasler’s commit
D3D12 lets a draw bind one shader-visible CBV/SRV/UAV heap. If a draw uses both mirrored title descriptors and fresh tables, a second heap would have to hold all the resource descriptors that draw uses, with table handles and directly indexed slots preserved or remapped appropriately. The sampler heap is separate. SetDescriptorHeaps
A larger minimum or a second heap would be premature from this count alone. #871 also identified a case where a valid contiguous range spanning the search cursor was missed. Its contribution on this run is still unknown. Allocator regression
Separately, your same-host comparison establishes a concrete visual gain with #876: the Lucia key art and prologue title card appeared. Which view supplied those pixels, and what caused the later world stop, remain open.
@bailu12300 on GitHub · 2026-11-24 13:42 UTC · original
Correction first: the count in my report is 1,245,184, not 124,518 — I truncated it when transcribing. The raw unwrapped line:
With that, the constructor arithmetic is exactly the branch sequence you described: 1,245,184 + 262,144 = 1,507,328 fails, 1,245,184 + 65,536 = 1,310,720 fails, and 1,310,720 > 1,000,000 so the port cap branch runs. Sorry for the bad number.
The cap ceiling on this host is measured:
make(2_097_152)andmake(1_310_720)both returnE_INVALIDARG (0x80070057), whilemake(1_000_000)succeeds. So 1,000,000 is the ceiling here as well.Revision note, as you asked: my tree is the
mainZIP (no.git, so no commit hash to quote) plus Wasler'sfix/shader-top5(66252c0) applied tocrates/victory-shader+apps/victory/src/translate.rs, plus Xvania7'sfix/issue-850-typeless-view(5e3c9e2) applied tovictory-gpu(descriptor/host.rs, andis_typeless/first_concreteadded by hand toresource.rs), plus my own local edits toresource.rs(pc_format86/115 -> 28) and, in the run below, the constructor.One measured result that may help the recycling work
I modified the cap branch locally to keep 200,000 slots for dynamics and 800,000 for the title's views (instead of 934,464 + 65,536). Result, same host, same title:
no dynamic slots for its tableswarnings: 0 for the whole run (previously they climbed to the 65,536 counter and every world draw after that was dropped)0xc0000005 +0x23cf683 (write 0x0), now with 800,000 views held against 1,245,184 needed (445,184 left null)So on this host dynamic slots are the binding constraint for dropped draws, while views are the binding constraint for the title's own resources, and a 1,000,000-slot heap cannot satisfy both. That supports your point that a bigger minimum alone is not the fix.
Happy to run any variant you want measured (including a patched constructor) — this box reproduces the prologue deterministically now.
@bailu12300 on GitHub · 2026-11-24 13:50 UTC · original
The two host-side fixes are on a fork branch, since
gh pr createis refused for outside accounts here (collaborators_only):https://github.com/bailu12300/VIctory/tree/win10-agility-sdk-and-packed-formats (commit
3411406, based onffe310e)Three files, 39 lines:
apps/victory/build.rs(new):/EXPORT:D3D12SDKVersion,DATAand/EXPORT:D3D12SDKPath,DATA(a Rust bin crate has no export table)apps/victory/src/main.rs: the two#[unsafe(no_mangle)]statics, Agility614, path.\D3D12\crates/victory-gpu/src/resource.rs:pc_formatmaps 86 and 115 to 28Why they matter on Windows 10: without the exports the runtime never loads Agility 1.614, and the in-box 19041 d3d12 refuses the title's
0xC01root signatures wholesale —drawn=0, no pipeline ever created,0xC0000005about 5 s in. With them, the same host builds the full set and holds 30 fps. The 86/115 mapping is what makes the UI composition targets create at all (no host texturex2 -> 0).Happy to rebase on request.
@Xvania7 on GitHub · 2026-11-24 13:51 UTC · original
Hey @bailu12300 and @MichaelSmithAI, thanks for the detailed breakdown of the 1M limit and the dynamic slot starvation.
I've implemented a fix that adds multi-tiered heap fallbacks and a ring-buffer recycling mechanism for dynamic slots, so dropped draws and dispatches shouldn't cause
0xc0000005anymore. Even if we can't fit the full 1.24M views, the game should now degrade gracefully instead of crashing.Here is the new Issue with the ready-to-merge branch: #902.
@bailu12300, since you have a deterministic repro now and offered to run variants, it would be amazing if you could test this branch on your RTX 5060 to see if it gets past the world load!
@Proudnoob4 on GitHub · 2026-11-24 15:15 UTC · original
Second NVIDIA datapoint for #876: RTX 4080 / Win10 22H2, no black-screen fix here
Stack:
ffe310e+ #175 + #579 + #206 + #493 (the pairing required on this card) + #876 (5e3c9e2+b7a0a8c). Diagnostics build, Agility SDK 620, stock settings, 900 s, DRED + target dumps.So the 5060 result in this issue looks hardware/stack dependent rather than a general NVIDIA fix. AI-assisted (Claude Code).
@Xvania7 on GitHub · 2026-11-24 16:11 UTC · original
@Proudnoob4 thanks for the detailed datapoint on the RTX 4080. It confirms that while #876 addresses one class of null views, the black screen on some hardware is heavily dependent on the remaining untranslated shaders dropping the actual draw calls (as noted by @zhien114514 in #850). We will keep pushing on the shader translation front (e.g., #979).
@bailu12300 on GitHub · 2026-11-24 17:32 UTC · original
RTX 5060 8GB / Win10 19045, Machad3x tree (31f4a19), with #902's
mirror()graceful degradation transplanted by hand.title slot past the host heapno dynamic slots for its tablespresenting 2560x1440 format=10)The heap half of #902 holds: the dropped-pass path is gone and the run no longer dies at the cap. But it produces no pixels. The 2560x1440 target we present reads 44 everywhere, and the screen is black with HUD and subtitles only.
Worth recording for whoever chases this next: with every pipeline set built (
being made=0,shader does not translate=0, mesh refused 0), 1384 draws running, and the cap no longer dropping passes, a fully black frame points past the heap. The final lighting/post pass is not writing — the FSPX compute modules still have no host shader (pipeline.rsreturns a valid no-shaders PSO for them). I would confirm that before any more heap work.@Xvania7 on GitHub · 2026-11-24 18:00 UTC · original
@bailu12300 Spot on. We investigated why the FSPX compute modules end up with a valid "no-shaders PSO" and drop every dispatch in
crates/victory-gpu/src/draw.rs.Root Cause
amd_fidelityfx_upscaler_xbox.dll(FSR4 post-process upscaler) packages 29 compute pipelines either as rawFSPXpayloads or asDXBCcontainers with anACCCchunk and noDXILpart.DeserializeComputePipelineStateX(slot 67 /0x218). In upstreammain, slot 67 was unmapped (missing_table, returningE_NOTIMPL). Upon failure, the DLL setsFFX_FSR4_XBOX_ACO_ACTIVE=0and falls back to "NewBE" via slot 62 (create_compute_x/0x1f0).create_compute_xdefers host pipeline compilation to first use and immediately hands out a valid guestID3D12PipelineStatehandle withS_OK. The DLL receives a valid pointer and does not fault.Shader::translated()callsvictory_shader::emit::translate(), which strictly checks forFourCC::DXIL(c.part(FourCC::DXIL).ok_or(...)). Because FSPX has no DXIL chunk, translation fails.HostPipeline::newreturnsNone.crates/victory-gpu/src/draw.rs,host_pipeline(self.pipeline)returnsNone, logging"a dispatch without a host pipeline dropped". Every single compute dispatch for post-processing / lighting composition is skipped. As a result, the 2560x1440 target remains untouched at background clear (44), and only 2D HUD / subtitle graphics draws are composited on top.Branch with Fix & Diagnostics
We opened a branch with full FSPX container parsing, slot 67 dispatch wiring, and diagnostic tracing:
https://github.com/Xvania7/VIctory/tree/fix/issue-887-fspx-shaders (commit
d7d0770)DeserializeComputePipelineStateX(0x218) is now wired and extracts kind 0 (dispatch state:NumThreadsX/Y/Z,wave32/wave64, RSRC1/2), kind 1, kind 6 (RDNA2 program code), and kind 7.inspect_fspxparses bare FSPX containers and DXBCACCCchunks.Shader::translated()andcreate_compute_xnow print the exact shader hash, thread group dimensions, wave size (wave32vswave64), and bytecode size.missing()inpipeline/make.rsnow tags dropped pipelines ascompute <hash> (FSPX compute module)so drops are attributable in frame statistics.If you test this branch with your setup, the log will output the exact hashes and thread dimensions of the 29 FSPX modules being executed by the upscaler.
@Xvania7 on GitHub · 2026-11-24 18:13 UTC · original
@bailu12300 We put together an experimental branch designed to test how
amd_fidelityfx_upscaler_xbox.dlland the game engine respond when FSPX compute pipeline creation fails:Branch: https://github.com/Xvania7/VIctory/tree/experiment/fspx-force-dxil (commit
e60e91c)The Hypothesis
In upstream
main, slot 67 returnedE_NOTIMPL, causing the DLL to fall back to slot 62 (CreateComputePipelineStateX). VIctory was returningS_OKfrom slot 62 without a compiled host shader, fooling the DLL/engine into believing the FSR4 compute pipelines were active, only for every dispatch to drop indraw.rs(black screen with clear color 44).Modern game engines integrating upscalers (FSR/DLSS) usually have an internal fallback (engine-native TAA / resolution resolve) if the upscaler context or its pipelines fail to initialize. The engine's internal resolve shaders are compiled into
shaders.rpfas standard DXIL, which VIctory can translate.What to Test
Default run (
E_FAILon slot 67):Just run the branch as-is. Slot 67 will log:
DeserializeComputePipelineStateX (slot 67) called for FSPX; returning E_FAIL (0x80004005) to force DXIL fallbackReject FSPX across both slots:
If the DLL still attempts to push FSPX bytecode through slot 62 (
create_compute_x), set:This rejects FSPX creation in slot 62 with
E_FAILas well. This will definitively fail the upscaler's pipeline creation and test whether the game engine catches the error and activates its internal DXIL post-process fallback.Testing
E_INVALIDARG:If
E_FAILcauses an unhandled fault in the DLL, you can testE_INVALIDARG:If either fallback activates, we should see actual pixels rendered to the presented 2560x1440 target instead of clear color 44. Even if it doesn't immediately draw, the log will show exactly how the DLL handles non-
E_NOTIMPLfailure codes.@Proudnoob4 on GitHub · 2026-11-24 22:05 UTC · original
Correction and disclosure for my comment above
It ends with "AI-assisted (Claude Code)", but HY4 Flash (
hy4-flash-free) wrote and posted it. OpenCode ran it after my Claude Code session hit its usage limit. I have now rechecked it with Claude Code against the original files.f62's dominant value changes from 85 to 255 (62.3% non-background).This correction: Claude Code (Claude Opus 5.5); every figure was recomputed from the original files on my machine.
@Marvisak on GitHub · 2026-11-25 06:56 UTC · original
Automated triage for the maintainers.
Run report with the essentials (RTX 5060, Windows 10 19045, the tree and patches it was built from, how far it got, and the log lines). The corrected count is 1,245,184 title views. The host view heap capped at 1,000,000, with too few dynamic slots left for world tables, is the defect confirmed in #747, where it is tracked. Open PR #1349 gives capped heaps 2^18 dynamic slots. The black cutscenes that the typeless remap cleared here are discussed in #850 (branch in #876, aspect-aware version in PR #970). The Windows 10 Agility exports in your branch are tracked with the Windows 10 shader-model limit in #84 (open PRs #463 and #969).
Your fork branch (
win10-agility-sdk-and-packed-formats) is not in an open pull request. Pull requests are open to everyone again, so thepc_formatmappings can go in one of their own. A run of currentmainplus #1349 would show what remains once the heap shortage is gone.Generated by Claude Code