Skip to content

Commit

Permalink
Fix agsInitialize call capture (#1144)
Browse files Browse the repository at this point in the history
* Fix agsInitialize call capture

* Fix the issue in replay
  • Loading branch information
feimao-gfxr authored Jun 21, 2023
1 parent 21dc82d commit f76cd3e
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions framework/decode/custom_ags_replay_consumer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,19 @@ void AgsReplayConsumer::Process_agsInitialize(const ApiCallInfo& call_info,
if (ags_dll_loaded_)
{
captured_context_ = context;
AGSGPUInfo gpu_info_replay{};
AGSGPUInfo gpu_info_replay{};

if (config != nullptr && (config->allocCallback != nullptr || config->freeCallback != nullptr))
{
GFXRECON_LOG_WARNING_ONCE(
"agsInitialize function was called with a non-null 'config' parameter during capture. "
"Now for replay, the parameter is set to a nullptr value, because the callback pointers can't be translated.");
}

AGSConfiguration* forced_config = nullptr;

AGSReturnCode result =
ags_dispatch_table_.agsInitialize(agsVersion, config, &current_context_, &gpu_info_replay);
ags_dispatch_table_.agsInitialize(agsVersion, forced_config, &current_context_, &gpu_info_replay);

CheckReplayResult("Process_agsInitialize", return_value, result);
}
Expand Down

0 comments on commit f76cd3e

Please sign in to comment.