[Mesa-dev] [PATCH 02/14] freedreno: move drm to common location

Rob Clark robdclark at gmail.com
Mon Nov 12 15:50:46 UTC 2018


So that we can re-use at least parts of it for vulkan driver, and so
that we can move ir3 to a common location (which uses fd_bo to allocate
storage for shaders)

Signed-off-by: Rob Clark <robdclark at gmail.com>
---
 configure.ac                                  |  2 +
 src/Makefile.am                               |  4 ++
 src/freedreno/Makefile.am                     | 59 +++++++++++++++++++
 src/freedreno/Makefile.sources                | 17 ++++++
 .../drivers => }/freedreno/drm/freedreno_bo.c |  0
 .../freedreno/drm/freedreno_bo_cache.c        |  0
 .../freedreno/drm/freedreno_device.c          |  0
 .../freedreno/drm/freedreno_drmif.h           |  0
 .../freedreno/drm/freedreno_pipe.c            |  0
 .../freedreno/drm/freedreno_priv.h            |  0
 .../freedreno/drm/freedreno_ringbuffer.c      |  0
 .../freedreno/drm/freedreno_ringbuffer.h      |  0
 src/freedreno/drm/meson.build                 | 54 +++++++++++++++++
 .../drivers => }/freedreno/drm/msm_bo.c       |  0
 .../drivers => }/freedreno/drm/msm_device.c   |  0
 .../drivers => }/freedreno/drm/msm_drm.h      |  0
 .../drivers => }/freedreno/drm/msm_pipe.c     |  0
 .../drivers => }/freedreno/drm/msm_priv.h     |  0
 .../freedreno/drm/msm_ringbuffer.c            |  0
 .../freedreno/drm/msm_ringbuffer_sp.c         |  0
 src/freedreno/meson.build                     | 23 ++++++++
 src/gallium/drivers/freedreno/Android.mk      |  1 -
 src/gallium/drivers/freedreno/Automake.inc    |  1 +
 src/gallium/drivers/freedreno/Makefile.am     | 10 ++--
 .../drivers/freedreno/Makefile.sources        | 17 ------
 src/gallium/drivers/freedreno/meson.build     | 27 +++------
 src/gallium/winsys/freedreno/drm/Makefile.am  |  1 +
 src/gallium/winsys/freedreno/drm/meson.build  |  1 +
 src/meson.build                               |  3 +
 29 files changed, 176 insertions(+), 44 deletions(-)
 create mode 100644 src/freedreno/Makefile.am
 create mode 100644 src/freedreno/Makefile.sources
 rename src/{gallium/drivers => }/freedreno/drm/freedreno_bo.c (100%)
 rename src/{gallium/drivers => }/freedreno/drm/freedreno_bo_cache.c (100%)
 rename src/{gallium/drivers => }/freedreno/drm/freedreno_device.c (100%)
 rename src/{gallium/drivers => }/freedreno/drm/freedreno_drmif.h (100%)
 rename src/{gallium/drivers => }/freedreno/drm/freedreno_pipe.c (100%)
 rename src/{gallium/drivers => }/freedreno/drm/freedreno_priv.h (100%)
 rename src/{gallium/drivers => }/freedreno/drm/freedreno_ringbuffer.c (100%)
 rename src/{gallium/drivers => }/freedreno/drm/freedreno_ringbuffer.h (100%)
 create mode 100644 src/freedreno/drm/meson.build
 rename src/{gallium/drivers => }/freedreno/drm/msm_bo.c (100%)
 rename src/{gallium/drivers => }/freedreno/drm/msm_device.c (100%)
 rename src/{gallium/drivers => }/freedreno/drm/msm_drm.h (100%)
 rename src/{gallium/drivers => }/freedreno/drm/msm_pipe.c (100%)
 rename src/{gallium/drivers => }/freedreno/drm/msm_priv.h (100%)
 rename src/{gallium/drivers => }/freedreno/drm/msm_ringbuffer.c (100%)
 rename src/{gallium/drivers => }/freedreno/drm/msm_ringbuffer_sp.c (100%)
 create mode 100644 src/freedreno/meson.build

