20 Commits

Author SHA1 Message Date
baefe6d643 Merge main 2d3369a4 into #4113
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-23 04:54:39 +01:00
a3f28baa34 bvh_builder_test: hold a reference on each hooked PSO until its vtable is restored
restore_all_pso_vtables could write into a PSO the builder had already released.
Take an AddRef through the original vtable when hooking and drop it after the restore.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 01:38:25 +01:00
cda44a2d53 bvh_builder_test: free the hooked PSO vtable copy once the original is restored
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 00:50:58 +01:00
7156ffcb31 bvh_builder_test: restore PSO vtables after naming, tidy the name log (RT-266)
The hooked PSO gets its own vtable back as soon as its name is logged (the
rest after the constructor returns), so the destructor never sees the
9-slot copy. find_pso searches newest first and skips restored entries,
the named count is of distinct creations, g_in_set_name is thread_local,
and the doc says what was measured about PostBuildInfoQuery.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 00:28:57 +01:00
0d94fa72a7 bvh_builder_test: log each PSO's call site and name; settle #47/#53 (RT-266)
LEONIDA_BVH_RECORD62=1 now prints the unwound call site (offsets from the
DLL base, with function starts from the unwind tables) and the name the
builder gives the returned PSO through SetName/SetPrivateData. Measured:
#47 and #53 are both "XDXR GetBVHCompactedSize", one PSO created twice from
FUN_18001d400; no creation is named PostBuildInfoQuery.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 00:25:26 +01:00
4affe0d629 Merge pull request #3562 from FIocker
# Conflicts:
#	docs/embedded_shaders.md
2026-11-22 17:02:43 -05:00
66c53d04d9 RT-182: the BVH builder container created twice is GetBVHCompactedSize
bvh_builder_test measures 53 PSO creations over XboxBvhBuilder.dll's 52 containers.
With LEONIDA_BVH_RECORD62=1 the test now prints each container's ILDN module name and the
first bytes of its digest, which answers the open question in docs/embedded_shaders.md:
creations 1-51 are 51 distinct containers (GetBVHCompactedSize at 47), 52 is
CopyAndCompactBVH (0x1134 bytes) and 53 is GetBVHCompactedSize again (0x14a4 bytes, same
digest): the container FUN_18001d400 passes for "XDXR PostBuildInfoQuery".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 21:55:54 +01:00
3a40f5a539 Merge pull request #2702 from Sc4ros 2026-11-22 13:17:12 -05:00
5b5b69aed3 bvh_builder_test: name the container behind each PSO creation (RT-182)
LEONIDA_BVH_RECORD62=1 now prints the module of each CreateComputePipelineState
call (the file name in the container's ILDN part) and says when a creation passes
a container byte-identical to an earlier one. The constructor makes 53 creations
over 52 containers; the repeat is GetBVHCompactedSize (5,284 bytes = 0x14a4):
creations #47 and #53. The test prints a summary and checks that the repeated
container names the same module both times.

docs/embedded_shaders.md answers the open question and lists the creation order.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-22 18:55:53 +01:00
e7ee2d7f99 Tests: the Linux cross-build compiles the FSR and BVH builder tests
clang-cl 19 and 20 crash (exit 139, in recoverAddrOfEscapedLocal) on the
__except filters of fsr_dispatch_test.cpp and bvh_builder_test.cpp: each
guard's `Call c` is also its named return value, and the filter writes it.
That stops the cross-build of runtime/cmake/clang-cl-xwin.cmake before the
rest of the tests. Return a copy instead, so `c` stays an ordinary local.
Behaviour is unchanged; both tests still skip without a package.
2026-11-22 17:54:37 +00:00
4852fe83e2 Report unconfigured retail runtime tests as skipped 2026-11-22 20:23:07 +08:00
faa57e52ad bvh_builder_test: use WARP on every hardware vendor by default (RT-89)
RT-54 switched to WARP only on NVIDIA (PCI vendor 0x10DE). AMD faults the same way: on an RX 7900 XTX the
XboxBvhBuilder constructor ends with 0xC0000005 right after the first slot 62 call (found by
@ThatZaliaSGuy, #166). The test now uses WARP whenever there is a hardware adapter, prints the vendor id it
skipped, and LEONIDA_BVH_HARDWARE=1 still keeps the hardware device. docs/d3d12_vulkan.md updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 11:36:34 +00:00
39d5d0e60d RT-54: bvh_builder_test uses WARP on NVIDIA; record the builder's shader shapes
The package's 53 compute shaders are Xbox DXIL (target triple dxil-ms-xb2,
xbox.compiler.options metadata; dxil.dll rejects all 53). NVIDIA's DXIL reader
rejects the 49th, the only one with a resource in a function signature, and
either returns E_OUTOFMEMORY or aborts the process inside nvwgf2umx.dll.
The proxy forwards the bytecode unchanged, so the fix is in the test: an NVIDIA
adapter switches to WARP unless LEONIDA_BVH_HARDWARE=1. LEONIDA_BVH_RECORD62
now prints each container's shape before the call, and LEONIDA_BVH_DXIL=1 adds
dx.op counts and masked validator error kinds (names and counts only).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 06:48:55 +00:00
3dce6425c7 bvh_builder_test: skip with a reason when the host D3D12 device has no ID3D12Device11 (#688)
The proxy answers ID3D12Device11 with a QueryInterface on the host device. The Windows 10 runtime without the Agility SDK stops before ID3D12Device11, on hardware and WARP alike, so the test failed on every Windows 10 machine with a game copy before the DLL made a call. It now prints SKIP with the reason there, as root_sig does since #597; LEONIDA_BVH_DEVICE=vulkan still runs.
2026-11-21 21:19:16 -05:00
6416481c7b fsr/bvh tests and A.2/A.3: unwind is #176's (or the test's), #93 is TLS only; FSR host imports are 82 on current main
AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 00:58:24 +01:00
fb0d52c60c fsr/bvh tests: read the module TLS index from either loader (#95's tls_slot or #93's tls_index)
AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 00:58:24 +01:00
ba62e9ec9f bvh_builder_test: LEONIDA_BVH_DEVICE=vulkan puts the builder on the Vulkan-backed device (#119)
AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 00:58:24 +01:00
1e7a6c6846 fsr/bvh tests: run on main's loader (#95): Loader::initialise, unwind registered here until #93; FSR checks its TLS block
AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 00:58:24 +01:00
7b28e72909 bvh_builder_test: record slot 62 per call, decode thrown HRESULTs; measured results in d3d12_vulkan.md A.2
AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 00:58:24 +01:00
0feffed584 WIP: bvh_builder_test (local, measuring the constructor) 2026-11-22 00:58:24 +01:00