Repository navigation
Conversation
Add two-target write and discard controls and report the mixed-mask MRT1 observation separately. Compare defined pixels bit for bit without assuming a native RDNA2 value for the second target.
|
Tested ba8b9aa on Windows 11 with an NVIDIA GeForce RTX 4090 (driver 32.0.16.2101) and AMD Radeon(TM) Graphics (driver 32.0.21043.5001). The two-target readback checks pass on both adapters.
I built the head and base with AI-assisted. |
|
On Windows 11, Intel UHD 770 driver The new readback also makes a regression test for #3988 possible. In a hand-written 8×8 draw using
As a negative control I changed the combined translator to keep only the last target's lane mask. The split draw then lost all 32 left-side writes while all 32 right-side writes still matched. I'd put this case with #3988's regression tests once the two-target harness lands. These results cover translated Vulkan draws; the original two-target RDNA2 behavior still needs a native measurement. AI-assisted, synthetic fixtures only. |
|
Tested
Negative controls: the old one-target harness gives No blocking issue found in the reviewed changes. These checks cover translated Vulkan draws and the test harness; no native RDNA2 reference, game files, full runtime run or full GPU suite. |
|
VERIFIED GOOD, with one gap. At head (local RTX 5070, VS18/MSVC): Unverified here: the three Approve. AI-assisted review, no game files. |
|
Tested ba8b9aa on Intel UHD Graphics 630 (CFL GT2), Mesa 25.2.8 ANV, Ubuntu 24.04, device selected with LEONIDA_VK_DEVICE=Intel: pass. scripts/run_gpu_tests.py --filter ps_mrt_exports --require-pass: 3/3 passed, 4 shaders translated, 4 pass spirv-val.
So on ANV the masked MRT1 export lands at all 64 pixels, unlike the UHD 770 Windows driver result above, where MRT1 kept its clear color. tests/test_shader_checks.py: 82 tests OK. AI-assisted. |
|
Verified on current main (3faac55, merges cleanly): python -I tests/test_shader_checks.py gives 82 tests OK (re-run); the new cases cover the second-image requirement, truncated-readback detection, and the mixed-mask bucket report through a mocked harness, so the CPU-side logic is exercised without a GPU. The three new fixtures are hand-written listings, the .mrt1 sidecar name matches vk_harness, and the masked MRT1 value is explicitly reported as an observation without a hardware reference — the honest choice given #3988. The GPU readbacks themselves are hardware claims and unverified here; CI reports no checks for this branch. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only run). |
|
Native Windows Radeon integration verification of
The runner suite passed all four cases. Separate stock harness draws confirmed Khronos loaded at instance and device, with no validation warnings or errors. WSL LLVM 21.1.8 was used for CPU assembly only. Six modules passed Vulkan 1.2 validation and 176 focused Python tests passed. |
|
Tested
|
Keep the perspective fixture registered and exercise RGBA32F controls independently of an external format override. Copy the two targets to aligned offsets and write each image without padding.
|
Tested I ran the three 8×8 RGBA32F fixtures five times in separate runner processes. The write and discard controls matched all 64 pixels on both attachments in every run. For the masked export, MRT0 matched all 64 expected pixels each time. On MRT1 the masked draw placed all 64 pixels in the histogram’s “other” category on each of the five runs. None matched the clear value, zero, or the explicit export color. Together with the Windows result in the PR description, this supports keeping the masked MRT1 histogram diagnostic. The defined outputs passed in all 15 fixture runs. AI-assisted verification. |
|
Tested the current head 5d8091d on an AMD Radeon RX 9070 XT (RDNA4, subgroup 32..64) with AMD's Windows driver, Windows 11 23H2 (the AMD Windows runs here so far are at ba8b9aa). The run builds the PR's own
AI-assisted (Claude Code). No game files. |
Claimed in the coordination issue as TEST-1083. Claim in #4816
What and why
This adds two-color-target readback for the per-export mask question in #3988. The test harness previously saved only color attachment 0. Setting
VKH_MRT1=1writes both attachments to<out.raw>and<out.raw>.mrt1. A direct draw usesVKH_COLOR_FORMATfor both. In the default RGBA32F format, MRT0 clears to −1 and MRT1 to −2 in all four channels.Three hand-written pixel shaders run under both GPU test entry points. The write and discard controls check every channel of both images. The mixed case exports MRT0 with full EXEC and
vm, waits for that export, clears EXEC and exports MRT1 withdoneand novm. It checks the defined MRT0 pixels and reports what MRT1 contained. Missing or short second images fail the test. The change is independent of Vonsek's translator patch and can land on main.Hardware verification at
5d8091d4Merged upstream
mainat561b65a8and rebuilt the Vulkan harness. I selected the RTX 5090 D v2 (617.42) and Ryzen 7 9800X3D Radeon iGPU (32.0.21036.18) by name and verified the device reported by each draw.--filter ps_mrt_exports --require-passpassed 3/3 even withVKH_COLOR_FORMAT=9:1in the caller's environment. The built-in fixtures explicitly use RGBA32F. Three separate 8×8 draws per case reproduced both write colors, both discard clears and the defined first target of the mixed case, bit for bit.ps_persp_baryand the single-targetps_flatcontrols also passed on both devices.Earlier verification
Windows 11 Pro 26300.9974. Tested this branch at
ba8b9aa6(base64b45d07) and applied the test patch separately to the exact #3988 head55338a17. Selected the adapters by name and checked the device reported by the draw program. On both revisions, each row below was reproduced in three fresh draw processes per adapter. All counts are out of 64 pixels per image.On the AMD iGPU I also queried the driver's disassembly for the translated mixed shader via
VK_AMD_shader_info. It loads zero intov1, exportsmrt1 v1, v1, v1, v1 vm, and then exports MRT0 withdone vm. That inspection draw returned the same bytes as the regular run. This explains the observed zeros on this driver. A reference draw executing the original RDNA2 export order and EXEC change is still needed to establish the native result. Other Vulkan drivers may produce different MRT1 bits.python -I scripts/run_gpu_tests.py --build <build> --filter ps_mrt_exports --require-passran 3/3 cases on both GPUs and both revisions. All four fixture modules, including the vertex shader, passedspirv-val(LLVM 22.1.8, SPIRV-Tools 2026.4).ps_flattest matched all 4,096 pixels on both GPUs. The stencil-backedms_v5_workgrouptest matched all 24 groups on both.missing MRT1 readback.AI-assisted: yes, with OpenAI Codex. All inputs are synthetic.