Compare commits

..
3 changed files with 9 additions and 49 deletions

No files matched your search

@@ -898,10 +898,7 @@ static void take_dmabuf(struct surface *s, struct dmabuf_buffer *b, struct wl_re
* the display layer draws on screen while the counter sat at 0.0 fps and 1000.0 ms. */
if (s == g_hud_surface) {
g_hud_alive_ns = now_ns();
if (!repeat) { g_hud_last_ns = g_hud_alive_ns; g_hud_fresh = 1; droiddeck_on_game_frame();
droiddeck_log("dd-source", "recv=%lld tick=%lld buffer=%u", (long long)g_hud_last_ns,
(long long)g_tick_vsync_ns, wl_resource_get_id(buffer));
}
if (!repeat) { g_hud_last_ns = g_hud_alive_ns; g_hud_fresh = 1; droiddeck_on_game_frame(); }
}
}
@@ -2340,7 +2337,6 @@ static void on_vsync(int64_t frame_time_ns) {
}
g_last_vsync_ns = now;
g_tick_vsync_ns = frame_time_ns;
droiddeck_log("dd-vtick", "frame=%lld dispatch=%lld", (long long)frame_time_ns, (long long)now);
/* The app's surface may have been replaced or taken away since the last frame: apply that now
* (the app never waits for us), and redraw the scene onto a new one. */
if (vkp_apply_window_request()) g_dirty = 1;
+8
View File
@@ -45,5 +45,13 @@ library list, before anything is published.
`GAMESCOPE_FOCUSABLE_WINDOWS`, so the client kept its loading screen over the running game
(Skyrim SE, A Plague Tale: Innocence, on the games' own Xwayland). MapNotify now refreshes the flag.
- `0115-vblank-timer-once-per-refresh.patch` - this app: host presentation feedback can re-arm
the nested vblank timer after it already woke for a refresh. As the draw offset decays, the
same refresh's new wakeup can be ahead of the current time, so it fires twice and advances the
FPS limiter's counter twice. A 30 FPS FIFO game then reaches the host 1 or 3 refreshes apart
instead of 2, particularly with MangoHud redrawing between game frames. Remember the last
timerfd refresh dispatched and schedule beyond it, allowing small host-clock corrections.
This does not change the frame-sync/nudge path or add compositor buffering.
Sixteen more of Armada's patches are DRM/lease/HDR-on-KMS work for a native display, which this
app's Wayland-hosted gamescope never reaches, or need a newer gamescope than the runtime has.
@@ -1,44 +0,0 @@
--- 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;