| # Copyright 2016 The Fuchsia Authors |
| # |
| # 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 (including the next |
| # paragraph) 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. |
| |
| import("//garnet/lib/magma/gnbuild/magma.gni") |
| |
| config("intel_config") { |
| include_dirs = [ |
| "$mesa_build_root/src/intel", |
| "$mesa_build_root/src/intel/isl", |
| ] |
| } |
| |
| source_set("isl") { |
| public_configs = [ ":intel_config" ] |
| |
| sources = [ |
| "$target_gen_dir/isl_format_layout.c", |
| "isl/isl.c", |
| "isl/isl.h", |
| "isl/isl_format.c", |
| "isl/isl_gen4.c", |
| "isl/isl_gen4.h", |
| "isl/isl_gen6.c", |
| "isl/isl_gen6.h", |
| "isl/isl_priv.h", |
| "isl/isl_storage_image.c", |
| ] |
| |
| include_dirs = [ |
| "$mesa_build_root/src/mesa", |
| "$mesa_build_root/src/mapi", |
| ] |
| |
| deps = [ |
| ":gen_format_layout", |
| ":genxml", |
| ":isl_gen7", |
| ":isl_gen75", |
| ":isl_gen8", |
| ":isl_gen9", |
| ":isl_gen10", |
| "$mesa_build_root/include:c_compat", |
| "$mesa_build_root/src/util", |
| ] |
| } |
| |
| source_set("isl_gen7") { |
| configs += [ ":intel_config" ] |
| |
| sources = [ |
| "isl/isl_emit_depth_stencil.c", |
| "isl/isl_gen7.c", |
| "isl/isl_gen7.h", |
| "isl/isl_surface_state.c", |
| ] |
| |
| defines = [ "GEN_VERSIONx10=70" ] |
| |
| deps = [ |
| ":genxml", |
| "$mesa_build_root/include:c_compat", |
| "$mesa_build_root/src/util", |
| ] |
| } |
| |
| source_set("isl_gen75") { |
| configs += [ ":intel_config" ] |
| |
| sources = [ |
| "isl/isl_emit_depth_stencil.c", |
| "isl/isl_surface_state.c", |
| ] |
| |
| defines = [ "GEN_VERSIONx10=75" ] |
| |
| deps = [ |
| ":genxml", |
| "$mesa_build_root/include:c_compat", |
| "$mesa_build_root/src/util", |
| ] |
| } |
| |
| source_set("isl_gen8") { |
| configs += [ ":intel_config" ] |
| |
| sources = [ |
| "isl/isl_emit_depth_stencil.c", |
| "isl/isl_gen8.c", |
| "isl/isl_gen8.h", |
| "isl/isl_surface_state.c", |
| ] |
| |
| defines = [ "GEN_VERSIONx10=80" ] |
| |
| deps = [ |
| ":genxml", |
| "$mesa_build_root/include:c_compat", |
| "$mesa_build_root/src/util", |
| ] |
| } |
| |
| source_set("isl_gen9") { |
| configs += [ ":intel_config" ] |
| |
| sources = [ |
| "isl/isl_emit_depth_stencil.c", |
| "isl/isl_gen9.c", |
| "isl/isl_gen9.h", |
| "isl/isl_surface_state.c", |
| ] |
| |
| defines = [ "GEN_VERSIONx10=90" ] |
| |
| deps = [ |
| ":genxml", |
| "$mesa_build_root/include:c_compat", |
| "$mesa_build_root/src/util", |
| ] |
| } |
| |
| source_set("isl_gen10") { |
| configs += [ ":intel_config" ] |
| |
| sources = [ |
| "isl/isl_emit_depth_stencil.c", |
| "isl/isl_surface_state.c", |
| ] |
| |
| defines = [ "GEN_VERSIONx10=100" ] |
| |
| deps = [ |
| ":genxml", |
| "$mesa_build_root/include:c_compat", |
| "$mesa_build_root/src/util", |
| ] |
| } |
| |
| config("gen_public_config") { |
| include_dirs = [ "$target_gen_dir" ] |
| } |
| |
| group("genxml") { |
| public_configs = [ ":gen_public_config" ] |
| deps = [ |
| "genxml:gen_pack75_header", |
| "genxml:gen_pack7_header", |
| "genxml:gen_pack8_header", |
| "genxml:gen_pack9_header", |
| "genxml:gen_pack10_header", |
| "genxml:gen_bits_header", |
| ] |
| } |
| |
| action("gen_format_layout") { |
| output_name = "isl_format_layout.c" |
| script = "isl/gen_format_layout.py" |
| |
| outputs = [ |
| "$target_gen_dir/$output_name", |
| ] |
| |
| inputs = [ |
| "isl/isl_format_layout.csv", |
| ] |
| |
| args = [ "--pythonpath", "$magma_python_path" ] |
| args += [ "--csv" ] |
| args += rebase_path(inputs, root_build_dir) |
| args += [ |
| "--out", |
| rebase_path("$target_gen_dir") + "/$output_name", |
| ] |
| } |