AC_MSG_ERROR([swr enabled but no swr architectures selected])
fi
+ # test if more than one swr arch configured
+ if test `echo $swr_archs | wc -w` -eq 1; then
+ HAVE_SWR_BUILTIN=yes
+ fi
+
HAVE_GALLIUM_SWR=yes
;;
xvc4)
AM_CONDITIONAL(HAVE_SWR_AVX2, test "x$HAVE_SWR_AVX2" = xyes)
AM_CONDITIONAL(HAVE_SWR_KNL, test "x$HAVE_SWR_KNL" = xyes)
AM_CONDITIONAL(HAVE_SWR_SKX, test "x$HAVE_SWR_SKX" = xyes)
+AM_CONDITIONAL(HAVE_SWR_BUILTIN, test "x$HAVE_SWR_BUILTIN" = xyes)
dnl We need to validate some needed dependencies for renderonly drivers.
echo ""
if test "x$HAVE_GALLIUM_SWR" != x; then
- echo " SWR archs: $swr_archs"
+ if test "x$HAVE_SWR_BUILTIN" = xyes; then
+ echo " SWR archs: $swr_archs (builtin)"
+ else
+ echo " SWR archs: $swr_archs"
+ fi
fi
dnl Libraries
noinst_LTLIBRARIES = libmesaswr.la
-# gen_knobs.* included here to provide driver access to swr configuration
libmesaswr_la_SOURCES = \
$(CXX_SOURCES) \
- $(COMMON_CXX_SOURCES) \
$(JITTER_CXX_SOURCES) \
- rasterizer/codegen/gen_knobs.cpp \
- rasterizer/codegen/gen_knobs.h \
$(LOADER_SOURCES)
COMMON_CXXFLAGS = \
lib_LTLIBRARIES =
if HAVE_SWR_AVX
-lib_LTLIBRARIES += libswrAVX.la
-
libswrAVX_la_CXXFLAGS = \
$(PTHREAD_CFLAGS) \
$(SWR_AVX_CXXFLAGS) \
endif
if HAVE_SWR_AVX2
-lib_LTLIBRARIES += libswrAVX2.la
libswrAVX2_la_CXXFLAGS = \
$(PTHREAD_CFLAGS) \
$(SWR_AVX2_CXXFLAGS) \
endif
if HAVE_SWR_KNL
-lib_LTLIBRARIES += libswrKNL.la
-
libswrKNL_la_CXXFLAGS = \
$(PTHREAD_CFLAGS) \
$(SWR_KNL_CXXFLAGS) \
endif
if HAVE_SWR_SKX
-lib_LTLIBRARIES += libswrSKX.la
-
libswrSKX_la_CXXFLAGS = \
$(PTHREAD_CFLAGS) \
$(SWR_SKX_CXXFLAGS) \
$(COMMON_LDFLAGS)
endif
+if HAVE_SWR_BUILTIN
+libmesaswr_la_CXXFLAGS += -DHAVE_SWR_BUILTIN
+libmesaswr_la_LIBADD =
+if HAVE_SWR_AVX
+noinst_LTLIBRARIES += libswrAVX.la
+libmesaswr_la_LIBADD += libswrAVX.la
+endif
+if HAVE_SWR_AVX2
+noinst_LTLIBRARIES += libswrAVX2.la
+libmesaswr_la_LIBADD += libswrAVX2.la
+endif
+if HAVE_SWR_KNL
+noinst_LTLIBRARIES += libswrKNL.la
+libmesaswr_la_LIBADD += libswrKNL.la
+endif
+if HAVE_SWR_SKX
+noinst_LTLIBRARIES += libswrSKX.la
+libmesaswr_la_LIBADD += libswrSKX.la
+endif
+else # !HAVE_SWR_BUILTIN
+# gen_knobs.* included here to provide driver access to swr configuration
+libmesaswr_la_SOURCES += \
+ $(COMMON_CXX_SOURCES) \
+ rasterizer/codegen/gen_knobs.cpp \
+ rasterizer/codegen/gen_knobs.h
+if HAVE_SWR_AVX
+lib_LTLIBRARIES += libswrAVX.la
+endif
+if HAVE_SWR_AVX2
+lib_LTLIBRARIES += libswrAVX2.la
+endif
+if HAVE_SWR_KNL
+lib_LTLIBRARIES += libswrKNL.la
+endif
+if HAVE_SWR_SKX
+lib_LTLIBRARIES += libswrSKX.la
+endif
+endif
+
include $(top_srcdir)/install-gallium-links.mk
# Generated gen_builder.hpp is not backwards compatible. So ship only one