vulkan: Set unused entrypoints to vk_entrypoint_stub when compiling with MSVC

If we don't do that we hit the assert(entry[i] != NULL) added by commit
6d44b21d4f ("vulkan: Fix weak symbol emulation when compiling with MSVC").

Fixes: 6d44b21d4f ("vulkan: Fix weak symbol emulation when compiling with MSVC")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13355>
This commit is contained in:
Boris Brezillon 2021-10-14 10:34:37 +02:00 committed by Marge Bot
parent b4aa5a3fdd
commit fd46749234
2 changed files with 6 additions and 0 deletions

View file

@ -68,6 +68,10 @@ TEMPLATE_H = Template(COPYRIGHT + """\
extern "C" {
#endif
#ifdef _MSC_VER
void vk_entrypoint_stub(void);
#endif
<%def name="dispatch_table(entrypoints)">
% for e in entrypoints:
% if e.alias:

View file

@ -148,6 +148,8 @@ const struct vk_${type}_entrypoint_table ${p}_${type}_entrypoints = {
% endif
.${e.name} = ${p}_${e.name},
% if e.guard is not None:
#elif defined(_MSC_VER)
.${e.name} = (PFN_vkVoidFunction)vk_entrypoint_stub,
#endif // ${e.guard}
% endif
% endfor