Commit Graph

4696 Commits

Author SHA1 Message Date
3974555c19 [TEST-189] Fix descriptor test compilation with clang-cl 2026-11-22 11:09:12 +01:00
62593f47ca Runtime: Xbox-ABI proxies for the command queue and the fence (BUILD-231)
Device slots 8 (CreateCommandQueue), 75 (CreateCommandQueue1), 36
(CreateFence) and 32 (OpenSharedHandle of a fence) now return queue and
fence proxies. They forward the public chain in PC order (19 queue slots,
11 or 12 fence slots), refuse and log a slot past it up to the end of the
proxy's table, and name a read past the table through a guard region and
a vectored handler.

Heap, queue and fence proxies are unwrapped wherever a device or queue
method hands them to the real runtime: queue Signal/Wait, device slots
31/34/35/45/46/50. Arrays are copied without exceptions. QueryInterface
answers only the modelled interfaces, and logs one the real object has
but the proxy does not model. Outputs are cleared on failure as for
slots 14/62/76. --trace-d3d12 records proxy calls in the README grammar.
Every function a thunk hands its words to keeps them in the same
positions, because a title passes only as many as the method takes.

Tests: queue_proxy_test (host WARP, host hardware, Vulkan device;
differential per-process error cases, guard faults, identity, threads,
raw-slot client, child-runner self-test), xs_proxy_mock_test (older
devices, fences without Fence1, OpenSharedHandle branches, allocation
failures; three guard-setup fault modes), and device_proxy_test through
the D3D12XboxCreateDevice shim. No game files.

AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 11:08:53 +01:00
9c2c6918f1 fix(vulkan): synchronize physical constant-buffer reads
A root CBV supplies a device address and shaders load through a physical storage buffer. Transfer writes must be visible to that access in both legacy and enhanced buffer transitions.
2026-11-22 11:08:53 +01:00
22d26c949d Merge origin/main into m15-translated-draw-v2
Conflicts (both sides kept): runtime/CMakeLists.txt (stub list), d3d12_com.h, d3d12_vulkan_device.cpp (arena buffers
with main's ray-tracing buffers and deferred destruction, calibrated timestamps, instance extensions, sampler
registration next to the window presenter), command_list.h, vulkan_backend.h, vulkan_replay.h, vk_test_device.h,
d3d12_state_map_test.cpp, docs and README. vulkan_present.h takes main's resource and tracker locks.

