Skip to main content

add-vulkan-test

Add a Vulkan test or microbenchmark

설치로 이동

소스 정보

저장소
ARM-software/tracetooltests
최근 소스 활동
2026년 6월 7일 17:31
감지된 SKILL.md 언어
영어
스타
9
포크
13

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
add-vulkan-test
description
Add a Vulkan test or microbenchmark
metadata
{"short-description":"Add a Vulkan test"}
## Add A New Vulkan Test - Create source `src/vulkan_<name>.cpp` and a bench file `benchmarking/vulkan_<name>.bench`. - Register the test in `CMakeLists.txt` with `vulkan_test(<name>)` (or `vulkan_window_test` if it uses a surface). - Build with 'make -j6' - Run from build directory without GPU: `./vulkan_<name> -v --cpu`. - Run from build directory with GPU: `./vulkan_<name> -v --gpu`. - Fix any Vulkan validation errors shown in the output from the above runs. - Use the check() function to test Vulkan call return values. Put it on a separate line after the Vulkan call. Do not wrap the Vulkan call. - If asked to test an extension you are not familiar with, download the extension text from `https://docs.vulkan.org/refpages/latest/refpages/source/<extension name>.html` and read it. Minimal `src/vulkan_<name>.cpp`: ```cpp #include "vulkan_common.h" int main(int argc, char** argv) { vulkan_req_t reqs{}; // Optional: set reqs.usage/cmdopt auto vk = test_init(argc, argv, "vulkan_<name>", reqs); bench_start_iteration(vk.bench); // Start one deterministic iteration // ... do work here ... bench_stop_iteration(vk.bench); test_done(vk); return 0; } ``` Minimal `benchmarking/vulkan_<name>.bench`: ```json { "name": "vulkan_<name>", "description": "<short description of test>" } ``` ### Add a new shader file for Vulkan - Shaders shall be in separate files with extension giving their type, eg .comp for compute shaders, like `vulkan_<name>.<ext>`. - Generate SPIRV from the GLSL source code with `glslangValidator -V vulkan_<name>.<ext> -o vulkan_<name>_<ext>.spirv` - Then generate an include file with `xxd -i vulkan_<name>_<ext>.spirv > vulkan_<name>_<ext>.inc` - Include this file in the C++ source code with `#include "vulkan_<name>_<ext>.inc"`
GitHub에서 보기