Repository navigation
fix: clear GCC warnings in the AGC driver and two tests - #7555
Conversation
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed the five warning fixes against their call sites and existing UTF-8 path construction. The null-path log now avoids passing a null pointer to %s; the larger queue message buffer accommodates the full formatted diagnostic; and the ignored nodiscard result and C-linkage definition changes are appropriate. The focused hosted checks and cross-platform relinker/context jobs pass. I did not rerun the full build locally.
|
Confirming the AI-assisted: yes |
|
@brummilab thank you for checking it on Windows. It's in the Tested section now. AI-assisted: yes (Claude Code) |
2368d21 to
7e7b5ca
Compare
|
Rebased onto With GCC 15.2 on Ubuntu 26.04.1, AI-assisted: yes (Claude Code) |
A Release build with GCC warned in these three places: - SubmissionCapture's unknown-queue message needs up to 67 bytes and was formatted into 64, so queue numbers above 0xfffff lost its end. The buffer is 96 bytes. - ConstantPhi.cpp ignored IrBuilder::Emit's nodiscard result. - GuestMemoryModule.cpp both initialized and declared guestMemoryModuleData extern. The definition is now inside an extern "C" block. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7e7b5ca to
9aaf5ee
Compare
GCC 15.2 now warns (-Wformat-truncation) at two error messages that landed after the first commit: the unsupported PM4 packet message needs up to 101 bytes and had 96, and the stencil operation message needs up to 119 and had 112. Both buffers are 128 bytes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@MarcZX10 this changed since your approval, so a re-check is needed.
AI-assisted: yes (Claude Code) |
|
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.
|
✅ NVIDIA GPU test: passedPR head
Failing on main too (2, not counted against this PR)Passed on retry (1, failed in the parallel run, passed when re-run with a 360 s timeout; 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. |
What
A clean Release build (
CMAKE_BUILD_TYPE=Release,BUILD_TESTING=ON) with GCC warns in these five places incore/. Each is fixed without changing behaviour:libSceAgcDriver/Execution/src/SubmissionCapture.cpp(QueueType): "queue 0x%x is neither the graphics queue nor a compute queue" needs up to 67 bytes, and it was formatted into 64. So for a queue number above 0xfffff, the end of the exception message was cut off. The buffer is now 96 bytes.libSceAgcDriver/tests/ConstantPhi.cpp: the result of a[[nodiscard]]IrBuilder::Emitwas ignored. It is nowstatic_cast<void>, as the other tests do.tests/GuestMemoryModule.cpp:guestMemoryModuleDatawas both initialized and declaredextern("initialized and declared 'extern'"). The definition is now inside anextern "C" { }block, which gives the same C linkage and external symbol.libSceAgcDriver/Execution/src/Driver/Packets/CommandValidation.cpp(second commit): "unsupported PM4 packet type: header 0x%08x at DWORD %zu of %zu" needs up to 101 bytes for the largest%zuvalues and had 96 (-Wformat-truncation). The buffer is 128 bytes.libSceAgcDriver/Graphics/src/State.cpp(second commit): the stencil operation message needs up to 119 bytes for a 10-digit%uand had 112 (-Wformat-truncation). The operation is at most 15, so the text always fit; 128 bytes only silences the warning. fix(agc): replace with a stencil operation value the pixel shader exports #6762, which changed that buffer, has merged.Not in this PR any more: this PR also fixed
chdir's deprecatedstd::filesystem::u8pathin libc and the null%sargument insceKernelOpen's log. Both functions now copy the guest path first (2c5fcf6, "safely copy guest path arguments"), somainno longer warns there, and the rebase dropped those hunks.Also not in this PR:
DepthSurface.cpp's tile mode format (fix(agc): pass the tile mode of a mismatched depth plane copy as an int #7504) andStagedClearSampledRead.cpp's%u(test(agc): print the staged clear's expected byte count as a size_t #7415) are open as their own PRs.sceRtcFormatRFC2822formats into the guest's 32-byte buffer, which its longest valid string exactly fills, so that warning is a false positive I can't fix by enlarging anything.stl_algobase.h(GCC 13-Wstringop-overflow/-Warray-boundsfalse positives on vector copies) or in glslang.Tested
main316615d042(head9db070f8de, two commits).SubmissionCapture.cppconflicted with fix(agc): accept compute queue 0x58 on SubmitAcb #10307's queue range change: the merge keepsmain'sDriverDetail::SubmissionQueueEndbound and this PR's 96-byte buffer. Ubuntu 26.04.1, GCC 15.2, Release. The rebased first commit (9aaf5ee0bf) recompiled its three files without their warnings; that build's log still showed the two the second commit fixes andDepthSurface.cpp:1305, which is fix(agc): pass the tile mode of a mismatched depth plane copy as an int #7504's. At this head, the two files the second commit changes recompile without a warning.agc_driver_graphics,agc_constant_phi,guest_memoryandagc_driver_pm4pass 3 of 3. Windows 11 VM (GT 1030, WinLibs GCC 15.2.0, Release): the base316615d042and this head both build, and the four tests pass 3 of 3 on each; the rebased first commit alone (9aaf5ee0bf) passes its three 3 of 3 too.Earlier:
Rebased onto
main6f58a04 (head7e7b5ca3a7, one commit), on Ubuntu 26.04.1, GCC 15.2, Release. I touched the three files and built their targets onmainand on this head. Onmain, all three warnings appear:SubmissionCapture.cpp:179-Wformat-truncationConstantPhi.cpp:177ignored[[nodiscard]]GuestMemoryModule.cpp:1"initialized and declared 'extern'"On this head none appear.
agc_driver_graphics,agc_constant_phiandguest_memorypass.Windows 11 VM (GT 1030, 582.78, WinLibs GCC 15.2.0): both the merge base
acbfd7c7feand this head build. The same three tests pass 3 of 3 on each.Windows: @brummilab confirmed the
ConstantPhi.cpp:177-Wunused-resultwarning this fixes, with WinLibs GCC 15.2.0 r7 onmain2fade7e.Earlier, on the five-file head
2368d21ba0, Ubuntu 24.04 (Linux 6.8), GCC 13.3, NVIDIA RTX 4070 Ti, driver 595.99.02:main5bf2e13 with this PR: none of the five warnings above appear.ctest -R "^guest_|constant_phi|submission|stencil|graphics|libc": 436/436 pass.tools/check_conventions.py --base upstream/mainpasses.tools/pr_overlap.pylists only conflicting PRs that it could not compare: feat(aot): consolidate native ARM64 compiler, runtime and consumers #5021, test: organize library tests and label CTest suites #6044, Macos m4 #6222 and feat(wasm): run relinked titles in the browser with WebGPU #6879. Of those, test: organize library tests and label CTest suites #6044, Macos m4 #6222 and feat(wasm): run relinked titles in the browser with WebGPU #6879 don't touch these lines; feat(aot): consolidate native ARM64 compiler, runtime and consumers #5021's diff is too large for the API.VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 ctest -R '^agc_' -Vonmainf29546a and onmain+ this PR (2368d21, a local merge).main: 812 of 812 pass; with this PR: 812 of 812 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-vkCmdDispatch-magFilter-04553×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-vkCmdDispatch-magFilter-04553×2,VUID-vkCmdDraw-multisampledRenderToSingleSampled-07285×2,VUID-vkCmdWaitEvents-srcStageMask-01158×2,VUID-vkSetEvent-event-09543×2. None is new with this PR. Each ofmain's is the subject of an open PR: 00118 fix(agc): give copied guest buffer regions transfer-source usage #7961, 04553 fix(shader): point-filter direct samplers paired with unsigned integer images #7707, 07285 fix(agc): copy a linked pipeline's color sample counts only when it has color attachments #7985, 01158 and 09543 fix(agc): hold a pending producer batch with a timeline semaphore #7913, 00605 fix(agc): enable independentBlend for color targets with different blend states #6782, 02275 fix(agc): restrict sampled storage texture view usage #862.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