Piglit
flowchart TB
subgraph p [Main Thread]
subgraph p0 ["piglit_drm_create_dma_buf()"]
p.a["drv->create(w, h, fourcc, src_data, drm_buf)"]
p.b["drv->export(drm_buf)"]
subgraph p1 ["create_and_destroy_texture()"]
p.c["egl_image_for_dma_buf_fd<br>(buf, fd, fourcc, img)"]
p.d["texture_for_egl_image(img, texture)"]
p.e["eglDestroyImageKHR(display, img)"]
p.f["glDeleteTextures(1, &texture)"]
p.g["glFinish()"]
end
end
end
subgraph t1 [Thread 1]
subgraph lo11 [Loop 1]
t1.a["eglCreateContext()"]
t1.b["eglMakeCurrent()"]
subgraph lo111 ["create_and_destroy_texture()"]
t1.c["egl_image_for_dma_buf_fd<br>(buf, fd, fourcc, img)"]
t1.d["texture_for_egl_image(img, texture)"]
t1.e["eglDestroyImageKHR(display, img)"]
t1.f["glDeleteTextures(1, &texture)"]
t1.g["glFinish()"]
end
end
end
subgraph t2 [Thread 2]
subgraph lo21 [Loop 1]
t2.a["eglCreateContext()"]
t2.b["eglMakeCurrent()"]
subgraph lo211 ["create_and_destroy_texture()"]
t2.c["egl_image_for_dma_buf_fd<br>(buf, fd, fourcc, img)"]
t2.d["texture_for_egl_image(img, texture)"]
t2.e["eglDestroyImageKHR(display, img)"]
t2.f["glDeleteTextures(1, &texture)"]
t2.g["glFinish()"]
end
end
end
p.a --> p.b --> p.c --> p.d --> p.e --> p.f --> p.g
t1.a --> t1.b --> t1.c --> t1.d --> t1.e --> t1.f --> t1.g
t2.a --> t2.b --> t2.c --> t2.d --> t2.e --> t2.f --> t2.g
p --> t1
p --> t2
lo11 -- 100000 times --> lo11
lo21 -- 100000 times --> lo21
click p.a https://gitlab.freedesktop.org/mesa/piglit/-/blob/main/tests/util/piglit-framework-gl/piglit_drm_dma_buf.c#L519"
click p.b https://gitlab.freedesktop.org/mesa/piglit/-/blob/main/tests/util/piglit-framework-gl/piglit_drm_dma_buf.c#L519"
strace - System Call Tracing
1 | % time seconds usecs/call calls errors syscall |
Render To Texture
Render-To-Texture 是一种十分常见和简单的渲染技术,它将纹理对象和 FBO 绑定,把场景渲染到纹理中,以便之后可以反复使用。RTT 被广泛应用在 in-game cameras(virtual camera systems), post-processing 和各种特效中。本文主要比较 RTT 技术在两种不同的渲染架构下的不同和一些思考。
Xephyr
Xephyr /'zefə/ 是一个嵌套的 X Server, 作为 X 应用程序运行。
1 | Xephyr :1 -glamor -screen 1024x768 -ac -retro |