Repository navigation
fix(agc): pass the tile mode of a mismatched depth plane copy as an int - #7504
milescoviello wants to merge 1 commit into
Conversation
The error for a depth plane copy whose geometry does not match its layers passed the TextureTileMode enum class straight to a %u conversion. GCC warns about it (-Wformat), and a scoped enumeration is not promoted in a variadic call. Cast it to int and print it with %d, as the two other tile mode messages in DepthSurface.cpp already do. 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.
|
|
Tested at
AI-assisted: yes (Claude Code); results above were run on this machine. |
|
Thanks @wachi35676 for checking the warning on both toolchains and running the depth tests on two GPUs. Added to the description. AI-assisted: yes (Claude Code) |
|
Windows regression check on an Intel UHD 770 and an AMD RX 9070 XT: no change in the full CTest results. Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release, every execution test built, This PR adds no test. Full CTest ( I also ran full CTest with this PR and the 13 other open AGC and shader PRs I tested in the same batch merged together (#7668, #7659, #7432, #7426, #7413, #7480, #7465, #7466, #7464, #7449, #7489, #7673, #7560). Neither GPU showed a failure beyond AI-assisted: yes (Claude Code) |
|
@savvaniss thanks for the full CTest on both GPUs, alone and in the 14-PR batch. It's in the description now. AI-assisted: yes (Claude Code) |
✅ NVIDIA GPU test: passedPR head
Unstable on main (3, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (3, not counted against this PR)Validation IDs already present on main (4 IDs in 495 tests)Skipped (45)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. |
BunnyFl
left a comment
There was a problem hiding this comment.
Still needed on current main f6232fcfda: the message moved to core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp:1561, and it still passes resource.tileMode (a TextureTileMode scoped enum) to %u. The PR merges cleanly.
Windows 11, WinLibs GCC 15.2.0: the merged DepthSurface.cpp compiles with no warnings. This build passes no -W flags for that file (ninja -t commands for its object). In a separate two-line file, GCC 15.2 with -Wall reports format '%u' expects argument of type 'unsigned int', but argument 4 has type 'E' [-Wformat=] for a scoped enum passed to %u, the same diagnostic you saw with GCC 13.
A wording nit for the description: on current main only the replaced-view message (:869) prints the tile mode as static_cast<int> with %d. The storage-access one (:612) uses static_cast<unsigned> with %u. Either cast fixes the mismatch.
|
@BunnyFl thanks for checking it on current AI-assisted: yes (Claude Code) |
What
The error for a depth plane copy whose geometry doesn't match its layers (
DepthSurface.cpp) passedresource.tileMode, aTextureTileModeenum class, straight to a%uconversion. A scoped enumeration isn't promoted in a variadic call, so the conversion doesn't match its argument. GCC 13 warns about it in every build:It is now cast to
intand printed with%d, as the replaced-view error in the same file already prints it. (The storage image access error casts tounsignedand prints%u; either cast fixes the mismatch.) On currentmainthe message is atDepthSurface.cpp:1561.Tested
Ubuntu 24.04 (Linux 6.8), GCC 13.3, NVIDIA RTX 4070 Ti, driver 595.99.02.
cmake --build build: the warning above is gone, andDepthSurface.cppbuilds without warnings.ctest -R "agc_driver_depth|native_depth|depth_plane|depth_storage": 19/19 pass. No test reaches this error (it fires only on a geometry mismatch), so there's no red/green test. The change only touches the message's arguments.tools/check_conventions.py --base upstream/mainpasses.tools/pr_overlap.pylists only conflicting PRs that it could not compare onDepthSurface.cpp, and none of their diffs touch this message.@wachi35676 tested 352f6236c. On WSL Ubuntu 24.04 with GCC 13.3,
mainprints the-Wformatwarning atDepthSurface.cpp:868and this PR builds the object without warnings. MinGW GCC 15.2 gives no warning either way. The 19agc_driver_depth|native_depth|depth_plane|depth_storagetests pass on an RTX 5070 Ti (617.42) and an AMD Radeon iGPU (32.0.21042.62).Windows, Intel and AMD: @savvaniss ran the full CTest (1,526 tests, Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Intel UHD 770 and AMD RX 9070 XT) with head 352f623 merged into
main0737757, alone and together with 13 other open AGC and shader PRs. Neither GPU fails anything beyondmain's own failures on that machine.Khronos validation layer (LunarG SDK 1.4.363), NVIDIA RTX 4070 Ti (595.99.02), Ubuntu 24.04:
VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 ctest -R '^agc_' -Vonmaine2a2914 and onmain+ this PR (352f623, a local merge).main: 815 of 815 pass; with this PR: 815 of 815 pass. Neither log reports the layer missing. VUIDs onmain:VUID-VkImageViewCreateInfo-usage-02275×6,VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605×18,VUID-vkCmdCopyBuffer-srcBuffer-00118×2,VUID-vkCmdDraw-multisampledRenderToSingleSampled-07285×2,VUID-vkCmdWaitEvents-srcStageMask-01158×2,VUID-vkSetEvent-event-09543×2; with this PR:VUID-VkImageViewCreateInfo-usage-02275×6,VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605×18,VUID-vkCmdCopyBuffer-srcBuffer-00118×2,VUID-vkCmdDraw-multisampledRenderToSingleSampled-07285×2,VUID-vkCmdWaitEvents-srcStageMask-01158×2,VUID-vkSetEvent-event-09543×2. None is new with this PR.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)🤖 Generated with Claude Code