Skip to content

D3D12.X: canonicalize inactive two-pass stream descriptors - #2448

Draft
ZekkJJ wants to merge 1 commit into
xcl-dev:mainfrom
ZekkJJ:codex/two-pass-empty-descriptors
Draft

ZekkJJ wants to merge 1 commit into
xcl-dev:mainfrom
ZekkJJ:codex/two-pass-empty-descriptors

Conversation

@ZekkJJ

@ZekkJJ ZekkJJ commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Streams with zero-count input layout, stream-output, or view-instancing descriptors can still carry pointer values and padding. Those bytes caused the canonical two-pass key to return None. A zero-length optional shader subobject had the same effect.

This follows #1941. It prepares the graphics-cache identity used by #1942 and can be reviewed independently.

What is in it

  • Treat inactive descriptors and zero-length optional shader bytecode as omitted. Active unsupported state, duplicates, and malformed streams still fail closed.
  • Add a regression fixture that compares an omitted-state mesh stream with the same stream containing inert pointers, padding, and empty shader bytecode. Previously accepted streams retain their existing keys.

Tested

  • Earlier local integration on the RTX 4060 Laptop GPU, Windows 11, and Rust MSVC x64 passed 16 filtered unit tests and one native GPU end-to-end cache test. A heap-window fixture skipped in the default configuration and ran successfully in the Series X heap-window configuration. The new identity regression passed in that integration.
  • git diff --check passed on the isolated PR commit. The guarded exact-head test could not start with 891 MiB of physical RAM available. The GitHub Windows build and test check is pending.

Regression run

Paired main and PR-head retail smoke runs are pending.

Not tested

Full workspace tests on the isolated head, AMD hardware, and world entry. The draft makes no retail performance or memory-reduction claim.

AI use

Codex (GPT-6) isolated the existing local fix and regression, checked the diff, and drafted this PR.

Zero-count stream output, input layouts, and view instancing can carry inert pointer values and padding. Treat them and empty optional shader bytecode as omitted so the stream remains eligible for a stable two-pass cache key. Preserve rejection of unsupported active state.

Assisted-by: Codex (GPT-6)
@SlopTart

Copy link
Copy Markdown

gpu_ suite (cold cache): 160 passed / 4 failed, no crashes. The four are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, depth-buffer state refusal, and gpu_promoted_uav_clear_values_pass_create_committed_resource (report); none caused by this PR.
Targeted run of the stream-related tests: 24 passed.

@DavidM1911

Copy link
Copy Markdown
Contributor

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

Thanks!

gustavsi added a commit to gustavsi/xcl that referenced this pull request Nov 25, 2026
…#2127, xcl-dev#2476, xcl-dev#2479, xcl-dev#2467, xcl-dev#2444, xcl-dev#2447, xcl-dev#2448

Integrates compositor RT tracking fix (xcl-dev#2480), split shader cache budget
(xcl-dev#2475), foreign-thread deferred release (xcl-dev#2474), Wine 4-thread DXC cap
(xcl-dev#2127), DXIL feature/reload fixes (xcl-dev#2476, xcl-dev#2479), DXC loader cleanup
(xcl-dev#2467), console xcl-dev#14 null ppv guard (xcl-dev#2444), root-sig flag stripping
(xcl-dev#2447), and two-pass stream canonicalization (xcl-dev#2448).

Assisted-by: Antigravity (Gemini 4 Neon)

@bmjask bmjask left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No concrete correctness defect found. Inactive descriptor canonicalization keys semantic count/flags rather than pointers/padding while retaining active/duplicate/unknown rejection; current Windows CI is green. This runtime change is not merge-ready because paired retail smoke runs are explicitly pending and description checks fail. Nonblocking coverage gap: regression uses only zero-length VS; broader optional-stage cases would strengthen it.

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.

4 participants