turnip: Instance can be NULL resolving 'GetInstanceProcAddr' entry point
Using turnip driver without a vulkan loader is currently broken because the entry point resolver is expecting a valid instance when resolving 'vkGetInstanceProcAddr' through vk_icdGetInstanceProcAddr(). Reviewed-by: Jonathan Marek <jonathan@marek.ca> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4257> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4257>
This commit is contained in:
parent
5cc3ab0ba0
commit
55b0a676fd
|
@ -206,7 +206,7 @@ tu_entrypoint_is_enabled(int index, uint32_t core_version,
|
||||||
% if not e.device_command:
|
% if not e.device_command:
|
||||||
if (device) return false;
|
if (device) return false;
|
||||||
% endif
|
% endif
|
||||||
% if e.name == 'vkCreateInstance' or e.name == 'vkEnumerateInstanceExtensionProperties' or e.name == 'vkEnumerateInstanceLayerProperties' or e.name == 'vkEnumerateInstanceVersion':
|
% if e.name == 'vkGetInstanceProcAddr' or e.name == 'vkCreateInstance' or e.name == 'vkEnumerateInstanceExtensionProperties' or e.name == 'vkEnumerateInstanceLayerProperties' or e.name == 'vkEnumerateInstanceVersion':
|
||||||
return !device;
|
return !device;
|
||||||
% elif e.core_version:
|
% elif e.core_version:
|
||||||
return instance && ${e.core_version.c_vk_version()} <= core_version;
|
return instance && ${e.core_version.c_vk_version()} <= core_version;
|
||||||
|
|
Loading…
Reference in New Issue