Commit Graph

10 Commits

Author SHA1 Message Date
273b3bdf9d [integration] Linux/Proton and native Windows: boot through the story load (RT-PROTON-STORY-LOAD)
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>
2026-11-24 11:42:12 -06:00
4f26b1de32 d3d12_depth_resolve_test: shorter comments
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 20:57:12 -06:00
919715b83c d3d12_depth_resolve_test: clears, resolve and read-back as three lists
Since 4da716493 the layer refuses a whole ExecuteCommandLists batch that holds a list whose Close failed, as
D3D12 must not be given one. resolve_and_read recorded the clears, the resolve and the read-back copy in one
list, so a refused resolve now took the clears and the copy with it and the eight refused cases read back an
unwritten buffer: "refused D24S8 depth AVERAGE rect 1: Close 0x80070057, destination changed" and seven more.

The resolve is now a list of its own between a setup list (clears, edge draw, barriers) and a copy list
(barrier, read-back). Each runs as its own batch, so the layer refuses only the resolve and the test checks
that the destination keeps its clears. The host path is unchanged: a resolve whose Close fails is still never
executed there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 20:11:04 -06:00
afd5304c61 Tests: depth resolves of D32S8, and of samples that differ (TEST-847, TEST-848)
d3d12_depth_resolve_test now takes D32_FLOAT_S8X24_UINT through the same cases
as D24S8: either plane by the depth-stencil format, the depth plane by
R32_FLOAT_X8X24_TYPELESS (MIN, MAX, AVERAGE) and the stencil plane by
X32_TYPELESS_G8X24_UINT, an R32G8X24_TYPELESS resource, and the refusals
(AVERAGE by the D32S8 format or of stencil). The readback tells a 24-bit UNORM
depth plane from a float one by format, not by "has stencil".

Every case also runs as an edge case: a triangle drawn over the cleared 4x
source with a depth-only PSO (depth 0.5, stencil 0x44 REPLACE, test ALWAYS)
leaves the pixels its diagonal edge crosses with samples that differ, so
MIN, MAX and AVERAGE reduce over different values. There is no CPU model of
the coverage: the layer must match the PC runtime byte for byte, and MIN and
MAX of each edge case must differ somewhere. The layer's VS is a GLSL stand-in
(test/glsl/vs_depth_edge.vert) behind a synthetic FSSM container; the host's
is HLSL compiled by d3dcompiler_47. Without glslangValidator the edge cases are
skipped and the summary says so.

RTX 5070 (621.01), Windows 11, validation on: 97 of 97 cases match the PC
runtime on the default adapter, 71 of 71 on WARP, 20 edge MIN/MAX pairs differ.

AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 16:15:34 -06:00
05a1b7f6d8 Merge pull request #2916 from Andrew 2026-11-22 15:13:10 -05:00
839e14dc1e Tests: seven host comparisons take their hardware reference on the layer's own adapter
d3d12_copy_xfmt, d3d12_depth_resolve, d3d12_fence_events, d3d12_indirect_zero,
d3d12_node_mask, d3d12_query_rules and d3d12_resource_desc created their hardware
reference with D3D12CreateDevice(nullptr), the default adapter, and did not read
LEONIDA_HOST_ADAPTER. On a PC with two GPUs the layer then ran on one GPU and the
host driver on the other.

runtime/test/host_adapter.h picks the adapter by the rule d3d12_copy_compare.h
already follows for d3d12_vulkan_device: the adapter LEONIDA_HOST_ADAPTER names
(a name that matches none fails the run; "warp" leaves the hardware pass out),
else the adapter behind the Vulkan device (deviceLUID), else the default adapter.
The tests print the adapter's name instead of "the default adapter".

Measured on a Ryzen 7 9700X iGPU (AMD 32.0.21042.62) next to an RTX 3070
(NVIDIA 610.74, the default adapter): d3d12_depth_resolve with the layer on the
Radeon set aside nine resolves as host quirks before and after, but four of them
were NVIDIA's ("D24S8 stencil as X24_G8"); against the Radeon's own driver the
four are D24S8 depth MIN/MAX. The other six tests print the same results against
either adapter.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 20:35:52 +02:00
bd2194f65d Wait 30 s for the depth resolve fence, not 5 s, so parallel GPU tests stop tripping it (TEST-514) 2026-11-22 10:35:00 -08:00
806ee523c4 tests: D3D12 host comparisons skip under Wine (TEST-105 follow-up)
The host-comparison tests added since #869 create their host devices with
D3D12CreateDevice themselves, so copycmp::try_create_host's Wine check never
reached them. Under Wine the reference is vkd3d, not Microsoft's runtime,
and they failed on a real GPU for that reason alone.

runtime/test/host_wine.h has the same check (ntdll's wine_get_version) for
them. Under Wine:
- d3d12_fence_events, d3d12_query_rules: the layer's own expectations
  still run; only the host references are skipped.
- d3d12_depth_resolve: the layer is still checked against the clears; a
  host reference is no longer required.
- d3d12_resource_desc, d3d12_node_mask, d3d12_copy_xfmt,
  d3d12_typeless_rtv, d3d12_predicated_copy: every case compares with the
  host (or WARP), so they exit 77, which ctest already reads as a skip.
Windows runs them all as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 12:25:32 +02:00
6f4752d87b d3d12_depth_resolve_test: a host that differs from the clears is a host quirk
#1155's comparison failed on an RTX 4060 Ti: NVIDIA's D3D12 driver returns, for 12 of 31 D24S8 / R24G8 rectangle
resolves, planes that match neither the clears nor WARP, while the layer matches both (WARP: 26 of 26). The layer
is already checked against the clears above, so such a case is now reported as a host quirk and counted, not failed;
a host that matches the clears still has to agree with the layer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 03:20:02 -05:00
73dd6d7dce Runtime: depth and stencil resolves in ResolveSubresourceRegion
MIN and MAX of either plane, and AVERAGE of the depth plane when Format is
the plane's own format, as the PC runtime accepts them (RTX 5070 and WARP).
Each resolve is a vkCmdBeginRendering scope with no draws: the MSAA plane
is the depth or stencil attachment and the destination plane its resolve
target, checked at record time against D3D12's rules and the device's
supported resolve modes. Colour resolves are unchanged.
2026-11-22 13:14:43 +05:30