CI (linux-gpu-tests): ps_m15 and vs_m15 belong to d3d12_translated_draw_test. run_gpu_tests.py still assembles and
translates them but reports them as skipped (OTHER_HARNESS) instead of "no checker defined".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 11:08:08 +01:00
f85582e23d Merge pull request #1318 from Freem 2026-11-22 05:08:05 -05:00
e6e880909a Merge pull request #1314 from bobcatchris 2026-11-22 05:08:05 -05:00
acf0707d58 Merge pull request #1311 from Zebraine 2026-11-22 05:08:04 -05:00
553fb7d357 Merge pull request #1303 from 55jnj5wrgc-create 2026-11-22 05:07:58 -05:00
f0aa5c9693 Merge pull request #1293 from cxchhh 2026-11-22 05:07:54 -05:00
3ea9ca3b0c Merge pull request #1287 from LocranKing 2026-11-22 05:07:53 -05:00
10b5c2bcb3 Merge pull request #1285 from Emre Demir 2026-11-22 05:07:53 -05:00
9d56cc494c Merge pull request #1284 from 55jnj5wrgc-create 2026-11-22 05:07:52 -05:00
643c4c9870 Merge pull request #1254 from totonii 2026-11-22 05:07:50 -05:00
dabd806bb1 Merge pull request #1022 from AREA52 Agent 2026-11-22 05:07:49 -05:00
2fdfd8c433 Runtime: suspend conditional rendering across all ResolveQueryData runs (D3D-148) 2026-11-22 13:06:54 +03:00
675e35b2d4 d3d12_predicated_copy: no Vulkan device is a skip (77), not a failure
c0ac5fd6 registered the test with SKIP_RETURN_CODE 77, but the test never
returns 77: a machine without a Vulkan ICD (the Windows CI runner) failed
vk.create() and returned 1, so the whole CPU runtime job went red on main.
Return 77 there like d3d12_copy_xfmt_test and the other registered tests.
2026-11-22 04:03:25 -06:00
3e8191d2ba Check Vulkan clock domains in the fence timing test 2026-11-22 18:01:06 +08:00
ede8c96f3d fix(dxgi): use primary DEVICE_LOCAL heap to avoid double-counting BAR1 aperture 2026-11-22 07:00:57 -03:00
5f9ed5f458 Skip ps_bitmask_perm when fragment shaders run narrower than 32 lanes 2026-11-22 11:00:52 +01:00
571cad4d8a fix(dxgi): share video-memory reservation state across adapter handles per LUID 2026-11-22 06:59:07 -03:00
cccd008f3a Reject non-finite GPU test timeouts before subprocess launch 2026-11-22 10:53:25 +01:00
220fa73744 GPU tests: cover non-mov DPP with bound_ctrl
Lane 0 of cs_dpp_bound has an invalid row_shr source and bound_ctrl:1, so it writes op(0, 10)=10; this pins the zero-filled src0 path for a VOP2 op. out[0..7] is 10 10 11 12 13 14 15 16 on the RTX 3070.
2026-11-22 09:51:36 +00:00
c0ac5fd651 Register d3d12_predicated_copy_test with ctest
#1277 builds d3d12_predicated_copy_test but no add_test ran it, which #1258's test_ctest_registration now catches.
It is registered like its neighbours (exit 77 is a skip); it passes on an RTX 4060 Ti.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 04:50:53 -05:00
474134787a Tests: GPU and CPU checks for untested VOPC compares and s_andn2 EXEC ops
Three hand-written fixtures for translator rules that no test exercised
(or that only the CPU interpreter checked), expected words derived from the
RDNA2 ISA definitions in each .asm header:

- ps_vcmp_f32_nan: f32 VOPC with a quiet NaN read from memory. v_cmp
  ge/lg/neq/nge (VCC) and ngt/nle/nlt/tru (SGPR), v_cmpx
  ge/lg/nge/nlt/neq/o/tru/f.
- ps_vcmp_64: v_cmp lt/le/gt/ge u64 and i64, ne_u64, eq/ne_i64, v_cmpx
  lt/ge/ne_i64 and gt/le_u64, with pairs where equal high words leave the
  decision to an unsigned low word (0x80000000 vs 1).
- cs_w32_andn2_exec: s_andn2_saveexec_b32 and s_andn2_wrexec_b32 in a
  32-thread wave: the EXEC they leave, old/new EXEC in D, SCC.

Registered in check.py and run_gpu_tests.py, added to regen_fixtures.py,
and asserted in test_value_semantics.py with plain-Python references.

AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 10:45:19 +01:00
8c4e3832d9 GPU fixtures for the CPU-only nlg, cvt_off, output-modifier and constant-modifier rules (TEST-175)
docs/design.md marked four translator rules "not GPU-verified": v_cmp(x)_nlg,
v_cvt_off_f32_i4, the VOP3 output modifiers on v_fmac_f16 and
v_interp_p2/mov_f32, and VOP3 FP modifiers on constants. This adds one pixel
fixture per rule group, each writing four constant mrt0 words derived in its
header: ps_cmp_nlg, ps_cvt_off, ps_fmac_f16_mods, ps_vop3_const_mods,
ps_interp_f32_mods and ps_interp_mov_mods. The two interp fixtures are drawn
with a new vertex shader, vs_interp_consts, whose params are constant over the
triangle.

