• Home
Name Date Size #Lines LOC

..--

cmake/12-May-2024-149130

include/12-May-2024-188,420162,540

registry/12-May-2024-72,94171,438

.cmake-format.pyD12-May-2024956 3510

.gitattributesD12-May-2024421 1711

.gitignoreD12-May-202458 76

BUILD.gnD12-May-20242 KiB6862

BUILD.mdD12-May-20248.6 KiB275182

CMakeLists.txtD12-May-20242.7 KiB6048

CODE_OF_CONDUCT.mdD12-May-2024280 21

LICENSE.txtD12-May-202411.1 KiB203169

OAT.xmlD12-May-20245.5 KiB8428

README.OpenSourceD12-May-2024332 1211

README.mdD12-May-20242.6 KiB7859

README_zh.mdD12-May-20242.2 KiB5029

README.OpenSource

1[
2    {
3        "Name": "Vulkan",
4        "License": "Apache-2.0",
5        "License File": "LICENSE",
6        "Version Number": "v1.2.201",
7        "Owner": "mengzhaobing@huawei.com",
8        "Upstream URL": "https://github.com/KhronosGroup/Vulkan-Headers.git",
9        "Description": "Vulkan header files and API registry"
10    }
11]
12

README.md

1# Vulkan-Headers
2
3Vulkan header files and API registry
4
5## Default branch changed to 'main' 2021-09-12
6
7As discussed in #222, the default branch of this repository is now 'main'. This change should be largely transparent to repository users, since github rewrites many references to the old 'master' branch to 'main'. However, if you have a checked-out local clone, you may wish to take the following steps as recommended by github:
8
9```sh
10git branch -m master main
11git fetch origin
12git branch -u origin/main main
13git remote set-head origin -a
14```
15
16## Repository Content
17
18The contents of this repository are largely obtained from other repositories
19and are collected, coordinated, and curated here.
20
21If proposing changes to any file originating from a different repository,
22please propose such changes in that repository, rather than Vulkan-Headers.
23Files in this repository originate from:
24
25### Specification repository (https://github.com/KhronosGroup/Vulkan-Docs)
26
27* registry/cgenerator.py
28* registry/conventions.py
29* registry/generator.py
30* registry/genvk.py
31* registry/reg.py
32* registry/spec_tools/util.py
33* registry/validusage.json
34* registry/vk.xml
35* registry/vkconventions.py
36* All files under include/vulkan/ which are *not* listed explicitly as originating from another repository.
37
38### This repository (https://github.com/KhronosGroup/Vulkan-Headers)
39
40* .cmake-format.py
41* BUILD.gn
42* BUILD.md
43* CMakeLists.txt
44* CODE_OF_CONDUCT.md
45* LICENSE.txt
46* README.md
47* cmake/Copyright_cmake.txt
48* cmake/cmake_uninstall.cmake.in
49* Non-API headers (report issues to the [Vulkan-Loader/issues](https://github.com/KhronosGroup/Vulkan-Loader/issues) tracker)
50  * include/vulkan/vk_icd.h
51  * include/vulkan/vk_layer.h
52  * include/vulkan/vk_sdk_platform.h
53
54### Vulkan C++ Binding Repository (https://github.com/KhronosGroup/Vulkan-Hpp)
55
56As of the Vulkan-Docs 1.2.182 spec update, the Vulkan-Hpp headers have been
57split into multiple files. All of those files are now included in this
58repository.
59
60* include/vulkan/vulkan.hpp
61* include/vulkan/vulkan_enums.hpp
62* include/vulkan/vulkan_funcs.hpp
63* include/vulkan/vulkan_handles.hpp
64* include/vulkan/vulkan_raii.hpp
65* include/vulkan/vulkan_structs.hpp
66
67## Version Tagging Scheme
68
69Updates to the `Vulkan-Headers` repository which correspond to a new Vulkan
70specification release are tagged using the following format:
71`v<`_`version`_`>` (e.g., `v1.1.96`).
72
73**Note**: Marked version releases have undergone thorough testing but do not
74imply the same quality level as SDK tags. SDK tags follow the
75`sdk-<`_`version`_`>.<`_`patch`_`>` format (e.g., `sdk-1.1.92.0`).
76
77This scheme was adopted following the 1.1.96 Vulkan specification release.
78

README_zh.md

1# Vulkan API Headers
2
3仓库包含Vulkan API 和 API 注册表。Vulkan 是一个适用于高性能 3D 图形设备的低开销、跨平台 API。与 OpenGL ES (GLES) 一样,Vulkan 提供用于在应用中创建高品质实时图形的工具。与OpenGL ES相比使用 Vulkan 的优势明显,Vulkan可以大大降低 CPU 开销,另外Vulkan支持 SPIR-V 二进制Shader语言。
4
5OpenHarmony引入后,在框架层新增Vulkan Wrapper,负责实现Vulkan WSI(Window System Integration, 窗口系统集成) 与本地窗口(NativeWindow)对接,另外提供Vulkan加载程序。目前仅支持native层调用Vulkan。
6
7
8## 一、北向开发和OpenHarmony发行版
9### 1.实现 Vulkan
10
11设备成功运行Vulkan必需的条件:
12    1. 加载程序,由OpenHarmony提供
13    2. 实现了Vulkan API 的 VulKan 驱动程序,有 SoC 提供。
14
15### 2. Vulkan Wrapper
16
17`foundation/graphic/graphic_2d/frameworks/vulkan_wrapper`中实现的Vulkan加载程序是Vulkan应用与Vulkan驱动之前的Wrapper层。Vulkan Wrapper安装在`/system/lib[64]/libvulkan.so`中。Vulkan Wrapper 会提供标准 Vulkan API 函数符号、OpenHarmony WSI扩展的函数符号,以及许多其他可选扩展。
18
19
20### 3. Vulkan 驱动程序
21
22Vulkan驱动程序需要对外暴露的函数符号请参考`hdi_vulkan.h`中的定义。
23
24## 二、南向应用开发者
25
26### VK_OpenHarmony_OHOS_surface 扩展
27
28    接口:vkCreateOHOSSurfaceOpenHarmony
29    VkResult vkCreateOHOSSurfaceOpenHarmony(
30        VkInstance                               instance,
31        const VkOHOSSurfaceCreateInfoOpenHarmony pCreateInfo,
32        const VkAllocationCallbacks              pAllocator,
33        VkSurfaceKHR                             pSurface)
34
35    参数:
36        instance是要关联Surface的实例。
37        pCreateInfo是一个指向结构的指针,该VkOHOSSurfaceCreateInfoOpenHarmony 结构包含影响表面对象创建的参数。
38        pAllocator是用于在没有更多特定内存分配器可用时做为Surface对象分配的分配器。
39        pSurface是一个指向VkSurfaceKHR句柄的指针,在该句柄中返回创建的Surface对象。
40
41
42## 三、Vulkan使用文档
43
44API官方文档  https://registry.khronos.org/vulkan/
45
46
47## 四、License
48
49见 [LICENSE](LICENSE).
50