From 3ae4b3924b69bb633c377abf0298c7c77461db5b Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Tue, 14 Aug 2012 22:40:35 -0700 Subject: [PATCH] Add a couple of tests for the --frames option of "apitrace trim" Recent versions of apitrace added this new command-line option, so it's useful to test that it actually works here. --- traces/trim-frame-set.script | 20 ++++++++++++++++++++ traces/trim-head-by-frame.script | 14 ++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 traces/trim-frame-set.script create mode 100644 traces/trim-head-by-frame.script diff --git a/traces/trim-frame-set.script b/traces/trim-frame-set.script new file mode 100644 index 0000000..a6175be --- /dev/null +++ b/traces/trim-frame-set.script @@ -0,0 +1,20 @@ +trim --frames=0-5/draw,0-5/frame --exact glxsimple.trace +dump --verbose glxsimple-trim.trace +0 glClear(mask = GL_COLOR_BUFFER_BIT) +1 glXSwapBuffers(dpy = 0x236a280, drawable = 41943041) + +2 glEnd() +3 glXSwapBuffers(dpy = 0x236a280, drawable = 41943041) + +4 glEnd() +5 glXSwapBuffers(dpy = 0x236a280, drawable = 41943041) + +6 glClear(mask = GL_COLOR_BUFFER_BIT) +7 glXSwapBuffers(dpy = 0x236a280, drawable = 41943041) + +8 glEnd() +9 glXSwapBuffers(dpy = 0x236a280, drawable = 41943041) + +10 glEnd() +11 glXSwapBuffers(dpy = 0x236a280, drawable = 41943041) + diff --git a/traces/trim-head-by-frame.script b/traces/trim-head-by-frame.script new file mode 100644 index 0000000..ee5ddb4 --- /dev/null +++ b/traces/trim-head-by-frame.script @@ -0,0 +1,14 @@ +trim --frames=0 glxsimple.trace +dump --verbose glxsimple-trim.trace +0 glXChooseVisual(dpy = 0x236a280, screen = 0, attribList = {GLX_RGBA, GLX_RED_SIZE, GLX_RED_SIZE, GLX_GREEN_SIZE, GLX_RED_SIZE, GLX_BLUE_SIZE, GLX_RED_SIZE, GLX_ALPHA_SIZE, GLX_RED_SIZE, GLX_DOUBLEBUFFER, GLX_DEPTH_SIZE, 24, GLX_STENCIL_SIZE, GLX_RED_SIZE, GLX_X_VISUAL_TYPE, GLX_DIRECT_COLOR, 0}) = &{visual = 0x2374ef8, visualid = 34, screen = 0, depth = 24, c_class = 5, red_mask = 16711680, green_mask = 65280, blue_mask = 255, colormap_size = 256, bits_per_rgb = 8} +1 glXCreateContext(dpy = 0x236a280, vis = &{visual = 0x2374ef8, visualid = 34, screen = 0, depth = 24, c_class = 5, red_mask = 16711680, green_mask = 65280, blue_mask = 255, colormap_size = 256, bits_per_rgb = 8}, shareList = NULL, direct = True) = 0x2384330 +2 glXMakeCurrent(dpy = 0x236a280, drawable = 41943041, ctx = 0x2384330) = True +3 glViewport(x = 0, y = 0, width = 64, height = 64) +4 glMatrixMode(mode = GL_PROJECTION) +5 glLoadIdentity() +6 glOrtho(left = 0, right = 64, bottom = 64, top = 0, zNear = 0, zFar = 1) +7 glMatrixMode(mode = GL_MODELVIEW) +8 glClearColor(red = 0, green = 0, blue = 1, alpha = 1) +9 glClear(mask = GL_COLOR_BUFFER_BIT) +10 glXSwapBuffers(dpy = 0x236a280, drawable = 41943041) + -- 2.43.0