From 8d46e35d16e3936968958bcab86d61967a673305 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Fri, 31 Aug 2018 16:50:20 +0200 Subject: zink: introduce opengl over vulkan Here's zink, a so far pretty simple vulkan-gallium driver that is able to translate some applications from OpenGL to Vulkan. The compiler is quite limited for now, this will be improved on later. Signed-off-by: Erik Faye-Lund Acked-by: Jordan Justen --- src/gallium/auxiliary/target-helpers/inline_sw_helper.h | 7 +++++++ src/gallium/auxiliary/target-helpers/sw_helper.h | 11 +++++++++++ 2 files changed, 18 insertions(+) (limited to 'src/gallium/auxiliary/target-helpers') diff --git a/src/gallium/auxiliary/target-helpers/inline_sw_helper.h b/src/gallium/auxiliary/target-helpers/inline_sw_helper.h index 36146cf1e37..c89ef14a6fb 100644 --- a/src/gallium/auxiliary/target-helpers/inline_sw_helper.h +++ b/src/gallium/auxiliary/target-helpers/inline_sw_helper.h @@ -55,6 +55,11 @@ sw_screen_create_named(struct sw_winsys *winsys, const char *driver) screen = swr_create_screen(winsys); #endif +#if defined(GALLIUM_ZINK) + if (screen == NULL && strcmp(driver, "zink") == 0) + screen = zink_create_screen(winsys); +#endif + return screen; } @@ -71,6 +76,8 @@ sw_screen_create(struct sw_winsys *winsys) default_driver = "softpipe"; #elif defined(GALLIUM_SWR) default_driver = "swr"; +#elif defined(GALLIUM_ZINK) + default_driver = "zink"; #else default_driver = ""; #endif diff --git a/src/gallium/auxiliary/target-helpers/sw_helper.h b/src/gallium/auxiliary/target-helpers/sw_helper.h index 953412a3ff5..2fb1da527cc 100644 --- a/src/gallium/auxiliary/target-helpers/sw_helper.h +++ b/src/gallium/auxiliary/target-helpers/sw_helper.h @@ -12,6 +12,10 @@ * llvmpipe, softpipe, swr. */ +#ifdef GALLIUM_ZINK +#include "zink/zink_public.h" +#endif + #ifdef GALLIUM_SOFTPIPE #include "softpipe/sp_public.h" #endif @@ -57,6 +61,11 @@ sw_screen_create_named(struct sw_winsys *winsys, const char *driver) screen = swr_create_screen(winsys); #endif +#if defined(GALLIUM_ZINK) + if (screen == NULL && strcmp(driver, "zink") == 0) + screen = zink_create_screen(winsys); +#endif + return screen; } @@ -73,6 +82,8 @@ sw_screen_create(struct sw_winsys *winsys) default_driver = "softpipe"; #elif defined(GALLIUM_SWR) default_driver = "swr"; +#elif defined(GALLIUM_SWR) + default_driver = "zink"; #else default_driver = ""; #endif -- cgit v1.2.3