Commit Graph

1286 Commits

Author SHA1 Message Date
a3263e79e6 Merge pull request #1757 from Vonsek 2026-11-22 09:15:07 -05:00
b78819439f Merge pull request #1753 from Serrambi 2026-11-22 09:15:05 -05:00
082190c19b Merge pull request #1752 from CowDeV 2026-11-22 09:15:05 -05:00
24abd3dde4 Merge pull request #1749 from Alex Arenas 2026-11-22 09:15:03 -05:00
3430786f75 Merge pull request #1744 from Emirhan Karaca 2026-11-22 09:15:00 -05:00
445e79b2c7 Merge pull request #1743 from romainveurrier 2026-11-22 09:15:00 -05:00
b6135472da Merge pull request #1739 from Alex Arenas 2026-11-22 09:14:59 -05:00
32e03070a3 Merge pull request #1737 from IAmNotSiob 2026-11-22 09:14:58 -05:00
44c8ccc979 Merge pull request #1735 from yoraudev 2026-11-22 09:14:57 -05:00
0535612599 Merge pull request #1730 from totonii 2026-11-22 09:14:55 -05:00
b28487c827 Merge pull request #1729 from Vonsek 2026-11-22 09:14:55 -05:00
f74e67dd01 Merge pull request #1728 from Vonsek 2026-11-22 09:14:55 -05:00
da574cb90e Merge pull request #1714 from SWAYAM 2026-11-22 09:14:53 -05:00
09854b89a5 Merge pull request #1707 from Ash Hopkins 2026-11-22 09:14:52 -05:00
22baad5ec7 Merge pull request #1702 from Sagah123 2026-11-22 09:14:51 -05:00
a14edd52a4 Merge pull request #1674 from Serrambi 2026-11-22 09:14:50 -05:00
f0cddb90f8 Merge pull request #1578 from Dominik 2026-11-22 09:14:47 -05:00
ceb244b124 d3d12_vulkan_device_test: pin the 0.6 ULP clear tolerance on every GPU
The accept side of the SRGB-cast rule only runs where the host rounds
differently (Intel), so a change to it would stay green on NVIDIA and
AMD. ideal_srgb and within_06_ulp move to file scope, and the test
checks the predicate directly: (187, 188) at 187.516 and (127, 128) at
127.5 are accepted; (186, 188), (126, 128), (224, 225) at 224.61,
(136, 137) at 136.97 and (254, 255) at 255 are not. Raising the
tolerance to 1.6 fails the test on an RTX 4070 SUPER. Suggested in review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 15:11:35 +01:00
9eaddc92be vk_pipeline_check_cli: run the tool through CMAKE_CROSSCOMPILING_EMULATOR
CTest applies CMAKE_CROSSCOMPILING_EMULATOR only to tests whose command is a
target; the script test runs the host CMake, so the cross-build/Proton workflow
in docs/testing.md would execute the tool directly, without Wine. Pass the
emulator list as -DRUNNER and prepend it to both execute_process commands, the
same pattern as check_loaded_async.cmake.
2026-11-22 17:04:38 +03:00
400d976f43 d3d12_xs: name slot 67 descriptor fields as FSPX kinds 0, 1, 6, 7
Name all four pointer and size pairs in the XboxNativeComputePipelineStateDesc
struct as kinds 0, 1, 6, 7 per docs/fspx.md and name the slot
DeserializeComputePipelineStateX in slot_name, matching the DLL's messages.
This prepares the description struct for the runtime FSPX resolver follow-up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 19:34:10 +05:30
af236e196b d3d12_xs: route slot 67 compute pipeline from native code to CreateComputePipelineState (RT-99)
Xbox device slot 67 takes (desc, riid, out) with IID_ID3D12PipelineState and a console-only
descriptor with the root signature at +0x00 and code blob pointer/size at +0x28/+0x30.
Previously it logged and returned E_NOTIMPL.

Route it to CreateComputePipelineState on the PC device (slot 11) like slot 62, mapping the
console descriptor to D3D12_COMPUTE_PIPELINE_STATE_DESC. On the Vulkan device this resolves
through the translator via fssm_program and ShaderLibrary.

