Add Perfetto Tracing to NCE Trapping API

As a performance sensitive part of code, the NCE Trapping API benefits from having tracing and it helps us better determine where guest code is spending its time for more targeted optimizations.
This commit is contained in:
PixelyIon
2022-07-26 19:35:47 +05:30
parent 9d294b9ccc
commit 1af781c0a5
4 changed files with 18 additions and 0 deletions

View File

@ -152,6 +152,8 @@ namespace skyline::gpu {
std::scoped_lock lock{*texture};
}, [weakThis] {
TRACE_EVENT("gpu", "Texture::ReadTrap");
auto texture{weakThis.lock()};
if (!texture)
return true;
@ -164,6 +166,8 @@ namespace skyline::gpu {
texture->WaitOnFence();
return true;
}, [weakThis] {
TRACE_EVENT("gpu", "Texture::WriteTrap");
auto texture{weakThis.lock()};
if (!texture)
return true;