remove WDK dependency for OpenCL ICD loader #102
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a similar change as #90, but it goes a bit farther and removes all WDK dependencies, including header file dependencies. Instead of including a WDK header file, a private header file is used, which contains just the structure and function definitions needed by the OpenCL ICD loader. This is the same mechanism used by the Vulkan loader, and indeed the private header file is copied unchanged from the Vulkan loader repo - see https://github.com/KhronosGroup/Vulkan-Loader/blob/master/loader/adapters.h.
I've intentionally kept the code flow fairly unchanged, and most of the diffs are due to slightly different structure member names in adapters.h. At some point it would be beneficial to refactor this function slightly, I think, but that can be done as a follow-on PR.
The one change I did include in this PR is to use the "secure" version of
wcstombs
, so I believe this PR fixes #93.