strace -c -w -o glmark2.strace glmark2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ------------------
55.82 14.421660 55 258416 ioctl
16.68 4.309981 18 238578 205238 recvmsg
14.62 3.777039 17 210879 42 futex
5.06 1.306534 16 77652 getpid
2.73 0.705886 21 33276 writev
2.51 0.648318 17 36385 close
2.40 0.620114 18 33335 ppoll
0.04 0.011076 24 452 read
0.04 0.009150 32 281 47 openat
0.02 0.005639 30 187 mmap
0.01 0.003267 28 113 munmap
0.01 0.003240 21 152 120 readlinkat
0.01 0.002085 26 80 mprotect
0.01 0.002033 19 104 newfstatat
0.01 0.001976 26 75 brk
0.01 0.001364 71 19 recvfrom
0.00 0.001138 54 21 clone3
0.00 0.000778 18 43 rt_sigprocmask
0.00 0.000679 27 25 write
0.00 0.000645 29 22 getdents64
0.00 0.000493 492 1 execve
0.00 0.000323 17 18 lseek
0.00 0.000249 20 12 getrusage
0.00 0.000232 17 13 getrandom
0.00 0.000163 27 6 memfd_create
0.00 0.000150 24 6 sendmsg
0.00 0.000136 22 6 ftruncate
0.00 0.000131 16 8 fcntl
0.00 0.000054 18 3 geteuid
0.00 0.000054 18 3 getuid
0.00 0.000047 23 2 1 faccessat
0.00 0.000037 18 2 uname
0.00 0.000033 32 1 socket
0.00 0.000031 30 1 shutdown
0.00 0.000028 27 1 connect
0.00 0.000018 17 1 getpeername
0.00 0.000018 17 1 sched_getaffinity
0.00 0.000017 17 1 rt_sigaction
0.00 0.000017 16 1 prlimit64
0.00 0.000017 16 1 set_tid_address
0.00 0.000016 16 1 rseq
0.00 0.000016 16 1 set_robust_list
------ ----------- ----------- --------- --------- ------------------
100.00 25.834885 29 890185 205448 total
Read more »

Render-To-Texture 是一种十分常见和简单的渲染技术,它将纹理对象和 FBO 绑定,把场景渲染到纹理中,以便之后可以反复使用。RTT 被广泛应用在 in-game cameras(virtual camera systems), post-processing 和各种特效中。本文主要比较 RTT 技术在两种不同的渲染架构下的不同和一些思考。

rtt-on-tbr

Read more »

Xephyr /'zefə/ 是一个嵌套的 X Server, 作为 X 应用程序运行。

Start Xephyr
1
Xephyr :1 -glamor -screen 1024x768 -ac -retro

Xephyr :1 -screen 1024x768 -glamor -ac -retro

Read more »

OpenGL (可能也有其它与 OpenGL 有关的)中的有些概念很相似,有些标准里也没有给出一个明确的定义,有些如果仅从字面意思理解很容易混淆,这里将平时自己查询的资料及自己的理解整理到一起,以备不时之需。

Read more »

---
title: VkSemaphore interface
---
classDiagram
    VkSemaphore ()-- vk_semaphore
    vk_object_base <|-- vk_semaphore
    vk_semaphore <|.. vk_sync
    vk_sync -- vk_sync_type
    link vk_semaphore "https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/vulkan/runtime/vk_semaphore.h" "vk_semaphore"
    link vk_sync "https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/vulkan/runtime/vk_sync.h" "vk_sync"
    link vk_sync_type "https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/vulkan/runtime/vk_sync.h" "vk_sync_type"
    class vk_object_base{
        VK_LOADER_DATA _loader_data
        VkObjectType type
        bool client_visible
        vk_device *device
        vk_instance *instance
        util_sparse_array private_data
        char *object_name
    }
    class vk_semaphore{
        VkSemaphoreType type
        vk_sync *temporary
        vk_sync permanent
    }
    class vk_sync{
        vk_sync_type *type
        vk_sync_flags flags
    }
    class vk_sync_type{
        size_t size
        vk_sync_features features
        init() VkResult
        finish() void
        signal() VkResult
        get_value() VkResult
        reset() VkResult
        move() VkResult
        wait() VkResult
        wait_many() VkResult
        import_opaque_fd() VkResult
        export_opaque_fd() VkResult
        import_sync_file() VkResult
        export_sync_file() VkResult
        import_win32_handle() VkResult
        export_win32_handle() VkResult
        set_win32_export_params() VkResult
    }
    <<interface>> vk_sync_type
Read more »

Segfault ?

下面的程序会段错误吗?

1
2
3
4
5
6
7
8
9
10
11
12
#include <stdio.h>

struct foo {
long a;
};

int main(int argc, char *argv[])
{
struct foo *f = NULL;

printf("0x%016lx\n", &f->a);
}
Read more »
0%