Every word is a normal float or zero, so the R32G32B32A32_SFLOAT target can't
change it. All six are wired into check.py and run_gpu_tests.py.
tests/semantic/test_rule_gpu_fixtures.py checks that the interpreter, both
runners and the headers agree. run_gpu_tests.py now skips only
ps_interp_f16_high under --bary-fallback, as check.py does, rather than every
PIXEL_VERTEX fixture.

On a Tesla V100 (NVIDIA 580.95.05, Linux), all six write their words on 4096
of 4096 pixels, natively and with LEONIDA_W64_EMULATE=1
LEONIDA_BARY_FALLBACK=1. docs/design.md now cites them. The integer clamp row
stays with quackottu's part of TEST-175, and the denormal-flush row still
needs an RDNA1/2 part.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 09:41:50 +00:00
cf71ee3820 Export the SDK-declared stub entry points via a definition file 2026-11-22 01:41:43 -08:00
4388d97aaf Test async callbacks from a mapped guest executable 2026-11-22 01:41:43 -08:00
1ecfd55afe Merge pull request #1278 from Zebraine 2026-11-22 04:38:00 -05:00
b583c89998 Merge pull request #1277 from 73N1X 2026-11-22 04:38:00 -05:00
4f4fc5ecce Merge pull request #1266 from Vonsek 2026-11-22 04:37:57 -05:00
a9b11aaf1c Merge pull request #1261 from Dominik 2026-11-22 04:37:55 -05:00
199f2b255b Merge pull request #1259 from Vonsek 2026-11-22 04:37:55 -05:00
154e383f48 Merge pull request #1258 from Rayhan Robin 2026-11-22 04:37:54 -05:00
613bc1785c Merge pull request #1254 from totonii 2026-11-22 04:37:52 -05:00
c50059aaba Merge pull request #1230 from totonii 2026-11-22 04:37:50 -05:00
5f6603cc01 Merge pull request #238 from Mokbul Miah 2026-11-22 04:37:47 -05:00
4166eef07f Report a missing per-test Vulkan executable as a case failure 2026-11-22 10:37:41 +01:00
48496b96c1 d3d12: emulate R9G9B9E5_SHAREDEXP UAV textures with mutable R32_UINT 2026-11-22 06:37:10 -03:00
05b1dbdb10 d3d12: OPTIONS1 answers 16..16 lanes on Intel integrated GPUs like the host (D3D-121)
Intel's D3D12 driver reports a fixed WaveLaneCountMin/Max of 16 on its
integrated GPUs, where Vulkan reports the compiler's 8..32 range, so
compare_options1 failed on every Intel iGPU. Measured on Xe-LP: UHD 770
(32.0.101.6129) and Raptor Lake-S Mobile (101.7092). Discrete Arc keeps
the Vulkan range until TEST-57 measures it.
2026-11-22 12:37:02 +03:00
ac86de067f check.py: run compute tests at the wave size index.json records, as run_gpu_tests.py does
cs_barrier_loop is a wave32 test (four waves of 32 in a 128-thread group) but not one of the
WAVE32_LANE_DUMPS, so check.py ran it without VKC_SUBGROUP_SIZE. On a device whose default compute
subgroup is 64 (AMD, subgroups 32..64) it ran as two waves and failed, while run_gpu_tests.py, which
pins every test from index.json, passed it. Found by @WHOISJARDAS.

compute_test() now pins the recorded subgroup size unless the caller set VKC_SUBGROUP_SIZE itself, and
a size the device can't pin is a skip, as for the lane dumps.

