blob: 50a3186fe81ca99422668a4e3cd074de2489c812 [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_aux_info.c",
"isl/isl_drm.c",
"isl/isl_format.c",
"isl/isl_gfx4.c",
"isl/isl_gfx4.h",
"isl/isl_gfx6.c",
"isl/isl_gfx6.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_gen11",
":isl_gen12",
":isl_gen125",
":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_cpb.c",
"isl/isl_emit_depth_stencil.c",
"isl/isl_gfx7.c",
"isl/isl_gfx7.h",
"isl/isl_surface_state.c",
]
defines = [ "GFX_VERx10=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_cpb.c",
"isl/isl_emit_depth_stencil.c",
"isl/isl_surface_state.c",
]
defines = [ "GFX_VERx10=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_cpb.c",
"isl/isl_emit_depth_stencil.c",
"isl/isl_gfx8.c",
"isl/isl_gfx8.h",
"isl/isl_surface_state.c",
]
defines = [ "GFX_VERx10=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_cpb.c",
"isl/isl_emit_depth_stencil.c",
"isl/isl_gfx9.c",
"isl/isl_gfx9.h",
"isl/isl_surface_state.c",
]
defines = [ "GFX_VERx10=90" ]
deps = [
":genxml",
"$mesa_build_root/include:c_compat",
"$mesa_build_root/src/util",
]
configs += [ "//build/config:Wno-conversion" ]
}
mesa_source_set("isl_gen11") {
configs = [ ":intel_config" ]
sources = [
"isl/isl_emit_cpb.c",
"isl/isl_emit_depth_stencil.c",
"isl/isl_surface_state.c",
]
defines = [ "GFX_VERx10=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_cpb.c",
"isl/isl_emit_depth_stencil.c",
"isl/isl_gfx12.c",
"isl/isl_surface_state.c",
]
defines = [ "GFX_VERx10=120" ]
deps = [
":genxml",
"$mesa_build_root/include:c_compat",
"$mesa_build_root/src/util",
]
}
static_library("isl_gen125") {
configs += [ ":intel_config", "//third_party/mesa/src:common_config" ]
sources = [
"isl/isl_emit_cpb.c",
"isl/isl_emit_depth_stencil.c",
"isl/isl_gfx12.c",
"isl/isl_surface_state.c",
]
defines = [ "GFX_VERx10=125" ]
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_pack11_header",
"genxml:gen_pack12_header",
"genxml:gen_pack125_header",
"genxml:gen_pack75_header",
"genxml:gen_pack7_header",
"genxml:gen_pack8_header",
"genxml:gen_pack9_header",
"genxml:gen_rt_header",
]
}
mesa_python_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 = [
"--csv",
rebase_path("isl/isl_format_layout.csv", root_build_dir),
"--out",
rebase_path("$target_gen_dir", root_build_dir) + "/$output_name",
]
}