mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 19:58:09 +02:00
vulkan: Fix entrypoint generation when compiling for x86 with MSVC
When compiling for x86 with MSVC, Vulkan API entry points follow the __stdcall convention (VKAPI_CALL maps to __stdcall), which uses the following name mangling: _<function_name>@<arguments_size> Fix the vk_entrypoint_stub()/alternatename definitions accordingly. 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/13516> (cherry picked from commit1813bb5917)
This commit is contained in:
parent
734011012f
commit
a63104a7d8
3 changed files with 4 additions and 4 deletions
|
|
@ -562,7 +562,7 @@
|
|||
"description": "vulkan: Fix entrypoint generation when compiling for x86 with MSVC",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "6d44b21d4fdea89673541de265f69258747c5499"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
void vk_entrypoint_stub(void);
|
||||
VKAPI_ATTR void VKAPI_CALL vk_entrypoint_stub(void);
|
||||
#endif
|
||||
|
||||
<%def name="dispatch_table(entrypoints)">
|
||||
|
|
@ -469,7 +469,7 @@ vk_device_entrypoint_is_enabled(int index, uint32_t core_version,
|
|||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
void vk_entrypoint_stub(void)
|
||||
VKAPI_ATTR void VKAPI_CALL vk_entrypoint_stub(void)
|
||||
{
|
||||
unreachable(!"Entrypoint not implemented");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ TEMPLATE_C = Template(COPYRIGHT + """
|
|||
#ifdef _MSC_VER
|
||||
#ifdef _M_IX86
|
||||
% for args_size in [4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 60, 104]:
|
||||
#pragma comment(linker, "/alternatename:_${p}_${e.name}@${args_size}=_vk_entrypoint_stub")
|
||||
#pragma comment(linker, "/alternatename:_${p}_${e.name}@${args_size}=_vk_entrypoint_stub@0")
|
||||
% endfor
|
||||
#else
|
||||
#pragma comment(linker, "/alternatename:${p}_${e.name}=vk_entrypoint_stub")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue