blob: d6478b303e2bf2e79ba2e23c3c47f600c5957210 [file] [log] [blame]
# Copyright © 2019 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 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("format_config") {
include_dirs = [
".",
"$target_gen_dir",
"$target_gen_dir/../..",
]
}
mesa_source_set("format") {
public_configs = [ "$mesa_build_root/src/util:util_public_config" ]
public_deps = [
"$mesa_build_root/include:c_compat",
]
sources = [
"$target_gen_dir/u_format_table.c",
"u_format.c",
"u_format.h",
"u_format_bptc.c",
"u_format_etc.c",
"u_format_fxt1.c",
"u_format_latc.c",
"u_format_other.c",
"u_format_rgtc.c",
"u_format_s3tc.c",
"u_format_tests.c",
"u_format_yuv.c",
"u_format_zs.c",
]
if (target_cpu == "arm64") {
sources += [
"u_format_unpack_neon.c",
]
}
include_dirs = [
"$mesa_build_root/src/mesa/",
]
configs = [ ":format_config" ]
deps = [
":u_format_pack_h",
":u_format_table_c",
]
}
mesa_python_stdout_to_file_action("u_format_pack_h") {
output = "u_format_pack.h"
script = "u_format_table.py"
sources = [ "u_format_parse.py", "u_format_pack.py" ]
inputs = [ "u_format.csv" ]
args = [
rebase_path("u_format.csv", root_build_dir),
"--header",
]
}
mesa_python_stdout_to_file_action("u_format_table_c") {
output = "u_format_table.c"
script = "u_format_table.py"
sources = [ "u_format_parse.py", "u_format_pack.py" ]
inputs = [ "u_format.csv" ]
args = [
rebase_path("u_format.csv", root_build_dir),
]
}