diff --git a/configure.ac b/configure.ac
index d782f56205d..de11a4f2955 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3007,6 +3007,7 @@ AM_CONDITIONAL(HAVE_AMD_DRIVERS, test "x$HAVE_GALLIUM_RADEONSI" = xyes -o \
 AM_CONDITIONAL(HAVE_BROADCOM_DRIVERS, test "x$HAVE_GALLIUM_VC4" = xyes -o \
                                       "x$HAVE_GALLIUM_V3D" = xyes)
 
+AM_CONDITIONAL(HAVE_FREEDRENO_DRIVERS, test "x$HAVE_GALLIUM_FREEDRENO" = xyes)
 AM_CONDITIONAL(HAVE_INTEL_DRIVERS, test "x$HAVE_INTEL_VULKAN" = xyes -o \
                                         "x$HAVE_I965_DRI" = xyes)
 
@@ -3099,6 +3100,7 @@ AC_CONFIG_FILES([Makefile
                  src/amd/vulkan/Makefile
                  src/broadcom/Makefile
                  src/compiler/Makefile
+                 src/freedreno/Makefile
                  src/egl/Makefile
                  src/egl/main/egl.pc
                  src/egl/wayland/wayland-drm/Makefile
diff --git a/src/Makefile.am b/src/Makefile.am
index c91e63efa13..79c2a543fdc 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -81,6 +81,10 @@ if HAVE_BROADCOM_DRIVERS
 SUBDIRS += broadcom
 endif
 
+if HAVE_FREEDRENO_DRIVERS
+SUBDIRS += freedreno
+endif
+
 if NEED_OPENGL_COMMON
 SUBDIRS += mesa
 endif
diff --git a/src/freedreno/Makefile.am b/src/freedreno/Makefile.am
new file mode 100644
index 00000000000..9ddc3c0ad35
--- /dev/null
+++ b/src/freedreno/Makefile.am
@@ -0,0 +1,59 @@
+# Copyright © 2016 Broadcom
+# Copyright © 2016 Intel Corporation
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+# IN THE SOFTWARE.
+
+AM_CPPFLAGS = \
+	-I$(top_srcdir)/include \
+	-I$(top_builddir)/src \
+	-I$(top_srcdir)/src \
+	-I$(top_srcdir)/src/freedreno/ \
+	-I$(top_srcdir)/src/gallium/auxiliary \
+	-I$(top_srcdir)/src/gallium/include \
+	$(DEFINES)
+
+AM_CFLAGS = \
+	$(EXPAT_CFLAGS)
+
+include Makefile.sources
+
+lib_LTLIBRARIES =
+check_LTLIBRARIES =
+noinst_DATA =
+noinst_HEADERS =
+noinst_LTLIBRARIES =
+noinst_PROGRAMS =
+check_PROGRAMS =
+TESTS =
+BUILT_SOURCES =
+CLEANFILES =
+EXTRA_DIST = \
+	drm/meson.build
+
+MKDIR_GEN = $(AM_V_at)$(MKDIR_P) $(@D)
+PYTHON_GEN = $(AM_V_GEN)$(PYTHON) $(PYTHON_FLAGS)
+
+CLEANFILES += $(BUILT_SOURCES)
+
+noinst_LTLIBRARIES += libfreedreno_drm.la
+
+libfreedreno_drm_la_SOURCES = $(drm_SOURCES)
+libfreedreno_drm_la_CFLAGS = $(VALGRIND_CFLAGS) $(LIBDRM_CFLAGS)
+
diff --git a/src/freedreno/Makefile.sources b/src/freedreno/Makefile.sources
new file mode 100644
index 00000000000..06a1a99b9e2
--- /dev/null
+++ b/src/freedreno/Makefile.sources
@@ -0,0 +1,17 @@
+drm_SOURCES := \
+	drm/freedreno_bo.c \
+	drm/freedreno_drmif.h \
+	drm/freedreno_ringbuffer.c \
+	drm/msm_bo.c \
+	drm/msm_pipe.c \
+	drm/msm_ringbuffer_sp.c \
+	drm/freedreno_bo_cache.c \
+	drm/freedreno_pipe.c \
+	drm/freedreno_ringbuffer.h \
+	drm/msm_device.c \
+	drm/msm_priv.h \
+	drm/freedreno_device.c \
+	drm/freedreno_priv.h \
+	drm/msm_drm.h \
+	drm/msm_ringbuffer.c
+
diff --git a/src/gallium/drivers/freedreno/drm/freedreno_bo.c b/src/freedreno/drm/freedreno_bo.c
similarity index 100%
rename from src/gallium/drivers/freedreno/drm/freedreno_bo.c
rename to src/freedreno/drm/freedreno_bo.c
diff --git a/src/gallium/drivers/freedreno/drm/freedreno_bo_cache.c b/src/freedreno/drm/freedreno_bo_cache.c
similarity index 100%
rename from src/gallium/drivers/freedreno/drm/freedreno_bo_cache.c
rename to src/freedreno/drm/freedreno_bo_cache.c
diff --git a/src/gallium/drivers/freedreno/drm/freedreno_device.c b/src/freedreno/drm/freedreno_device.c
similarity index 100%
rename from src/gallium/drivers/freedreno/drm/freedreno_device.c
rename to src/freedreno/drm/freedreno_device.c
diff --git a/src/gallium/drivers/freedreno/drm/freedreno_drmif.h b/src/freedreno/drm/freedreno_drmif.h
similarity index 100%
rename from src/gallium/drivers/freedreno/drm/freedreno_drmif.h
rename to src/freedreno/drm/freedreno_drmif.h
diff --git a/src/gallium/drivers/freedreno/drm/freedreno_pipe.c b/src/freedreno/drm/freedreno_pipe.c
similarity index 100%
rename from src/gallium/drivers/freedreno/drm/freedreno_pipe.c
rename to src/freedreno/drm/freedreno_pipe.c
diff --git a/src/gallium/drivers/freedreno/drm/freedreno_priv.h b/src/freedreno/drm/freedreno_priv.h
similarity index 100%
rename from src/gallium/drivers/freedreno/drm/freedreno_priv.h
rename to src/freedreno/drm/freedreno_priv.h
diff --git a/src/gallium/drivers/freedreno/drm/freedreno_ringbuffer.c b/src/freedreno/drm/freedreno_ringbuffer.c
similarity index 100%
rename from src/gallium/drivers/freedreno/drm/freedreno_ringbuffer.c
rename to src/freedreno/drm/freedreno_ringbuffer.c
diff --git a/src/gallium/drivers/freedreno/drm/freedreno_ringbuffer.h b/src/freedreno/drm/freedreno_ringbuffer.h
similarity index 100%
rename from src/gallium/drivers/freedreno/drm/freedreno_ringbuffer.h
rename to src/freedreno/drm/freedreno_ringbuffer.h
diff --git a/src/freedreno/drm/meson.build b/src/freedreno/drm/meson.build
new file mode 100644
index 00000000000..5679d147894
--- /dev/null
+++ b/src/freedreno/drm/meson.build
@@ -0,0 +1,54 @@
+# Copyright © 2018 Rob Clark
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+libfreedreno_drm_files = files(
+  'freedreno_bo.c',
+  'freedreno_bo_cache.c',
+  'freedreno_device.c',
+  'freedreno_drmif.h',
+  'freedreno_pipe.c',
+  'freedreno_priv.h',
+  'freedreno_ringbuffer.c',
+  'freedreno_ringbuffer.h',
+  'msm_bo.c',
+  'msm_device.c',
+  'msm_drm.h',
+  'msm_pipe.c',
+  'msm_priv.h',
+  'msm_ringbuffer.c',
+  'msm_ringbuffer_sp.c',
+)
+
+libfreedreno_drm = static_library(
+  'freedreno_drm',
+  libfreedreno_drm_files,
+  include_directories : [
+    inc_freedreno,
+    inc_common,
+  ],
+  c_args : [c_vis_args, no_override_init_args],
+  cpp_args : [cpp_vis_args],
+  dependencies : [
+    dep_libdrm,
+    dep_valgrind,
+  ],
+  build_by_default : false,
+)
+
diff --git a/src/gallium/drivers/freedreno/drm/msm_bo.c b/src/freedreno/drm/msm_bo.c
similarity index 100%
rename from src/gallium/drivers/freedreno/drm/msm_bo.c
rename to src/freedreno/drm/msm_bo.c
diff --git a/src/gallium/drivers/freedreno/drm/msm_device.c b/src/freedreno/drm/msm_device.c
similarity index 100%
rename from src/gallium/drivers/freedreno/drm/msm_device.c
rename to src/freedreno/drm/msm_device.c
diff --git a/src/gallium/drivers/freedreno/drm/msm_drm.h b/src/freedreno/drm/msm_drm.h
similarity index 100%
rename from src/gallium/drivers/freedreno/drm/msm_drm.h
rename to src/freedreno/drm/msm_drm.h
diff --git a/src/gallium/drivers/freedreno/drm/msm_pipe.c b/src/freedreno/drm/msm_pipe.c
similarity index 100%
rename from src/gallium/drivers/freedreno/drm/msm_pipe.c
rename to src/freedreno/drm/msm_pipe.c
diff --git a/src/gallium/drivers/freedreno/drm/msm_priv.h b/src/freedreno/drm/msm_priv.h
similarity index 100%
rename from src/gallium/drivers/freedreno/drm/msm_priv.h
rename to src/freedreno/drm/msm_priv.h
diff --git a/src/gallium/drivers/freedreno/drm/msm_ringbuffer.c b/src/freedreno/drm/msm_ringbuffer.c
similarity index 100%
rename from src/gallium/drivers/freedreno/drm/msm_ringbuffer.c
rename to src/freedreno/drm/msm_ringbuffer.c
diff --git a/src/gallium/drivers/freedreno/drm/msm_ringbuffer_sp.c b/src/freedreno/drm/msm_ringbuffer_sp.c
similarity index 100%
rename from src/gallium/drivers/freedreno/drm/msm_ringbuffer_sp.c
rename to src/freedreno/drm/msm_ringbuffer_sp.c
diff --git a/src/freedreno/meson.build b/src/freedreno/meson.build
new file mode 100644
index 00000000000..bb2cb201c0d
--- /dev/null
+++ b/src/freedreno/meson.build
@@ -0,0 +1,23 @@
+# Copyright © 2018 Rob Clark
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+inc_freedreno = include_directories('.')
+
+subdir('drm')
diff --git a/src/gallium/drivers/freedreno/Android.mk b/src/gallium/drivers/freedreno/Android.mk
index 9c9d0707ba9..ab4b3ed4351 100644
--- a/src/gallium/drivers/freedreno/Android.mk
+++ b/src/gallium/drivers/freedreno/Android.mk
@@ -27,7 +27,6 @@ include $(CLEAR_VARS)
 
 LOCAL_SRC_FILES := \
 	$(C_SOURCES) \
-	$(drm_SOURCES) \
 	$(a2xx_SOURCES) \
 	$(a3xx_SOURCES)	\
 	$(a4xx_SOURCES) \
diff --git a/src/gallium/drivers/freedreno/Automake.inc b/src/gallium/drivers/freedreno/Automake.inc
index 1fdf91cf3a5..9b9b3d39fea 100644
--- a/src/gallium/drivers/freedreno/Automake.inc
+++ b/src/gallium/drivers/freedreno/Automake.inc
@@ -5,6 +5,7 @@ TARGET_CPPFLAGS += -DGALLIUM_FREEDRENO
 TARGET_LIB_DEPS += \
 	$(top_builddir)/src/gallium/winsys/freedreno/drm/libfreedrenodrm.la \
 	$(top_builddir)/src/gallium/drivers/freedreno/libfreedreno.la \
+	$(top_builddir)/src/freedreno/libfreedreno_drm.la \
 	$(FREEDRENO_LIBS) \
 	$(LIBDRM_LIBS)
 
diff --git a/src/gallium/drivers/freedreno/Makefile.am b/src/gallium/drivers/freedreno/Makefile.am
index 5690b6ec884..39887e13e37 100644
--- a/src/gallium/drivers/freedreno/Makefile.am
+++ b/src/gallium/drivers/freedreno/Makefile.am
@@ -4,11 +4,10 @@ include $(top_srcdir)/src/gallium/Automake.inc
 AM_CFLAGS = \
 	-Wno-packed-bitfield-compat \
 	-I$(top_srcdir)/src/gallium/drivers/freedreno/ir3 \
+	-I$(top_srcdir)/src/freedreno \
 	-I$(top_builddir)/src/compiler/nir \
 	-I$(top_srcdir)/src/compiler/nir \
-	$(GALLIUM_DRIVER_CFLAGS) \
-	$(LIBDRM_CFLAGS) \
-	$(VALGRIND_CFLAGS)
+	$(GALLIUM_DRIVER_CFLAGS)
 
 MKDIR_GEN = $(AM_V_at)$(MKDIR_P) $(@D)
 ir3/ir3_nir_trig.c: ir3/ir3_nir_trig.py $(top_srcdir)/src/compiler/nir/nir_algebraic.py
@@ -19,7 +18,6 @@ noinst_LTLIBRARIES = libfreedreno.la
 
 libfreedreno_la_SOURCES = \
 	$(C_SOURCES) \
-	$(drm_SOURCES) \
 	$(a2xx_SOURCES) \
 	$(a3xx_SOURCES) \
 	$(a4xx_SOURCES) \
@@ -46,7 +44,7 @@ ir3_compiler_LDADD = \
 	$(top_builddir)/src/compiler/glsl/libstandalone.la \
 	$(top_builddir)/src/util/libmesautil.la \
 	$(top_builddir)/src/mesa/libmesagallium.la \
-	$(GALLIUM_COMMON_LIB_DEPS) \
-	$(LIBDRM_LIBS)
+	$(top_builddir)/src/freedreno/libfreedreno_drm.la \
+	$(GALLIUM_COMMON_LIB_DEPS)
 
 EXTRA_DIST += meson.build
diff --git a/src/gallium/drivers/freedreno/Makefile.sources b/src/gallium/drivers/freedreno/Makefile.sources
index 8b4d61c9884..c76c53278a9 100644
--- a/src/gallium/drivers/freedreno/Makefile.sources
+++ b/src/gallium/drivers/freedreno/Makefile.sources
@@ -40,23 +40,6 @@ C_SOURCES := \
 	freedreno_util.c \
 	freedreno_util.h
 
-drm_SOURCES := \
-	drm/freedreno_bo.c \
-	drm/freedreno_bo_cache.c \
-	drm/freedreno_device.c \
-	drm/freedreno_drmif.h \
-	drm/freedreno_pipe.c \
-	drm/freedreno_priv.h \
-	drm/freedreno_ringbuffer.c \
-	drm/freedreno_ringbuffer.h \
-	drm/msm_bo.c \
-	drm/msm_device.c \
-	drm/msm_drm.h \
-	drm/msm_pipe.c \
-	drm/msm_priv.h \
-	drm/msm_ringbuffer.c \
-	drm/msm_ringbuffer_sp.c
-
 a2xx_SOURCES := \
 	a2xx/a2xx.xml.h \
 	a2xx/disasm-a2xx.c \
diff --git a/src/gallium/drivers/freedreno/meson.build b/src/gallium/drivers/freedreno/meson.build
index 4024d2fa99f..e0ad9ff4ce0 100644
--- a/src/gallium/drivers/freedreno/meson.build
+++ b/src/gallium/drivers/freedreno/meson.build
@@ -71,21 +71,6 @@ files_libfreedreno = files(
   'freedreno_texture.h',
   'freedreno_util.c',
   'freedreno_util.h',
-  'drm/freedreno_bo.c',
-  'drm/freedreno_bo_cache.c',
-  'drm/freedreno_device.c',
-  'drm/freedreno_drmif.h',
-  'drm/freedreno_pipe.c',
-  'drm/freedreno_priv.h',
-  'drm/freedreno_ringbuffer.c',
-  'drm/freedreno_ringbuffer.h',
-  'drm/msm_bo.c',
-  'drm/msm_device.c',
-  'drm/msm_drm.h',
-  'drm/msm_pipe.c',
-  'drm/msm_priv.h',
-  'drm/msm_ringbuffer.c',
-  'drm/msm_ringbuffer_sp.c',
   'a2xx/a2xx.xml.h',
   'a2xx/disasm-a2xx.c',
   'a2xx/fd2_blend.c',
@@ -255,6 +240,7 @@ files_libfreedreno = files(
 
 freedreno_includes = [
   inc_src, inc_include, inc_gallium, inc_gallium_aux,
+  inc_freedreno,
   include_directories('ir3')
 ]
 
@@ -275,15 +261,17 @@ libfreedreno = static_library(
   c_args : [freedreno_c_args, c_vis_args],
   cpp_args : [freedreno_cpp_args, cpp_vis_args],
   dependencies : [
-    dep_libdrm,
-    dep_valgrind,
     idep_nir_headers
   ],
 )
 
 driver_freedreno = declare_dependency(
   compile_args : '-DGALLIUM_FREEDRENO',
-  link_with : [libfreedrenowinsys, libfreedreno],
+  link_with : [
+    libfreedrenowinsys,
+    libfreedreno,
+    libfreedreno_drm,
+  ],
   dependencies : idep_nir,
 )
 
@@ -292,13 +280,12 @@ ir3_compiler = executable(
   'ir3/ir3_cmdline.c',
   include_directories : freedreno_includes,
   dependencies : [
-    dep_libdrm,
-    dep_valgrind,
     dep_thread,
     idep_nir,
   ],
   link_with : [
     libfreedreno,
+    libfreedreno_drm,
     libgallium,
     libglsl_standalone,
     libmesa_util,
diff --git a/src/gallium/winsys/freedreno/drm/Makefile.am b/src/gallium/winsys/freedreno/drm/Makefile.am
index e7e9a625c3a..76c9bea0d80 100644
--- a/src/gallium/winsys/freedreno/drm/Makefile.am
+++ b/src/gallium/winsys/freedreno/drm/Makefile.am
@@ -25,6 +25,7 @@ include $(top_srcdir)/src/gallium/Automake.inc
 
 AM_CFLAGS = \
 	-I$(top_srcdir)/src/gallium/drivers \
+	-I$(top_srcdir)/src/freedreno \
 	$(GALLIUM_WINSYS_CFLAGS) \
 	$(FREEDRENO_CFLAGS)
 
diff --git a/src/gallium/winsys/freedreno/drm/meson.build b/src/gallium/winsys/freedreno/drm/meson.build
index 0fc02897ddd..4a84732947f 100644
--- a/src/gallium/winsys/freedreno/drm/meson.build
+++ b/src/gallium/winsys/freedreno/drm/meson.build
@@ -23,6 +23,7 @@ libfreedrenowinsys = static_library(
   files('freedreno_drm_public.h', 'freedreno_drm_winsys.c'),
   include_directories : [
     inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_gallium_drivers,
+    inc_freedreno,
   ],
   c_args : [c_vis_args],
   dependencies : [dep_libdrm],
diff --git a/src/meson.build b/src/meson.build
index 73146d37143..4113f40a862 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -59,6 +59,9 @@ endif
 if with_gallium_vc4 or with_gallium_v3d
   subdir('broadcom')
 endif
+if with_gallium_freedreno
+  subdir('freedreno')
+endif
 if with_dri_i965 or with_intel_vk
   subdir('intel')
 endif
-- 
2.19.1



More information about the mesa-dev mailing list