diff options
author | George Kyriazis <[email protected]> | 2018-01-31 21:44:54 -0600 |
---|---|---|
committer | George Kyriazis <[email protected]> | 2018-02-02 17:43:00 -0600 |
commit | 16bf8138308008f4b889caa827a8291ff72745b8 (patch) | |
tree | 1ef24231aaae4279b6830b9cfc1e82b41bcab0e3 /src/gallium | |
parent | 3bf1e036e8ad196fe669ac24da8c14ff160399d8 (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]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/swr/meson.build | 23 | ||||
-rw-r--r-- | src/gallium/drivers/swr/rasterizer/codegen/meson.build | 76 | ||||
-rw-r--r-- | src/gallium/drivers/swr/rasterizer/core/backends/meson.build | 57 | ||||
-rw-r--r-- | src/gallium/drivers/swr/rasterizer/jitter/meson.build | 50 |
4 files changed, 126 insertions, 80 deletions
diff --git a/src/gallium/drivers/swr/meson.build b/src/gallium/drivers/swr/meson.build index ae86c8ec380..4d6af87af08 100644 --- a/src/gallium/drivers/swr/meson.build +++ b/src/gallium/drivers/swr/meson.build @@ -151,7 +151,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', @@ -180,7 +195,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], @@ -212,7 +227,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], @@ -236,7 +251,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', @@ -263,7 +278,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, +) + |