diff options
author | Jason Ekstrand <[email protected]> | 2018-01-23 19:15:27 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-03-07 12:13:47 -0800 |
commit | 8e8f167c72757aa9a1ee835570100e56bb6dc06d (patch) | |
tree | 2d9380550e6e94af7f3ed70de81c43b818fefe85 /src | |
parent | 54b3493fc078a89bf9c3abc64721e37348a41018 (diff) |
anv/entrypoints: Add an is_device_entrypoint helper
Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/intel/vulkan/anv_entrypoints_gen.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_entrypoints_gen.py b/src/intel/vulkan/anv_entrypoints_gen.py index 4a910aed63e..b33460f8f7b 100644 --- a/src/intel/vulkan/anv_entrypoints_gen.py +++ b/src/intel/vulkan/anv_entrypoints_gen.py @@ -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:] |