-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
We use a decoupled approach for obtaining the SPIRV and Vulkan headers without requiring systemwide installation. However, we have ever-rotting (#8743) copies of other headers vendored (and sometimes patched!) in our runtime.
Because the runtime is freestanding, we cannot rely on standard headers. Even so, we should provide minimal internal implementations of the required standard headers (e.g. stdint.h
, stddef.h
) to allow the upstream copies of, for example, webgpu.h
to be included unmodified.
In the case of webgpu, we need only a few definitions (see my draft #8714):
#define NULL nullptr
#define SIZE_MAX ((size_t)-1)
#define UINT32_MAX ((uint32_t)-1)
#define UINT64_MAX ((uint64_t)-1)
#define UINT8_C(v) (v)
#define UINT16_C(v) (v)
#define UINT32_C(v) (v##U)
#define UINT64_C(v) (v##ULL)
We have the following mini_*.h headers:
- mini_cl.h
- mini_cuda.h
- mini_d3d12.h
- mini_hexagon_dma.h
- mini_qurt.h
- mini_qurt_vtcm.h
- mini_webgpu.h (related: Target the stable webgpu.h headers #8759)
Note that I'm not saying we should take hard dependencies on these headers, only that we should have equally mechanical ways of downloading and extracting the unmodified upstream copies to our dependencies/
subtree.