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

Open
opened 2026-11-26 05:34:45 +00:00 by github-bot · 1 comment
Owner

@⁠KOLESNiii on GitHub · 2026-11-26 01:31 UTC · original

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.

**@⁠KOLESNiii** on GitHub · 2026-11-26 01:31 UTC · [original](https://github.com/xcl-dev/xcl/issues/2606) 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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:34:45 +00:00
Author
Owner

@⁠Decodere on GitHub · 2026-11-26 02:16 UTC · original

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).

**@⁠Decodere** on GitHub · 2026-11-26 02:16 UTC · [original](https://github.com/xcl-dev/xcl/issues/2606#issuecomment-7180628625) 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).
This discussion has been locked. Commenting is limited to contributors.
No description provided.