Skip to content

Diagnose primitive-ordered pixel shaders in the DXIL translator - #50

Closed
Castyan wants to merge 4 commits into
DexNom:mainfrom
Castyan:fix/pixel-pops-diagnostics
Closed

Castyan wants to merge 4 commits into
DexNom:mainfrom
Castyan:fix/pixel-pops-diagnostics

Conversation

@Castyan

@Castyan Castyan commented Nov 25, 2026

Copy link
Copy Markdown

What this changes

The DXIL emitter detects AMD Primitive Ordered Pixel Shading (POPS) in the pixel stage and reports the first recognized ordering instruction. The previous diagnostic reported a missing hardware SGPR at a later branch. The collision-wave input feeds a wait around order-dependent texture accesses, so this first change leaves those programs unsupported until equivalent ordering is implemented.

The shader hashes, offsets, and proposed D3D12 rasterizer-ordered view work are in docs/pixel-shader-pops.md.

Validation on RTX 5060

  • Matched all ten pixel shaders from the preload refusals. The installed preload build gave ten generic SGPR errors. This build gave ten POPS diagnostics at the packer writes, six at 0x2d8c and four at 0x2fe4. DXIL emission remains at 0/10 for this set.
  • All 11 pixel I/O tests passed, including synthetic coverage for the packer write, wave-ID source, completion message, and ordered termination.
  • D3D12 reported ROVsSupported = true on this adapter with driver 621.24. This confirms feature availability. The ordered UAV lowering and a rendering test with overlapping fragments are still pending.

The three compute translation refusals were tested independently on PR #35.

@Castyan

Castyan commented Nov 25, 2026 •

Copy link
Copy Markdown
Author

Full preload and game run on RTX 5060

I applied 456e242 to the #47 launcher build at 8c53afb and ran Preload and Play with a fresh isolated cache. The scan translated 25,745 shaders and created 2,699 D3D12 compute pipelines in 735 s. It reported 13 translation refusals and 32 compute pipeline refusals, the same totals as the previous #47 run.

All ten pixel shaders reported primitive-ordered pixel shading (POPS) in the full scan. A filtered validation run matched all ten hashes, with six reports at 0x2d8c and four at 0x2fe4. The DXIL emission count for that set was 0/10.

Preload completed and launched the game. The game exited after 7 min 34 s during intro Prestream, frame 1508, with 0x80000003 at +0x5149aec and INSTANCE_LIST at 45,000/45,000. The game phase contains zero references to the ten pixel hashes and no D3D12 device removal. The run provides no evidence linking shader refusals to the breakpoint. Upstream issue #698

Follow-up in 33c05ba

The emitter now follows paths from the packer write to check for an exit before explicit POPS completion. A filtered rerun of the release build with #47 found such a path in all ten shaders. Six now point to 0x305c and four to 0x32b4. DXIL emission remains at 0/10 for the active ordered shaders in this set.

The patch allows an immediate zero write that clears the inactive packer enable bit. A synthetic pixel shader with that write emits byte-identical DXIL to the baseline. All 13 targeted pixel tests, the shader-cache source list test, and the #47 launcher test passed. This follow-up was validated with the filtered scan. The full preload and game results above are for 456e242.

@Castyan

Castyan commented Nov 25, 2026

Copy link
Copy Markdown
Author

Follow-up gameplay integration on RTX 5060

I ran 33c05ba with the #47 preload launcher and the local gameplay integration at 00b26e5. The test used the 32-lane RTX 5060, a cold isolated cache, and a 500 ms base pipeline wait.

  • The targeted archive scan matched all ten pixel shaders. Each still reports a path bypassing explicit POPS completion. DXIL emission remains at 0/10 for that set.
  • The full preload completed in 653 s with 25,745 translations and 2,699 compute pipelines. Ten of the 13 translation refusals were the same POPS shaders. The scan also reported 32 compute pipeline refusals.
  • The local candidate validated the four targeted instance culling and batching compute shaders and created their D3D12 pipelines. This verifies pipeline creation. It does not establish their in-game outputs.

The game started automatically and the window was closed about 6 min 15 s later. The runtime reported a suspend timeout and exited with code 0. The game phase contained zero mentions of the ten POPS hashes, seven fixed wave64 pipeline refusals, and no earlier breakpoint or D3D12 device removal. It ended before the prior 7 min 34 s crash point, so the crash fix and interactive gameplay remain unverified. Preload PR #47

@Castyan

Castyan commented Nov 25, 2026

Copy link
Copy Markdown
Author

Ten POPS pixel shaders validated on RTX 5060

Commit 64255cf ports rasterizer-ordered heap UAV lowering and the distinct synthetic collision IDs from the upstream POPS work. The DXIL feature declaration follows the ROV handles that survive optimization. Upstream #2490 · Upstream #2395 · Upstream #2610

Each of the ten hashes in docs/pixel-shader-pops.md was tested individually on the RTX 5060. All ten emitted DXIL, declared ROV support, passed the SDK validator, and created a D3D12 graphics pipeline with a generated vertex shader. victory warm on those ten containers with an empty cache reported 10 translated and 0 refused. All 14 targeted pixel tests passed, including the new synthetic ordered texture store.

This run was limited to offline shader compilation, preload and graphics pipeline creation. In-game output and the intro breakpoint remain unverified on this commit.

@Castyan
Castyan marked this pull request as ready for review November 25, 2026 23:35
@Castyan

Castyan commented Nov 26, 2026

Copy link
Copy Markdown
Author

I pushed 546b748 to document the combined RTX 5060 run with this POPS fix, the #35 builder changes and the #47 preload launcher. The full preload translated all 25,758 shaders with zero translation refusals. The ten POPS shaders had also passed individual DXIL validation and graphics pipeline creation in the earlier targeted run.

The 30 failures reported at the end of preload were compute pipeline failures. Their diagnostics are documented on #47, with the experimental code in the multi-wave draft based on Marvisak#2214.

@Castyan

Castyan commented Nov 26, 2026

Copy link
Copy Markdown
Author

Superseded by #61, which combines #47 and #50 on current main.

@Castyan Castyan closed this Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant