Trace dump tool, for dumping pngs (and in the future more stuff).
This commit is contained in:
@@ -28,6 +28,8 @@ TracePlayer::TracePlayer(xe::ui::Loop* loop, GraphicsSystem* graphics_system)
|
||||
->AllocFixed(0, 0x1FFFFFFF, 4096,
|
||||
kMemoryAllocationReserve | kMemoryAllocationCommit,
|
||||
kMemoryProtectRead | kMemoryProtectWrite);
|
||||
|
||||
playback_event_ = xe::threading::Event::CreateAutoResetEvent(false);
|
||||
}
|
||||
|
||||
TracePlayer::~TracePlayer() = default;
|
||||
@@ -77,6 +79,10 @@ void TracePlayer::SeekCommand(int target_command) {
|
||||
}
|
||||
}
|
||||
|
||||
void TracePlayer::WaitOnPlayback() {
|
||||
xe::threading::Wait(playback_event_.get(), true);
|
||||
}
|
||||
|
||||
void TracePlayer::PlayTrace(const uint8_t* trace_data, size_t trace_size,
|
||||
TracePlaybackMode playback_mode) {
|
||||
graphics_system_->command_processor()->CallInThread(
|
||||
@@ -194,6 +200,8 @@ void TracePlayer::PlayTraceOnThread(const uint8_t* trace_data,
|
||||
playing_trace_ = false;
|
||||
command_processor->set_swap_mode(SwapMode::kNormal);
|
||||
command_processor->IssueSwap(0, 1280, 720);
|
||||
|
||||
playback_event_->Set();
|
||||
}
|
||||
|
||||
} // namespace gpu
|
||||
|
||||
Reference in New Issue
Block a user