summaryrefslogtreecommitdiff
path: root/src/gallium/frontends/vallium/meson.build
blob: 91de24e9137762ffb15be91cc9eaceccff1dfa4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67

val_entrypoints = custom_target(
  'val_entrypoints.[ch]',
  input : ['val_entrypoints_gen.py', vk_api_xml],
  output : ['val_entrypoints.h', 'val_entrypoints.c'],
  command : [
    prog_python, '@INPUT0@', '--xml', '@INPUT1@', '--outdir',
    meson.current_build_dir()
  ],
  depend_files : files('val_extensions.py'),
)

val_extensions_c = custom_target(
  'val_extensions.c',
  input : ['val_extensions.py', vk_api_xml],
  output : ['val_extensions.c', 'val_extensions.h'],
  command : [
    prog_python, '@INPUT0@', '--xml', '@INPUT1@', '--out-c', '@OUTPUT0@',
    '--out-h', '@OUTPUT1@'
  ],
)

libval_files = files(
    'val_device.c',
    'val_cmd_buffer.c',
    'val_descriptor_set.c',
    'val_execute.c',
    'val_util.c',
    'val_image.c',
    'val_formats.c',
    'val_lower_vulkan_resource.c',
    'val_lower_vulkan_resource.h',
    'val_lower_input_attachments.c',
    'val_pass.c',
    'val_pipeline.c',
    'val_pipeline_cache.c',
    'val_query.c',
    'val_wsi.c')

val_deps = []
val_flags = []

if with_platform_x11
  val_deps += dep_xcb_dri3
  val_flags += [
    '-DVK_USE_PLATFORM_XCB_KHR',
    '-DVK_USE_PLATFORM_XLIB_KHR',
  ]
  libval_files += files('val_wsi_x11.c')
endif

if with_platform_wayland
  val_deps += dep_wayland_client
  val_flags += '-DVK_USE_PLATFORM_WAYLAND_KHR'
  libval_files += files('val_wsi_wayland.c')
endif

libvallium_st = static_library(
  'vallium_st',
  [libval_files, val_entrypoints, val_extensions_c ],
  link_with : [ libvulkan_wsi ],
  c_args : [ val_flags ],
  cpp_args : [ val_flags ],
  gnu_symbol_visibility : 'hidden',
  include_directories : [ inc_include, inc_src, inc_util, inc_gallium, inc_compiler, inc_gallium_aux, inc_vulkan_wsi ],
  dependencies : [ idep_nir, idep_mesautil, idep_vulkan_util ]
)