swr: refactor swr_create_screen to allow for proper cleanup on error
[mesa.git] / meson.build
index cb8ec89e2b446c95230825c6f635ea6531d684b1..f3179c38062979fe0053c3438b49af7fefd5e384 100644 (file)
@@ -125,6 +125,7 @@ with_gallium_imx = false
 with_gallium_i915 = false
 with_gallium_svga = false
 with_gallium_virgl = false
+with_gallium_swr = false
 _drivers = get_option('gallium-drivers')
 if _drivers == 'auto'
   if not ['darwin', 'windows'].contains(host_machine.system())
@@ -247,7 +248,6 @@ if with_glx == 'auto'
   elif with_gallium
     # Even when building just gallium drivers the user probably wants dri
     with_glx = 'dri'
-    with_dri = true
   elif with_platform_x11 and with_any_opengl and not with_any_vk
     # The automatic behavior should not be to turn on xlib based glx when
     # building only vulkan drivers
@@ -256,6 +256,11 @@ if with_glx == 'auto'
     with_glx = 'disabled'
   endif
 endif
+if with_glx == 'dri'
+   if with_gallium
+      with_dri = true
+   endif
+endif
 
 if not (with_dri or with_gallium or with_glx == 'xlib' or with_glx == 'gallium-xlib')
   with_gles1 = false
@@ -584,7 +589,7 @@ if with_gallium_st_nine
 endif
 
 _opencl = get_option('gallium-opencl')
-if _opencl !=disabled'
+if _opencl != 'disabled'
   if not with_gallium
     error('OpenCL Clover implementation requires at least one gallium driver.')
   endif
@@ -942,6 +947,7 @@ endif
 
 # TODO: some of these may be conditional
 dep_zlib = dependency('zlib', version : '>= 1.2.3')
+pre_args += '-DHAVE_ZLIB'
 dep_thread = dependency('threads')
 if dep_thread.found() and host_machine.system() != 'windows'
   pre_args += '-DHAVE_PTHREAD'