| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Vulkan.Extensions.VK_EXT_layer_settings
Description
Name
VK_EXT_layer_settings - instance extension
VK_EXT_layer_settings
- Name String
VK_EXT_layer_settings
- Extension Type
- Instance extension
- Registered Extension Number
- 497
- Revision
- 2
- Ratification Status
- Ratified
- Extension and Version Dependencies
- None
- Contact
- Extension Proposal
- VK_EXT_layer_settings
Other Extension Metadata
- Last Modified Date
- 2023-09-23
- IP Status
- No known IP claims.
- Contributors
- Christophe Riccio, LunarG
- Mark Lobodzinski, LunarG
- Charles Giessen, LunarG
- Spencer Fricke, LunarG
- Juan Ramos, LunarG
- Daniel Rakos, RasterGrid
- Shahbaz Youssefi, Google
- Lina Versace, Google
- Bill Hollings, The Brenwill Workshop
- Jon Leech, Khronos
- Tom Olson, Arm
Description
This extension provides a mechanism for configuring programmatically through the Vulkan API the behavior of layers.
This extension provides the LayerSettingsCreateInfoEXT structure that
can be included in the pNext chain of the
InstanceCreateInfo structure passed
as the pCreateInfo parameter of
createInstance.
The structure contains an array of LayerSettingEXT structure values
that configure specific features of layers.
The VK_EXT_layer_settings extension subsumes all the functionality
provided in the VK_EXT_validation_flags extension and the
VK_EXT_validation_features extension.
New Structures
Extending
InstanceCreateInfo:
New Enums
New Enum Constants
EXT_LAYER_SETTINGS_SPEC_VERSIONExtending
StructureType:
Example
One example usage of VK_EXT_layer_settings is as implemented by the
Vulkan Profiles layer.
It allows the profiles layer tests used by the profiles layer C.I. to programmatically configure the layer for each test without affecting the C.I. environment, allowing to run multiple tests concurrently.
const char* profile_file_data = JSON_TEST_FILES_PATH "VP_KHR_roadmap_2022.json";
const char* profile_name_data = "VP_KHR_roadmap_2022";
VkBool32 emulate_portability_data = VK_TRUE;
const char* simulate_capabilities[] = {
"SIMULATE_API_VERSION_BIT",
"SIMULATE_FEATURES_BIT",
"SIMULATE_PROPERTIES_BIT",
"SIMULATE_EXTENSIONS_BIT",
"SIMULATE_FORMATS_BIT",
"SIMULATE_QUEUE_FAMILY_PROPERTIES_BIT"
};
const char* debug_reports[] = {
"DEBUG_REPORT_ERROR_BIT",
"DEBUG_REPORT_WARNING_BIT",
"DEBUG_REPORT_NOTIFICATION_BIT",
"DEBUG_REPORT_DEBUG_BIT"
};
const VkLayerSettingEXT settings[] = {
{kLayerName, kLayerSettingsProfileFile, VK_LAYER_SETTING_TYPE_STRING_EXT, 1, &profile_file_data},
{kLayerName, kLayerSettingsProfileName, VK_LAYER_SETTING_TYPE_STRING_EXT, 1, &profile_name_data},
{kLayerName, kLayerSettingsEmulatePortability, VK_LAYER_SETTING_TYPE_BOOL32_EXT, 1, &emulate_portability_data},
{kLayerName, kLayerSettingsSimulateCapabilities, VK_LAYER_SETTING_TYPE_STRING_EXT,
static_cast<uint32_t>(std::size(simulate_capabilities)), simulate_capabilities},
{kLayerName, kLayerSettingsDebugReports, VK_LAYER_SETTING_TYPE_STRING_EXT,
static_cast<uint32_t>(std::size(debug_reports)), debug_reports}
};
const VkLayerSettingsCreateInfoEXT layer_settings_create_info{
VK_STRUCTURE_TYPE_LAYER_SETTINGS_CREATE_INFO_EXT, nullptr,
static_cast<uint32_t>(std::size(settings)), settings};
VkInstanceCreateInfo inst_create_info = {};
...
inst_create_info.pNext = &layer_settings_create_info;
vkCreateInstance(&inst_create_info, nullptr, &_instances);Issues
- How should application developers figure out the list of available settings?
This extension does not provide a reflection API for layer settings. Layer settings are described in each layer JSON manifest and the documentation of each layer which implements this extension.
Version History
Revision 1, 2020-06-17 (Mark Lobodzinski)
- Initial revision for Validation layer internal usages
Revision 2, 2023-09-26 (Christophe Riccio)
- Refactor APIs for any layer usages and public release
See Also
No cross-references are available
Document Notes
For more information, see the Vulkan Specification.
This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.
Synopsis
- data LayerSettingsCreateInfoEXT = LayerSettingsCreateInfoEXT {}
- data LayerSettingEXT = LayerSettingEXT {
- layerName :: ByteString
- settingName :: ByteString
- type' :: LayerSettingTypeEXT
- valueCount :: Word32
- values :: Ptr ()
- newtype LayerSettingTypeEXT where
- LayerSettingTypeEXT Int32
- pattern LAYER_SETTING_TYPE_BOOL32_EXT :: LayerSettingTypeEXT
- pattern LAYER_SETTING_TYPE_INT32_EXT :: LayerSettingTypeEXT
- pattern LAYER_SETTING_TYPE_INT64_EXT :: LayerSettingTypeEXT
- pattern LAYER_SETTING_TYPE_UINT32_EXT :: LayerSettingTypeEXT
- pattern LAYER_SETTING_TYPE_UINT64_EXT :: LayerSettingTypeEXT
- pattern LAYER_SETTING_TYPE_FLOAT32_EXT :: LayerSettingTypeEXT
- pattern LAYER_SETTING_TYPE_FLOAT64_EXT :: LayerSettingTypeEXT
- pattern LAYER_SETTING_TYPE_STRING_EXT :: LayerSettingTypeEXT
- type EXT_LAYER_SETTINGS_SPEC_VERSION = 2
- pattern EXT_LAYER_SETTINGS_SPEC_VERSION :: Integral a => a
- type EXT_LAYER_SETTINGS_EXTENSION_NAME = "VK_EXT_layer_settings"
- pattern EXT_LAYER_SETTINGS_EXTENSION_NAME :: (Eq a, IsString a) => a
Documentation
data LayerSettingsCreateInfoEXT Source #
VkLayerSettingsCreateInfoEXT - Specify layer capabilities for a Vulkan instance
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_LAYER_SETTINGS_CREATE_INFO_EXT
- If
settingCountis not0,pSettingsmust be a valid pointer to an array ofsettingCountvalidLayerSettingEXTstructures
See Also
Constructors
| LayerSettingsCreateInfoEXT | |
Fields
| |
Instances
data LayerSettingEXT Source #
VkLayerSettingEXT - Specify a layer capability to configure
Description
When multiple LayerSettingsCreateInfoEXT structures are chained and
the same pSettingName is referenced for the same pLayerName, the
value of the first reference of the layer setting is used.
Valid Usage
- If
valueCountis not0,pValuesmust be a valid pointer to an array ofvalueCountvalues of the type indicated bytype
Valid Usage (Implicit)
-
pSettingNamemust be a null-terminated UTF-8 string -
typemust be a validLayerSettingTypeEXTvalue
See Also
VK_EXT_layer_settings,
LayerSettingTypeEXT, LayerSettingsCreateInfoEXT
Constructors
| LayerSettingEXT | |
Fields
| |
Instances
| Show LayerSettingEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_layer_settings Methods showsPrec :: Int -> LayerSettingEXT -> ShowS # show :: LayerSettingEXT -> String # showList :: [LayerSettingEXT] -> ShowS # | |
| FromCStruct LayerSettingEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_layer_settings Methods peekCStruct :: Ptr LayerSettingEXT -> IO LayerSettingEXT Source # | |
| ToCStruct LayerSettingEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_layer_settings Methods withCStruct :: LayerSettingEXT -> (Ptr LayerSettingEXT -> IO b) -> IO b Source # pokeCStruct :: Ptr LayerSettingEXT -> LayerSettingEXT -> IO b -> IO b Source # withZeroCStruct :: (Ptr LayerSettingEXT -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr LayerSettingEXT -> IO b -> IO b Source # cStructSize :: Int Source # | |
| Zero LayerSettingEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_layer_settings Methods | |
newtype LayerSettingTypeEXT Source #
VkLayerSettingTypeEXT - Type of the values that can be passed to a layer
Description
LAYER_SETTING_TYPE_BOOL32_EXTspecifies that the layer setting’s type isBool32.
LAYER_SETTING_TYPE_INT32_EXTspecifies that the layer setting’s type is signed 32-bit integer.LAYER_SETTING_TYPE_INT64_EXTspecifies that the layer setting’s type is signed 64-bit integer.LAYER_SETTING_TYPE_UINT32_EXTspecifies that the layer setting’s type is unsigned 32-bit integer.LAYER_SETTING_TYPE_UINT64_EXTspecifies that the layer setting’s type is unsigned 64-bit integer.LAYER_SETTING_TYPE_FLOAT32_EXTspecifies that the layer setting’s type is 32-bit floating-point.LAYER_SETTING_TYPE_FLOAT64_EXTspecifies that the layer setting’s type is 64-bit floating-point.LAYER_SETTING_TYPE_STRING_EXTspecifies that the layer setting’s type is a pointer to a null-terminated UTF-8 string.
See Also
Constructors
| LayerSettingTypeEXT Int32 |
Bundled Patterns
| pattern LAYER_SETTING_TYPE_BOOL32_EXT :: LayerSettingTypeEXT | |
| pattern LAYER_SETTING_TYPE_INT32_EXT :: LayerSettingTypeEXT | |
| pattern LAYER_SETTING_TYPE_INT64_EXT :: LayerSettingTypeEXT | |
| pattern LAYER_SETTING_TYPE_UINT32_EXT :: LayerSettingTypeEXT | |
| pattern LAYER_SETTING_TYPE_UINT64_EXT :: LayerSettingTypeEXT | |
| pattern LAYER_SETTING_TYPE_FLOAT32_EXT :: LayerSettingTypeEXT | |
| pattern LAYER_SETTING_TYPE_FLOAT64_EXT :: LayerSettingTypeEXT | |
| pattern LAYER_SETTING_TYPE_STRING_EXT :: LayerSettingTypeEXT |
Instances
type EXT_LAYER_SETTINGS_SPEC_VERSION = 2 Source #
pattern EXT_LAYER_SETTINGS_SPEC_VERSION :: Integral a => a Source #
type EXT_LAYER_SETTINGS_EXTENSION_NAME = "VK_EXT_layer_settings" Source #
pattern EXT_LAYER_SETTINGS_EXTENSION_NAME :: (Eq a, IsString a) => a Source #