derive_stream (device slot 55) patches a base PSO stream with records that
carry D3D12 v0 descriptions: tag 0 a D3D12_DEPTH_STENCIL_DESC, tag 1 a
D3D12_RASTERIZER_DESC, tag 5 the two stencil masks. They only matched
DEPTH_STENCIL/DEPTH_STENCIL1 and RASTERIZER, so on a base that uses
DEPTH_STENCIL2 or RASTERIZER1/2 the derive failed as missing state. Found by
kevincommits in #1608 (RT-STATE-AUDIT-PIPELINE, item 6).
Those versions have other layouts, so the record is converted rather than
copied:
- tag 0 on DEPTH_STENCIL2: depth fields and face ops set, the one pair of
masks on both faces, the base's DepthBoundsTestEnable kept (as for
DEPTH_STENCIL1);
- tag 5 on DEPTH_STENCIL2: both faces' masks;
- tag 1 on RASTERIZER1: DepthBias as a float; on RASTERIZER2 also the line
mode from MultisampleEnable/AntialiasedLineEnable, as D3D12 maps them.
DEPTH_STENCIL, DEPTH_STENCIL1 and RASTERIZER are patched as before.
pso_stream_test: bases with DEPTH_STENCIL2 plus RASTERIZER1 or RASTERIZER2
take tags 0, 1 and 5 with every field checked. All 14 new checks fail on main.
AI-assisted (Claude Code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The stream parser that decides creation models `D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_VIEW_INSTANCING`: it refuses a
non-zero `ViewInstanceCount` and accepts the subobject with a count of 0. The capture walker that keeps a stream for
derivation (`layout_of` in `shims/d3d12_xs_pso_stream.cpp`) did not model it, so that same stream created a PSO and
was never captured. The PSO then carried no `PsoStreamRecord`, and every `CreateDerivedPipelineState` on it failed
with E_FAIL ("base PSO has no kept stream"), which is a silent loss of the derived states the title asks for.
Model the subobject's size and alignment in the capture walker. Only the count == 0 shape reaches it (a non-zero count
is refused before a PSO is created), so the payload's `pViewInstanceLocations` is never read: the walk needs the
entry's own size and alignment to step over it, nothing more.
`pso_stream_test` gains `test_view_instancing_is_captured`: a synthetic stream built the same way as the existing
cases, plus a zero-count `VIEW_INSTANCING` entry, must be captured, keep the entry's payload offset, and still derive a
tag-1 record. It fails on `main` ("a stream with a zero-count VIEW_INSTANCING subobject is captured") and passes with
this change.
The base is 8a242efeb, the merge of main and #984. 68 files conflicted; they were resolved in seven groups by
one rule: the same change in two forms keeps the base's form, everything only #939 has is kept, and where the
two solve one problem in two ways the base's is the frame and #939's plugs into it.
A, the Xbox proxy (d3d12_xs_device.cpp/.h, d3d12_xs.cpp, d3d12_xs_pso_stream.cpp/.h, d3d12_xs_alloc_size.h,
d3d12_xs_desc_clean.h, device_proxy_test.cpp, queue_proxy_test.cpp): the base's files with #939's additions
ported in. Device slot 57 asks #939's NativeGraphicsFactory first and falls back to the base's
proxy_create_graphics_pipeline_from_native_code on E_NOTIMPL. Kept from #939: the providers (texture lease,
raw texture view, resource by address, constant view, descriptor mapping, depth-stencil UAV, texture pages),
the title-backed descriptor mirror, slot 13's feature answers, GPU labels on list slots 71/72. Dropped: #939's
duplicates of the boot ladder routes, its fallback window, its slot 133 stand-in.
A2 (xs_proxy_mock_test.cpp): the base's test with #939's slot 70 raw-buffer case; presentation cases follow
#939's rule that a device which ever had a handler has no queue fallback.
B1, the Vulkan device (d3d12_vulkan_device.cpp, d3d12_com.cpp/.h, shader_library.h, queue_families.h,
pipeline_cache_file.h, startup_trace.h): one lazy-pipeline mechanism, the base's; #939's pending_base_compile
and first_use_backend_pipelines dropped, prepare_on_bind and cold_graphics_compile kept. create_texture keeps
the base's signature; #939's deferred backing is folded into the base's placed-memory binder. #939's quad
lists as triangle indices.
B2, the D3D12 tests (d3d12_existing_heap, a8_dimensions, pipeline_cache_seed, title_va, rect_list,
shader_library, loader_tls_index0, draw, compute, xmem_placed, shader_library_corpus): the base's tests where
both carry the same case, #939's cases added (rebound tables, linear texture map, large vertex batch,
executable shaders, default A8 views).
C, the backend (vulkan_replay.h, vulkan_backend.h, vulkan_bindless.h, vulkan_scratch.h, vulkan_present.h,
rect_list_geometry.h, vk_test_device.h, vk_pipeline_check.cpp, vk_store_test.cpp, bindless_sizing_test.cpp,
replay_texture_barrier_test.cpp): the base's prepare_draw and lazy compute, its #1055 release rule and its
rectangle generator; #939's rectangle variants, GPU quad index expansion, 1D/3D and depth-stencil UAVs, the
label fence on the base's submit.
D, memory, services, presentation (xmem.cpp/.h, xg_xs.cpp, xg_xs_test.cpp, title_va_alias.h and its test,
main.cpp, frame_pacer.h, xbox_present.cpp/.h; xgameruntime_offline.cpp for one comment): the base's xmem with
#939's label hooks, file-backed sections and pin_mapped_data; both texture computers in xg_xs.cpp, the base's
answering first; --first-run-ui kept without host speech in its profile.
E, build, tools, docs (runtime/CMakeLists.txt, make_game.py, tools/rdna2spirv.py, tools/shader_disasm.py,
scripts, tests, docs; docs/README.md and tests/test_exe_shaders_stage.py beyond the conflicts): the base's
v_dot4 decode, #281's disassembler form and tests/semantic/test_fspx_dot4_op_sel_disasm.py dropped; the
base's executable-shader step with #939's cache fix; 366 registered tests.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
One squashed commit of a fork that was developed on a Linux/Proton machine and
tested on two native Windows machines. On all of them the retail 1.0.2.1
package now launches, shows its launch movie, first-run pages and landing
prompt, runs the story load to its end with the loading slideshow drawing its
artwork, and enters the world phase. A first world frame is not verified yet.
docs/linux_proton.md has the setup, a healthy boot's timeline, the machines
and where it stops.
Runtime: frames in the title's own window; DirectStorage pinned reads,
page-list scatter/gather, BCPack and unshuffle with a locally generated
predictor file; pooled, device-local and deferred image backing for streamed
and placed textures; enhanced barriers into LAYOUT_UNDEFINED; a bindless table
that degrades instead of refusing a submission; a descriptor hash finalizer
(off until a library carries it); directly indexed heap offsets for compute
dispatches and VS/PS/GS draws; title buffer windows outside a fragmented
arena; opt-in device-local copies of streamed buffer views; write-fault
retries under the tracker lock, shared trackers and write-watched title memory
for native Windows; device-loss, compute-input and memory probes.
Translator: loop bounds at structured exits, the eight FidelityFX programs
that use a packed-dot form the disassembler skips, buffer bounds modes per
view kind, a compaction option, the hash finalizer option.
Tools and scripts: Linux boot scripts (Wine/Proton, no network), a Windows
boot script, the paired compute translation script.
No game data. AI-assisted (Claude Code and Codex agents), reviewed and booted
by people on the machines named in docs/linux_proton.md.
Co-authored-by: Plaaasma <47513553+Plaaasma@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Build on the public frame-loop integration in #321. Carry the texture-view and depth work from #213 and #261, the layout provider from #461, the responsive window from #526, and the rectangle generator from #682. Integrate the Xbox constant-buffer row addressing measured in #513 and the draw-time rectangle selection in #722. Keep all fixtures synthetic.
The Windows GPU path resolves title-owned shader objects, retires geometry uploads per submission, materializes texture views on use, maps linear surfaces, and delivers completed GPU label writes. A first-run UI launch selects the tested settings for these paths.