mirror of
https://github.com/KhronosGroup/Vulkan-Utility-Libraries.git
synced 2025-05-14 16:58:43 +00:00
layer: Disable layer settings registry
This commit is contained in:
parent
6999ef9b82
commit
33e1bd1c97
4 changed files with 8 additions and 0 deletions
|
@ -19,8 +19,10 @@ VK_DEFINE_HANDLE(VlLayerSettingSet)
|
|||
|
||||
typedef void (VKAPI_PTR *VlLayerSettingLogCallback)(const char *pSettingName, const char *pMessage);
|
||||
|
||||
#ifdef ENABLE_REGISTER_LAYER_SETTINGS
|
||||
void vlRegistryLayerSettingsProperties(const char *pLayerName,
|
||||
uint32_t propertyCount, VkLayerSettingPropertiesEXT *pProperties);
|
||||
#endif // ENABLE_REGISTER_LAYER_SETTINGS
|
||||
|
||||
// Create a layer setting set. If 'pCallback' is set to NULL, the messages are outputed to stderr.
|
||||
VkResult vlCreateLayerSettingSet(const char *pLayerName, const VkLayerSettingsCreateInfoEXT *pCreateInfo,
|
||||
|
|
|
@ -19,11 +19,13 @@
|
|||
#include <cstdint>
|
||||
#include <unordered_map>
|
||||
|
||||
#ifdef ENABLE_REGISTER_LAYER_SETTINGS
|
||||
std::unordered_map<std::string, std::pair<uint32_t, VkLayerSettingPropertiesEXT *> > layer_settings_properties;
|
||||
|
||||
void vlRegistryLayerSettingsProperties(const char *pLayerName, uint32_t propertyCount, VkLayerSettingPropertiesEXT *pProperties) {
|
||||
layer_settings_properties.insert(std::pair(pLayerName, std::pair(propertyCount, pProperties)));
|
||||
}
|
||||
#endif//ENABLE_REGISTER_LAYER_SETTINGS
|
||||
|
||||
// This is used only for unit tests in test_layer_setting_file
|
||||
void test_helper_SetLayerSetting(VlLayerSettingSet layerSettingSet, const char *pSettingName, const char *pValue) {
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
#ifdef ENABLE_REGISTER_LAYER_SETTINGS
|
||||
#if defined(__GNUC__) && __GNUC__ >= 4
|
||||
#define LAYER_EXPORT __attribute__((visibility("default")))
|
||||
#else
|
||||
|
@ -40,3 +41,4 @@ LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceLayerSettingsEXT(
|
|||
}
|
||||
|
||||
} // extern "C"
|
||||
#endif // ENABLE_REGISTER_LAYER_SETTINGS
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
#include "vulkan/layer/vk_layer_settings.h"
|
||||
|
||||
#ifdef ENABLE_REGISTER_LAYER_SETTINGS
|
||||
TEST(test_layer_setting_api, vkEnumerateInstanceLayerSettingsEXT) {
|
||||
|
||||
VkLayerSettingPropertiesEXT properties[] = {
|
||||
|
@ -37,6 +38,7 @@ TEST(test_layer_setting_api, vkEnumerateInstanceLayerSettingsEXT) {
|
|||
EXPECT_STREQ(properties[1].key, results[1].key);
|
||||
EXPECT_EQ(properties[1].type, results[1].type);
|
||||
}
|
||||
#endif // ENABLE_REGISTER_LAYER_SETTINGS
|
||||
|
||||
TEST(test_layer_setting_api, vlHasLayerSetting_NotFound) {
|
||||
VlLayerSettingSet layerSettingSet = VK_NULL_HANDLE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue