Repository navigation
Conversation
|
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.
|
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
The reviewed change provides strong exception safety for UnitFlags growth by replacing the vector only after the new allocation succeeds; no blocking defect was found in the changed code.
What I ran
Reviewed head 2599195b793dd9864d8c54c69db63741f2cb4af6. Read the prepared description, commits, manifest, diff, and the complete changed file core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp. Used the pinned repository reader repo_read.py search for related uses. No build or tests were run.
Results
| Check | Result | Note |
|---|---|---|
| Changed code review | passed | Exception-safe growth path |
| Tests | not run | Author reports test results |
Findings
Blocking
None.
Non-blocking
None.
Not verified
The author reports libc++ allocation-failure tests and a broader ctest run, but these were not run during this review. No other files were changed or excluded according to the manifest.
To get this to a good state
Nothing is required.
|
Windows check of head All 10 selected tests (
AI-assisted: yes. |
kurexw
left a comment
There was a problem hiding this comment.
Tested on macOS 27.2 / Apple M4 with MoltenVK 1.4.2 (LunarG Vulkan SDK 1.4.363.1, validation layer 1.4.363), x86-64 build under Rosetta. This is the only GPU I tested.
Head 2599195b79 merged alone onto main 3b17977ba6, compared with 3b17977ba6 itself. I ran the 29 AGC tests that fail on main on this Mac, with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation and VK_LOADER_DEBUG=layer, through ctest --test-dir build -R <those 29> -V, three runs per side. Every Vulkan test logged Insert instance layer "VK_LAYER_KHRONOS_validation" and none logged was not found but was requested by env var VK_INSTANCE_LAYERS.
| test | main (3 runs) | this PR (3 runs) |
|---|---|---|
agc_unit_flags_allocation_failure_populated |
Failed, Failed, Failed | Passed, Passed, Passed |
The other 27 tests gave the same result on both sides.
agc_driver_label_after_import_copy is flaky on main as well: main Failed, Passed, Passed, this PR Failed, Failed, Failed. Every failure on either side is the same timing check ("round N: a CPU read after the label that followed the copy found K of 262144 destination bytes not yet copied"), and it varied the same way across the other PRs I tested in the same session, so I don't attribute it to this change.
VUID- lines: identical per test on both sides (30 on main, 30 with this PR, over the three runs). The VUID- lines on both sides are main's existing VUID-VkDeviceCreateInfo-sType-unique (a duplicated VkPhysicalDevicePortabilitySubsetFeaturesKHR in the device pNext chain) and VUID-VkSamplerCreateInfo-samplerMipLodBias-04467; this PR adds none. (agc_unit_flags_allocation_failure_populated doesn't create a Vulkan device, so it logs no layer insertion on either side.)
|
Tested on an Apple M1 (macOS 26.5, Apple clang 21.0.0), x86_64 Release under Rosetta 2. The tree was
AI-assisted: yes (Claude Code) |
|
Tested on an Apple M1 Pro, macOS 27.0.1 (26A434), Apple clang 21.0.0 (clang-2100.3.34.2), x86_64 Release under Rosetta 2. Base: main ae54dc8 + #17425 + #11049, with this PR’s head 2599195 merged on top. Without this PR, agc_unit_flags_allocation_failure_populated fails on every run with failed growth changed the existing unit flags, also at a4d1053. AI-assisted: yes |
|
Tested head Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, WinLibs GCC 15.2.0 r7, Release,
Whole batch: the full This is one combined tree, not a run of this PR alone. AI-assisted: yes (Claude Code) |
|
Tested on macOS: Apple M5 Pro, macOS 27.3, Apple clang, x86_64 Release under Rosetta 2, Tree:
AI-assisted: yes (Claude Code) |
|
Tested
Not covered: GPU. This pull request changes GPU code, and the GitHub-hosted runners above have no GPU, so the Vulkan and GPU tests fail there on main and on this pull request alike. This result says nothing about the changed GPU paths; they still need a run on a real GPU. AI-assisted: yes (Claude Code); the runs are automated, this summary was written from their reports. |
ligmaSec
left a comment
There was a problem hiding this comment.
The trial merge onto a1b75b0947 was clean. I checked that UnitFlags::assign constructs the replacement words before changing live storage or count when capacity must grow. The populated allocation-failure case is the most diagnostic one, because both members need to retain their prior values. Keep the paired libc++ results distinct from the Linux/libstdc++ control, where main can already preserve the old allocation.
AI-assisted: yes.
|
Host: macOS 15.7.9, Apple M4, x86_64 Release build under Rosetta 2,
The full I did not test natively on arm64 or on Intel hardware, and no title was run. AI-assisted: yes (Claude Code) |
What
On macOS,
agc_unit_flags_allocation_failure_populatedfails:UnitFlags::assignresizes its words withstd::vector::assign(n, value). Whennis larger than the capacity, libc++ frees the old buffer before it allocates the new one. So if that allocation throws, the vector is left empty. libstdc++ keeps the old contents, which is why only libc++ builds fail. A standalone check under the same toolchain shows it:In
UnitFlagsthat is worse than a lost value.countis updated only after the assign, so after a failed growth it still says 65 whilewordsis empty. The nextoperator[],AnyInorSetRangethen indexes past the end of the vector.When the new size needs more words than the capacity,
assignnow builds the new vector first and swaps it in. A failed allocation then leaves bothwordsandcountas they were. When the words fit in the current capacity, it still callsstd::vector::assign. That does not allocate, so nothing changes on that path.Tested
Setup:
-DCMAKE_OSX_ARCHITECTURES=x86_64; tests run under RosettaANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1(MoltenVK 1.4.2, LunarG Vulkan SDK 1.4.363.1)mainwith the open macOS build fixes appliedResults:
agc_unit_flags_allocation_failure_populatedfails before this change and passes after it.agc_unit_flags_allocation_failure_emptypasses before and after.ctest -R 'unit_flags|allocation_failure|texture_units|unit_'(13 tests) passes.ctest -R '^(agc|shader|job)'(1578 tests,-j 1) and compared it with the same run before this change: the test above is fixed and nothing new fails (16 failures before, 15 after).On libstdc++ the observable behaviour is the same as before; on libc++ a failed growth no longer clears the flags.
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)