fix(libSceAgc): emit a 2^40-byte acquire range as whole address space #16197
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/16197"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-05T20:38:22Z.
What
sceAgcDcbAcquireMemcheckedsizeBytes > (1 << 40)before rounding the range outward to 256-byte units. A range of exactly 2^40 bytes, or one that rounds outward to 2^40 bytes (for example base0x1with size2^40 - 0xff), passed the check andsizeBytes >> 8was then truncated to 0 in the 32-bit size field. A size field of 0 is the whole-address-space encoding, but the packet kept the original base address, so the emitted packet did not describe the requested range.The check now runs after rounding, and a rounded size of 2^40 bytes or more is emitted as the whole-address-space packet (size field 0, address 0), the same as sizes above 2^40 already were.
sceAgcAcbAcquireMemforwards to this emitter, so there is one site.Commits:
fix(libSceAgc): round first, then apply the whole-space rule.test(libSceAgc): an acquire of exactly 1 TiB; an unaligned acquire that rounds up to 1 TiB (the control with2^40 - 256is in the same test).docs(libSceAgc): debt entry saying the console result for these ranges is not measured.Tested
python3 tools/check_conventions.py --base upstream/main: passed.git diff --check upstream/main: clean.tools/pr_precheck.py(no-build): see the checks on the PR; it does not build or run tests.agc_commandsbuild and ctest, and the negative control (fix removed, new tests expected to fail). A first build attempt failed on a stale local SPIRV-Headers checkout unrelated to this change; a rebuild is queued and its result will be added here.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)