RX 9070 (AMD 26.11.2): check.py was 105 of 109 with cs_barrier_loop failing; it's now 106 of 109
(3 skipped), native and with LEONIDA_W64_EMULATE=1; run_gpu_tests.py 118/118.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 09:35:04 +00:00
1c5463b430 perf(vulkan): restore parallel prepare() with lazy depth24 lock and native-D24 skip 2026-11-22 06:31:28 -03:00
158e3e9455 Validate Vulkan clock calibration against Win32 QPC 2026-11-22 17:30:42 +08:00
f704067680 Register d3d12_indirect_rt_test with ctest 2026-11-22 03:29:00 -06:00
0206318f69 Test GPU query results driving predicated buffer copies against WARP
Resolve real empty ordinary/binary occlusion queries into default-heap predicates at two offsets and check both operators. Add GPU high-word-only overwrites, captured-value preservation, same-address recapture and reset controls. Compare all destination bytes and predicate guards with literal expectations and native WARP; four paired recapture controls change exactly one 13-byte region.

RX 5700 XT with Vulkan validation and synchronization validation: all 16 query-to-copy cases plus 180 existing cases passed, zero validation errors. Native WARP-only controls also passed. Coverage intentionally excludes nonzero visible-draw occlusion counts.
2026-11-22 05:28:28 -04:00
60e4d945ea Test predicated buffer copies with queue kinds and occlusion resolves
Verify compute and transfer readback-stage collection, descriptor cleanup after failed submits and gated/reused batches. Extend binary and overlapping occlusion fixtures with independent destinations to check skipped-copy preservation and copying after predicate reset. Document the command-slot lifetime and queue integration.

Local RX 5700 XT validation: 180 exact WARP comparisons, 64 gated/reused copy submissions, both occlusion controls, 192 predicate captures, replay A-G and 1663 existing WARP readbacks passed. CTest: 59/60 active tests passed; the six stencil CopyResource mismatch reports exactly match the tested #856 baseline. Shader source and embedded SPIR-V match after Vulkan 1.2 validation.
2026-11-22 05:28:28 -04:00
9360ec9ec0 Runtime: predicate byte-granular CopyBufferRegion on the GPU
Build on the full 64-bit predicate snapshots from #856. Replay predicated buffer copies through a storage8 compute helper, retain descriptor batches through timeline completion, and reject missing capabilities or active statistics queries before submitting work.

Validate byte offsets, high predicate words, bounds, skipped destinations and pending descriptor lifetimes with CPU checks, 180 native WARP comparisons and 64 gated/reused GPU submissions. The existing OPTIONS19 host-capability mismatch also reproduces on base 4a36bb1; no tests are disabled.
2026-11-22 05:28:28 -04:00
fd7761947a test(runtime): run depth24 conversion with CTest
The exhaustive compute readback was built on CI but missing from its test list. Preserve device initialization failures and let CTest distinguish an unavailable GPU from a successful comparison.
2026-11-22 10:18:08 +01:00
c57b5711a3 GPU tests: cover wave64 DPP under --wave64-emulate
cs_dpp_w64 uses v_mbcnt_hi, so it is a wave64 shader; without a 64-wide subgroup it is skipped, and with LEONIDA_W64_EMULATE=1 the DPP source/EXEC exchange goes through %x_buf and produces the same out[0..7] on the RTX 3070.
2026-11-22 09:16:19 +00:00
8c20dd093d Translator: implement DPP16/DPP8 source selection
base_op stripped the _dpp suffix and the op ran as a plain move, so v_mov_b32_dpp quad_perm:[1,0,3,2] exported its own lane and still passed spirv-val. Implement the DPP16 controls (quad_perm, row_shl/shr/ror/share/xmask/mirror/half_mirror), DPP8 (dpp8 + fi), row/bank masks and bound_ctrl. A source lane that is out of range or inactive reads zero under bound_ctrl:1, otherwise the destination keeps its old value. Under --wave64-emulate the exchange goes through the workgroup buffer, like the other cross-lane ops. GPU-checked with cs_dpp*.asm on an RTX 3070.
2026-11-22 09:15:01 +00:00
e16fa7c86a test(runtime): reject NaN channels in bindless readbacks
A translated shader can export NaN in alpha while RGB matches the reference. The previous maximum-error calculation discarded that channel and reported the entire frame as correct.
2026-11-22 10:11:26 +01:00