xa: support for drivers which use NIR
authorRob Clark <robclark@freedesktop.org>
Fri, 3 Apr 2015 18:01:47 +0000 (14:01 -0400)
committerRob Clark <robclark@freedesktop.org>
Sun, 5 Apr 2015 13:24:17 +0000 (09:24 -0400)
We need to pull in libnir.la and it's dependency libglsl_util.la.  Also,
_mesa_error_no_memory() must be defined.

Fortunately with libnir.la (vs pulling in all of libglsl.la) we don't
also need libstdc++.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/Makefile.am
src/gallium/state_trackers/xa/xa_tracker.c
src/gallium/targets/xa/Makefile.am

index aae2a2458edf73d0aa519f1c1057e82aeafed8bc..4b2629f77bdeae0387efda6ae25b385df30aa07f 100644 (file)
@@ -6,6 +6,7 @@ include $(top_srcdir)/src/gallium/Automake.inc
 AM_CFLAGS = \
        -Wno-packed-bitfield-compat \
        -I$(top_srcdir)/src/gallium/drivers/freedreno/ir3 \
+       -I$(top_builddir)/src/glsl/nir \
        $(GALLIUM_DRIVER_CFLAGS) \
        $(FREEDRENO_CFLAGS)
 
@@ -26,6 +27,9 @@ ir3_compiler_SOURCES = \
 ir3_compiler_LDADD = \
        libfreedreno.la \
        ../../auxiliary/libgallium.la \
+       $(top_builddir)/src/glsl/libnir.la \
+       $(top_builddir)/src/libglsl_util.la \
+       -lstdc++ \
        $(top_builddir)/src/util/libmesautil.la \
        $(GALLIUM_COMMON_LIB_DEPS) \
        $(FREEDRENO_LIBS)
index f69ac8edf2774a1dfd2d824d4a2ea6fc0c55ef4f..89019988d57af8cf8914c122dba3b17a284f7fa2 100644 (file)
@@ -535,3 +535,15 @@ xa_surface_format(const struct xa_surface *srf)
 {
     return srf->fdesc.xa_format;
 }
+
+/*
+ * _mesa_error_no_memory() is expected by NIR to be provided by the
+ * user.  Normally this is in mesa st, but other state trackers
+ * must provide their own.
+ */
+void _mesa_error_no_memory(const char *caller);
+void
+_mesa_error_no_memory(const char *caller)
+{
+       debug_printf("Mesa error: out of memory in %s", caller);
+}
index a1eae2af13f23a94962a2b38135c48da073c8f5c..8ddb9672bd7306f7b6248bedd8a0fff87442efd0 100644 (file)
@@ -37,6 +37,8 @@ libxatracker_la_LIBADD = \
        $(top_builddir)/src/gallium/state_trackers/xa/libxatracker.la \
        $(top_builddir)/src/gallium/auxiliary/libgalliumvl_stub.la \
        $(top_builddir)/src/gallium/auxiliary/libgallium.la \
+       $(top_builddir)/src/glsl/libnir.la \
+       $(top_builddir)/src/libglsl_util.la \
        $(top_builddir)/src/util/libmesautil.la \
        $(LIBDRM_LIBS) \
        $(GALLIUM_COMMON_LIB_DEPS)