diff --git a/tools/spec.py b/tools/spec.py index ac04e65..8a347d3 100644 --- a/tools/spec.py +++ b/tools/spec.py @@ -960,7 +960,9 @@ def write_dispatch(dst: TextIO, q: List[Type], reg: Registry): forwarding = f"return ::cruft::vk::load::i_table->{obj.name} ({', '.join (i.name for i in obj.params)});" else: forwarding = f""" - auto const entry = reinterpret_cast const*> ({obj.params[0].name}); + auto const entry = reinterpret_cast< + indirect<{obj.params[0].type},cruft::vk::load::{table}_table> const* + > ({obj.params[0].name}); return (entry->table.{obj.name})( {", ".join(['entry->handle'] + [p.name for p in obj.params[1:]])}