Commit b5ed865
committed
loader: Support latest Fuchsia build
This change merges the Fuchsia-forked Vulkan-Loader branch into
the upstream.
Since last update (#478), there has been significant changes to
the way for Vulkan Loader to get manifests and the way for Vulkan
ICDs to get I/O access to GPU devices. Also, Fuchsia has completely
dropped C bindings for the FIDL API which `dlopen_fuchsia.c` uses.
This change makes the following changes:
* Add `loader_extensions_fuchsia.{cc,h}`. This allows the Vulkan
Loader to provide a way to allow I/O to GPU devices to the ICDs
it opens.
The extended ICD API is defined in https://fuchsia.dev/fuchsia-src/
contribute/governance/rfcs/0205_vulkan_loader and it's implemented
on ICDs like Fuchsia's Intel Mesa ICD:
https://fuchsia.googlesource.com/third_party/mesa/+/main/src/intel/
vulkan/anv_magma.c
* Access data and manifest files from manifest file system FD:
The Fuchsia Vulkan loader service provides manifests using a
service-provided virtual file system. It creates these filesystems
based on the contents of multiple ICD packages and services it
receives through devfs. As a result, they must be constructed
using a filesystem serving library and don't reflect anything
on-disk (see https://fuchsia.dev/fuchsia-src/contribute/governance/
rfcs/0205_vulkan_loader#filesystem_serving for details).
The service-provided file system can be only opened as an FD using
Fuchsia's FDIO (https://fuchsia.googlesource.com/fuchsia/+/main/sdk/
lib/fdio) library. Thus, in order to read manifest files located
in a directory opened as an FD, we need to add a `parent_dir_fd`
param to the functions that read files, including `loader_get_json`
and `add_data_files`.
* Migrated to the C++ FIDL bindings.
The old C bindings are not supported anymore and have been deleted
from the Fuchsia tree. This change migrates `dlopen_fuchsia` to use
the C++ wire bindings (https://fuchsia.dev/fuchsia-src/reference/
fidl/bindings/cpp-bindings) which is part of the Fuchsia SDK.
Test: libvulkan builds on Fuchsia with the changes above.
Bug: https://fxbug.dev/378964821
Change-Id: I2af9f677d706d07193aecd2dcc4640ec602b138f1 parent 24e6717 commit b5ed865
21 files changed
Lines changed: 998 additions & 151 deletions
File tree
- loader
- scripts
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | | - | |
78 | | - | |
| 76 | + | |
79 | 77 | | |
80 | 78 | | |
81 | 79 | | |
| |||
87 | 85 | | |
88 | 86 | | |
89 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
| |||
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
101 | | - | |
| 102 | + | |
| 103 | + | |
102 | 104 | | |
103 | 105 | | |
104 | 106 | | |
105 | | - | |
106 | | - | |
107 | | - | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
111 | | - | |
112 | | - | |
| 110 | + | |
113 | 111 | | |
114 | 112 | | |
115 | 113 | | |
| |||
147 | 145 | | |
148 | 146 | | |
149 | 147 | | |
150 | | - | |
151 | | - | |
152 | | - | |
| 148 | + | |
153 | 149 | | |
154 | 150 | | |
155 | 151 | | |
| |||
170 | 166 | | |
171 | 167 | | |
172 | 168 | | |
| 169 | + | |
173 | 170 | | |
174 | 171 | | |
175 | 172 | | |
176 | 173 | | |
177 | 174 | | |
178 | 175 | | |
179 | 176 | | |
180 | | - | |
181 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
182 | 181 | | |
183 | 182 | | |
184 | 183 | | |
185 | | - | |
186 | | - | |
187 | 184 | | |
188 | 185 | | |
189 | 186 | | |
190 | 187 | | |
| 188 | + | |
191 | 189 | | |
192 | 190 | | |
193 | 191 | | |
194 | 192 | | |
195 | 193 | | |
196 | 194 | | |
197 | 195 | | |
198 | | - | |
199 | 196 | | |
| 197 | + | |
200 | 198 | | |
201 | 199 | | |
202 | 200 | | |
| |||
221 | 219 | | |
222 | 220 | | |
223 | 221 | | |
| 222 | + | |
224 | 223 | | |
225 | 224 | | |
226 | 225 | | |
227 | 226 | | |
228 | | - | |
229 | 227 | | |
230 | 228 | | |
231 | 229 | | |
| |||
270 | 268 | | |
271 | 269 | | |
272 | 270 | | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
273 | 274 | | |
274 | 275 | | |
275 | 276 | | |
276 | 277 | | |
277 | 278 | | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
278 | 289 | | |
279 | 290 | | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
280 | 294 | | |
281 | 295 | | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
282 | 302 | | |
283 | | - | |
| 303 | + | |
284 | 304 | | |
| 305 | + | |
285 | 306 | | |
286 | 307 | | |
287 | 308 | | |
| |||
291 | 312 | | |
292 | 313 | | |
293 | 314 | | |
294 | | - | |
| 315 | + | |
295 | 316 | | |
296 | 317 | | |
297 | 318 | | |
298 | 319 | | |
299 | 320 | | |
300 | 321 | | |
301 | 322 | | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | 323 | | |
315 | 324 | | |
316 | | - | |
| 325 | + | |
317 | 326 | | |
318 | 327 | | |
319 | 328 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
604 | 604 | | |
605 | 605 | | |
606 | 606 | | |
607 | | - | |
| 607 | + | |
608 | 608 | | |
609 | 609 | | |
610 | 610 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
This file was deleted.
0 commit comments