Mesa (master): anv/entrypoints: dispatches to VkQueue are device-level
Iago Toral Quiroga
itoral at kemper.freedesktop.org
Wed Mar 14 07:10:24 UTC 2018
Module: Mesa
Branch: master
Commit: a631575ff4e415271d7b4b5574d64fc5d2e5586e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a631575ff4e415271d7b4b5574d64fc5d2e5586e
Author: Iago Toral Quiroga <itoral at igalia.com>
Date: Mon Mar 12 08:29:57 2018 +0100
anv/entrypoints: dispatches to VkQueue are device-level
v2:
- Add trampoline functions (Jason)
- Add an assertion for unhandled trampoline cases
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
---
src/intel/vulkan/anv_entrypoints_gen.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/intel/vulkan/anv_entrypoints_gen.py b/src/intel/vulkan/anv_entrypoints_gen.py
index 485c6cfe8d..7211034782 100644
--- a/src/intel/vulkan/anv_entrypoints_gen.py
+++ b/src/intel/vulkan/anv_entrypoints_gen.py
@@ -233,9 +233,14 @@ string_map_lookup(const char *str)
% if e.params[0].type == 'VkDevice':
ANV_FROM_HANDLE(anv_device, anv_device, ${e.params[0].name});
return anv_device->dispatch.${e.name}(${e.call_params()});
- % else:
+ % elif e.params[0].type == 'VkCommandBuffer':
ANV_FROM_HANDLE(anv_cmd_buffer, anv_cmd_buffer, ${e.params[0].name});
return anv_cmd_buffer->device->dispatch.${e.name}(${e.call_params()});
+ % elif e.params[0].type == 'VkQueue':
+ ANV_FROM_HANDLE(anv_queue, anv_queue, ${e.params[0].name});
+ return anv_queue->device->dispatch.${e.name}(${e.call_params()});
+ % else:
+ assert(!"Unhandled device child trampoline case: ${e.params[0].type}");
% endif
}
% if e.guard is not None:
@@ -423,7 +428,7 @@ class Entrypoint(EntrypointBase):
self.guard = guard
def is_device_entrypoint(self):
- return self.params[0].type in ('VkDevice', 'VkCommandBuffer')
+ return self.params[0].type in ('VkDevice', 'VkCommandBuffer', 'VkQueue')
def prefixed_name(self, prefix):
assert self.name.startswith('vk')
More information about the mesa-commit
mailing list