Repository navigation
test(agc): export the front-face bits through a uint target as uint - #7746
oneandonlydean merged 2 commits into
Conversation
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
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.
|
|
Thanks, the test change looks right: with mode 7 and a uint export, the readback is raw dwords, so the all-bits checks still catch a real regression. One small request: could you change "Fixes #7703" to "Refs #7703" in the description? This PR fixes the test, but the issue's follow-up case (a mode 1 export to a 32-bit UINT target still producing float4, State.cpp:1275) is still open in the driver, and your debt bullet records that. "Fixes" would close the issue on merge. |
jotitadev
left a comment
There was a problem hiding this comment.
Apple GPU / MoltenVK run. This fixes the Metal side of #7703: agc_driver_front_face_all_bits was one of the base ^agc failures on Apple, and with this PR it passes. The full ^agc suite loses that failure and gains nothing from this PR.
Machine: Apple M2 Max, macOS 27.2, x86-64 build under Rosetta. Drivers: MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0) and MoltenVK main + SPIRV-Cross #2704. Head 3aded24, PR diff applied cleanly.
Tested: the tree is main a373e85 + mugurc's macOS series (ci/macos-series-2) + the PRs needed to build on macOS (#6667, #6668, #7524, #6969, and two files of #7332), not plain main (it doesn't build on macOS yet). Applied together in the same build: #7371, #7535, #7684, #7746 and #7759, plus a test-only patch that lets nine AGC fixtures load the Vulkan loader on macOS (branch jotitadev:fix/agc-tests-vulkan-loader-macos). Base on that tree: 40 ^agc failures with MoltenVK 1.4.2 and 26 with MoltenVK main + #2704, plus agc_driver_pooled_buffer_range and agc_performance_overlay, which only run because of the loader patch.
- With the PR:
agc_driver_front_face_all_bitspasses 3 of 3 on both drivers. - With only
FrontFaceAllBits.cppreverted, it fails on both drivers. MoltenVK rejects the pipeline withoutput of type float4 is not compatible with a MTLPixelFormatR32Uint color attachment, the error from #7703. - Full
^agcsuite with the stack: the base failures minusagc_driver_front_face_all_bitson both drivers. The one new failure in that run,agc_driver_native_depth_clears, comes from #7371 / #7233 in the same build (it passes again with #7371 reverted). Nothing from this PR.
GPUs tested: Apple M2 Max (MoltenVK 1.4.2; MoltenVK main + SPIRV-Cross #2704)
Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
|
@oneandonlydean done, the description now says "Refs #7703", so the issue stays open for the mode 1 export into a 32-bit UINT target. @jotitadev thanks for the MoltenVK run, good to have the Metal side confirmed. |
|
AMD and Intel Windows data: Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release, every execution test built,
The change only touches the test, so there is no separate run without it; AI-assisted: yes (Claude Code) |
3aded24 to
3bdd430
Compare
|
Rebased onto current @savvaniss thanks for the RX 9070 XT and UHD 770 runs on the Windows drivers. |
What
Refs #7703.
agc_driver_front_face_all_bitsbinds aVK_FORMAT_R32_UINTcolor target but drives the pixel export throughtargetOutputMode[0] = 1(SPI_SHADER_32_R) withuintExportleft clear, so the recompiler declaresout_mrt_0asfloat4. Writing a float output to an unsigned-integer attachment is undefined in Vulkan: the Khronos validation layer reportsUndefined-Value-ShaderFragmentOutputMismatchon every driver, and MoltenVK's Metal compiler refuses the pipeline (#7703). Desktop drivers keep the raw bits, so the behavioural check still passed and the mismatch went unseen in CI behaviour.The test now exports through mode 7 with
uintExportset, the path a real unsigned-integer target uses: the recompiler declaresout_mrt_0asuint4and the raw front-face bits reach theR32_UINTattachment as an unsigned integer. The pixel program exports component 0 only, so the readback values are unchanged. Test-only change; no driver source is touched.I also recorded in
docs/dev/debt/libSceAgcDriver.mdthat the export-format check inState.cpprefuses aUINT16_ABGRexport into a non-integer target but not the reverse, so a float export into an integer target is the same mismatch at the driver level.DecodeColorBuffermaps a number format of 4 toR32_UINTfrom the color buffer alone, so the combination is representable; which export format a title pairs with a 32-bit integer target is not measured, so I left the recompiler as is rather than change it speculatively here.Tested
Linux (Fedora 44, GCC, Ninja,
-DBUILD_TESTING=ON), RX 7700 XT (RADV NAVI32, Mesa), based onmain4ffb0cd12b:VK_LAYER_KHRONOS_validation1.4.34): onmainthe test prints twoUndefined-Value-ShaderFragmentOutputMismatchwarnings, one per draw, reporting a FLOAT output intoVK_FORMAT_R32_UINT; with this change both are gone. The 8 pre-existingVUID-VkGraphicsPipelineCreateInfo-pLibraries-06681errors are unrelated to color formats and are unchanged before and after.agc_driver_front_face_all_bits: passes 3 of 3 (--repeat until-fail:3) with and without the change; the readback values (0x3f800000/0xbf800000without all-bits,0xffffffff/0with it) are identical.tools/check_conventions.py --base upstream/mainandtools/pr_overlap.py --base main(no overlap) pass.Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repository