1# Copyright © 2017 Dylan Baker 2# Copyright © 2017 Intel Corporation 3 4# Permission is hereby granted, free of charge, to any person obtaining a copy 5# of this software and associated documentation files (the "Software"), to deal 6# in the Software without restriction, including without limitation the rights 7# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8# copies of the Software, and to permit persons to whom the Software is 9# furnished to do so, subject to the following conditions: 10 11# The above copyright notice and this permission notice shall be included in 12# all copies or substantial portions of the Software. 13 14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20# SOFTWARE. 21 22inc_gallium_drivers = include_directories('drivers') 23inc_gallium_winsys = include_directories('winsys') 24 25subdir('auxiliary') 26subdir('auxiliary/pipe-loader') 27subdir('drivers/ddebug') 28subdir('drivers/noop') 29subdir('drivers/trace') 30subdir('drivers/rbug') 31subdir('winsys/sw/null') 32if with_dri 33 subdir('winsys/sw/dri') 34else 35 libswdri = [] 36endif 37if with_gallium_drisw_kms 38 subdir('winsys/sw/kms-dri') 39else 40 libswkmsdri = [] 41endif 42subdir('winsys/sw/wrapper') 43if with_gallium_swr 44 if meson.version().version_compare('< 0.44.0') 45 error('SWR requires meson 0.44.0 or greater.') 46 endif 47 subdir('drivers/swr') 48else 49 driver_swr = declare_dependency() 50endif 51if with_gallium_softpipe 52 subdir('drivers/softpipe') 53 if with_llvm 54 subdir('drivers/llvmpipe') 55 endif 56else 57 driver_swrast = declare_dependency() 58endif 59if with_gallium_r300 or with_gallium_radeonsi or with_gallium_r600 60 subdir('winsys/radeon/drm') 61endif 62if with_gallium_r300 63 subdir('drivers/r300') 64else 65 driver_r300 = declare_dependency() 66endif 67if with_gallium_r600 68 subdir('drivers/r600') 69else 70 driver_r600 = declare_dependency() 71endif 72if with_gallium_radeonsi 73 subdir('winsys/amdgpu/drm') 74 subdir('drivers/radeon') 75 subdir('drivers/radeonsi') 76else 77 driver_radeonsi = declare_dependency() 78endif 79if with_gallium_nouveau 80 subdir('winsys/nouveau/drm') 81 subdir('drivers/nouveau') 82else 83 driver_nouveau = declare_dependency() 84endif 85if with_gallium_freedreno 86 subdir('winsys/freedreno/drm') 87 subdir('drivers/freedreno') 88else 89 driver_freedreno = declare_dependency() 90endif 91if with_gallium_vc4 92 subdir('winsys/vc4/drm') 93 subdir('drivers/vc4') 94else 95 driver_vc4 = declare_dependency() 96endif 97if with_gallium_pl111 98 subdir('winsys/pl111/drm') 99else 100 driver_pl111 = declare_dependency() 101endif 102if with_gallium_vc5 103 subdir('winsys/vc5/drm') 104 subdir('drivers/vc5') 105else 106 driver_vc5 = declare_dependency() 107endif 108if with_gallium_etnaviv 109 subdir('winsys/etnaviv/drm') 110 subdir('drivers/etnaviv') 111else 112 driver_etnaviv = declare_dependency() 113endif 114if with_gallium_imx 115 subdir('winsys/imx/drm') 116else 117 driver_imx = declare_dependency() 118endif 119if with_gallium_i915 120 subdir('winsys/i915/drm') 121 subdir('drivers/i915') 122else 123 driver_i915 = declare_dependency() 124endif 125if with_gallium_svga 126 subdir('winsys/svga/drm') 127 subdir('drivers/svga') 128else 129 driver_svga = declare_dependency() 130endif 131if with_gallium_virgl 132 subdir('winsys/virgl/drm') 133 subdir('winsys/virgl/vtest') 134 subdir('drivers/virgl') 135else 136 driver_virgl = declare_dependency() 137endif 138if with_gallium_vdpau 139 subdir('state_trackers/vdpau') 140endif 141if with_gallium_xvmc 142 subdir('state_trackers/xvmc') 143endif 144if with_gallium_omx 145 subdir('state_trackers/omx_bellagio') 146endif 147if with_gallium_va 148 subdir('state_trackers/va') 149endif 150if with_gallium_xa 151 subdir('state_trackers/xa') 152endif 153if with_gallium_st_nine 154 subdir('state_trackers/nine') 155endif 156if with_gallium_opencl 157 # TODO: this isn't really clover specific, but ATM clover is the only 158 # consumer 159 subdir('targets/pipe-loader') 160 161 if meson.version().version_compare('< 0.44.0') 162 error('OpenCL requires meson 0.44.0 or greater.') 163 endif 164 subdir('state_trackers/clover') 165 subdir('targets/opencl') 166endif 167if with_dri 168 subdir('state_trackers/dri') 169 subdir('targets/dri') 170endif 171if with_osmesa == 'gallium' 172 subdir('state_trackers/osmesa') 173 subdir('targets/osmesa') 174endif 175if with_glx == 'gallium-xlib' 176 subdir('winsys/sw/xlib') 177 subdir('state_trackers/glx/xlib') 178 subdir('targets/libgl-xlib') 179endif 180if with_gallium_vdpau 181 subdir('targets/vdpau') 182endif 183if with_gallium_xvmc 184 subdir('targets/xvmc') 185endif 186if with_gallium_omx 187 subdir('targets/omx-bellagio') 188endif 189if with_gallium_va 190 subdir('targets/va') 191endif 192if with_gallium_xa 193 subdir('targets/xa') 194endif 195if with_gallium_st_nine 196 subdir('targets/d3dadapter9') 197endif 198# TODO: tests 199