mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-21 22:05:59 +00:00
45 lines
1.9 KiB
Diff
45 lines
1.9 KiB
Diff
--- a/src/steamcompmgr.cpp
|
|
+++ b/src/steamcompmgr.cpp
|
|
@@ -7979,6 +7979,18 @@
|
|
{
|
|
gpuvis_trace_printf( "commit %lu done", w->commit_queue[ j ]->commitID );
|
|
w->commit_queue[ j ]->done = true;
|
|
+ if (w->appID == 1794680) {
|
|
+ static uint64_t last=0, start=0; static unsigned h[12]={};
|
|
+ const uint64_t now=get_time_in_nanos();
|
|
+ if (last) h[std::min<uint64_t>((now-last)/4000000,11)]++;
|
|
+ last=now; if (!start) start=now;
|
|
+ if (now-start>=10000000000ULL) {
|
|
+ fprintf(stderr,"[dd-latch] span=%lu bins4ms:",now-start);
|
|
+ for (unsigned value:h) fprintf(stderr," %u",value);
|
|
+ fprintf(stderr,"\n"); memset(h,0,sizeof(h)); start=now;
|
|
+ }
|
|
+
|
|
+ }
|
|
w->commit_queue[ j ]->earliest_present_time = earliestPresentTime;
|
|
w->commit_queue[ j ]->present_margin = earliestPresentTime - earliestLatchTime;
|
|
bFoundWindow = true;
|
|
--- a/src/Backends/WaylandBackend.cpp
|
|
+++ b/src/Backends/WaylandBackend.cpp
|
|
@@ -1473,6 +1473,20 @@
|
|
|
|
void CWaylandPlane::Present( std::optional<WaylandPlaneState> oState )
|
|
{
|
|
+ static wl_buffer *lastBuffer=nullptr;
|
|
+ if (oState && oState->bOpaque && oState->flSrcWidth>1 && oState->pBuffer!=lastBuffer) {
|
|
+ lastBuffer=oState->pBuffer;
|
|
+ static uint64_t last=0, start=0; static unsigned h[12]={};
|
|
+ const uint64_t now=get_time_in_nanos();
|
|
+ if (last) h[std::min<uint64_t>((now-last)/4000000,11)]++;
|
|
+ last=now; if (!start) start=now;
|
|
+ if (now-start>=10000000000ULL) {
|
|
+ fprintf(stderr,"[dd-plane-cadence] span=%lu bins4ms:",now-start);
|
|
+ for (unsigned value:h) fprintf(stderr," %u",value);
|
|
+ fprintf(stderr,"\n"); memset(h,0,sizeof(h)); start=now;
|
|
+ }
|
|
+
|
|
+ }
|
|
{
|
|
std::unique_lock lock( m_PlaneStateLock );
|
|
m_oCurrentPlaneState = oState;
|