- Implement proxy_create_compute_pipeline_from_native_code in d3d12_xs_device.cpp
- Update device_proxy_test to verify slot 67 thunk, compute PSO creation over WARP, and argument checks
- Update d3d12_compute_test to verify slot 67 compute PSO creation on the Vulkan device
- Update documentation in d3d12_command_objects.md and d3d12_vulkan.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 19:34:10 +05:30
af0453281d d3d12: support multisampled placed textures (D3D-222) 2026-11-22 15:02:35 +01:00
c97ae2619a test(d3d12): gate tiled MSAA allocation skip on host quality levels (D3D-191) 2026-11-22 15:02:33 +01:00
dfdde86773 test(d3d12): skip host-unsupported tiled allocation cases (D3D-191) 2026-11-22 14:57:48 +01:00
22888d4e65 Runtime: test the shader lookup against a translated corpus
shader_library_corpus_test runs src/shader_library.h over the work folder
make_game.py builds from the player's copy (LEONIDA_SHADERS=<work>/shaders/spirv,
containers from <work>/shaders/dxbc or LEONIDA_SHADER_DXBC), as the D3D12
layer does with a PSO's bytecode: inflate the FSSM program, hash it and look
it up under the stage the DXIL program header names. Every container must
find its own index.json entry and a readable .spv, every entry must be
reached, and in containers with more than one 0x0D payload no earlier
payload may be the indexed program.

Without LEONIDA_SHADERS it prints SKIP and exits 77 (SKIP_RETURN_CODE).
On the 1.0.2.1 corpus: 26,503 containers, all resolve, 195 with more than
one program. With fssm_program switched to the first payload it fails
(391 failures, 26,308 of 26,503 entries reached).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 14:54:56 +01:00
146a9f02b4 d3d12_vulkan_device_test: 0.6 ULP tolerance for placed SRGB-cast clears (D3D-221)
Against another adapter or WARP, a placed clear byte may differ from the
host when both sides are within 0.6 ULP of the ideal value, the
tolerance D3D11.3 spec 3.2.3.6 (FLOAT -> UNORM) and 3.2.3.8
(FLOAT -> SRGB) allow. The plain tie rule already did this for
0.5 * 255; the SRGB-cast clear's 0.5 encodes to 187.516, where Intel's
Vulkan driver (UHD 770, 101.7092) writes 187 and WARP 188. The layer's
own adapter stays exact.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 14:53:04 +01:00
41ceb016c2 runtime: remove duplicate bind_image call in write_image_descriptor 2026-11-22 14:50:41 +01:00
ea879b5ca4 d3d12_vulkan_device.cpp: fix swapchain maintenance1 header guard syntax and scope 2026-11-22 14:50:34 +01:00
e451cf248a d3d12_vulkan_device.cpp: guard swapchain maintenance1 features with macro check 2026-11-22 14:49:15 +01:00
e8ac3266e7 d3d12_vulkan_device.cpp: guard swapchain maintenance1 features with macro check 2026-11-22 14:48:21 +01:00
db9b0904f0 Runtime: O(1) LayoutTracker rollback and unlock tracker_mutex before vkQueuePresentKHR in VulkanPresenter 2026-11-22 16:47:54 +03:00
be6ebf0e91 runtime: set binding.va and host_readable on placed buffers 2026-11-22 14:45:46 +01:00
a72cc827e6 Merge remote-tracking branch 'origin/main' into runtime-reserve-fixed-base
# Conflicts:
#	runtime/CMakeLists.txt
#	runtime/src/main.cpp
2026-11-22 13:44:03 +00:00
86afc220f1 test(d3d12): rename shadowed loop variable host_desc (C4456) 2026-11-22 14:43:53 +01:00
f3a4450592 vk_pipeline_check: reject malformed option values (TEST-250) 2026-11-22 16:43:50 +03:00
fa687fda48 d3d12_vulkan_device_test: sampler heap size and realtime priority gates 2026-11-22 14:43:26 +01:00
52c3a88947 GPU test: image atomics in a pixel shader (ps_imgatomic)
1,018 of the corpus's 1,038 image-atomic shaders are pixel shaders, but every GPU test of image atomics ran in a
compute shader (found by @aslan2142). ps_imgatomic does the corpus's forms in a pixel shader: image_atomic_umax,
umin and or on three 8x8 2D r32ui images (64 pixels contend for each texel) and umax on a 4x4x4 3D image, each
found through its own T# in the descriptor table and the set-0 r32ui storage arrays. Odd pixels are discarded
after their atomics, which must still count.

