mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 08:08:06 +02:00
zink: factor out GET_PROC_ADDR and friends to zink_screen.h
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7800>
This commit is contained in:
parent
2f58d933ea
commit
12656de341
2 changed files with 18 additions and 18 deletions
|
|
@ -54,24 +54,6 @@ DEBUG_GET_ONCE_FLAGS_OPTION(zink_debug, "ZINK_DEBUG", debug_options, 0)
|
|||
uint32_t
|
||||
zink_debug;
|
||||
|
||||
#define GET_PROC_ADDR(x) do { \
|
||||
screen->vk_##x = (PFN_vk##x)vkGetDeviceProcAddr(screen->dev, "vk"#x); \
|
||||
if (!screen->vk_##x) { \
|
||||
debug_printf("vkGetDeviceProcAddr failed: vk"#x"\n"); \
|
||||
return false; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define GET_PROC_ADDR_INSTANCE(x) do { \
|
||||
screen->vk_##x = (PFN_vk##x)vkGetInstanceProcAddr(screen->instance, "vk"#x); \
|
||||
if (!screen->vk_##x) { \
|
||||
debug_printf("GetInstanceProcAddr failed: vk"#x"\n"); \
|
||||
return false; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define GET_PROC_ADDR_INSTANCE_LOCAL(instance, x) PFN_vk##x vk_##x = (PFN_vk##x)vkGetInstanceProcAddr(instance, "vk"#x)
|
||||
|
||||
static const char *
|
||||
zink_get_vendor(struct pipe_screen *pscreen)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -125,4 +125,22 @@ zink_get_format(struct zink_screen *screen, enum pipe_format format);
|
|||
bool
|
||||
zink_is_depth_format_supported(struct zink_screen *screen, VkFormat format);
|
||||
|
||||
#define GET_PROC_ADDR(x) do { \
|
||||
screen->vk_##x = (PFN_vk##x)vkGetDeviceProcAddr(screen->dev, "vk"#x); \
|
||||
if (!screen->vk_##x) { \
|
||||
debug_printf("vkGetDeviceProcAddr failed: vk"#x"\n"); \
|
||||
return false; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define GET_PROC_ADDR_INSTANCE(x) do { \
|
||||
screen->vk_##x = (PFN_vk##x)vkGetInstanceProcAddr(screen->instance, "vk"#x); \
|
||||
if (!screen->vk_##x) { \
|
||||
debug_printf("GetInstanceProcAddr failed: vk"#x"\n"); \
|
||||
return false; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define GET_PROC_ADDR_INSTANCE_LOCAL(instance, x) PFN_vk##x vk_##x = (PFN_vk##x)vkGetInstanceProcAddr(instance, "vk"#x)
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue