Commit Graph

4163 Commits

Author SHA1 Message Date
e1703a1c60 Merge pull request #1609 from Luiz Neves 2026-11-22 07:38:32 -05:00
7c32417608 Merge pull request #1604 from bobcatchris 2026-11-22 07:38:30 -05:00
f376f9f748 Runtime: lock LayoutTracker, roll back failed submits, and serialize capture copies in VulkanPresenter 2026-11-22 15:38:29 +03:00
bcbd21e077 Merge pull request #1602 from bobcatchris 2026-11-22 07:38:29 -05:00
23871359ff Merge pull request #1594 from Instru Control 2026-11-22 07:38:26 -05:00
2fb56d58f5 Merge pull request #1592 from Vonsek 2026-11-22 07:38:26 -05:00
83f13ed569 Merge remote-tracking branch 'origin/main' into rt/xdxr-gpu-builder-merge
# Conflicts:
#	runtime/CMakeLists.txt
2026-11-22 13:38:24 +01:00
19b1ec0af4 Merge pull request #1585 from LuanFreitas 2026-11-22 07:38:23 -05:00
868f3f8153 Merge pull request #1584 from AlxcBTW 2026-11-22 07:38:23 -05:00
8c35079690 Merge pull request #1583 from Vonsek 2026-11-22 07:38:22 -05:00
df311d79b8 Merge pull request #1582 from Emirhan Karaca 2026-11-22 07:38:22 -05:00
afd77f314d Merge pull request #1581 from Gurvan 2026-11-22 07:38:22 -05:00
e99aecb5cc Merge pull request #1580 from Zebraine 2026-11-22 07:38:21 -05:00
01cde4562b Verify the exact tiny game exit code in runtime tests 2026-11-22 20:38:19 +08:00
0dd6bb051c Merge pull request #1569 from Vonsek 2026-11-22 07:38:16 -05:00
4717f13f7c Merge pull request #1565 from Vyral1978
# Conflicts:
#	docs/design.md
2026-11-22 07:38:15 -05:00
85520f2a64 Merge pull request #1560 from Instru Control 2026-11-22 07:38:12 -05:00
af665729d2 Merge pull request #1553 from quackottu 2026-11-22 07:38:09 -05:00
c7dfd34fda Merge pull request #1552 from Luiz Neves 2026-11-22 07:38:08 -05:00
41557027b6 Merge pull request #1551 from HQasper 2026-11-22 07:38:08 -05:00
d87b14012c Merge pull request #1545 from abilliontokens 2026-11-22 07:38:06 -05:00
f3e6d5a9b4 Merge pull request #1523 from AlxcBTW 2026-11-22 07:38:02 -05:00
11380bbbd6 Merge pull request #1511 from zneel 2026-11-22 07:38:00 -05:00
12eab0b570 Merge pull request #1489 from AlxcBTW 2026-11-22 07:38:00 -05:00
8bf46bd30e Merge pull request #1419 from Jan Trencansky 2026-11-22 07:37:55 -05:00
1cca596655 Merge pull request #1391 from Flyander 2026-11-22 07:37:55 -05:00
814e506179 Merge pull request #558 from omar-akermi 2026-11-22 07:37:53 -05:00
ce7e042e6e Merge pull request #495 from Aminecsmc 2026-11-22 07:37:52 -05:00
ac1529efee vk_texture_test: skip when the Vulkan environment is unavailable
The texture test only returned 77 when --two-mip was set; a normal run returned 1 for a missing physical device or graphics queue, and a missing loader or ICD also failed instead of skipping. Treat those unavailable-environment cases as the existing ctest skip (77) in every mode, while real shader or result failures still return 1.

Verified on Windows 11 with an RX 7900 XTX: the normal texture test passes after building the generated SPIR-V, and a forced no-ICD run returns 77. No game files.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-11-22 06:37:03 -06:00
1556d9c4db Merge main (99f99890) into d3d-51-command-list-rules
Conflicts in d3d12_com.cpp and d3d12_vulkan_device_test.cpp: both sides kept.

d3d12_debug_markers_test recorded two lists into one allocator at once, which
this branch rejects as the PC runtime does; its second list now has its own
allocator. The device-removed wording in the docs and the test matches main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 13:36:11 +01:00
7173782f05 GPU test cs_w32_new_ops: ops merged today with CPU-only checks
s_quadmask_b32/b64, s_bitreplicate_b64_b32, v_cvt_pknorm_i16/u16_f32,
ds_wrxchg2_rtn_b32 and the ds_nop / v_clrexcp no-ops were merged with
semantic tests only. cs_w32_new_ops.asm has lane 0 of a wave32 group
store one word of each; check.py and run_gpu_tests.py expect the eight
words (derived in the .asm header), so CI runs it on llvmpipe.

tests/semantic/test_new_ops_fixture.py runs the fixture on the CPU,
checks the words against values computed from the ISA definitions, and
that both GPU runners expect the same words.
2026-11-22 09:35:20 -03:00
444de13ca4 GPU test cs_w32_misc_ext: more ops that only had CPU checks
s_nand_b64, s_xnor_b64, v_cvt_pk_u16_u32, v_cvt_pk_i16_i32,
v_mad_u32_u16, v_mad_i32_i16, ds_cmpst_rtn_b32 and ds_write2_b64 /
ds_read2_b64 were added with semantic tests only. cs_w32_misc_ext.asm has
lane 0 of a wave32 group store one word of each; check.py and
run_gpu_tests.py expect the eight words (derived in the .asm header), so
CI runs it on llvmpipe.

tests/semantic/test_misc_ext_fixture.py runs the fixture on the CPU,
checks the words against values computed from the ISA definitions, and
that both GPU runners expect the same words.
2026-11-22 09:35:20 -03:00
d63d9c9a05 Merge origin/main into pso-subgroup-size-v2
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-22 13:34:03 +01:00
67c8ffe45c fix(shader): query dimensions from 2D array image views
Array resource queries need the array at the descriptor index so the third component reports the view's layer count. Check the returned dimensions through a draw against the existing 12-layer texture.
2026-11-22 13:33:58 +01:00
c083d09f19 dxgi: report swapchain frame statistics from the presenter
GetFrameStatistics returned E_NOTIMPL even though the swapchain already tracks successful presents. Record the QPC at each successful present and fill PresentCount, PresentRefreshCount, SyncRefreshCount and SyncQPCTime; failed and test presents still change nothing. The test checks the values and the null-argument error.

