Repository navigation
fix(shader): round emulated array sampling half to even - #13415
Conversation
Carry the RoundEven and unordered NOT_EQUAL fixes from boykopovar#907, with ThisIsAkill's invitation, onto the current constant-zero comparison path. Keep TRUNC_COORD accepted for that path and retain the newer format rules. Exercise array rounding through converted unorm sampling, where selecting the wrong layer changes the result. Preserve zero comparisons for half-float NaNs, signed zero, GREATER, NOT_EQUAL and TRUNC_COORD. Record the inherited RDNA2 measurement basis and the limits of these host tests. Co-Authored-By: Akhil Moola <24420588+ThisIsAkill@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Windows GPU run of head Windows 11 Enterprise 10.0.22621, Ryzen 9 5950X, Radeon RX 6700 XT with AMD proprietary driver 26.10.1 (Vulkan 1.4.315), WinLibs GCC 15.2.0 UCRT r7, Ninja, Release,
AI-assisted: yes (Claude Code). |
✅ NVIDIA GPU test: passedPR head
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (2, not counted against this PR)Validation IDs already present on main (4 IDs in 385 tests)Skipped (41)ReproduceAutomated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
|
Checked the array layer rounding ( |
|
Thanks @adriadam10 for the review and merge, and @JJenkx and @TechLevelZero for the GPU testing! Thanks again @ThisIsAkill for the original fixes. |
What
Carry the RoundEven and unordered NOT_EQUAL fixes from #907 at @ThisIsAkill's invitation, adapted to main
da026c70655a. Akhil Moola and the original AI co-author retain commit credit. This replaces #907; the two should not both land.The shared emulated sampler now rounds array layers half to even. A four-layer converted-unorm sampling regression exposes the live error at 0.49999997, 0.5, 1.5 and 2.5, with bounds cases. The retained NOT_EQUAL arithmetic uses unordered comparison as measured by adriadam10 on RDNA2 gfx1035 in the original review; this is not a new hardware or PS5 measurement.
Current main overrides accepted color comparisons with zero. Keep that behavior, the newer format rules and existing reduction refusal. The old TRUNC_COORD point-sampling refusal no longer applies to this constant-zero path. Test half-float NaN texels/references, signed zero, LESSEQUAL/GREATER/NOT_EQUAL and point/bilinear TRUNC_COORD without restoring the obsolete nonzero comparison expectations. Record these limits in the existing shader debt file.
Overlap: ran
tools/pr_overlap.pyagainst the open PRs. It reports no confirmed overlap for mergeable heads and flags shared files on conflicting heads. Targeted inspection of the rounding, comparison and TRUNC_COORD edits identifies #907 as the intended replacement; #12246 adds a separate 1D-array row helper. No prerequisite identified. Those other branch compositions were not runtime-tested.Tested
Windows 11 Home 10.0.26300, WinLibs MinGW-w64 GCC 15.2.0 / Ninja Release, synthetic shader fixtures:
5a32581256): 4/4 pass; zero VUID errors. The later commit only shortens/splits the debt documentation.agc_driver,agc_driver_emulated_color_compare,agc_driver_emulated_color_compare_srgb_decode,agc_driver_image_converted_unorm.ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, validation 1.4.363, serial verbose CTest with 30-second test bounds. Loader logs confirm layer insertion, with no missing-layer messages.Not tested: PS5, Linux/lavapipe, other GPUs, titles or the full suite. The NaN zero-result tests do not establish nonzero color-comparison semantics.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)