-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
In the spirit of "not invented here", because OpenCL Layers are following the success of Vulkan layers, it makes sense to follow the same format and locations for setting settings on how layers should behave when loaded.
File structure example
# Comments start with #
# settings (by convention) are prefixed by layer name
layer.setting1 = 10
# Empty lines are ignored, trailing and leading whitespace is trimmed
layer.setting2 = true # Line commentsIn general this is a direct translation of vk_layer_settings.txt
$VARIABLE is used for environment variables.
Search locations for the file
The order of precedence through which config files are found are as follows:
- If
$OPENCL_LAYERS_SETTINGS_PATHis set to a path to a directory, use the filecl_layer_settings.txtfile from it. Otherwise if set it should be set to the file name to read the settings from. - If
$OPENCL_LAYERS_SETTINGS_PATHis not set search for platform specific directories listed below. - If no settings are found in any of the platform specific locations, then fall back to
cl_layer_settings.txtin the current working directory.
Platform specific locations
Linux and MacOS
$XDG_DATA_HOME/settings.d/opencl/cl_layer_settings.txt- if
$XDG_DATA_HOMEis not set try with$HOME/.local/share
- if
Windows
- If
{HKEY_LOCAL_MACHINE}\Software\Khronos\OpenCL\Settingshas key with zero value, the the name of
the key is used as filename. - Non admin only:
HKEY_CURRENT_USERinstead ofHKEY_LOCAL_MACHINE
Android
The vulkan validation layers use the same locations as in linux, but environment variables are
replaced by properties.
Metadata
Metadata
Assignees
Labels
No labels