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',
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],
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],
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',
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],
),
)
-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.
)
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',
- ),
-)
--- /dev/null
+# 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 ],
+)
--- /dev/null
+# 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,
+)
+