Skip to content

fix(agc): report pipelined read ranges per period, not since start - #738

Open
Thimo188 wants to merge 7 commits into
mainfrom
upstream-pr/22030
Open

Thimo188 wants to merge 7 commits into
mainfrom
upstream-pr/22030

Conversation

@Thimo188

@Thimo188 Thimo188 commented Dec 2, 2026 •

Copy link
Copy Markdown
Owner

Imported from boykopovar/AnyPS5#22030, originally opened by chitters2004.

Source commit: 8326d74a632189f43df6b4e11075cd2d3762f49b. The import branch preserves this fetched upstream PR snapshot. The description and validation below are copied from upstream; no new code changes or test runs were made for this import. Original reviews, discussions, and attachments remain at the linked upstream PR.


What

The [draw] pipelined profile line (DrawPipeline::report, APS5_PIPELINE_STATS or APS5_PROFILE_DRAW) reports every other count for its 10 s period. Its "read ranges" figure read heldReadRanges.Sum(), though, so it kept growing from process start instead of resetting each period. It now uses heldReadRanges.Take(), like "stores held" next to it.

Tested

Rebased onto main 802a0ae with no conflicts.

Linux (lavapipe):

  • agc_driver_pipeline_profile (tests/DrawPipelineProfile.cpp) now checks the line across two report periods. The second period must report only its own read ranges.
    • With Sum() restored: it fails, and the second line repeats the first period's count.
    • With the change: it passes.
  • This test creates no Vulkan device, so the validation layer has nothing to check here.
  • MinGW cross-compile of the changed files passes.

Fork CI on this commit (run 43999219790) passed every job, on Linux (lavapipe) and Windows, for this commit and for main 802a0ae: agc_driver_pipeline_profile passes, and no test fails here that passes on main. It opens no Vulkan device, so the validation layer has nothing to check.

Interaction with open pull requests:

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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • 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: n/a (no GPU work in the changed code or its test)
  • AI-assisted: yes

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Pipeline statistics reports now appear at most once every 10 seconds, including during enqueue activity.
    • Read-range counts reset after each report, so subsequent reports show only new activity.

The [draw] pipelined line printed heldReadRanges.Sum(), the running total,
while the stores-held and decode-drain counts beside it are per 10 s
period. It now takes the count like its siblings. The profile test reads
a second report and requires its read ranges to start from zero.
@coderabbitai

coderabbitai Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Changes: Pipeline reporting

Layer / File(s) Summary
Schedule reports and consume counters
core/libs/prx/libSceAgcDriver/Execution/include/Driver/Draw/DrawPipeline.hpp, core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPipeline.cpp
enqueue passes the current time to reportIfDue, which calls report after 10 seconds. report consumes and resets the read-range counter.
Test timed and enqueue reports
core/libs/prx/libSceAgcDriver/tests/DrawPipelineProfile.cpp, core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_pipeline_profile_tests.cmake
Tests check interval boundaries, counter resets, and reports triggered by enqueue. CTest registers the enqueue-report test.

Suggested reviewers: muhmuhkuh, chitters2004, amoenus

Change: Bug fix

Merge Risk: Minimal · up to 8326d

This change makes the pipelined draw profile report read ranges per 10-second period instead of as a running total, and lets enqueue trigger a due report. The change only affects profiling output and has test coverage. No merge-blocking risk was identified.

Security architecture risk: Minimal · up to 8326d

DrawPipeline now reports read ranges accumulated since the previous report. Profiling remains opt-in, with the same report cadence and draw submission behavior.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Usage-based review receipt

  • Mode: Continue automatically
  • Reviewed files: 4
  • Waived: $1.00 (charged $0.00)
  • View usage details

Note

This review exceeded your plan’s limits and used usage-based reviews—free during trial, billed after paid activation unless disabled. Manage usage-based reviews.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a0aad50e-55c4-4a12-b949-c44c1829e630
Commits

Reviewing files that changed from the base of the PR and between 4131f51 and 8326d74.

Files selected for processing: 4

  • core/libs/prx/libSceAgcDriver/Execution/include/Driver/Draw/DrawPipeline.hpp
  • core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPipeline.cpp
  • core/libs/prx/libSceAgcDriver/tests/DrawPipelineProfile.cpp
  • core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_pipeline_profile_tests.cmake

Limit details: You’ve used all 10 included reviews currently available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants