Commit Graph

4163 Commits

Author SHA1 Message Date
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
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
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
0bc74260d4 feat(dxgi): implement Vulkan-backed IDXGIAdapter3 enumeration and swapchain state queries 2026-11-22 06:09:11 -03:00
40bd14777a Merge pull request #1249 from Felix Croasdale 2026-11-22 04:07:53 -05:00
130234319c Merge pull request #1247 from Vonsek 2026-11-22 04:07:52 -05:00
5f20f591de Merge pull request #1244 from Ryongen 2026-11-22 04:07:50 -05:00
06f211f63b Merge pull request #1241 from Vonsek 2026-11-22 04:07:50 -05:00
d8455a7ae8 Merge pull request #1235 from Vonsek 2026-11-22 04:07:48 -05:00
eddffb846d Merge pull request #1153 from ICUMADETHIS 2026-11-22 04:07:45 -05:00
22e6aec2a4 Merge pull request #856 from 73N1X 2026-11-22 04:07:44 -05:00
6ff753db81 clears: round ties to even whatever the FP mode, and run d3d12_clear in ctest
quantize_unorm/quantize_snorm used std::nearbyint, which follows the thread's
rounding mode (matheuskshn's review): under FE_DOWNWARD 0.5 on 8 bits gave 127
and 0.5 on SNORM8 gave 63. round_half_even uses floor() plus an explicit tie
check, which does not depend on the mode. clear_color_test converts the ties
under FE_DOWNWARD, FE_UPWARD and FE_TOWARDZERO and checks them once the
default mode is back; with nearbyint it fails as above.

d3d12_clear was left out of ctest until this lands (3fc0b21); it is registered
again, with SKIP_RETURN_CODE 77 as before.
2026-11-22 06:04:27 -03:00
a13ed408a4 Merge main (426023a) into the D3D-45 clear branch
- render_target_clear_color: main's integer conversion (every exposed UINT/SINT
  format, A2B10G10R10_UINT's 2-bit alpha) with this branch's normalised
  rounding (quantize_unorm, quantize_snorm) for the UNORM, SNORM and sRGB-alpha
  channels.
- Depth clears: main's D24-as-float conversion, then D16_UNORM through
  quantize_unorm.
- Format tables: main and this branch both mapped DXGI R16_UNORM and R8G8_SNORM
  and the R8G8_SNORM copy size; the duplicates are dropped.
- clear_color_test: main's table-driven integer checks plus this branch's
  normalised and integer cases. The float pass-through loop now uses
  R32_SFLOAT and R16G16B16A16_SFLOAT, since R8G8B8A8_UNORM values are rounded.
2026-11-22 06:04:16 -03:00
e63bf6bdef mc_command.run: a missing llvm-mc is one line, not a FileNotFoundError traceback
Without llvm-mc, run_gpu_tests.py, valu_fuzz.py, lds_fuzz.py,
image_fuzz.py, crosslane_fuzz.py and runtime/test/shaders/build.py
ended in 'FileNotFoundError: [WinError 2]' from subprocess.run: the first
step of TEST-71 on a Windows machine without one. Only shader_disasm.py
said what was missing. mc_command.run() starts an llvm-mc command and
turns a command that can't be started into shader_disasm.py's message
(set LLVM_MC or --llvm-mc, build_llvm_mc.ps1, the WSL form); the six
llvm-mc call sites use it. tests/test_mc_command.py covers run() and
each tool with a nonexistent LLVM_MC.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 03:02:20 -06:00
23962cb6d6 fix(runtime): classify D24 readback depth from its raw bits
Intel UHD 770 reports maximum depth for NaNs in the float comparison path. Check the input encoding before rounding finite values and exercise both signs of every NaN payload on the GPU.
2026-11-22 10:00:25 +01:00
ac5dbfae74 fix(tests): reject non-finite packed interpolation readbacks
Python's maximum can ignore a NaN after a finite operand. Check every decoded result before reducing pixel errors so a broken high-half export cannot pass both GPU runners.
2026-11-22 09:54:16 +01:00
a8dd36df99 d3d12_xs_root_signature_test: skip 1.2 when the runtime doesn't know it
Windows 10's D3D12 runtime fails the 1.2 feature query with E_INVALIDARG instead of reporting a lower version, so the test failed there.
2026-11-22 09:52:41 +01:00
8163c74be5 Merge origin/main into d3d90-castable-placed (resolve #1083 conflicts) 2026-11-22 00:52:00 -08:00