Skip to content

d3d12_xs: derive pipeline states for device slot 55 (RT-PSO-STREAM-SLOT55) - #1058

Closed
Taffyyy-ops wants to merge 1 commit into
ProjectLeonida:mainfrom
Taffyyy-ops:feat/xs-pso-stream-slot55
Closed

Taffyyy-ops wants to merge 1 commit into
ProjectLeonida:mainfrom
Taffyyy-ops:feat/xs-pso-stream-slot55

Conversation

@Taffyyy-ops

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: RT-PSO-STREAM-SLOT55 (#14 (comment))

Depends on: #727

What and why

Restores and adapts Xbox device slot 55 (CreateDerivedPipelineState) and runtime/shims/d3d12_xs_pso_stream.{h,cpp} + runtime/test/pso_stream_test.cpp from ancestor commit 6946344eb0 (originally authored by tf, dropped by merge 6dece9231):

  • Pipeline state stream deep copy and derivation (runtime/shims/d3d12_xs_pso_stream.{h,cpp}): captures and deep-copies supported D3D12_PIPELINE_STATE_SUBOBJECT_DESC subobjects onto ID3D12Object private data (released automatically with the PSO), applies 1..4 0x14c-byte records in order (tag 0 DEPTH_STENCIL/DEPTH_STENCIL1, tag 1 RASTERIZER, tag 2 BLEND, tag 3 SAMPLE_MASK, tag 5 stencil read/write mask overlay), and refuses unmodelled subobjects (such as VIEW_INSTANCING) or invalid counts/tags. Hardened with deep-copy of STREAM_OUTPUT SemanticName strings via shared copy_semantic_entries, a 4096-entry bound on subobject descriptor arrays, and cleanup of kRecordOwnerGuid if SetPrivateData fails in attach_pso_record.
  • Xbox device proxy (runtime/shims/d3d12_xs_device.{h,cpp}): wires slot 55 (CreateDerivedPipelineState -> proxy_create_derived_pso -> create_pso_from_stream via PC slot 47) and marks slot 55 in device_slot_overridden(55). Shares create_pso_from_stream / keep_pso_stream so #727's slot 86 routes cleanly onto it once merged, while staying completely standalone-buildable and testable on current main.
  • Build and tests (runtime/CMakeLists.txt, pso_stream_test.cpp, device_proxy_test.cpp, xs_proxy_mock_test.cpp, d3d12_vulkan_device_test.cpp): adds pso_stream_test under the Windows D3D12 guard (so Linux and macOS CI remain unaffected), links shims/d3d12_xs_pso_stream.cpp into all targets compiling shims/d3d12_xs_device.cpp, updates d3d12_vulkan_device_test to query ID3D12Device4 on inner for PC CreateReservedResource1 (since proxy slot 55 is Xbox CreateDerivedPipelineState), adds WARP graphics/compute derivation & chained-derivation coverage in device_proxy_test, and adds mock slot 55 refusal checks in xs_proxy_mock_test.
  • Documentation (docs/d3d12_vulkan.md): documents device slot 55, tags 0/1/2/3/5, refusal rules, and #727 slot 86 relationship.

Tested

  • MSVC 19.44 (vcvars64.bat && cmake --build runtime/build, [154/154] + final [2/2]): 0 errors, 0 new /W4 warnings.
  • Targeted CTest suite (LEONIDA_VK_DEVICE=NVIDIA): 11/11 passed:
    • device_proxy, device_proxy_trace
    • xs_proxy_mock, xs_proxy_mock_no_reserve, xs_proxy_mock_no_protect, xs_proxy_mock_no_handler, xs_proxy_mock_env_slots, xs_proxy_mock_env_slots_invalid
    • pso_stream, root_sig, d3d12_vulkan_device
  • Python & hygiene checks: tests/test_ctest_registration.py (4/4 OK), tests/test_docs_links.py (16/16 OK), tests/test_docs_repo_paths.py (3/3 OK), tests/test_docs_encoding.py (1/1 OK), tests/test_docs_repeated_lines.py (2/2 OK), tests/test_docs_cli_flags.py (4/4 OK), tests/test_docs_list_items.py (3/3 OK), scripts/check_no_game_data.py (pass), git diff --check main..HEAD (clean).

GPUs tested: NVIDIA GeForce RTX 5060 Laptop GPU (driver 621.24, Vulkan 1.4.357, Windows 11) + WARP

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a)

…OT55)

Restores runtime/shims/d3d12_xs_pso_stream.{h,cpp} and runtime/test/pso_stream_test.cpp from ancestor commit 6946344 (tf; dropped by merge 6dece92), hardens deep-copy of STREAM_OUTPUT declaration SemanticName strings and array bounds + SetPrivateData cleanup on error, wires Xbox device slot 55 (CreateDerivedPipelineState) into DeviceProxy, updates d3d12_vulkan_device_test to query ID3D12Device4 on inner for PC CreateReservedResource1, adds slot 55 coverage in device_proxy_test and xs_proxy_mock_test, and documents slot 55 in docs/d3d12_vulkan.md (Depends on ProjectLeonida#727 for console slot 86 stream capture).
@github-actions github-actions Bot added the needs rebase Conflicts with the base branch: rebase it on main label Nov 24, 2026
@Taffyyy-ops

Copy link
Copy Markdown
Contributor Author

Status note: runtime/shims/d3d12_xs_pso_stream.h, runtime/shims/d3d12_xs_pso_stream.cpp, runtime/test/pso_stream_test.cpp, and Xbox device slot 55 (proxy_create_derived_pso) have since been restored on upstream/main (273b3bdf9 / 154e4ec03) with extended subobject/console support (DEPTH_STENCIL2, RASTERIZER1/2, console mode), so #1058 appears superseded.

@Taffyyy-ops

Copy link
Copy Markdown
Contributor Author

Closing as superseded by upstream/main (273b3bd / 154e4ec).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs rebase Conflicts with the base branch: rebase it on main

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant