aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/target-helpers
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2018-08-31 16:50:20 +0200
committerErik Faye-Lund <[email protected]>2019-10-28 08:51:43 +0000
commit8d46e35d16e3936968958bcab86d61967a673305 (patch)
tree340ebb375451698e95c55ff577fc0e4412d803f2 /src/gallium/auxiliary/target-helpers
parent59127925010bfbab09e0c22a41ce77b334f59942 (diff)
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 <[email protected]> Acked-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/target-helpers')
-rw-r--r--src/gallium/auxiliary/target-helpers/inline_sw_helper.h7
-rw-r--r--src/gallium/auxiliary/target-helpers/sw_helper.h11
2 files changed, 18 insertions, 0 deletions
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