i965: Allow mapped VBOs during drawing in non-debug contexts.
[mesa.git] / meson.build
index 86e1cc98f81f0acf2f69bb6c394756f4570f5782..bff40f697d37902f0f055865a0b96e36804087ce 100644 (file)
@@ -42,6 +42,11 @@ with_asm = get_option('asm')
 with_appledri = false
 with_windowsdri = false
 
+dri_drivers_path = get_option('dri-drivers-path')
+if dri_drivers_path == ''
+  dri_drivers_path = join_paths(get_option('libdir'), 'dri')
+endif
+
 with_gles1 = get_option('gles1')
 with_gles2 = get_option('gles2')
 with_opengl = get_option('opengl')
@@ -68,10 +73,12 @@ endif
 
 with_dri = false
 with_dri_i965 = false
+with_dri_swrast = false
 _drivers = get_option('dri-drivers')
 if _drivers != ''
   _split = _drivers.split(',')
   with_dri_i965 = _split.contains('i965')
+  with_dri_swrast = _split.contains('swrast')
   with_dri = true
 endif
 
@@ -96,12 +103,15 @@ pre_args += '-DHAVE_LIBDRM'
 with_dri2 = with_dri_platform == 'drm' and dep_libdrm.found()
 with_dri3 = get_option('dri3')
 if with_dri3 == 'auto'
-  if host_machine.system() == 'linux'
+  if host_machine.system() == 'linux' and with_dri2
     with_dri3 = true
   else
     with_dri3 = false
  endif
 elif with_dri3 == 'yes'
+  if not with_dri2
+    error('dri3 support requires libdrm')
+  endif
   with_dri3 = true
 else
   with_dri3 = false
@@ -117,6 +127,18 @@ if _platforms != ''
   with_platform_wayland = _split.contains('wayland')
 endif
 
+with_gbm = get_option('gbm')
+if with_gbm == 'auto' and with_dri  # TODO: or gallium
+  with_gbm = host_machine.system() == 'linux'
+elif with_gbm == 'yes'
+  if not ['linux', 'bsd'].contains(host_machine.system())
+    error('GBM only supports unix-like platforms')
+  endif
+  with_gbm = true
+else
+  with_gbm = false
+endif
+
 with_glx = get_option('glx')
 if with_glx != 'disabled'
   pre_args += '-DGLX_USE_TLS'