[Mesa-dev] [PATCH 12/20] meson: Build gallium dri state tracker

Dylan Baker dylan at pnwbakers.com
Wed Oct 11 17:41:20 UTC 2017


Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 meson.build                                      |  1 +
 src/gallium/meson.build                          |  1 +
 src/gallium/{ => state_trackers/dri}/meson.build | 46 +++++++++++++++++++-----
 3 files changed, 39 insertions(+), 9 deletions(-)
 copy src/gallium/{ => state_trackers/dri}/meson.build (59%)

diff --git a/meson.build b/meson.build
index ff48ff59d09..d37a869b615 100644
--- a/meson.build
+++ b/meson.build
@@ -89,6 +89,7 @@ endif
 
 with_gallium = false
 with_gallium_radeonsi = false
+with_gallium_softpipe = false
 _drivers = get_option('gallium-drivers')
 if _drivers != ''
   _split = _drivers.split(',')
diff --git a/src/gallium/meson.build b/src/gallium/meson.build
index d69c3aeca39..47dbcd84414 100644
--- a/src/gallium/meson.build
+++ b/src/gallium/meson.build
@@ -27,3 +27,4 @@ subdir('drivers/ddebug')
 subdir('drivers/noop')
 subdir('drivers/trace')
 subdir('drivers/rbug')
+subdir('state_trackers/dri')
diff --git a/src/gallium/meson.build b/src/gallium/state_trackers/dri/meson.build
similarity index 59%
copy from src/gallium/meson.build
copy to src/gallium/state_trackers/dri/meson.build
index d69c3aeca39..5d89f23a6fe 100644
--- a/src/gallium/meson.build
+++ b/src/gallium/state_trackers/dri/meson.build
@@ -18,12 +18,40 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 # SOFTWARE.
 
-inc_gallium = include_directories('include')
-inc_gallium_winsys = include_directories('winsys')
-
-subdir('auxiliary')
-subdir('auxiliary/pipe-loader')
-subdir('drivers/ddebug')
-subdir('drivers/noop')
-subdir('drivers/trace')
-subdir('drivers/rbug')
+files_libdri = files(
+  'dri_context.c',
+  'dri_context.h',
+  'dri_drawable.c',
+  'dri_drawable.h',
+  'dri_helpers.c',
+  'dri_helpers.h',
+  'dri_query_renderer.c',
+  'dri_query_renderer.h',
+  'dri_screen.c',
+  'dri_screen.h',
+)
+
+if with_dri
+  files_libdri += files('drisw.c')
+endif
+
+if with_dri2
+  files_libdri += files('dri2.c', 'dri2_buffer.h')
+endif
+
+libdri_c_args = []
+if with_gallium_softpipe
+  libdri_c_args += '-DGALLIUM_SOFTPIPE'
+endif
+
+libdri = static_library(
+  'dri',
+  files_libdri,
+  include_directories : [
+    inc_include, inc_util, inc_mesa, inc_mapi, inc_src, inc_gallium,
+    inc_gallium_aux, inc_dri_common,
+  ],
+  c_args : [c_vis_args, libdri_c_args],
+  dependencies : dep_libdrm,
+  build_by_default : false,
+)
-- 
2.14.2



More information about the mesa-dev mailing list