Commit 8e8f167c authored by Jason Ekstrand's avatar Jason Ekstrand

anv/entrypoints: Add an is_device_entrypoint helper

Reviewed-by: Samuel Iglesias Gonsálvez's avatarSamuel Iglesias Gonsálvez <siglesias@igalia.com>
parent 54b3493f
......@@ -215,7 +215,7 @@ string_map_lookup(const char *str)
/** Trampoline entrypoints for all device functions */
% for e in entrypoints:
% if e.params[0].type not in ('VkDevice', 'VkCommandBuffer'):
% if not e.is_device_entrypoint():
<% continue %>
% endif
% if e.guard is not None:
......@@ -239,7 +239,7 @@ string_map_lookup(const char *str)
const struct anv_dispatch_table anv_tramp_dispatch_table = {
% for e in entrypoints:
% if e.params[0].type not in ('VkDevice', 'VkCommandBuffer'):
% if not e.is_device_entrypoint():
<% continue %>
% endif
% if e.guard is not None:
......@@ -406,6 +406,9 @@ class Entrypoint(object):
self.core_version = None
self.extension = None
def is_device_entrypoint(self):
return self.params[0].type in ('VkDevice', 'VkCommandBuffer')
def prefixed_name(self, prefix):
assert self.name.startswith('vk')
return prefix + '_' + self.name[2:]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment