Skip to content

Conversation

angela28chen
Copy link
Collaborator

@angela28chen angela28chen commented Sep 18, 2025

Since we moved to using the GFXR file load folder as the output folder for replay artifacts, currently there is an issue where subsequent replays will not have the proper artifacts displayed in the UI because we have improper cleanup and reload.

This PR addresses the issue for three files (profiling metrics CSV, gpu timing CSV, and PM4 capture) and adds a warning in the UI for the user to manually save any temporary files that they don't want cleared on the next replay. In the future when we have .dive files, more of this will be hidden from the user for ease of use.

Changes:

  • Deleting temp files from earlier replay runs upon initiation of new replay
  • Force reload of GFXR (+rd if present) after replay has completed.
  • Adding support for perf counter model reset with no CSV present
  • Added replay warning text in UI Analyze Capture menu
image

Minor changes:

  • Refactoring for updating tab views and getting path names
  • Extra debug logging around file handling

@angela28chen
Copy link
Collaborator Author

Notes:

  1. I think this should be done for PM4 as well, any thoughts on that?
  2. The UI text is ugly, suggestions on how to make it better are welcome

@angela28chen angela28chen marked this pull request as ready for review September 18, 2025 20:08
@GrantComm
Copy link
Collaborator

Notes:

  1. I think this should be done for PM4 as well, any thoughts on that?
  2. The UI text is ugly, suggestions on how to make it better are welcome

Maybe the warning could be a popup that appears when one of the artifact producing replay options is selected? Using the ShowErrorMessage(const std::string &err_msg); function. It could only popup once so the user isn't constantly dealing with popups if enabling more than one artifact producing replay option

@angela28chen
Copy link
Collaborator Author

Notes:

  1. I think this should be done for PM4 as well, any thoughts on that?
  2. The UI text is ugly, suggestions on how to make it better are welcome

Maybe the warning could be a popup that appears when one of the artifact producing replay options is selected? Using the ShowErrorMessage(const std::string &err_msg); function. It could only popup once so the user isn't constantly dealing with popups if enabling more than one artifact producing replay option

The thing is the artifacts will be wiped if the replay options that don't produce them are selected. So every time you replay it would affect the temporary artifacts. That's why I'm thinking a popup isn't a good option unless there's some kind of "don't show me this again" checkbox? Is that the popup option you mentioned?

@wangra-google
Copy link
Collaborator

The thing is the artifacts will be wiped if the replay options that don't produce them are selected. So every time you replay it would affect the temporary artifacts. That's why I'm thinking a popup isn't a good option unless there's some kind of "don't show me this again" checkbox? Is that the popup option you mentioned?

Personally I feel that a persistent warning text is better than a popup. But I guess this is not that important since using files is just a temp solution, and will soon be replaced by Elvis' comm infrastructure, and with that we dont have this issue. So for now i think you can keep the warning message as it is (maybe different font/color or maybe with warning signs like ⚠️)

@angela28chen
Copy link
Collaborator Author

@GrantComm @wangra-google I have updated this PR to also remove PM4 and force capture reload (which may be slower, but ensures the user sees the correct info from the most recent replay. In the future we might be able to speed it up and avoid re-loading the GFXR file with some refactoring)

I also updated the warning text. PTAL (image in PR description)

@@ -139,7 +142,7 @@ private slots:
const int kDataRole = Qt::UserRole + 1;
const int kDefaultFrameCount = 3;
const std::string kDefaultReplayButtonText = "Replay";
absl::StatusOr<std::string> m_capture_file_directory = "";
absl::StatusOr<std::string> m_local_capture_file_directory = "";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not really part of this change, but i feel it is a bit overkill to use absl::StatusOrstd::string for class members. When absl::StatusOrstd::string m_member is part of your object's state, it implies the object itself can exist in a "failed" state. This means that every single method that wants to use m_member must first check its status. This is repetitive and error-prone. You've just deferred the error handling from one place (creation) to everywhere (usage).

}

// Run the gpu_time replay
std::string gpu_time_csv_stem = "";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we use gpu_time_csv_stem some where?

WaitForReplay(*device);
qDebug() << "Loading gpu timing data: " << perf_counter_csv.string().c_str();
Copy link
Collaborator

@wangra-google wangra-google Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a bit confused here: are we loading gpu time or perf counter here? should perf_counter_csv be replaced by something like gpu_time_csv()?

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.

3 participants