Verified on Windows 11 with an RX 7900 XTX: dxgi_swapchain passed with and without LEONIDA_VK_VALIDATION=1. No game files.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-11-22 06:33:56 -06:00
9f681772df Tests: skip ps_vcmpx_forms when fragment subgroups may run narrower than 32 (TEST-205)
On devices with minSubgroupSize under 32, vk_harness cannot pin fragment (#1318), so the
v_cmpx EXEC packing in ps_vcmpx_forms is not comparable to the 32-lane expectation.
2026-11-22 09:33:33 -03:00
f3977cac42 Merge main into test-184-image-ops
main is at 41f44826. Two conflicts, both sides kept:

- docs/design.md: both sides edited the one-line "Ray tracing" row. Main's
  row (the triangle node types and their vertex slots), with this branch's
  sentence about cs_bvh32 where it stood.
- tests/test_shader_checks.py: main counts ps_ssharp (9 -> 10) and patches
  sampler_test on the lines next to this branch's STORE_WORDS / GET_LOD_TESTS
  terms and its get_lod_test patch. All four lines.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 07:33:23 -05:00
c94ca41411 dxgi: answer swapchain GetDevice and GetFullscreenDesc
The swapchain kept the factory but discarded the device passed to CreateSwapChainForHwnd, so both IDXGIDeviceSubObject::GetDevice and IDXGISwapChain1::GetFullscreenDesc returned E_NOTIMPL. Hold that device (as native DXGI does), return it through QueryInterface, and describe the windowed swapchain with a zeroed fullscreen description and Windowed = TRUE. The swapchain test now checks both.

Verified on Windows 11 with an RX 7900 XTX: dxgi_swapchain passed with and without LEONIDA_VK_VALIDATION=1. No game files.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-11-22 06:32:44 -06:00
c2215fc635 vk_xdxr_build_test: a timing mode in device-local memory
`vk_xdxr_build_test <dir> <triangles>` times BLAS builds of random triangles
with the result and scratch in device-local memory; vk_test_device.h's
buffer() gives a device-local buffer when `mapped` is null.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 13:31:32 +01:00
678c5c0b1e fix(test): synchronize texture framebuffer readback
Make the render pass expose its attachment writes and final layout transition to the copy that reads the frame. Matching pixels alone leave this hazard invisible on two drivers.
2026-11-22 13:30:08 +01:00
445f796eae fix(runtime): enable multisampled graphics pipelines (SampleDesc.Count > 1)
CreateGraphicsPipelineState previously rejected SampleDesc.Count > 1 with E_NOTIMPL and hardcoded rasterizationSamples = VK_SAMPLE_COUNT_1_BIT, even though multisampled render targets, RTVs and ResolveSubresource already work.

Validate power-of-two sample counts against the physical device's framebufferColorSampleCounts / framebufferDepthSampleCounts / framebufferStencilSampleCounts / framebufferNoAttachmentsSampleCounts limits, set VkPipelineMultisampleStateCreateInfo::rasterizationSamples from desc.SampleDesc.Count, and add a synthetic 4x MSAA draw + ResolveSubresource test in d3d12_draw_test with SampleMask = 0xFFFFFFFF and SampleMask = 0x5 (half-mask control).
2026-11-22 13:30:06 +01:00
b02e334962 Mark the binary occlusion test output host-readable 2026-11-22 15:59:55 +03:30
21a8e07168 Fix what the merge round broke: w64_graphics fixtures, the R24G8 FORMAT_SUPPORT check, four tools' stdout
- run_gpu_tests.py: #1541's wave64 pixel fixtures (runtime/test/shaders/w64_graphics.py FIXTURES, tiers A-C) are
  checked by that runner; run_gpu_tests picked up their .asm and failed 14 of them with "no checker defined".
  It now leaves w64_graphics.FIXTURES to that runner.
- d3d12_d24_support_test (#1493): expected DEPTH_STENCIL in FORMAT_SUPPORT for R24G8_TYPELESS. Measured here, the
  host D3D12 (RTX 4060 Ti and WARP) reports 0x001010b0 for R24G8_TYPELESS and 0x003110b0 (DEPTH_STENCIL) only for
  D24_UNORM_S8_UINT, which #1511's per-format rules follow; the check now expects the bit for the typed format only.
- fma_mix_probe, text_tables, wave64_halves, xdxr_bvh: new tools without #1428's stdout errors='replace' guard.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 07:29:31 -05:00
c5fb25f734 gta6rt: a failed write-open no longer revives a deleted GAME: name (RT-97)
write_target cleared the delete marker before the host CreateFileW ran, and copied a package file up
without looking at the marker, so a write-open of a deleted name could make it readable again: an
OPEN_EXISTING open succeeded on the copy-up, and one that failed left the marker gone with the package
file visible behind it.

The marker is now never removed, and a tombstoned name is never copied up. Reads and listings prefer an
overlay copy, so a re-created file is visible without clearing anything, while an open that keeps the
contents (OPEN_EXISTING, TRUNCATE_EXISTING) fails with ERROR_FILE_NOT_FOUND and leaves the name deleted.
file_system asserts that sequence: the failed write-open, no overlay copy, and the name still gone.

Review pass over the rest of the shim: Target loses the two fields nothing read, FindFirstFile no longer
parses its pattern twice, collect drops its unreachable non-console branch, and the enumeration states are
unique_ptr entries looked up under the lock instead of raw pointers handed out of it.
2026-11-22 13:29:20 +01:00
1cf3ca9211 Mark the overlapping occlusion test output host-readable 2026-11-22 15:58:49 +03:30
432d9ab1eb fix(runtime): support IBStripCutValue via dynamic primitive restart
CreateGraphicsPipelineState previously logged that index-buffer strip cuts (primitive restart) were not modelled and left primitiveRestartEnable disabled.

Load Vulkan 1.3 vkCmdSetPrimitiveRestartEnable in vulkan_backend.h, declare VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE on graphics pipelines, record IBStripCutValue on GraphicsPipeline, and enable primitive restart during replay only for indexed strip topologies whose index format matches the PSO strip-cut value (0xFFFF with UINT16, 0xFFFFFFFF with UINT32). Add synthetic 16-bit/32-bit triangle-strip cut and no-cut negative-control GPU draw tests in d3d12_draw_test.
2026-11-22 13:25:06 +01:00
7ec6e3ecfe d3d12 FORMAT_SUPPORT: depth formats are not UAVs
NVIDIA gives VK_FORMAT_D32_SFLOAT and D16_UNORM STORAGE_IMAGE, so the
layer reported typed UAVs (and now typed loads) for D32_FLOAT and
D16_UNORM on an RTX 3070 where native D3D12 reports none (found by
@Parakeet-Wheat, review by @Flyander). The depth cleanup clears the
typed-UAV bit and every Support2 bit, and the host comparison's depth
check now covers TYPED_UNORDERED_ACCESS_VIEW and Support2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 13:24:48 +01:00
eeb873355e Runtime: match GPU->HOST readback stages to depth24, rgb96 and buffer UAV clears 2026-11-22 15:23:54 +03:00
4852fe83e2 Report unconfigured retail runtime tests as skipped 2026-11-22 20:23:07 +08:00
17d0861c34 d3d12 FORMAT_SUPPORT: review fixes; the test catches over-claims
From two reviews of #1511:
- Depth formats drop TEXTURE1D: the layer refuses 1D depth-stencil
  resources (native D3D12 allows them).
- The depth MULTISAMPLE_RENDERTARGET query uses the same usages as
  MULTISAMPLE_QUALITY_LEVELS and resource creation.
- R9G9B9E5's emulated UAV reports typed load with store, like the rest.
- Comments and docs say what works today: typed UAV texture reads go
  through the sampled binding; typed buffer UAVs share the store side's
  gaps (no buffer UAV views, rdna2spirv FORMATS); R32_UINT atomics work
  on 2D UAVs only.
- compare_format_support only runs against a host on the same adapter,
  lists the formats the layer answers with no uses instead of skipping
  them silently, needs at least 40 compared formats, and checks
  over-claims: MIP and atomics the host lacks, atomics outside
  R32_UINT/R32_SINT, sampling integer formats, and multisample render
  targets that disagree with MULTISAMPLE_QUALITY_LEVELS. A layer with
  injected atomics, multisample and integer-sampling over-claims fails
  it with 128 mismatches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 13:23:02 +01:00