AM_CONDITIONAL(HAVE_GALLIUM_SOFTPIPE, test "x$HAVE_GALLIUM_SOFTPIPE" = xyes)
AM_CONDITIONAL(HAVE_GALLIUM_LLVMPIPE, test "x$HAVE_GALLIUM_LLVMPIPE" = xyes)
AM_CONDITIONAL(HAVE_GALLIUM_SWR, test "x$HAVE_GALLIUM_SWR" = xyes)
+AM_CONDITIONAL(HAVE_GALLIUM_SWRAST, test "x$HAVE_GALLIUM_SOFTPIPE" = xyes -o \
+ "x$HAVE_GALLIUM_LLVMPIPE" = xyes -o \
+ "x$HAVE_GALLIUM_SWR" = xyes)
AM_CONDITIONAL(HAVE_GALLIUM_VC4, test "x$HAVE_GALLIUM_VC4" = xyes)
AM_CONDITIONAL(HAVE_GALLIUM_VIRGL, test "x$HAVE_GALLIUM_VIRGL" = xyes)
/* Helper function to choose and instantiate one of the software rasterizers:
- * llvmpipe, softpipe.
+ * llvmpipe, softpipe, swr.
*/
#ifdef GALLIUM_SOFTPIPE
#include "llvmpipe/lp_public.h"
#endif
+#ifdef GALLIUM_SWR
+#include "swr/swr_public.h"
+#endif
+
#ifdef GALLIUM_VIRGL
#include "virgl/virgl_public.h"
#include "virgl/vtest/virgl_vtest_public.h"
#endif
#if defined(GALLIUM_SOFTPIPE)
- if (screen == NULL)
+ if (screen == NULL && strcmp(driver, "softpipe") == 0)
screen = softpipe_create_screen(winsys);
#endif
+#if defined(GALLIUM_SWR)
+ if (screen == NULL && strcmp(driver, "swr") == 0)
+ screen = swr_create_screen(winsys);
+#endif
+
return screen;
}
default_driver = "llvmpipe";
#elif defined(GALLIUM_SOFTPIPE)
default_driver = "softpipe";
+#elif defined(GALLIUM_SWR)
+ default_driver = "swr";
#else
default_driver = "";
#endif
--- /dev/null
+if HAVE_GALLIUM_SWR
+
+TARGET_DRIVERS += swrast
+TARGET_CPPFLAGS += -DGALLIUM_SWR
+TARGET_LIB_DEPS += \
+ $(top_builddir)/src/gallium/drivers/swr/libmesaswr.la
+
+endif
include $(top_srcdir)/src/gallium/drivers/softpipe/Automake.inc
include $(top_srcdir)/src/gallium/drivers/llvmpipe/Automake.inc
+include $(top_srcdir)/src/gallium/drivers/swr/Automake.inc
if HAVE_GALLIUM_STATIC_TARGETS
endif
-if HAVE_GALLIUM_SOFTPIPE
-AM_CPPFLAGS += -DGALLIUM_SOFTPIPE
-
+if HAVE_GALLIUM_SWRAST
pipe_LTLIBRARIES += pipe_swrast.la
pipe_swrast_la_SOURCES = pipe_swrast.c
nodist_EXTRA_pipe_swrast_la_SOURCES = dummy.cpp
+pipe_swrast_la_LIBADD = $(PIPE_LIBS)
-pipe_swrast_la_LIBADD = \
- $(PIPE_LIBS) \
+if HAVE_GALLIUM_SOFTPIPE
+AM_CPPFLAGS += -DGALLIUM_SOFTPIPE
+
+pipe_swrast_la_LIBADD += \
$(top_builddir)/src/gallium/drivers/softpipe/libsoftpipe.la
+endif
if HAVE_GALLIUM_LLVMPIPE
AM_CPPFLAGS += -DGALLIUM_LLVMPIPE
$(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la
endif
+if HAVE_GALLIUM_SWR
+AM_CPPFLAGS += -DGALLIUM_SWR
+
+pipe_swrast_la_LIBADD += \
+ $(top_builddir)/src/gallium/drivers/swr/libmesaswr.la
+endif
+
pipe_swrast_la_LIBADD += \
$(GALLIUM_PIPE_LOADER_WINSYS_LIBS)