summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGeorge Kyriazis <[email protected]>2018-01-31 21:44:54 -0600
committerEmil Velikov <[email protected]>2018-02-05 19:06:01 +0000
commit5afeb68c7e87740230f7daa954b17c33d066a625 (patch)
treeb5c18ee67c85afff9b8bed4fadcb92dc9bd82e8d /src
parentc4d9ceecf809d455aeed581d12167e4ff4c29d1f (diff)
meson/swr: re-shuffle generated files
Move generated files from codegen/meson.build to other directories, in order to satisfy generated include file dependencies Add correct file lists for architecture-specific libraries. cc: [email protected] cc: [email protected] Reviewed-by: Dylan Baker <[email protected]> (cherry picked from commit 16bf8138308008f4b889caa827a8291ff72745b8)
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/swr/meson.build23
-rw-r--r--src/gallium/drivers/swr/rasterizer/codegen/meson.build76
-rw-r--r--src/gallium/drivers/swr/rasterizer/core/backends/meson.build57
-rw-r--r--src/gallium/drivers/swr/rasterizer/jitter/meson.build50
4 files changed, 126 insertions, 80 deletions
diff --git a/src/gallium/drivers/swr/meson.build b/src/gallium/drivers/swr/meson.build
index 8dffb4c000d..a5a9a698c34 100644
--- a/src/gallium/drivers/swr/meson.build
+++ b/src/gallium/drivers/swr/meson.build
@@ -149,7 +149,22 @@ files_swr_arch = files(
swr_context_files = files('swr_context.h')
swr_state_files = files('rasterizer/core/state.h')
swr_event_proto_files = files('rasterizer/archrast/events.proto')
+swr_gen_backend_files = files('rasterizer/codegen/templates/gen_backend.cpp')
+swr_gen_rasterizer_files = files('rasterizer/codegen/templates/gen_rasterizer.cpp')
+swr_gen_header_init_files = files('rasterizer/codegen/templates/gen_header_init.hpp')
+
+swr_gen_llvm_ir_macros_py = files('rasterizer/codegen/gen_llvm_ir_macros.py')
+swr_gen_backends_py = files('rasterizer/codegen/gen_backends.py')
+
+swr_gen_builder_depends = files(
+ 'rasterizer/codegen/templates/gen_builder.hpp',
+ 'rasterizer/codegen/gen_common.py'
+ )
+
+
+subdir('rasterizer/jitter')
subdir('rasterizer/codegen')
+subdir('rasterizer/core/backends')
swr_incs = include_directories(
'rasterizer/codegen', 'rasterizer/core', 'rasterizer/jitter',
@@ -178,7 +193,7 @@ if with_swr_arches.contains('avx')
swr_arch_defines += '-DHAVE_SWR_AVX'
swr_arch_libs += shared_library(
'swrAVX',
- files_swr_common,
+ [files_swr_common, files_swr_arch],
cpp_args : [swr_cpp_args, swr_avx_args, '-DKNOB_ARCH=KNOB_ARCH_AVX'],
link_args : [ld_args_gc_sections],
include_directories : [swr_incs],
@@ -210,7 +225,7 @@ if with_swr_arches.contains('avx2')
swr_arch_defines += '-DHAVE_SWR_AVX2'
swr_arch_libs += shared_library(
'swrAVX2',
- files_swr_common,
+ [files_swr_common, files_swr_arch],
cpp_args : [swr_cpp_args, swr_avx2_args, '-DKNOB_ARCH=KNOB_ARCH_AVX2'],
link_args : [ld_args_gc_sections],
include_directories : [swr_incs],
@@ -234,7 +249,7 @@ if with_swr_arches.contains('knl')
swr_arch_defines += '-DHAVE_SWR_KNL'
swr_arch_libs += shared_library(
'swrKNL',
- files_swr_common,
+ [files_swr_common, files_swr_arch],
cpp_args : [
swr_cpp_args, swr_knl_args, '-DKNOB_ARCH=KNOB_ARCH_AVX512',
'-DKNOB_ARCH_KNIGHTS',
@@ -261,7 +276,7 @@ if with_swr_arches.contains('skx')
swr_arch_defines += '-DHAVE_SWR_SKX'
swr_arch_libs += shared_library(
'swrSKX',
- files_swr_common,
+ [files_swr_common, files_swr_arch],
cpp_args : [swr_cpp_args, swr_skx_args, '-DKNOB_ARCH=KNOB_ARCH_AVX512'],
link_args : [ld_args_gc_sections],
include_directories : [swr_incs],
diff --git a/src/gallium/drivers/swr/rasterizer/codegen/meson.build b/src/gallium/drivers/swr/rasterizer/codegen/meson.build
index a21f40540a1..2cef0d3aaf5 100644
--- a/src/gallium/drivers/swr/rasterizer/codegen/meson.build
+++ b/src/gallium/drivers/swr/rasterizer/codegen/meson.build
@@ -40,40 +40,6 @@ gen_knobs_h = custom_target(
),
)
-gen_builder_hpp = custom_target(
- 'gen_builder.hpp',
- input : [
- 'gen_llvm_ir_macros.py',
- join_paths(
- dep_llvm.get_configtool_variable('includedir'), 'llvm', 'IR',
- 'IRBuilder.h'
- )
- ],
- output : 'gen_builder.hpp',
- command : [
- prog_python2, '@INPUT0@', '--input', '@INPUT1@', '--output', '@OUTPUT@',
- '--gen_h', '--output-dir', meson.current_build_dir()
- ],
- depend_files : files(
- 'templates/gen_builder.hpp',
- 'gen_common.py',
- ),
- build_by_default : true,
-)
-
-gen_builder_x86_hpp = custom_target(
- 'gen_builder_x86.hpp',
- input : 'gen_llvm_ir_macros.py',
- output : 'gen_builder_x86.hpp',
- command : [
- prog_python2, '@INPUT0@', '--gen_x86_h', '--output', '@OUTPUT@',
- '--output-dir', meson.current_build_dir()
- ],
- depend_files : files(
- 'templates/gen_builder.hpp',
- 'gen_common.py',
- ),
-)
# The generators above this are needed individually, while the below generators
# are all inputs to the same lib, so they don't need unique names.
@@ -114,45 +80,3 @@ foreach x : [['gen_ar_event.hpp', '--gen_event_hpp'],
)
endforeach
-files_swr_common += custom_target(
- 'gen_backend_pixel',
- input : 'gen_backends.py',
- output : [
- 'gen_BackendPixelRate0.cpp', 'gen_BackendPixelRate1.cpp',
- 'gen_BackendPixelRate2.cpp', 'gen_BackendPixelRate3.cpp',
- 'gen_BackendPixelRate.hpp',
- ],
- command : [
- prog_python2, '@INPUT@',
- '--outdir', meson.current_build_dir(),
- '--dim', '5', '2', '3', '2', '2', '2',
- '--numfiles', '4',
- '--cpp', '--hpp',
- ],
- depend_files : files(
- 'templates/gen_backend.cpp',
- 'templates/gen_header_init.hpp',
- ),
-)
-
-files_swr_common += custom_target(
- 'gen_backend_raster',
- input : 'gen_backends.py',
- output : [
- 'gen_rasterizer0.cpp', 'gen_rasterizer1.cpp',
- 'gen_rasterizer2.cpp', 'gen_rasterizer3.cpp',
- 'gen_rasterizer.hpp',
- ],
- command : [
- prog_python2, '@INPUT@',
- '--outdir', meson.current_build_dir(),
- '--rast',
- '--dim', '5', '2', '2', '3', '5', '2',
- '--numfiles', '4',
- '--cpp', '--hpp',
- ],
- depend_files : files(
- 'templates/gen_rasterizer.cpp',
- 'templates/gen_header_init.hpp',
- ),
-)
diff --git a/src/gallium/drivers/swr/rasterizer/core/backends/meson.build b/src/gallium/drivers/swr/rasterizer/core/backends/meson.build
new file mode 100644
index 00000000000..25665a3e085
--- /dev/null
+++ b/src/gallium/drivers/swr/rasterizer/core/backends/meson.build
@@ -0,0 +1,57 @@
+# Copyright © 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+
+files_swr_common += custom_target(
+ 'gen_backend_pixel',
+ input : swr_gen_backends_py,
+ output : [
+ 'gen_BackendPixelRate0.cpp', 'gen_BackendPixelRate1.cpp',
+ 'gen_BackendPixelRate2.cpp', 'gen_BackendPixelRate3.cpp',
+ 'gen_BackendPixelRate.hpp',
+ ],
+ command : [
+ prog_python2, '@INPUT@',
+ '--outdir', '@OUTDIR@',
+ '--dim', '5', '2', '3', '2', '2', '2',
+ '--numfiles', '4',
+ '--cpp', '--hpp',
+ ],
+ depend_files : [ swr_gen_backend_files, swr_gen_header_init_files ],
+)
+
+files_swr_common += custom_target(
+ 'gen_backend_raster',
+ input : swr_gen_backends_py,
+ output : [
+ 'gen_rasterizer0.cpp', 'gen_rasterizer1.cpp',
+ 'gen_rasterizer2.cpp', 'gen_rasterizer3.cpp',
+ 'gen_rasterizer.hpp',
+ ],
+ command : [
+ prog_python2, '@INPUT@',
+ '--outdir', '@OUTDIR@',
+ '--rast',
+ '--dim', '5', '2', '2', '3', '5', '2',
+ '--numfiles', '4',
+ '--cpp', '--hpp',
+ ],
+ depend_files : [ swr_gen_rasterizer_files, swr_gen_header_init_files ],
+)
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/meson.build b/src/gallium/drivers/swr/rasterizer/jitter/meson.build
new file mode 100644
index 00000000000..d4e79d519f1
--- /dev/null
+++ b/src/gallium/drivers/swr/rasterizer/jitter/meson.build
@@ -0,0 +1,50 @@
+# Copyright © 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+
+gen_builder_hpp = custom_target(
+ 'gen_builder.hpp',
+ input : [
+ swr_gen_llvm_ir_macros_py,
+ join_paths(
+ dep_llvm.get_configtool_variable('includedir'), 'llvm', 'IR',
+ 'IRBuilder.h'
+ )
+ ],
+ output : 'gen_builder.hpp',
+ command : [
+ prog_python2, '@INPUT0@', '--input', '@INPUT1@', '--output', '@OUTPUT@',
+ '--gen_h', '--output-dir', '@OUTDIR@'
+ ],
+ depend_files : swr_gen_builder_depends,
+ build_by_default : true,
+)
+
+gen_builder_x86_hpp = custom_target(
+ 'gen_builder_x86.hpp',
+ input : '../codegen/gen_llvm_ir_macros.py',
+ output : 'gen_builder_x86.hpp',
+ command : [
+ prog_python2, '@INPUT0@', '--gen_x86_h', '--output', '@OUTPUT@',
+ '--output-dir', '@OUTDIR@'
+ ],
+ depend_files : swr_gen_builder_depends,
+)
+