summaryrefslogtreecommitdiffstats
path: root/tools/guest-diag/gz_pbuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/guest-diag/gz_pbuf.c')
-rw-r--r--tools/guest-diag/gz_pbuf.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/tools/guest-diag/gz_pbuf.c b/tools/guest-diag/gz_pbuf.c
index 5c03732..ddd9d00 100644
--- a/tools/guest-diag/gz_pbuf.c
+++ b/tools/guest-diag/gz_pbuf.c
@@ -42,6 +42,7 @@ static int make_pb(int w, int h)
GLX_RENDER_TYPE, GLX_RGBA_BIT,
GLX_RED_SIZE, 8, GLX_GREEN_SIZE, 8, GLX_BLUE_SIZE, 8,
GLX_ALPHA_SIZE, 8,
+ GLX_DEPTH_SIZE, 24, GLX_STENCIL_SIZE, 8,
GLX_DOUBLEBUFFER, False,
None
};
@@ -88,7 +89,14 @@ void *SDL_GL_CreateContext(SDL_Window *win)
}
g_win = win;
glXMakeCurrent(g_dpy, g_pb, g_ctx);
- fprintf(stderr, "[gzpbuf] pbuffer %dx%d ctx=%p\n", g_w, g_h, (void *)g_ctx);
+ {
+ GLint db = -1, sb = -1;
+
+ glGetIntegerv(GL_DEPTH_BITS, &db);
+ glGetIntegerv(GL_STENCIL_BITS, &sb);
+ fprintf(stderr, "[gzpbuf] pbuffer %dx%d ctx=%p depth=%d stencil=%d\n",
+ g_w, g_h, (void *)g_ctx, (int)db, (int)sb);
+ }
return (void *)g_ctx;
}
@@ -107,7 +115,14 @@ int SDL_GL_MakeCurrent(SDL_Window *win, void *ctx)
void SDL_GL_SwapWindow(SDL_Window *win)
{
(void)win;
- glFinish();
+ /*
+ * 2026-11-16 (c899): never glFinish here. The emulated GPU's work does
+ * not retire, and a blocking finish puts GZDoom in an uninterruptible
+ * nv ioctl that even SIGKILL cannot reap (the mission then hangs for
+ * minutes). glFlush only submits; sdl_cap's async PBO+fence harvest
+ * decides when a frame is actually ready.
+ */
+ glFlush();
}
void SDL_GL_GetDrawableSize(SDL_Window *win, int *w, int *h)