{
ANV_FROM_HANDLE(anv_queue, queue, _queue);
- return ANV_CALL(DeviceWaitIdle)(anv_device_to_handle(queue->device));
+ return anv_DeviceWaitIdle(anv_device_to_handle(queue->device));
}
VkResult anv_DeviceWaitIdle(
VkImageAspectFlagBits aspect,
unsigned miplevel, unsigned array_layer)
{
- ANV_CALL(CmdPipelineBarrier)(anv_cmd_buffer_to_handle(cmd_buffer),
+ PFN_vkCmdPipelineBarrier CmdPipelineBarrier =
+ (void *)anv_GetDeviceProcAddr(anv_device_to_handle(device),
+ "vkCmdPipelineBarrier");
+
+ CmdPipelineBarrier(anv_cmd_buffer_to_handle(cmd_buffer),
VK_PIPELINE_STAGE_TRANSFER_BIT,
VK_PIPELINE_STAGE_TRANSFER_BIT,
0, 0, NULL, 0, NULL, 1,
src->usage = old_usage;
- ANV_CALL(CmdPipelineBarrier)(anv_cmd_buffer_to_handle(cmd_buffer),
+ CmdPipelineBarrier(anv_cmd_buffer_to_handle(cmd_buffer),
VK_PIPELINE_STAGE_TRANSFER_BIT,
VK_PIPELINE_STAGE_TRANSFER_BIT,
0, 0, NULL, 0, NULL, 1,
dispatch_devinfo = *devinfo;
}
-void * __attribute__ ((noinline))
+static void * __attribute__ ((noinline))
anv_resolve_entrypoint(uint32_t index)
{
if (dispatch_devinfo.gen == 0) {
gl_shader_stage stage,
unsigned per_thread_scratch);
-void *anv_resolve_entrypoint(uint32_t index);
-
extern struct anv_dispatch_table dtable;
-#define ANV_CALL(func) ({ \
- if (dtable.func == NULL) { \
- size_t idx = offsetof(struct anv_dispatch_table, func) / sizeof(void *); \
- dtable.entrypoints[idx] = anv_resolve_entrypoint(idx); \
- } \
- dtable.func; \
-})
-
static inline void *
anv_alloc(const VkAllocationCallbacks *alloc,
size_t size, size_t align,