Repository navigation
vulkan_replay: clear packed 16-bit UAV textures (VK-UAV-CLEAR-PACK16) - #907
Conversation
SweatierKey
left a comment
There was a problem hiding this comment.
Independent hardware verification on NVIDIA GeForce RTX 5070 Ti (driver 616.92, Windows 11, Vulkan 1.4) against origin/main@a28927849:
- Built
d3d12_uav_clear_test.exeandreplay_uav_clear_offset_test.exe(clang-cl+ xwin SDK 10.0.26100) and ran natively on Windows 11 + RTX 5070 Ti:d3d12_uav_clear_test.exe:ClearUnorderedAccessViewUint/Float: raw, structured and typed buffers and 2D, array and volume textures, whole views and rectangles, all matched(rc=0, includes the newB5G6R5/B5G5R5A1/B4G4R4A4conversion checks).replay_uav_clear_offset_test.exe:replay_uav_clear_offset: buffer offsets and typeless texture view-format clears all passed(rc=0, includes exhaustive 65,536-word decode/encode round-trips andR16_UINT-backed render target clear forB5G5R5A1).
python3 -I scripts/check_no_game_data.py: clean.
GPUs tested: NVIDIA GeForce RTX 5070 Ti (driver 616.92, Windows 11)
AI-assisted: yes
Independent verification — Turing and BlackwellBaseline: PR head: Environment
Core, GPU-assisted and synchronization validation enabled. Three repetitions per revision on each GPU. CTest results
Total: 60/60 passed, 0 failed, 0 CTest skips. Packed-format regression coverageAll new packed-format conversion and replay checks pass on both systems, including exhaustive decode/encode round trips for:
All 65,536 packed words per format are covered by each HEAD replay test. Hardware observationsBoth GPUs reported: The existing B5G5R5A1 resource test passed on both revisions: The short UAV clear tests matched:
A4B4G4R4 typed UAV device clears were internally skipped on both GPUs because the capability was unavailable. Vulkan validationAll 12 synchronization validation positive controls passed. Each positive control detected the deliberate unsynchronized copy hazard and reported zero errors after adding the barrier. No unexpected Vulkan validation errors were observed in the selected test logs. Conclusion
The new regression assertions are absent from BASE. Synthetic fixtures only. No game files used. AI-assisted test automation and result analysis. |
uav_clear.h had no layout for R5G6B5, A1R5G5B5 and A4R4G4B4 (D3D12 B5G6R5, B5G5R5A1 and B4G4R4A4), so ClearUnorderedAccessView on such a texture was refused at replay and the whole submission was dropped.
ebfcce6 to
b67109e
Compare
Merging. **Why merged:** RT-4444-TARGET: where the device can't use a 4444 format as a colour attachment (NVIDIA), a B4G4R4A4 render target becomes an RGBA8 image. Its T#s keep the 4_4_4_4 format, and PSO RTV formats follow the image. Before this, the render target couldn't be created at all (size UINT64_MAX). sodove (5070 Ti) and SweatierKey approved. **Why it's good:** The new d3d12_b4g4r4a4_target really runs here (not skipped): "B4G4R4A4_UNORM ... using RGBA8", OK, 0 validation errors. b5g5r5a1_uav, srgb_uav and vulkan_device also pass. **Follow-up, not a blocker:** sodove measured that the RGBA8 fallback stores clears at 8-bit precision instead of quantising to 4 bits (0/1920 texels matched WARP's 4-bit result), and buffer-footprint copies from it move 4-byte texels (documented in the code). Quantising on clear and store would close that gap. Tested on Windows 11 / RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0. Merged alone onto main, its ctests pass both plain and with LEONIDA_VK_VALIDATION=1. Cumulative: #517, #907, #927, #954 and #1074 merged onto main 32a5d96 (after aslan2142's runtime merges). There the repo-consistency set gives 573 passed / 5 skipped / 0 failed, compileall is clean, and full ctest is 314/316 with the same 11 skips. The 2 failures are d3d12_depth_resolve (pre-existing) and d3d12_close_parity, which fails on plain 32a5d96 too: a regression from #510, reported there, not from these PRs. git merge-tree against current main: no conflicts. Security read of the three-dot diff: no binaries, game data, downloads, network calls or CI changes. AI-assisted (Claude Code, Claude Opus 5.5).
|
Merging. Why merged: VK-UAV-CLEAR-PACK16: B5G6R5, B5G5R5A1 and B4G4R4A4 join the UAV-clear layout table, with conversion checks and an exhaustive 65,536-word round trip. Timon360SB (2060S and 5070, 60/60) and SweatierKey approved. The current head b67109e is a content-identical rebase of the reviewed one. Why it's good: uav_clear, short_uav_clear, b5g5r5a1_uav and replay_uav_clear_offset all pass both plain and under validation. Tested on Windows 11 / RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0. Merged alone onto main, its ctests pass both plain and with LEONIDA_VK_VALIDATION=1. Cumulative: #517, #907, #927, #954 and #1074 merged onto main 32a5d96 (after aslan2142's runtime merges). There the repo-consistency set gives 573 passed / 5 skipped / 0 failed, compileall is clean, and full ctest is 314/316 with the same 11 skips. The 2 failures are d3d12_depth_resolve (pre-existing) and d3d12_close_parity, which fails on plain 32a5d96 too: a regression from #510, reported there, not from these PRs. git merge-tree against current main: no conflicts. Security read of the three-dot diff: no binaries, game data, downloads, network calls or CI changes. AI-assisted (Claude Code, Claude Opus 5.5). |
Merging. **Why merged:** RT-TITLE-HOST-REGION: a test-only probe that imports a 185 MiB host region as a BDA buffer through VK_EXT_external_memory_host and checks coherence both ways. A machine that can't import exits 77 (skip). No runtime source changes. Timon360SB, madhyn (3060 Ti/Wine) and SweatierKey approved. **Why it's good:** vk_host_region_import and its _validation variant: "185 MiB imported ... cpu-gpu-coherence=ok", 0 validation errors. Nit for a follow-up: the _validation test sets VK_VALIDATE_SYNC=1, which nothing in the tree reads; if sync validation is the goal, the Khronos layer setting is spelled differently, so that variant probably runs core validation only. Tested on Windows 11 / RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0. Merged alone onto main, its ctests pass both plain and with LEONIDA_VK_VALIDATION=1. Cumulative: #517, #907, #927, #954 and #1074 merged onto main 32a5d96 (after aslan2142's runtime merges). There the repo-consistency set gives 573 passed / 5 skipped / 0 failed, compileall is clean, and full ctest is 314/316 with the same 11 skips. The 2 failures are d3d12_depth_resolve (pre-existing) and d3d12_close_parity, which fails on plain 32a5d96 too: a regression from #510, reported there, not from these PRs. git merge-tree against current main: no conflicts. Security read of the three-dot diff: no binaries, game data, downloads, network calls or CI changes. AI-assisted (Claude Code, Claude Opus 5.5).
Merging. **Why merged:** TEST-INDIRECT-RT-ARENA: d3d12_indirect_rt_test replaces a nested std::max with an initializer-list std::max to work around an MSVC 19.52 miscompile. It's 6 lines. sodove passed both revisions, and the current head is a content-identical rebase. **Why it's good:** indirect_rt and indirect_rt_upload_sysmem: PASS with 0 validation errors, and the RayQuery got hit=1 here under validation. Timon360SB's hit=0 on a 5070 with GPU-assisted validation shows up on the base too, so it isn't this PR. Tested on Windows 11 / RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0. Merged alone onto main, its ctests pass both plain and with LEONIDA_VK_VALIDATION=1. Cumulative: #517, #907, #927, #954 and #1074 merged onto main 32a5d96 (after aslan2142's runtime merges). There the repo-consistency set gives 573 passed / 5 skipped / 0 failed, compileall is clean, and full ctest is 314/316 with the same 11 skips. The 2 failures are d3d12_depth_resolve (pre-existing) and d3d12_close_parity, which fails on plain 32a5d96 too: a regression from #510, reported there, not from these PRs. git merge-tree against current main: no conflicts. Security read of the three-dot diff: no binaries, game data, downloads, network calls or CI changes. AI-assisted (Claude Code, Claude Opus 5.5).
Merging. **Why merged:** RT-INPUT-SCRIPT-LENGTH: the shim's env() reader now handles values of any length (64 characters or more used to read as unset). The PR also adds the LEONIDA_INPUT_SCRIPT keyboard-pad scheduler (`button@seconds`, 300 ms presses), documented in docs/gameinput.md. That's a second topic, but the body says so, and both parts were reviewed. sodove checked 14/14 runs across lengths, with the control failing 12/12, and kawaii-shakal's harness follow-ups were addressed. **Why it's good:** gameinput_host, gameinput and the new gameinput_script pass; with validation, gameinput_script passes and logs "8 accepted / 11 rejected". The parsing is bounded (strtod with end-pointer and finiteness checks) and reads only its own env var. Tested on Windows 11 / RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0. Merged alone onto main, its ctests pass both plain and with LEONIDA_VK_VALIDATION=1. Cumulative: #517, #907, #927, #954 and #1074 merged onto main 32a5d96 (after aslan2142's runtime merges). There the repo-consistency set gives 573 passed / 5 skipped / 0 failed, compileall is clean, and full ctest is 314/316 with the same 11 skips. The 2 failures are d3d12_depth_resolve (pre-existing) and d3d12_close_parity, which fails on plain 32a5d96 too: a regression from #510, reported there, not from these PRs. git merge-tree against current main: no conflicts. Security read of the three-dot diff: no binaries, game data, downloads, network calls or CI changes. AI-assisted (Claude Code, Claude Opus 5.5).
Claimed in the coordination issue as: VK-UAV-CLEAR-PACK16
What and why
runtime/src/uav_clear.hhad no layout forR5G6B5,A1R5G5B5andA4R4G4B4_UNORM_PACK16(D3D12B5G6R5,B5G5R5A1andB4G4R4A4).ClearUnorderedAccessViewFloat/Uinton such a texture recorded fine, thenuav_clear::encoderefused it at replay,replayreturnedunsupportedandExecuteCommandListsdropped the whole submission.The path measured here is
B5G5R5A1_UNORMwithALLOW_UNORDERED_ACCESSon a GPU without native storage for it: the layer backs it withR16_UINT, and its UAV clear still namesA1R5G5B5.The three rows go next to the existing
R4G4B4A4one. WARP supports typed UAV stores and clears for all three formats, and the expected words in the tests come from WARP.Tested
After a rebase on
main6293c1c4(b67109eb, same patch asebfcce66), on Windows 11, MSVC 19.52.37029, RTX 3080, driver 621.24: fullctest -j 1 --timeout 300257 passed, 3 failed, 12 skipped,gameinputdisabled.d3d12_uav_clear,d3d12_short_uav_clear,d3d12_b5g5r5a1_uavandreplay_uav_clear_offsetpassed. The failures are the same three as in the first run below (#954 is open for the two indirect RT tests, #1066 ford3d12_execute_indirect_validation), and the skipped tests are the 12 listed there. The XMA2 decoder was not built on this PC.Windows 11, MSVC 19.52,
mainf3e26be for the baseline and 3d3770c plus this change (rebased on a289278, where the only new commit is a docs link).replay_uav_clear_offset_test(realreplay()with fake Vulkan functions). Against the old header it exits 1 with 25FAIL:lines, 8 for each format plus theR16_UINT-backed render target. With the fix it passes. It checks five Float clears and one Uint clear per format, a clear of an image in the format itself, and a decode/encode round trip of all 65536 words.ctest -R uav_clear: 3 of 3 passed, includingd3d12_uav_clear(three added literals) andd3d12_short_uav_clear.d3d12_uav_clearskips its A4B4G4R4 device clears here because the device reports no typed UAV for it.d3d12_b5g5r5a1_uav_testwith a whole-view Float clear and a rectangle Uint clear. Before:ExecuteCommandLists failed: unsupported; nothing was submitted. After: exit 0, every texel matches WARP (a2ec,8443).ctest: same results as the baseline, 255 passed and the same three failures (d3d12_execute_indirect_validation,d3d12_indirect_rt,d3d12_indirect_rt_upload_sysmem). Skipped:shader_library_corpus,bink_decode,bink_abi,bink_play_headless,fsr_dispatch,bvh_builder,bink_audio,vk_sync_validation,d3d12_sparse_queue_family_contract,d3d12_rgb9e5_rtv,d3d12_boot_movie,d3d12_first_light. Disabled:gameinput.git diff --checkandpython -I scripts/check_no_game_data.pyon the three files: clean.Not covered:
B5G6R5andB4G4R4A4on a GPU (checked on the CPU against WARP words only; which Vulkan drivers have native storage for them was not measured), the Vulkan validation layer, GCC and Clang, and the tests that needglslangValidator,llvm-mcor the SPIR-V tools. Merging #418 onto this branch is clean; #261 conflicts withmainitself in three other files.GPUs tested: NVIDIA GeForce RTX 3080, driver 621.24, Windows 11
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly.docs/design.md: not applicable.