blob: 91216732574b1087f52544395b6019a7cea76b67 [file] [log] [blame]
# Copyright 2016 Google, LLC
#
# 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("../../mesa.gni")
config("intel_config") {
include_dirs = [ "$mesa_build_root/src/intel" ]
cflags = [ "-Wno-conversion" ]
}
mesa_source_set("isl_sse41") {
sources = [ "isl/isl_tiled_memcpy_sse41.c" ]
cflags = [ "-msse4.1" ]
include_dirs = [ "$mesa_build_root/src/mesa" ]
deps = [
":genxml",
"$mesa_build_root/src/util",
"dev",
]
public_configs = [ ":intel_config" ]
}
mesa_source_set("isl") {
public_configs = [ ":intel_config" ]
sources = [
"$target_gen_dir/isl_format_layout.c",
"isl/isl.c",
"isl/isl.h",
"isl/isl_drm.c",
"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",
"isl/isl_tiled_memcpy_normal.c",
]
include_dirs = [
"$mesa_build_root/src/mesa",
"$mesa_build_root/src/mapi",
"$mesa_build_root/include/drm-uapi",
]
deps = [
":gen_format_layout",
":genxml",
":isl_gen10",
":isl_gen11",
":isl_gen12",
":isl_gen7",
":isl_gen75",
":isl_gen8",
":isl_gen9",
":isl_sse41",
"$mesa_build_root/include:c_compat",
"$mesa_build_root/src/util",
]
configs = [ "//build/config:Wno-conversion" ]
}
mesa_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",
]
}
mesa_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",
]
}
mesa_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",
]
}
mesa_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",
]
configs += [ "//build/config:Wno-conversion" ]
}
mesa_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",
]
}
mesa_source_set("isl_gen11") {
configs = [ ":intel_config" ]
sources = [
"isl/isl_emit_depth_stencil.c",
"isl/isl_surface_state.c",
]
defines = [ "GEN_VERSIONx10=110" ]
deps = [
":genxml",
"$mesa_build_root/include:c_compat",
"$mesa_build_root/src/util",
]
}
mesa_source_set("isl_gen12") {
configs = [ ":intel_config" ]
sources = [
"isl/isl_emit_depth_stencil.c",
"isl/isl_gen12.c",
"isl/isl_surface_state.c",
]
defines = [ "GEN_VERSIONx10=120" ]
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_bits_header",
"genxml:gen_pack10_header",
"genxml:gen_pack11_header",
"genxml:gen_pack12_header",
"genxml:gen_pack75_header",
"genxml:gen_pack7_header",
"genxml:gen_pack8_header",
"genxml:gen_pack9_header",
]
}
action("gen_format_layout") {
output_name = "isl_format_layout.c"
script = "$mesa_build_root/scripts/python_exec.sh"
outputs = [ "$target_gen_dir/$output_name" ]
inputs = [
"isl/gen_format_layout.py",
"isl/isl_format_layout.csv",
]
args = [
rebase_path("$magma_python_path"),
rebase_path("isl/gen_format_layout.py"),
"--csv",
rebase_path("isl/isl_format_layout.csv", root_build_dir),
"--out",
rebase_path("$target_gen_dir") + "/$output_name",
]
}