Skip to content

Commit

Permalink
Install header for GetVersion api and add doc
Browse files Browse the repository at this point in the history
Signed-off-by: Brandon Yates <[email protected]>
  • Loading branch information
bmyates committed Jun 8, 2021
1 parent 67a539e commit 69a9eb1
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,13 @@ install(FILES ${LEVEL_ZERO_LAYERS_API_HEADERS}
COMPONENT level-zero-devel
)

file(GLOB LEVEL_ZERO_LOADER_API_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/include/loader/*.h")

install(FILES ${LEVEL_ZERO_LOADER_API_HEADERS}
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/level_zero/loader
COMPONENT level-zero-devel
)

# If generators list was not define build native package for current distro
if(NOT DEFINED CPACK_GENERATOR)
if(EXISTS "/etc/debian_version")
Expand Down
22 changes: 22 additions & 0 deletions doc/loader_api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Level Zero Loader APIs

## Introduction
The Level Zero Loader will expose some additional APIs beyond what is defined in the Level Zero spec. The purpose of these APIs will generally be to access and set various loader configuration components. At the current time, only one such API exists. It's expected more will be added in the future, and they will be documented here.

This document does not cover APIs specific to individual layers (ie. tracing) or APIs defined in the Level Zero spec.

## API Reference

Exposed Loader APIs will be defined in header files located in this repository at `include/loader`, and installed to `<prefix>/include/level_zero/loader`

### zelLoaderGetVersions

This API is used to retreive the version information of the loader itself and of any layers that are enabled.

- __*num_elems__ Is a pointer to the number of version components to get.
- __*versions__ Pointer to address to write version components to. If set to `nullptr`, `num_elems` will be set to the total number of version components available.

There are currently 3 versioned components assigned the following name strings:
- `"tracing layer"`
- `"validation layer"`
- `"loader"`

0 comments on commit 69a9eb1

Please sign in to comment.