layers: Add instance exts to extension helper list
vk_extension_helper.h was not including instance extensions in the
enabled device extension list. This prevented device APIs which were
part of instance extensions from operating with GetDevProcAddr
correctly.
Change-Id: If66e19c4cb2ca4a4c5e6c75eab585623f204fb9e
diff --git a/scripts/helper_file_generator.py b/scripts/helper_file_generator.py
index 4f1bd37..b48c42f 100644
--- a/scripts/helper_file_generator.py
+++ b/scripts/helper_file_generator.py
@@ -537,10 +537,11 @@
struct = [struct_decl]
struct.extend([ ' bool %s{false};' % field_name[ext_name] for ext_name, info in extension_items])
- # Create struct entries for saving extension count and extension list from DeviceCreateInfo
- struct.extend([
- '',
- ' std::unordered_set<std::string> device_extension_set;'])
+ # Create struct entries for saving extension count and extension list from Instance, DeviceCreateInfo
+ if type == 'Instance':
+ struct.extend([
+ '',
+ ' std::unordered_set<std::string> device_extension_set;'])
# Construct the extension information map -- mapping name to data member (field), and required extensions
# The map is contained within a static function member for portability reasons.
@@ -605,13 +606,13 @@
' // Initialize: this to defaults, base class fields to input.',
' assert(instance_extensions);',
' *this = %s(*instance_extensions);' % struct_type,
+ '']),
+ struct.extend([
'',
' // Save pCreateInfo device extension list',
' for (uint32_t extn = 0; extn < pCreateInfo->enabledExtensionCount; extn++) {',
' device_extension_set.insert(pCreateInfo->ppEnabledExtensionNames[extn]);',
- ' }']),
-
- struct.extend([
+ ' }',
'',
' static const std::vector<const char *> V_1_0_promoted_%s_extensions = {' % type.lower() ])
struct.extend([' %s_EXTENSION_NAME,' % ext_name.upper() for ext_name in promoted_ext_list])