summaryrefslogtreecommitdiffstats
path: root/src/gallium/targets/pipe-loader
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/targets/pipe-loader')
-rw-r--r--src/gallium/targets/pipe-loader/Makefile.am5
-rw-r--r--src/gallium/targets/pipe-loader/pipe.sym2
-rw-r--r--src/gallium/targets/pipe-loader/pipe_swrast.c34
3 files changed, 39 insertions, 2 deletions
diff --git a/src/gallium/targets/pipe-loader/Makefile.am b/src/gallium/targets/pipe-loader/Makefile.am
index 4f25b4f6073..4bc3b55f26b 100644
--- a/src/gallium/targets/pipe-loader/Makefile.am
+++ b/src/gallium/targets/pipe-loader/Makefile.am
@@ -27,6 +27,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src/gallium/drivers \
-I$(top_srcdir)/src/gallium/winsys \
+ $(GALLIUM_PIPE_LOADER_DEFINES) \
$(LIBDRM_CFLAGS) \
$(VISIBILITY_CFLAGS) \
-DGALLIUM_RBUG \
@@ -208,6 +209,10 @@ AM_CPPFLAGS += -DGALLIUM_LLVMPIPE
pipe_swrast_la_LIBADD += \
$(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la
endif
+
+pipe_swrast_la_LIBADD += \
+ $(GALLIUM_PIPE_LOADER_WINSYS_LIBS)
+
endif
EXTRA_DIST = pipe.sym
diff --git a/src/gallium/targets/pipe-loader/pipe.sym b/src/gallium/targets/pipe-loader/pipe.sym
index 19b1d77b040..b2fa619f7de 100644
--- a/src/gallium/targets/pipe-loader/pipe.sym
+++ b/src/gallium/targets/pipe-loader/pipe.sym
@@ -1,7 +1,7 @@
{
global:
driver_descriptor;
- swrast_create_screen;
+ swrast_driver_descriptor;
local:
*;
};
diff --git a/src/gallium/targets/pipe-loader/pipe_swrast.c b/src/gallium/targets/pipe-loader/pipe_swrast.c
index f7f354acf3f..cf617f37e20 100644
--- a/src/gallium/targets/pipe-loader/pipe_swrast.c
+++ b/src/gallium/targets/pipe-loader/pipe_swrast.c
@@ -1,7 +1,11 @@
#include "target-helpers/inline_sw_helper.h"
#include "target-helpers/inline_debug_helper.h"
-#include "state_tracker/drm_driver.h"
+#include "state_tracker/sw_driver.h"
+#include "sw/dri/dri_sw_winsys.h"
+#include "sw/kms-dri/kms_dri_sw_winsys.h"
+#include "sw/null/null_sw_winsys.h"
+#include "sw/wrapper/wrapper_sw_winsys.h"
PUBLIC struct pipe_screen *
swrast_create_screen(struct sw_winsys *ws);
@@ -17,3 +21,31 @@ swrast_create_screen(struct sw_winsys *ws)
return screen;
}
+
+PUBLIC
+struct sw_driver_descriptor swrast_driver_descriptor = {
+ .create_screen = swrast_create_screen,
+ .winsys = {
+#ifdef HAVE_PIPE_LOADER_DRI
+ {
+ .name = "dri",
+ .create_winsys = dri_create_sw_winsys,
+ },
+#endif
+#ifdef HAVE_PIPE_LOADER_KMS
+ {
+ .name = "kms_dri",
+ .create_winsys = kms_dri_create_winsys,
+ },
+#endif
+ {
+ .name = "null",
+ .create_winsys = null_sw_create,
+ },
+ {
+ .name = "wrapped",
+ .create_winsys = wrapper_sw_winsys_wrap_pipe_screen,
+ },
+ { 0 },
+ }
+};