aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorLenny Komow <lenny@lunarg.com>2017-10-02 15:32:55 -0600
committerMike Schuchardt <mikes@lunarg.com>2018-03-09 13:54:31 -0700
commit240ccee0362f6e6453139aa9f65483a95ea08d2c (patch)
treebdca85b39fb84c98522b54ad86566f3b79d63d72 /scripts
parent1769fff5bf002d432c0fc16dc5cded87b93f60e8 (diff)
downloadusermoji-240ccee0362f6e6453139aa9f65483a95ea08d2c.tar.xz
loader: Fix loader marking 1.1 cmds as required
Diffstat (limited to 'scripts')
-rw-r--r--scripts/loader_extension_generator.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/loader_extension_generator.py b/scripts/loader_extension_generator.py
index f0c16205..16eb78db 100644
--- a/scripts/loader_extension_generator.py
+++ b/scripts/loader_extension_generator.py
@@ -604,6 +604,7 @@ class LoaderExtensionOutputGenerator(OutputGenerator):
else:
commands = self.ext_commands
+ required = False
for cur_cmd in commands:
is_inst_handle_type = cur_cmd.ext_type == 'instance' or cur_cmd.handle_type == 'VkInstance' or cur_cmd.handle_type == 'VkPhysicalDevice'
if ((is_inst_handle_type or cur_cmd.name in DEVICE_CMDS_NEED_TERM) and (cur_cmd.name not in skip_gipa_commands)):
@@ -611,8 +612,10 @@ class LoaderExtensionOutputGenerator(OutputGenerator):
if cur_cmd.ext_name != cur_extension_name:
if 'VK_VERSION_' in cur_cmd.ext_name:
table += '\n // ---- Core %s\n' % cur_cmd.ext_name[11:]
+ required = cur_cmd.ext_name == 'VK_VERSION_1_0'
else:
table += '\n // ---- %s extension commands\n' % cur_cmd.ext_name
+ required = False
cur_extension_name = cur_cmd.ext_name
# Remove 'vk' from proto name
@@ -623,10 +626,7 @@ class LoaderExtensionOutputGenerator(OutputGenerator):
# The Core Vulkan code will be wrapped in a feature called VK_VERSION_#_#
# For example: VK_VERSION_1_0 wraps the core 1.0 Vulkan functionality
- if x == 0:
- table += ' LOOKUP_GIPA(%s, true);\n' % (base_name)
- else:
- table += ' LOOKUP_GIPA(%s, false);\n' % (base_name)
+ table += ' LOOKUP_GIPA(%s, %s);\n' % (base_name, 'true' if required else 'false')
if cur_cmd.protect is not None:
table += '#endif // %s\n' % cur_cmd.protect