%endfor
% for e in instance_entrypoints:
- % if e.alias:
+ % if e.alias and e.alias.enabled:
<% continue %>
% endif
% if e.guard is not None:
% endfor
% for e in device_entrypoints:
- % if e.alias:
+ % if e.alias and e.alias.enabled:
<% continue %>
% endif
% if e.guard is not None:
*/
% for e in instance_entrypoints:
- % if e.alias:
+ % if e.alias and e.alias.enabled:
<% continue %>
% endif
% if e.guard is not None:
% for layer in LAYERS:
% for e in device_entrypoints:
- % if e.alias:
+ % if e.alias and e.alias.enabled:
<% continue %>
% endif
% if e.guard is not None:
self.core_version = None
self.extensions = []
+ def prefixed_name(self, prefix):
+ assert self.name.startswith('vk')
+ return prefix + '_' + self.name[2:]
+
class Entrypoint(EntrypointBase):
def __init__(self, name, return_type, params, guard=None):
super(Entrypoint, self).__init__(name)
def is_device_entrypoint(self):
return self.params[0].type in ('VkDevice', 'VkCommandBuffer', 'VkQueue')
- def prefixed_name(self, prefix):
- assert self.name.startswith('vk')
- return prefix + '_' + self.name[2:]
-
def decl_params(self):
return ', '.join(p.decl for p in self.params)
return self.alias.is_device_entrypoint()
def prefixed_name(self, prefix):
- return self.alias.prefixed_name(prefix)
+ if self.alias.enabled:
+ return self.alias.prefixed_name(prefix)
+ return super(EntrypointAlias, self).prefixed_name(prefix)
+
+ @property
+ def params(self):
+ return self.alias.params
+
+ @property
+ def return_type(self):
+ return self.alias.return_type
+
+ def decl_params(self):
+ return self.alias.decl_params()
+
+ def call_params(self):
+ return self.alias.call_params()
def get_entrypoints(doc, entrypoints_to_defines):
"""Extract the entry points from the registry."""