Skip to content

Commit 5f2c9a0

Browse files
committed
Allow layers to expose new extensions
1 parent f952f5a commit 5f2c9a0

File tree

11 files changed

+69
-24
lines changed

11 files changed

+69
-24
lines changed

generator/vk_layer/source/instance.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,13 @@ static std::unordered_map<void*, std::unique_ptr<Instance>> g_instances;
3838
const APIVersion Instance::minAPIVersion { 1, 1 };
3939

4040
/* See header for documentation. */
41-
const std::vector<std::string> Instance::extraExtensions {
41+
const std::vector<std::string> Instance::extraDriverExtensions {
4242
VK_EXT_DEBUG_UTILS_EXTENSION_NAME
4343
};
4444

45+
/* See header for documentation. */
46+
const std::vector<std::string> Instance::injectedLayerExtensions {};
47+
4548
/* See header for documentation. */
4649
void Instance::store(
4750
VkInstance handle,

generator/vk_layer/source/instance.hpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,12 @@ class Instance
143143
static const APIVersion minAPIVersion;
144144

145145
/**
146-
* @brief The minimum set of instance extensions needed by this layer.
146+
* @brief The minimum set of instance extensions needed from the underlying driver.
147147
*/
148-
static const std::vector<std::string> extraExtensions;
148+
static const std::vector<std::string> extraDriverExtensions;
149+
150+
/**
151+
* @brief The minimum set of instance extensions injected by the layer.
152+
*/
153+
static const std::vector<std::string> injectedLayerExtensions;
149154
};

layer_example/source/instance.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,15 @@
3535
static std::unordered_map<void*, std::unique_ptr<Instance>> g_instances;
3636

3737
/* See header for documentation. */
38-
const APIVersion Instance::minAPIVersion {1, 1};
38+
const APIVersion Instance::minAPIVersion { 1, 1 };
3939

4040
/* See header for documentation. */
41-
const std::vector<std::string> Instance::extraExtensions {VK_EXT_DEBUG_UTILS_EXTENSION_NAME};
41+
const std::vector<std::string> Instance::extraDriverExtensions {
42+
VK_EXT_DEBUG_UTILS_EXTENSION_NAME
43+
};
44+
45+
/* See header for documentation. */
46+
const std::vector<std::string> Instance::injectedLayerExtensions {};
4247

4348
/* See header for documentation. */
4449
void Instance::store(VkInstance handle, std::unique_ptr<Instance>& instance)

layer_example/source/instance.hpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,12 @@ class Instance
137137
static const APIVersion minAPIVersion;
138138

139139
/**
140-
* @brief The minimum set of instance extensions needed by this layer.
140+
* @brief The minimum set of instance extensions needed from the underlying driver.
141141
*/
142-
static const std::vector<std::string> extraExtensions;
142+
static const std::vector<std::string> extraDriverExtensions;
143+
144+
/**
145+
* @brief The minimum set of instance extensions injected by the layer.
146+
*/
147+
static const std::vector<std::string> injectedLayerExtensions;
143148
};

layer_gpu_profile/source/instance.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,16 @@
3535
static std::unordered_map<void*, std::unique_ptr<Instance>> g_instances;
3636

3737
/* See header for documentation. */
38-
const APIVersion Instance::minAPIVersion {1, 1};
38+
const APIVersion Instance::minAPIVersion { 1, 1 };
3939

4040
/* See header for documentation. */
41-
const std::vector<std::string> Instance::extraExtensions {
41+
const std::vector<std::string> Instance::extraDriverExtensions {
4242
VK_EXT_DEBUG_UTILS_EXTENSION_NAME,
4343
};
4444

45+
/* See header for documentation. */
46+
const std::vector<std::string> Instance::injectedLayerExtensions {};
47+
4548
/* See header for documentation. */
4649
void Instance::store(VkInstance handle, std::unique_ptr<Instance>& instance)
4750
{

layer_gpu_profile/source/instance.hpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,12 @@ class Instance
143143
static const APIVersion minAPIVersion;
144144

145145
/**
146-
* @brief The minimum set of instance extensions needed by this layer.
146+
* @brief The minimum set of instance extensions needed from the underlying driver.
147147
*/
148-
static const std::vector<std::string> extraExtensions;
148+
static const std::vector<std::string> extraDriverExtensions;
149+
150+
/**
151+
* @brief The minimum set of instance extensions injected by the layer.
152+
*/
153+
static const std::vector<std::string> injectedLayerExtensions;
149154
};

layer_gpu_support/source/instance.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,16 @@
3535
static std::unordered_map<void*, std::unique_ptr<Instance>> g_instances;
3636

3737
/* See header for documentation. */
38-
const APIVersion Instance::minAPIVersion {1, 1};
38+
const APIVersion Instance::minAPIVersion { 1, 1 };
3939

4040
/* See header for documentation. */
41-
const std::vector<std::string> Instance::extraExtensions {
41+
const std::vector<std::string> Instance::extraDriverExtensions {
4242
VK_EXT_DEBUG_UTILS_EXTENSION_NAME,
4343
};
4444

45+
/* See header for documentation. */
46+
const std::vector<std::string> Instance::injectedLayerExtensions {};
47+
4548
/* See header for documentation. */
4649
void Instance::store(VkInstance handle, std::unique_ptr<Instance>& instance)
4750
{

layer_gpu_support/source/instance.hpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,12 @@ class Instance
142142
static const APIVersion minAPIVersion;
143143

144144
/**
145-
* @brief The minimum set of instance extensions needed by this layer.
145+
* @brief The minimum set of instance extensions needed from the underlying driver.
146146
*/
147-
static const std::vector<std::string> extraExtensions;
147+
static const std::vector<std::string> extraDriverExtensions;
148+
149+
/**
150+
* @brief The minimum set of instance extensions injected by the layer.
151+
*/
152+
static const std::vector<std::string> injectedLayerExtensions;
148153
};

layer_gpu_timeline/source/instance.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,16 @@
3535
static std::unordered_map<void*, std::unique_ptr<Instance>> g_instances;
3636

3737
/* See header for documentation. */
38-
const APIVersion Instance::minAPIVersion {1, 1};
38+
const APIVersion Instance::minAPIVersion { 1, 1 };
3939

4040
/* See header for documentation. */
41-
const std::vector<std::string> Instance::extraExtensions {
41+
const std::vector<std::string> Instance::extraDriverExtensions {
4242
VK_EXT_DEBUG_UTILS_EXTENSION_NAME,
4343
};
4444

45+
/* See header for documentation. */
46+
const std::vector<std::string> Instance::injectedLayerExtensions {};
47+
4548
/* See header for documentation. */
4649
void Instance::store(VkInstance handle, std::unique_ptr<Instance>& instance)
4750
{

layer_gpu_timeline/source/instance.hpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,12 @@ class Instance
137137
static const APIVersion minAPIVersion;
138138

139139
/**
140-
* @brief The minimum set of instance extensions needed by this layer.
140+
* @brief The minimum set of instance extensions needed from the underlying driver.
141141
*/
142-
static const std::vector<std::string> extraExtensions;
142+
static const std::vector<std::string> extraDriverExtensions;
143+
144+
/**
145+
* @brief The minimum set of instance extensions injected by the layer.
146+
*/
147+
static const std::vector<std::string> injectedLayerExtensions;
143148
};

0 commit comments

Comments
 (0)