mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-23 18:20:30 +01:00
zink: fix win32 detection in zink_device_info
str.find(substr) returns -1 if the substring's not in the string, and bool(-1) returns True in Python, so the _WIN32 ifdef guard was actually inserted everywhere. Also, the win32 functions actually have "Win32" in their name, like vkGetMemoryWin32HandleKHR Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35389>
This commit is contained in:
parent
4dafd2e787
commit
bbfeb6cd87
1 changed files with 2 additions and 2 deletions
|
|
@ -750,7 +750,7 @@ zink_verify_device_extensions(struct zink_screen *screen)
|
|||
<%helpers:guard ext="${ext}">
|
||||
if (screen->info.have_${ext.name_with_vendor()}) {
|
||||
%for cmd in registry.get_registry_entry(ext.name).device_commands:
|
||||
%if cmd.find("win32"):
|
||||
%if cmd.find("Win32") != -1:
|
||||
#ifdef _WIN32
|
||||
%endif
|
||||
if (!screen->vk.${cmd.lstrip("vk")}) {
|
||||
|
|
@ -760,7 +760,7 @@ zink_verify_device_extensions(struct zink_screen *screen)
|
|||
screen->vk.${cmd.lstrip("vk")} = (PFN_${cmd})zink_stub_function_not_loaded;
|
||||
#endif
|
||||
}
|
||||
%if cmd.find("win32"):
|
||||
%if cmd.find("Win32") != -1:
|
||||
#endif
|
||||
%endif
|
||||
%endfor
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue