test(agc): print the staged clear's expected byte count as a size_t #7415

Merged
milescoviello merged 1 commit from upstream-pr/7415 into main 2026-10-19 19:51:48 +00:00
milescoviello commented 2026-10-18 05:18:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-18T05:18:19Z.


What

The failure message of agc_driver_staged_clear_sampled_read formats its expected byte count, Threads * 4u + SampleTexelBytes (a std::size_t), with %u. On Linux with GCC 13 this is the only -Wformat warning in the tree:

StagedClearSampledRead.cpp:190:130: warning: format '%u' expects argument of type 'unsigned int', but argument 7 has type 'long unsigned int' [-Wformat=]

The test only prints this when it fails, and then it would show the wrong number. The conversion is now %zu, which the same format string already uses for its other three counts.

Tested

Ubuntu 24.04, GCC 13.3, Release:

  • the test target builds without the warning;
  • agc_driver_staged_clear_sampled_read passes on an RTX 4070 Ti (NVIDIA 595.99.02);
  • tools/check_conventions.py --base upstream/main passes.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 4070 Ti, driver 595.99.02, Ubuntu 24.04 (Linux 6.8)
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4906599731 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7415). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-18T05:18:19Z. --- ### What The failure message of `agc_driver_staged_clear_sampled_read` formats its expected byte count, `Threads * 4u + SampleTexelBytes` (a `std::size_t`), with `%u`. On Linux with GCC 13 this is the only `-Wformat` warning in the tree: ``` StagedClearSampledRead.cpp:190:130: warning: format '%u' expects argument of type 'unsigned int', but argument 7 has type 'long unsigned int' [-Wformat=] ``` The test only prints this when it fails, and then it would show the wrong number. The conversion is now `%zu`, which the same format string already uses for its other three counts. ### Tested Ubuntu 24.04, GCC 13.3, Release: - the test target builds without the warning; - `agc_driver_staged_clear_sampled_read` passes on an RTX 4070 Ti (NVIDIA 595.99.02); - `tools/check_conventions.py --base upstream/main` passes. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce RTX 4070 Ti, driver 595.99.02, Ubuntu 24.04 (Linux 6.8) - [x] AI-assisted: yes (Claude Code) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
adriadam10 commented 2026-10-19 19:53:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-19T19:53:08Z.


Checked the operand types (Threads is uint32_t, SampleTexelBytes is size_t, so the sum is size_t); %zu is right and matches the other counts in the format string. Merged.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6275948957 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7415#issuecomment-6275948957). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-19T19:53:08Z. --- Checked the operand types (Threads is uint32_t, SampleTexelBytes is size_t, so the sum is size_t); %zu is right and matches the other counts in the format string. Merged.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!7415
No description provided.