• Home
Name Date Size #Lines LOC

..--

.github/12-May-2024-200139

build-gn/12-May-2024-155114

build-qnx/12-May-2024-9467

cmake/12-May-2024-517428

docs/12-May-2024-23,71622,883

fuchsia/12-May-2024-11858

loader/12-May-2024-41,03233,250

openharmony/12-May-2024-3819

scripts/12-May-2024-4,1033,098

tests/12-May-2024-28,72422,337

.clang-formatD12-May-2024149 87

.cmake-format.pyD12-May-2024956 3510

.gitattributesD12-May-2024612 2316

.gitignoreD12-May-2024344 3332

.gnD12-May-2024759 2319

BUILD.gnD12-May-20242.8 KiB113100

BUILD.mdD12-May-202431.7 KiB747526

CMakeLists.txtD12-May-202422.6 KiB502427

CODE_OF_CONDUCT.mdD12-May-2024280 21

CONTRIBUTING.mdD12-May-20248 KiB175143

GOVERNANCE.mdD12-May-20242.6 KiB5041

LICENSE.txtD12-May-202411.4 KiB208173

OAT.xmlD12-May-20241.9 KiB4223

README.OpenSourceD12-May-2024396 1111

README.mdD12-May-20242.7 KiB6339

README_OpenHarmony.mdD12-May-20245.1 KiB14594

bundle.jsonD12-May-2024924 4443

vulkan.symbols.apiD12-May-20245.8 KiB244244

README.OpenSource

1[
2    {
3        "Name": "Vulkan-Loader",
4        "License": "Apache-2.0",
5        "License File": "LICENSE",
6        "Version Number": "v1.3.231",
7        "Owner": "liuzhiyuan31@huawei.com",
8        "Upstream URL": "https://github.com/KhronosGroup/Vulkan-Loader.git",
9        "Description": "This project provides the Vulkan ICD desktop loader for Windows, Linux, MacOS, and OpenHarmony."
10    }
11]

README.md

