• linux DRM/KMS 测试工具 modetest、kmscude、igt-gpu-tools (二)


    kmscube
     
    kmscube is a little demonstration program for how to drive bare metal graphics without a compositor like X11, wayland or similar, using DRM/KMS (kernel mode setting), GBM (graphics buffer manager) and EGL for rendering content using OpenGL or OpenGL ES.
     
    是由mesa3d提供和维护,这是一个基于 KMS/GBM/EGL/OPENGL ES2.0 测试用例。
    kmscude不依赖X11、wayland等窗口系统的简单图像测试程序。
    GBM、EGL和OpenGL ES产生图形数据,再经由DRM/KMS显示。
    GBM、EGL和OpenGL ES由mesa3D提供相关的库,DRM/KMS通过libdrm库进行访问。
    所以kmscude同时包含OpenGL、EGL、GBM和DRM/KMS的基本用法。
     

     
    代码下载和编译:
     
    编译:
    meson . build && ninja -C build
    编译成功后,build路径下会生成可执行文件:
     
    ls build/
    build.ninja             kernel.trace   kmscube-l.profile   kmscube.profile  'kmscube@exe'/   meson-logs/      oprofile_data/  'texturator@exe'/
    compile_commands.json   kmscube*       kmscube.1.trace     kmscube.trace     meson-info/     meson-private/   texturator*
     

     
    测试实例:
     
    进入到build命令,通过如下命令查看kmscude的帮助信息:
     
    ./kmscube --help
    ./kmscube: unrecognized option '--help'
    Usage: ./kmscube [-ADfMmSsVv]
     
     
    options:
        -A, --atomic             use atomic modesetting and fencing
        -c, --count              run for the specified number of frames
        -D, --device=DEVICE      use the given device
        -f, --format=FOURCC      framebuffer format
        -M, --mode=MODE          specify mode, one of:
            smooth    -  smooth shaded cube (default)
            rgba      -  rgba textured cube
            nv12-2img -  yuv textured (color conversion in shader)
            nv12-1img -  yuv textured (single nv12 texture)
        -m, --modifier=MODIFIER  hardcode the selected modifier
        -p, --perfcntr=LIST      sample specified performance counters using
                                 the AMD_performance_monitor extension (comma
                                 separated list, shadertoy mode only)
        -S, --shadertoy=FILE     use specified shadertoy shader
        -s, --samples=N          use MSAA
        -V, --video=FILE         video textured cube (comma separated list)
        -v, --vmode=VMODE        specify the video mode in the format
                                 <mode>[-<vrefresh>]
     
    基本用法:
     
    sudo ./kmscube -A -D /dev/dri/card0 -M smooth
     
        说明:
        -A:DRM/KMS使用atomic模式
        -D:指定设备节点,DRM/KMS和GPU是同一个设备节点
        -M:指定OpenGL的绘图模式,可选的值包括:smooth、rgba、nv12-2img、nv12-1img
     
    测试结果如下:
     
     
    参考链接:
     
  • 相关阅读:
    bzoj 2115: [Wc2011] Xor【线性基+dfs】
    bzoj 1027: [JSOI2007]合金【凸包+Floyd】
    bzoj 4824: [Cqoi2017]老C的键盘【树形dp】
    bzoj 2111: [ZJOI2010]Perm 排列计数【树形dp+lucas】
    bzoj 4822: [Cqoi2017]老C的任务【扫描线+树状数组+二维差分】
    bzoj 4823: [Cqoi2017]老C的方块【最大权闭合子图】
    bzoj 4826: [Hnoi2017]影魔【单调栈+树状数组+扫描线】
    洛谷 P3731 [HAOI2017]新型城市化【最大流(二分图匹配)+tarjan】
    洛谷 P3732 [HAOI2017]供给侧改革【trie树】
    poj 1474 Video Surveillance 【半平面交】
  • 原文地址:https://www.cnblogs.com/yaongtime/p/12944633.html
Copyright © 2020-2023  润新知