Commit Graph

876 Commits

Author SHA1 Message Date
67468767cf Merge pull request #1326 from zneel 2026-11-22 05:37:42 -05:00
90c8688124 Merge pull request #1323 from Flyander 2026-11-22 05:37:41 -05:00
8fa286d3a1 Merge pull request #1322 from Vonsek 2026-11-22 05:37:41 -05:00
4324a7f88f Merge pull request #1321 from Emirhan Karaca 2026-11-22 05:37:41 -05:00
d01d1df494 Merge pull request #1306 from zneel 2026-11-22 05:37:40 -05:00
53300de17f Merge pull request #1270 from AimLogin 2026-11-22 05:37:39 -05:00
2f6881a065 Merge pull request #908 from AlxcBTW 2026-11-22 05:37:39 -05:00
e6f8478e9b D3D-62: create the converter on every GPU; merge with the concurrent-queue test
The converter was made only where the GPU lacks D24_UNORM_S8_UINT (1c5463b4). 96-bit textures need it on every
GPU, so it is always created; it costs nothing until a copy uses it (lazy pipeline, lazy tracker lock).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 11:26:48 +01:00
0723014a83 D3D-62: converter split test, COPY queue, footprint refusal, ctest skip
- depth24_convert_test: 96-bit texels split into rows (1 KiB range) and slices (1 MiB range).
- d3d12_rgb96_test: an upload and a readback on a COPY queue; GetCopyableFootprints refuses what creation
  refuses (as WARP); returns 77 without a Vulkan GPU or WARP so ctest skips; large timings behind LEONIDA_RGB96_LARGE.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 11:26:48 +01:00
983862e2a8 Runtime: 96-bit R32G32B32 textures on the Vulkan layer (D3D-62)
R32G32B32_FLOAT/UINT/SINT/TYPELESS textures were refused ("texture format not
supported yet"). They are now R32G32B32A32 images on every GPU: most have no
optimal-tiling RGB32 image, and one that has would not avoid the repack, since
D3D12 places subresources at multiples of 512 bytes and Vulkan wants a copy's
buffer offset to be a multiple of the texel size
(VUID-vkCmdCopyBufferToImage-dstImage-07975).

- Footprints keep D3D12's 12-byte texels (compared with WARP).
- CopyTextureRegion between a texture and a buffer is repacked by the D24
  compute pass (depth24_convert.comp modes 2 and 3, Depth24Job::rgb96): the
  same scratch, parts and lifetime, texels of three words in the footprint and
  four in the scratch, copied uninterpreted. depth24_convert.inc is
  regenerated with the documented glslc command; the same glslc reproduces the
  previous blob byte for byte from the previous source.
- WriteToSubresource/ReadFromSubresource take the staged copy, as D24-as-D32.
- A view's T# names GFX10_FORMAT_32_32_32_*, so alpha reads as one.
- Refused: unordered access and depth (as WARP), render targets (WARP has
  them; not done, and FORMAT_SUPPORT and GetResourceAllocationInfo agree),
  copies between a 96-bit and a four-channel texture, views of another
  format family.

Tested on an RX 9070 XT (AMD 26.11.2), Windows 11: d3d12_rgb96_test matches
WARP and the expected texels bit for bit for 4 formats as 2D arrays with mips
and as volumes; d3d12_descriptor_test samples FLOAT, UINT and TYPELESS views.
Clean under the validation layer with sync validation; depth24_convert_test
and ctest (62) pass.

AI-assisted (Claude Code).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 11:26:48 +01:00
1b88414e61 Tests: s_andn2_saveexec_b64 and s_andn2_wrexec_b64 on wave64, GPU and CPU
Neither instruction had a test (the _b32 forms are in #1299). The translator
needs no change: both pass.

- runtime/test/shaders/cs_w64x_andn2_exec.asm: one 64-lane wave. Each result
  has lanes in one half of the wave only, so an EXEC or an SCC taken from the
  other half alone shows; D is checked to be the old EXEC for saveexec and the
  new one for wrexec. In check.py and run_gpu_tests.py as a wave64 dump.
- tests/semantic/test_andn2_exec_b64.py: 12 pairs of S0 and EXEC for each
  instruction on all 64 lanes, against the ISA's definition written as
  integers; also runs the GPU test's fixture.

Run on an RX 9070 XT (AMD 26.11.2, Windows 11): passes natively 64-wide and
with LEONIDA_W64_EMULATE=1; the whole GPU suite is 127/127 both ways and the
semantic suite 1175 tests OK. Breaking either instruction in the translator
(D of wrexec = the old EXEC, D of saveexec = the new one, andn2 as and) fails
the GPU test and 13 CPU subtests.

AI-assisted (Claude Code).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 11:22:13 +01:00
d5ad74af45 presenter: lock the resource table through resource_mutex_ (main split it from mutex_)
main moved the resource table behind VulkanContext::resource_mutex_ (a
shared_mutex for lookups), so present(), present_blank() and the capture
path take a shared lock on it instead of the old mutex_.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 11:21:19 +01:00
36c11f8879 Merge remote-tracking branch 'upstream/main' into codex/constant-buffer-storage-read 2026-11-22 11:20:42 +01:00
1ea8ac875d Merge remote-tracking branch 'origin/main' into presentx-core-v2-local
# Conflicts:
#	README.md
#	docs/d3d12_vulkan.md
#	runtime/CMakeLists.txt
#	runtime/shims/d3d12_com.h
#	runtime/shims/d3d12_vulkan_device.cpp
#	runtime/test/vk_test_device.h
2026-11-22 11:15:14 +01:00
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
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
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