1# Vulkan Ecosystem Components
2
3This project provides the Khronos official Vulkan ICD desktop loader for Windows, Linux, and MacOS.
4
5## CI Build Status
6
7[![Build Status](https://github.com/KhronosGroup/Vulkan-Loader/workflows/CI%20Build/badge.svg?branch=master)](https://github.com/KhronosGroup/Vulkan-Loader/actions)
8
9## Introduction
10
11Vulkan is an explicit API, enabling direct control over how GPUs actually work.
12As such, Vulkan supports systems that have multiple GPUs, each running with a different driver, or ICD (Installable Client Driver).
13Vulkan also supports multiple global contexts (instances, in Vulkan terminology).
14The ICD loader is a library that is placed between a Vulkan application and any number of Vulkan drivers, in order to support multiple drivers and the instance-level functionality that works across these drivers.
15Additionally, the loader manages inserting Vulkan layer libraries, such as validation layers, between an application and the drivers.
16
17This repository contains the Vulkan loader that is used for Linux, Windows, MacOS, and iOS.
18There is also a separate loader, maintained by Google, which is used on Android.
19
20The following components are available in this repository:
21
22- [ICD Loader](loader/)
23- [Loader Documentation](docs/LoaderInterfaceArchitecture.md)
24- [Tests](tests/)
25
26## Contact Information
27
28- [Charles Giessen](mailto:charles@lunarg.com)
29- [Mark Young](mailto:marky@lunarg.com)
30
31## Information for Developing or Contributing
32
33Please see the [CONTRIBUTING.md](CONTRIBUTING.md) file in this repository for more details.
34Please see the [GOVERNANCE.md](GOVERNANCE.md) file in this repository for repository
35management details.
36
37## How to Build and Run
38
39[BUILD.md](BUILD.md)
40Includes directions for building all components.
41
42Architecture and interface information for the loader is in
43[docs/LoaderInterfaceArchitecture.md](docs/LoaderInterfaceArchitecture.md).
44
45## Version Tagging Scheme
46
47Updates to the `Vulkan-Loader` repository which correspond to a new Vulkan specification release are tagged using the following format: `v<`_`version`_`>` (e.g., `v1.1.96`).
48
49**Note**: Marked version releases have undergone thorough testing but do not imply the same quality level as SDK tags. SDK tags follow the `sdk-<`_`version`_`>.<`_`patch`_`>` format (e.g., `sdk-1.1.92.0`).
50
51This scheme was adopted following the 1.1.96 Vulkan specification release.
52
53## License
54
55This work is released as open source under a Apache-style license from Khronos
56including a Khronos copyright.
57
58## Acknowledgements
59
60While this project has been developed primarily by LunarG, Inc., there are many other
61companies and individuals making this possible: Valve Corporation, funding
62project development; Khronos providing oversight and hosting of the project.
63

README_OpenHarmony.md

1# Vulkan-Loader
2
3本仓库包含开源软件Vulkan-Loader,为OpenHarmony提供对Vulkan的支持能力。
4
5Vulkan是一个跨平台的2D和3D绘图应用程序接口(API)。它的API分为核心API、窗口系统集成(WSI)扩展API以及其他扩展API。
6
7核心API由GPU驱动实现,窗口系统集成(WSI)扩展API由[swapchain_layer](#swapchain_layer)实现,swapchain_layer是OpenHarmony平台是实现的一个Vulkan Layer,安装在`/system/lib[64]/libvulkan_swapchain.so`中。Vulkan Layer属于增强Vulkan开发环境的扩展功能,被实现为动态链接库(.so文件)。
8
9Vulkan-Loader会加载这些API的实现并对外提供这些接口给应用开发者使用。Vulkan-Loader安装在`/system/lib[64]/libvulkan.so`中。
10
11Vulkan-Loader主要功能概括如下:
12
131、加载GPU驱动。
14
152、加载Vulkan Layer。
16
173、提供Vulkan NDK接口。
18
19![vulkan-loader_location_in_OH](openharmony/imgs/vulkan-loader_location_in_OH.png)
20
21
22## 加载GPU驱动
23
24在OpenHarmony上,Vulkan-Loader会扫描指定路径下的GPU驱动的**json清单文件**并读取该文件加载GPU驱动。
25
26### 指定的扫描路径
27
28```
29/vendor/etc/vulkan/icd.d/
30/system/etc/vulkan/icd.d/
31/data/vulkan/icd.d/
32```
33建议:GPU驱动的json清单文件应放在`/vendor/etc/vulkan/icd.d/`目录中。
34
35Vulkan-Loader会根据GPU驱动的**json清单文件**中配置的`library_path`找到GPU驱动的动态链接库文件(.so文件)并加载。
36
37### GPU驱动的json清单文件示例
38
39```json
40{
41   "file_format_version": "1.0.1",
42   "ICD": {
43      "library_path": "path to driver library",
44      "api_version": "1.2.205",
45      "library_arch" : "64",
46      "is_portability_driver": false
47   }
48}
49```
50
51详细介绍请见:[Driver Manifest File Format](docs/LoaderDriverInterface.md#driver-manifest-file-format)
52
53### GPU驱动的实现
54
55GPU驱动需要实现的Vulkan接口请参考文档:[LoaderDriverInterface](docs/LoaderDriverInterface.md),开发者需要按照文档里的要求实现对应的接口才能够被Vulkan-Loader正确加载。
56
57
58## 加载Vulkan Layer
59
60Vulkan Layer属于增强Vulkan开发环境的扩展功能,可以由开发人员启用或关闭。启用和关闭Vulkan Layer的方式有很多,可以通过环境变量、配置文件、或者代码来开启和关闭指定的Layer。
61
62在OpenHarmony上,Vulkan-Loader通过读取指定路径下的Layer的**json清单文件**加载Vulkan Layer。
63
64### 指定的扫描路径
65
66```
67/system/etc/vulkan/implicit_layer.d/
68/system/etc/vulkan/explicit_layer.d/
69/data/vulkan/implicit_layer.d/
70/data/vulkan/explicit_layer.d/
71```
72
73默认加载的layer的json文件应放在`xxx/implicit_layer.d/`下。
74需要显式加载的layer的json文件应放在`xxx/explicit_layer.d/`下,不会被Vulkan-Loader默认加载。
75
76### Vulkan Layer的json清单文件示例
77
78下面给出[swapchain_layer](#swapchain_layer)的json清单文件示例:
79
80```json
81{
82    "file_format_version" : "1.0.0",
83    "layer" : {
84        "name": "VK_LAYER_OHOS_surface",
85        "type": "GLOBAL",
86        "library_path": "libvulkan_swapchain.so",
87        "api_version": "1.3.231",
88        "implementation_version": "1",
89        "description": "Vulkan Swapchain",
90        "disable_environment": {
91            "DISABLE_OHOS_SWAPCHAIN_LAYER": "1"
92        },
93        "instance_extensions": [
94            { "name": "VK_KHR_surface", "spec_version": "25" },
95            { "name": "VK_OHOS_surface", "spec_version": "1" }
96        ],
97        "device_extensions": [
98            { "name": "VK_KHR_swapchain", "spec_version": "70" }
99        ]
100    }
101}
102```
103
104详细介绍请见:[Layer Manifest File Format](docs/LoaderLayerInterface.md#layer-manifest-file-format)
105
106### Vulkan Layer的实现
107
108Vulkan Layer需要实现的Vulkan接口请参考文档:[LoaderLayerInterface](docs/LoaderLayerInterface.md),开发者需要按照文档里的要求实现对应的接口才能够被Vulkan-Loader正确加载。
109
110### swapchain_layer
111
112swapchain_layer是实现Vulkan-Loader与OpenHarmony平台本地窗口(OHNativeWindow)对接的模块,作为一个隐式加载的Vulkan Layer使用。
113
114代码地址:[swapchain_layer](https://gitee.com/openharmony/graphic_graphic_2d/tree/master/frameworks/vulkan_layers/swapchain_layer)
115
116
117## Vulkan NDK
118
119在OpenHarmony上,Vulkan-Loader会提供Vulkan NDK接口,应用层软件(如:图形引擎、XComponent NAPI等)和系统层图形绘制模块(如:Skia)可以调用这些NDK接口。
120
121
122## 构建指导
123
124适配OpenHarmony平台的编译脚本请见:[openharmony/BUILD.gn](openharmony/BUILD.gn)
125
126由于graphic_2d模块的编译脚本中包含了Vulkan-Loader(详见:[bundle.json](https://gitee.com/openharmony/graphic_graphic_2d/blob/master/bundle.json)),所以编译graphic_2d模块可以将Vulkan-Loader同时编译出来,以rk3568平台为例,编译命令:
127
128```shell
129./build.sh --product-name rk3568 --ccache --build-target graphic_2d
130```
131
132也可以单独编译Vulkan-Loader:
133
134```shell
135./build.sh --product-name rk3568 --ccache --build-target vulkan_loader
136```
137
138编译完成后会在`out/rk3568/graphic/graphic_2d`目录下生成`libvulkan.so`
139
140
141## License
142
143Apache License 2.0
144
145见 [LICENSE](LICENSE.txt).