vk_bindless_test runs it when given ps_imgatomic.spv: it enables fragmentStoresAndAtomics (exit 77 without it),
clears the images (umin to all ones), draws, and checks all 256 texels against a model of the 4096 pixels and the
render target's discarded columns. run_gpu_tests.py and check.py run it next to ps_tex.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 13:42:22 +00:00
1eeaa202f9 d3d12_vulkan_device_test: invalid-argument cases a Windows 10 host predates 2026-11-22 14:41:44 +01:00
3f26a95a10 fix(file_system): check is_regular_file for deletion markers so nested deletes do not hide parent directories 2026-11-22 10:41:32 -03:00
fa2712e2b0 xdxr_build: one-workgroup sort for small builds, 256-element radix tiles
The radix sort's fixed latency dominated small builds (2,000 triangles: 0.81
ms with the sort, 0.08 ms without, on an RTX 2050; the 10k regression
@exhawk measured on #1572). Up to 1,024 keys are now sorted in one
workgroup's shared memory (bitonic, ties by element index: the stable
order; 8 KiB, within the 16 KiB minimum with the radix arrays), and the
radix tiles are 256 elements (4 chunks instead of 32 per workgroup).

RTX 2050: 1,000 triangles 0.24 ms, 2,000 0.28 ms (0.83), 10,000 0.38 ms
(0.81), 100,000 2.3 ms (2.5); 1M 21.9 ms (20.3, the larger scan).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 14:41:25 +01:00
6e8a1400ee vulkan_replay: name the XDXR build branch's binding apart from the KHR one
Two `const auto* build` in one else-if chain: the second hides the first
and MSVC /W4 warns (C4456) in every file that includes the header
(reported by @zneel on #1667).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 14:41:25 +01:00
5c6ff05950 feat(runtime): implement ID3D12Device::CreateConstantBufferView (GFX10 V#)
Write a 16-byte GFX10 raw buffer V# descriptor (48-bit BufferLocation, stride 0,
num_records = SizeInBytes, GFX10_FORMAT_32_UINT, OobSelect::raw) into the
32-byte CBV_SRV_UAV descriptor slot, zeroing the trailing 16 bytes (or the full
slot for a null description, zero BufferLocation, or zero SizeInBytes).

Verified on Windows 11 with RTX 5080 and Radeon Graphics in d3d12_compute_test:
64/64 dwords matched for CBV A, 32 in-bounds + 32 OOB-zero matched at +128, and
negative controls flipped 64/64 dwords for CBV B and null CBV.

AI Assisted.
2026-11-22 14:41:17 +01:00
40107eb878 Merge pull request #1724 from Vonsek 2026-11-22 08:38:47 -05:00
985a0ee4dc Merge pull request #1719 from waltingford 2026-11-22 08:38:45 -05:00
4e0abc668c Merge pull request #1713 from totonii 2026-11-22 08:38:40 -05:00
acc50aafd0 Merge pull request #1710 from Dominik 2026-11-22 08:38:38 -05:00
089c124df3 Merge pull request #1704 from Jack UK 2026-11-22 08:38:35 -05:00
12952f7e92 Merge pull request #1702 from Sagah123 2026-11-22 08:38:34 -05:00
10cf6ffca6 Merge pull request #1699 from AimLogin
# Conflicts:
#	docs/testing.md
2026-11-22 08:38:33 -05:00
464cff7336 Merge pull request #1698 from Jan Trencansky 2026-11-22 08:38:32 -05:00