From: Jason Ekstrand Date: Thu, 24 Sep 2015 21:20:07 +0000 (-0700) Subject: anv/entrypoints: Expose the anv_resolve_entrypoint function X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=00d18a661f7685fd3742337674deca372ad7cbc4;p=mesa.git anv/entrypoints: Expose the anv_resolve_entrypoint function --- diff --git a/src/vulkan/anv_entrypoints_gen.py b/src/vulkan/anv_entrypoints_gen.py index 50c98456846..0fa677bbe02 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 f710cefe36c..7e5982db645 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;