D3D12.X: preserve extended state in translated graphics PSO streams #2596

Open
opened 2026-11-26 01:31:17 +00:00 by KOLESNiii · 1 comment
KOLESNiii commented 2026-11-26 01:31:17 +00:00 (Migrated from github.com)
Contributor

Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-26T01:31:17Z.


Part of #2508 (Pipeline Rebuild). Verified on main at b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7.

With a console VS, CreatePipelineState projects the stream into a legacy graphics descriptor. The projection drops view instancing and the depth-bounds-enable field. DEPTH_STENCIL2 uses the front face’s stencil masks for both faces, and RASTERIZER1/2 truncates fractional depth bias. The legacy descriptor then goes through the normal graphics creation path. For a stream with an unknown later subobject, the parser can pass only a recognized prefix to this conversion. Parser and conversion · Dispatch to graphics creation · Known-prefix parser · D3D12 stream subobjects

Preserve supported extended state through translation and native creation. Start with descriptor-level regression tests for depth bounds, distinct front/back stencil masks and fractional bias, then verify a translated native stream with view instancing. Keep legacy conversion for descriptors it can faithfully represent. The original console shader bytecode still needs translation before native creation. Define how to handle a recognized prefix with an unknown suffix before using such a descriptor as cache identity.

This is distinct from #1661’s derived/depth-bias tracking fix. See also #1772 for legacy stream defaults and #902 for graphics cache identity. No affected title or native driver behavior was verified.

AI use was OpenAI Codex (GPT-6, exact serving variant unavailable) for static review and drafting.

<!-- greyfinch-sync:ivall/xcl:issue:6617452286 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/2606). Originally posted by [KOLESNiii](https://github.com/KOLESNiii) on 2026-11-26T01:31:17Z. --- Part of #2508 (Pipeline Rebuild). Verified on `main` at `b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7`. With a console VS, `CreatePipelineState` projects the stream into a legacy graphics descriptor. The projection drops view instancing and the depth-bounds-enable field. `DEPTH_STENCIL2` uses the front face’s stencil masks for both faces, and `RASTERIZER1/2` truncates fractional depth bias. The legacy descriptor then goes through the normal graphics creation path. For a stream with an unknown later subobject, the parser can pass only a recognized prefix to this conversion. [Parser and conversion](https://github.com/xcl-dev/xcl/blob/b49be18/crates/xcl/src/hle/d3d12x/real.rs#L6630-L6771) · [Dispatch to graphics creation](https://github.com/xcl-dev/xcl/blob/b49be18/crates/xcl/src/hle/d3d12x/real.rs#L6800-L6825) · [Known-prefix parser](https://github.com/xcl-dev/xcl/blob/b49be18/crates/xcl/src/hle/d3d12x/real.rs#L5879-L5899) · [D3D12 stream subobjects](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/ne-d3d12-d3d12_pipeline_state_subobject_type) Preserve supported extended state through translation and native creation. Start with descriptor-level regression tests for depth bounds, distinct front/back stencil masks and fractional bias, then verify a translated native stream with view instancing. Keep legacy conversion for descriptors it can faithfully represent. The original console shader bytecode still needs translation before native creation. Define how to handle a recognized prefix with an unknown suffix before using such a descriptor as cache identity. This is distinct from #1661’s derived/depth-bias tracking fix. See also #1772 for legacy stream defaults and #902 for graphics cache identity. No affected title or native driver behavior was verified. AI use was OpenAI Codex (GPT-6, exact serving variant unavailable) for static review and drafting.
Decodere commented 2026-11-26 03:06:29 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-26T02:16:03Z.


Claiming #2606: preserve supported extended graphics PSO stream state (DEPTH_STENCIL1/2, RASTERIZER1/2, VIEW_INSTANCING) through console shader translation and native CreatePipelineState, keep legacy descriptor conversion for faithfully representable streams, mark unknown-suffix prefixes uncacheable, and add descriptor + native view-instancing tests.

AI use: Google Antigravity (Gemini 4 Neon).

<!-- greyfinch-sync:ivall/xcl:comment:7180628625 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/2606#issuecomment-7180628625). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-26T02:16:03Z. --- Claiming #2606: preserve supported extended graphics PSO stream state (`DEPTH_STENCIL1`/`2`, `RASTERIZER1`/`2`, `VIEW_INSTANCING`) through console shader translation and native `CreatePipelineState`, keep legacy descriptor conversion for faithfully representable streams, mark unknown-suffix prefixes uncacheable, and add descriptor + native view-instancing tests. AI use: Google Antigravity (Gemini 4 Neon).
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl#2596
No description provided.