From 00d18a661f7685fd3742337674deca372ad7cbc4 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Thu, 24 Sep 2015 14:20:07 -0700 Subject: [PATCH] anv/entrypoints: Expose the anv_resolve_entrypoint function --- src/vulkan/anv_entrypoints_gen.py | 8 ++++---- src/vulkan/anv_private.h | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/vulkan/anv_entrypoints_gen.py b/src/vulkan/anv_entrypoints_gen.py index 50c9845..0fa677b 100644 --- a/src/vulkan/anv_entrypoints_gen.py +++ b/src/vulkan/anv_entrypoints_gen.py @@ -201,8 +201,8 @@ anv_set_dispatch_gen(uint32_t gen) dispatch_gen = gen; } -static void * __attribute__ ((noinline)) -resolve_entrypoint(uint32_t index) +void * __attribute__ ((noinline)) +anv_resolve_entrypoint(uint32_t index) { if (enable_validate && validate_layer.entrypoints[index]) return validate_layer.entrypoints[index]; @@ -229,7 +229,7 @@ resolve_entrypoint(uint32_t index) # lets the resolver look it up in the table. for type, name, args, num, h in entrypoints: - print "static void *resolve_%s(void) { return resolve_entrypoint(%d); }" % (name, num) + print "static void *resolve_%s(void) { return anv_resolve_entrypoint(%d); }" % (name, num) print "%s vk%s%s\n __attribute__ ((ifunc (\"resolve_%s\"), visibility (\"default\")));\n" % (type, name, args, name) @@ -305,6 +305,6 @@ anv_lookup_entrypoint(const char *name) if (strcmp(name, strings + e->name) != 0) return NULL; - return resolve_entrypoint(i); + return anv_resolve_entrypoint(i); } """ % (prime_factor, prime_step, hash_mask) diff --git a/src/vulkan/anv_private.h b/src/vulkan/anv_private.h index f710cef..7e5982d 100644 --- a/src/vulkan/anv_private.h +++ b/src/vulkan/anv_private.h @@ -366,6 +366,10 @@ void anv_bo_pool_finish(struct anv_bo_pool *pool); VkResult anv_bo_pool_alloc(struct anv_bo_pool *pool, struct anv_bo *bo); void anv_bo_pool_free(struct anv_bo_pool *pool, const struct anv_bo *bo); + +void *anv_resolve_entrypoint(uint32_t index); + + struct anv_physical_device { struct anv_instance * instance; uint32_t chipset_id; -- 2.7.4