Commit ee72fec9 authored by Tim Rowley's avatar Tim Rowley

gallium/swr: allow swr use as a swrast dri driver

Reviewed-by: default avatarEmil Velikov <emil.velikov@collabora.com>
Tested-by: Ilia Mirkin's avatarIlia Mirkin <imirkin@alum.mit.edu>
parent f6d21bcd
...@@ -2378,6 +2378,9 @@ AM_CONDITIONAL(HAVE_GALLIUM_FREEDRENO, test "x$HAVE_GALLIUM_FREEDRENO" = xyes) ...@@ -2378,6 +2378,9 @@ AM_CONDITIONAL(HAVE_GALLIUM_FREEDRENO, test "x$HAVE_GALLIUM_FREEDRENO" = xyes)
AM_CONDITIONAL(HAVE_GALLIUM_SOFTPIPE, test "x$HAVE_GALLIUM_SOFTPIPE" = xyes) 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_LLVMPIPE, test "x$HAVE_GALLIUM_LLVMPIPE" = xyes)
AM_CONDITIONAL(HAVE_GALLIUM_SWR, test "x$HAVE_GALLIUM_SWR" = 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_VC4, test "x$HAVE_GALLIUM_VC4" = xyes)
AM_CONDITIONAL(HAVE_GALLIUM_VIRGL, test "x$HAVE_GALLIUM_VIRGL" = xyes) AM_CONDITIONAL(HAVE_GALLIUM_VIRGL, test "x$HAVE_GALLIUM_VIRGL" = xyes)
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
/* Helper function to choose and instantiate one of the software rasterizers: /* Helper function to choose and instantiate one of the software rasterizers:
* llvmpipe, softpipe. * llvmpipe, softpipe, swr.
*/ */
#ifdef GALLIUM_SOFTPIPE #ifdef GALLIUM_SOFTPIPE
...@@ -20,6 +20,10 @@ ...@@ -20,6 +20,10 @@
#include "llvmpipe/lp_public.h" #include "llvmpipe/lp_public.h"
#endif #endif
#ifdef GALLIUM_SWR
#include "swr/swr_public.h"
#endif
#ifdef GALLIUM_VIRGL #ifdef GALLIUM_VIRGL
#include "virgl/virgl_public.h" #include "virgl/virgl_public.h"
#include "virgl/vtest/virgl_vtest_public.h" #include "virgl/vtest/virgl_vtest_public.h"
...@@ -44,10 +48,15 @@ sw_screen_create_named(struct sw_winsys *winsys, const char *driver) ...@@ -44,10 +48,15 @@ sw_screen_create_named(struct sw_winsys *winsys, const char *driver)
#endif #endif
#if defined(GALLIUM_SOFTPIPE) #if defined(GALLIUM_SOFTPIPE)
if (screen == NULL) if (screen == NULL && strcmp(driver, "softpipe") == 0)
screen = softpipe_create_screen(winsys); screen = softpipe_create_screen(winsys);
#endif #endif
#if defined(GALLIUM_SWR)
if (screen == NULL && strcmp(driver, "swr") == 0)
screen = swr_create_screen(winsys);
#endif
return screen; return screen;
} }
...@@ -62,6 +71,8 @@ sw_screen_create(struct sw_winsys *winsys) ...@@ -62,6 +71,8 @@ sw_screen_create(struct sw_winsys *winsys)
default_driver = "llvmpipe"; default_driver = "llvmpipe";
#elif defined(GALLIUM_SOFTPIPE) #elif defined(GALLIUM_SOFTPIPE)
default_driver = "softpipe"; default_driver = "softpipe";
#elif defined(GALLIUM_SWR)
default_driver = "swr";
#else #else
default_driver = ""; default_driver = "";
#endif #endif
......
if HAVE_GALLIUM_SWR
TARGET_DRIVERS += swrast
TARGET_CPPFLAGS += -DGALLIUM_SWR
TARGET_LIB_DEPS += \
$(top_builddir)/src/gallium/drivers/swr/libmesaswr.la
endif
...@@ -86,6 +86,7 @@ include $(top_srcdir)/src/gallium/drivers/virgl/Automake.inc ...@@ -86,6 +86,7 @@ include $(top_srcdir)/src/gallium/drivers/virgl/Automake.inc
include $(top_srcdir)/src/gallium/drivers/softpipe/Automake.inc include $(top_srcdir)/src/gallium/drivers/softpipe/Automake.inc
include $(top_srcdir)/src/gallium/drivers/llvmpipe/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 if HAVE_GALLIUM_STATIC_TARGETS
......
...@@ -192,16 +192,18 @@ pipe_vmwgfx_la_LIBADD = \ ...@@ -192,16 +192,18 @@ pipe_vmwgfx_la_LIBADD = \
endif endif
if HAVE_GALLIUM_SOFTPIPE if HAVE_GALLIUM_SWRAST
AM_CPPFLAGS += -DGALLIUM_SOFTPIPE
pipe_LTLIBRARIES += pipe_swrast.la pipe_LTLIBRARIES += pipe_swrast.la
pipe_swrast_la_SOURCES = pipe_swrast.c pipe_swrast_la_SOURCES = pipe_swrast.c
nodist_EXTRA_pipe_swrast_la_SOURCES = dummy.cpp nodist_EXTRA_pipe_swrast_la_SOURCES = dummy.cpp
pipe_swrast_la_LIBADD = $(PIPE_LIBS)
pipe_swrast_la_LIBADD = \ if HAVE_GALLIUM_SOFTPIPE
$(PIPE_LIBS) \ AM_CPPFLAGS += -DGALLIUM_SOFTPIPE
pipe_swrast_la_LIBADD += \
$(top_builddir)/src/gallium/drivers/softpipe/libsoftpipe.la $(top_builddir)/src/gallium/drivers/softpipe/libsoftpipe.la
endif
if HAVE_GALLIUM_LLVMPIPE if HAVE_GALLIUM_LLVMPIPE
AM_CPPFLAGS += -DGALLIUM_LLVMPIPE AM_CPPFLAGS += -DGALLIUM_LLVMPIPE
...@@ -210,6 +212,13 @@ pipe_swrast_la_LIBADD += \ ...@@ -210,6 +212,13 @@ pipe_swrast_la_LIBADD += \
$(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la $(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la
endif 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 += \ pipe_swrast_la_LIBADD += \
$(GALLIUM_PIPE_LOADER_WINSYS_LIBS) $(GALLIUM_PIPE_LOADER_WINSYS_LIBS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment