mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 00:30:11 +01:00
vk: Add a logger wrapper for the generated entrypoint
This commit is contained in:
parent
eb92745b2e
commit
ca7e62d421
1 changed files with 14 additions and 0 deletions
|
|
@ -189,6 +189,20 @@ for type, name, args, num, h in entrypoints:
|
|||
print "static void *resolve_%s(void) { return resolve_entrypoint(%d); }" % (name, num)
|
||||
print "%s vk%s%s\n __attribute__ ((ifunc (\"resolve_%s\"), visibility (\"default\")));\n" % (type, name, args, name)
|
||||
|
||||
|
||||
logger = """%s __attribute__ ((weak)) anv_validate_%s%s
|
||||
{
|
||||
fprintf(stderr, "%%s\\n", strings + %d);
|
||||
void *args = __builtin_apply_args();
|
||||
void *result = __builtin_apply((void *) anv_%s, args, 100);
|
||||
__builtin_return(result);
|
||||
}
|
||||
"""
|
||||
|
||||
for type, name, args, num, h in entrypoints:
|
||||
print logger % (type, name, args, offsets[num], name)
|
||||
|
||||
|
||||
# Now generate the hash table used for entry point look up. This is a
|
||||
# uint16_t table of entry point indices. We use 0xffff to indicate an entry
|
||||
# in the hash table is empty.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue