2018-07-17 17:53:15 +00:00
|
|
|
# Copyright 2018 Google Inc. All rights reserved.
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
import("//build_overrides/build.gni")
|
2019-07-10 20:37:10 +00:00
|
|
|
import("//build_overrides/spirv_tools.gni")
|
2019-07-03 20:26:06 +00:00
|
|
|
if (build_with_chromium) {
|
|
|
|
import("//testing/test.gni")
|
2021-07-14 09:04:50 +00:00
|
|
|
import("//third_party/protobuf/proto_library.gni")
|
2019-07-03 20:26:06 +00:00
|
|
|
}
|
2018-07-17 17:53:15 +00:00
|
|
|
|
2022-03-23 13:19:12 +00:00
|
|
|
# SPIRV-Tools may be part of multiple projects in the Chromium tree.
|
2022-03-28 14:22:33 +00:00
|
|
|
# Only enable building executables if this is the main copy.
|
2022-03-23 13:19:12 +00:00
|
|
|
abspath = get_path_info(".", "abspath")
|
2022-03-28 14:22:33 +00:00
|
|
|
spvtools_chromium_third_party = (abspath == "//third_party/vulkan-deps/spirv-tools/src/")
|
|
|
|
spvtools_build_executables = build_with_chromium && spvtools_chromium_third_party
|
|
|
|
# Fuchsia also requires building the executables.
|
|
|
|
# TODO(b/158002593): Avoid the use of dependent-specific variables.
|
|
|
|
if (defined(is_fuchsia_tree) && is_fuchsia_tree) {
|
|
|
|
spvtools_build_executables = true
|
|
|
|
}
|
2022-03-23 13:19:12 +00:00
|
|
|
|
2018-08-02 16:48:03 +00:00
|
|
|
spirv_headers = spirv_tools_spirv_headers_dir
|
2021-04-12 17:17:44 +00:00
|
|
|
spirv_is_winuwp = is_win && target_os == "winuwp"
|
2018-07-17 17:53:15 +00:00
|
|
|
|
|
|
|
template("spvtools_core_tables") {
|
|
|
|
assert(defined(invoker.version), "Need version in $target_name generation.")
|
|
|
|
|
|
|
|
action("spvtools_core_tables_" + target_name) {
|
|
|
|
script = "utils/generate_grammar_tables.py"
|
|
|
|
|
|
|
|
version = invoker.version
|
|
|
|
|
|
|
|
core_json_file =
|
|
|
|
"${spirv_headers}/include/spirv/$version/spirv.core.grammar.json"
|
|
|
|
core_insts_file = "${target_gen_dir}/core.insts-$version.inc"
|
|
|
|
operand_kinds_file = "${target_gen_dir}/operand.kinds-$version.inc"
|
2021-03-10 20:19:24 +00:00
|
|
|
debuginfo_insts_file =
|
|
|
|
"${spirv_headers}/include/spirv/unified1/extinst.debuginfo.grammar.json"
|
2020-07-30 16:08:53 +00:00
|
|
|
cldebuginfo100_insts_file = "${spirv_headers}/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json"
|
2018-07-17 17:53:15 +00:00
|
|
|
|
|
|
|
sources = [
|
2021-03-10 20:19:24 +00:00
|
|
|
cldebuginfo100_insts_file,
|
2018-07-17 17:53:15 +00:00
|
|
|
core_json_file,
|
2020-02-21 22:23:42 +00:00
|
|
|
debuginfo_insts_file,
|
2018-07-17 17:53:15 +00:00
|
|
|
]
|
|
|
|
outputs = [
|
|
|
|
core_insts_file,
|
|
|
|
operand_kinds_file,
|
|
|
|
]
|
|
|
|
args = [
|
|
|
|
"--spirv-core-grammar",
|
|
|
|
rebase_path(core_json_file, root_build_dir),
|
|
|
|
"--core-insts-output",
|
|
|
|
rebase_path(core_insts_file, root_build_dir),
|
|
|
|
"--extinst-debuginfo-grammar",
|
2019-12-19 22:16:26 +00:00
|
|
|
rebase_path(debuginfo_insts_file, root_build_dir),
|
|
|
|
"--extinst-cldebuginfo100-grammar",
|
|
|
|
rebase_path(cldebuginfo100_insts_file, root_build_dir),
|
2018-07-17 17:53:15 +00:00
|
|
|
"--operand-kinds-output",
|
|
|
|
rebase_path(operand_kinds_file, root_build_dir),
|
2022-11-04 21:27:10 +00:00
|
|
|
"--output-language",
|
|
|
|
"c++"
|
2018-07-17 17:53:15 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
template("spvtools_core_enums") {
|
|
|
|
assert(defined(invoker.version), "Need version in $target_name generation.")
|
|
|
|
|
|
|
|
action("spvtools_core_enums_" + target_name) {
|
|
|
|
script = "utils/generate_grammar_tables.py"
|
|
|
|
|
|
|
|
version = invoker.version
|
|
|
|
|
|
|
|
core_json_file =
|
|
|
|
"${spirv_headers}/include/spirv/$version/spirv.core.grammar.json"
|
2021-03-10 20:19:24 +00:00
|
|
|
debuginfo_insts_file =
|
|
|
|
"${spirv_headers}/include/spirv/unified1/extinst.debuginfo.grammar.json"
|
2020-07-30 16:08:53 +00:00
|
|
|
cldebuginfo100_insts_file = "${spirv_headers}/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json"
|
2020-01-08 22:27:38 +00:00
|
|
|
|
2018-07-17 17:53:15 +00:00
|
|
|
extension_enum_file = "${target_gen_dir}/extension_enum.inc"
|
|
|
|
extension_map_file = "${target_gen_dir}/enum_string_mapping.inc"
|
|
|
|
|
|
|
|
args = [
|
|
|
|
"--spirv-core-grammar",
|
|
|
|
rebase_path(core_json_file, root_build_dir),
|
|
|
|
"--extinst-debuginfo-grammar",
|
2019-12-19 22:16:26 +00:00
|
|
|
rebase_path(debuginfo_insts_file, root_build_dir),
|
|
|
|
"--extinst-cldebuginfo100-grammar",
|
|
|
|
rebase_path(cldebuginfo100_insts_file, root_build_dir),
|
2018-07-17 17:53:15 +00:00
|
|
|
"--extension-enum-output",
|
|
|
|
rebase_path(extension_enum_file, root_build_dir),
|
|
|
|
"--enum-string-mapping-output",
|
|
|
|
rebase_path(extension_map_file, root_build_dir),
|
2022-11-04 21:27:10 +00:00
|
|
|
"--output-language",
|
|
|
|
"c++"
|
2018-07-17 17:53:15 +00:00
|
|
|
]
|
|
|
|
inputs = [
|
|
|
|
core_json_file,
|
2020-01-08 22:27:38 +00:00
|
|
|
debuginfo_insts_file,
|
|
|
|
cldebuginfo100_insts_file,
|
2018-07-17 17:53:15 +00:00
|
|
|
]
|
|
|
|
outputs = [
|
|
|
|
extension_enum_file,
|
|
|
|
extension_map_file,
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
template("spvtools_glsl_tables") {
|
|
|
|
assert(defined(invoker.version), "Need version in $target_name generation.")
|
|
|
|
|
|
|
|
action("spvtools_glsl_tables_" + target_name) {
|
|
|
|
script = "utils/generate_grammar_tables.py"
|
|
|
|
|
|
|
|
version = invoker.version
|
|
|
|
|
|
|
|
core_json_file =
|
|
|
|
"${spirv_headers}/include/spirv/$version/spirv.core.grammar.json"
|
|
|
|
glsl_json_file = "${spirv_headers}/include/spirv/${version}/extinst.glsl.std.450.grammar.json"
|
2021-03-10 20:19:24 +00:00
|
|
|
debuginfo_insts_file =
|
|
|
|
"${spirv_headers}/include/spirv/unified1/extinst.debuginfo.grammar.json"
|
2020-07-30 16:08:53 +00:00
|
|
|
cldebuginfo100_insts_file = "${spirv_headers}/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json"
|
2020-01-08 22:27:38 +00:00
|
|
|
|
2018-07-17 17:53:15 +00:00
|
|
|
glsl_insts_file = "${target_gen_dir}/glsl.std.450.insts.inc"
|
|
|
|
|
|
|
|
args = [
|
|
|
|
"--spirv-core-grammar",
|
|
|
|
rebase_path(core_json_file, root_build_dir),
|
2020-01-08 22:27:38 +00:00
|
|
|
"--extinst-debuginfo-grammar",
|
|
|
|
rebase_path(debuginfo_insts_file, root_build_dir),
|
|
|
|
"--extinst-cldebuginfo100-grammar",
|
|
|
|
rebase_path(cldebuginfo100_insts_file, root_build_dir),
|
2018-07-17 17:53:15 +00:00
|
|
|
"--extinst-glsl-grammar",
|
|
|
|
rebase_path(glsl_json_file, root_build_dir),
|
|
|
|
"--glsl-insts-output",
|
|
|
|
rebase_path(glsl_insts_file, root_build_dir),
|
2022-11-04 21:27:10 +00:00
|
|
|
"--output-language",
|
|
|
|
"c++"
|
2018-07-17 17:53:15 +00:00
|
|
|
]
|
|
|
|
inputs = [
|
|
|
|
core_json_file,
|
|
|
|
glsl_json_file,
|
2020-01-08 22:27:38 +00:00
|
|
|
debuginfo_insts_file,
|
|
|
|
cldebuginfo100_insts_file,
|
2018-07-17 17:53:15 +00:00
|
|
|
]
|
2021-03-10 20:19:24 +00:00
|
|
|
outputs = [ glsl_insts_file ]
|
2018-07-17 17:53:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
template("spvtools_opencl_tables") {
|
|
|
|
assert(defined(invoker.version), "Need version in $target_name generation.")
|
|
|
|
|
|
|
|
action("spvtools_opencl_tables_" + target_name) {
|
|
|
|
script = "utils/generate_grammar_tables.py"
|
|
|
|
|
|
|
|
version = invoker.version
|
|
|
|
|
|
|
|
core_json_file =
|
|
|
|
"${spirv_headers}/include/spirv/$version/spirv.core.grammar.json"
|
2020-01-08 22:27:38 +00:00
|
|
|
opencl_json_file = "${spirv_headers}/include/spirv/${version}/extinst.opencl.std.100.grammar.json"
|
2021-03-10 20:19:24 +00:00
|
|
|
debuginfo_insts_file =
|
|
|
|
"${spirv_headers}/include/spirv/unified1/extinst.debuginfo.grammar.json"
|
2020-07-30 16:08:53 +00:00
|
|
|
cldebuginfo100_insts_file = "${spirv_headers}/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json"
|
2020-01-08 22:27:38 +00:00
|
|
|
|
2018-07-17 17:53:15 +00:00
|
|
|
opencl_insts_file = "${target_gen_dir}/opencl.std.insts.inc"
|
|
|
|
|
|
|
|
args = [
|
|
|
|
"--spirv-core-grammar",
|
|
|
|
rebase_path(core_json_file, root_build_dir),
|
2020-01-08 22:27:38 +00:00
|
|
|
"--extinst-debuginfo-grammar",
|
|
|
|
rebase_path(debuginfo_insts_file, root_build_dir),
|
|
|
|
"--extinst-cldebuginfo100-grammar",
|
|
|
|
rebase_path(cldebuginfo100_insts_file, root_build_dir),
|
2018-07-17 17:53:15 +00:00
|
|
|
"--extinst-opencl-grammar",
|
2020-01-08 22:27:38 +00:00
|
|
|
rebase_path(opencl_json_file, root_build_dir),
|
2018-07-17 17:53:15 +00:00
|
|
|
"--opencl-insts-output",
|
|
|
|
rebase_path(opencl_insts_file, root_build_dir),
|
|
|
|
]
|
|
|
|
inputs = [
|
|
|
|
core_json_file,
|
2020-01-08 22:27:38 +00:00
|
|
|
opencl_json_file,
|
|
|
|
debuginfo_insts_file,
|
|
|
|
cldebuginfo100_insts_file,
|
2018-07-17 17:53:15 +00:00
|
|
|
]
|
2021-03-10 20:19:24 +00:00
|
|
|
outputs = [ opencl_insts_file ]
|
2018-07-17 17:53:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
template("spvtools_language_header") {
|
|
|
|
assert(defined(invoker.name), "Need name in $target_name generation.")
|
|
|
|
|
|
|
|
action("spvtools_language_header_" + target_name) {
|
|
|
|
script = "utils/generate_language_headers.py"
|
|
|
|
|
|
|
|
name = invoker.name
|
2020-02-25 05:46:52 +00:00
|
|
|
extinst_output_path = "${target_gen_dir}/${name}.h"
|
2018-07-17 17:53:15 +00:00
|
|
|
|
|
|
|
args = [
|
|
|
|
"--extinst-grammar",
|
2019-12-19 22:16:26 +00:00
|
|
|
rebase_path(invoker.grammar_file, root_build_dir),
|
2020-02-25 05:46:52 +00:00
|
|
|
"--extinst-output-path",
|
|
|
|
rebase_path(extinst_output_path, root_build_dir),
|
2018-07-17 17:53:15 +00:00
|
|
|
]
|
2021-03-10 20:19:24 +00:00
|
|
|
inputs = [ invoker.grammar_file ]
|
|
|
|
outputs = [ "${extinst_output_path}" ]
|
2018-07-17 17:53:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
template("spvtools_vendor_table") {
|
|
|
|
assert(defined(invoker.name), "Need name in $target_name generation.")
|
|
|
|
|
|
|
|
action("spvtools_vendor_tables_" + target_name) {
|
|
|
|
script = "utils/generate_grammar_tables.py"
|
|
|
|
|
|
|
|
name = invoker.name
|
2021-03-10 20:19:24 +00:00
|
|
|
extinst_vendor_grammar =
|
|
|
|
"${spirv_headers}/include/spirv/unified1/extinst.${name}.grammar.json"
|
2018-07-17 17:53:15 +00:00
|
|
|
extinst_file = "${target_gen_dir}/${name}.insts.inc"
|
|
|
|
|
|
|
|
args = [
|
|
|
|
"--extinst-vendor-grammar",
|
|
|
|
rebase_path(extinst_vendor_grammar, root_build_dir),
|
|
|
|
"--vendor-insts-output",
|
|
|
|
rebase_path(extinst_file, root_build_dir),
|
2019-12-19 22:16:26 +00:00
|
|
|
"--vendor-operand-kind-prefix",
|
2021-03-10 20:19:24 +00:00
|
|
|
invoker.operand_kind_prefix,
|
2018-07-17 17:53:15 +00:00
|
|
|
]
|
2021-03-10 20:19:24 +00:00
|
|
|
inputs = [ extinst_vendor_grammar ]
|
|
|
|
outputs = [ extinst_file ]
|
2018-07-17 17:53:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
action("spvtools_generators_inc") {
|
|
|
|
script = "utils/generate_registry_tables.py"
|
|
|
|
|
|
|
|
# TODO(dsinclair): Make work for chrome
|
|
|
|
xml_file = "${spirv_headers}/include/spirv/spir-v.xml"
|
|
|
|
inc_file = "${target_gen_dir}/generators.inc"
|
|
|
|
|
2021-03-10 20:19:24 +00:00
|
|
|
sources = [ xml_file ]
|
|
|
|
outputs = [ inc_file ]
|
2018-07-17 17:53:15 +00:00
|
|
|
args = [
|
|
|
|
"--xml",
|
|
|
|
rebase_path(xml_file, root_build_dir),
|
|
|
|
"--generator",
|
|
|
|
rebase_path(inc_file, root_build_dir),
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2018-08-15 19:26:28 +00:00
|
|
|
action("spvtools_build_version") {
|
|
|
|
script = "utils/update_build_version.py"
|
|
|
|
|
2023-03-09 17:24:20 +00:00
|
|
|
changes_file = "CHANGES"
|
2018-08-15 19:26:28 +00:00
|
|
|
inc_file = "${target_gen_dir}/build-version.inc"
|
|
|
|
|
2021-03-10 20:19:24 +00:00
|
|
|
outputs = [ inc_file ]
|
2018-08-15 19:26:28 +00:00
|
|
|
args = [
|
2023-03-09 17:24:20 +00:00
|
|
|
rebase_path(changes_file, root_build_dir),
|
2018-08-15 19:26:28 +00:00
|
|
|
rebase_path(inc_file, root_build_dir),
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2018-07-17 17:53:15 +00:00
|
|
|
spvtools_core_tables("unified1") {
|
|
|
|
version = "unified1"
|
|
|
|
}
|
|
|
|
spvtools_core_enums("unified1") {
|
|
|
|
version = "unified1"
|
|
|
|
}
|
|
|
|
spvtools_glsl_tables("glsl1-0") {
|
|
|
|
version = "1.0"
|
|
|
|
}
|
|
|
|
spvtools_opencl_tables("opencl1-0") {
|
|
|
|
version = "1.0"
|
|
|
|
}
|
2019-12-19 22:16:26 +00:00
|
|
|
spvtools_language_header("debuginfo") {
|
2018-07-17 17:53:15 +00:00
|
|
|
name = "DebugInfo"
|
2021-03-10 20:19:24 +00:00
|
|
|
grammar_file =
|
|
|
|
"${spirv_headers}/include/spirv/unified1/extinst.debuginfo.grammar.json"
|
2019-12-19 22:16:26 +00:00
|
|
|
}
|
|
|
|
spvtools_language_header("cldebuginfo100") {
|
|
|
|
name = "OpenCLDebugInfo100"
|
2020-07-30 16:08:53 +00:00
|
|
|
grammar_file = "${spirv_headers}/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json"
|
2018-07-17 17:53:15 +00:00
|
|
|
}
|
2021-07-12 09:51:08 +00:00
|
|
|
spvtools_language_header("vkdebuginfo100") {
|
2021-09-15 18:38:53 +00:00
|
|
|
name = "NonSemanticShaderDebugInfo100"
|
|
|
|
grammar_file = "${spirv_headers}/include/spirv/unified1/extinst.nonsemantic.shader.debuginfo.100.grammar.json"
|
2021-07-12 09:51:08 +00:00
|
|
|
}
|
2018-07-17 17:53:15 +00:00
|
|
|
|
|
|
|
spvtools_vendor_tables = [
|
2021-03-10 20:19:24 +00:00
|
|
|
[
|
|
|
|
"spv-amd-shader-explicit-vertex-parameter",
|
|
|
|
"...nil...",
|
|
|
|
],
|
|
|
|
[
|
|
|
|
"spv-amd-shader-trinary-minmax",
|
|
|
|
"...nil...",
|
|
|
|
],
|
|
|
|
[
|
|
|
|
"spv-amd-gcn-shader",
|
|
|
|
"...nil...",
|
|
|
|
],
|
|
|
|
[
|
|
|
|
"spv-amd-shader-ballot",
|
|
|
|
"...nil...",
|
|
|
|
],
|
|
|
|
[
|
|
|
|
"debuginfo",
|
|
|
|
"...nil...",
|
|
|
|
],
|
|
|
|
[
|
|
|
|
"opencl.debuginfo.100",
|
|
|
|
"CLDEBUG100_",
|
|
|
|
],
|
|
|
|
[
|
|
|
|
"nonsemantic.clspvreflection",
|
|
|
|
"...nil...",
|
|
|
|
],
|
2021-09-23 14:18:06 +00:00
|
|
|
[
|
|
|
|
"nonsemantic.shader.debuginfo.100",
|
|
|
|
"SHDEBUG100_",
|
|
|
|
],
|
2018-07-17 17:53:15 +00:00
|
|
|
]
|
|
|
|
|
2019-12-19 22:16:26 +00:00
|
|
|
foreach(table_def, spvtools_vendor_tables) {
|
2020-01-08 22:27:38 +00:00
|
|
|
spvtools_vendor_table(table_def[0]) {
|
2019-12-19 22:16:26 +00:00
|
|
|
name = table_def[0]
|
|
|
|
operand_kind_prefix = table_def[1]
|
2018-07-17 17:53:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-09-06 14:50:27 +00:00
|
|
|
config("spvtools_public_config") {
|
|
|
|
include_dirs = [ "include" ]
|
|
|
|
}
|
|
|
|
|
2021-07-25 17:23:16 +00:00
|
|
|
config("spvtools_include_gen_dirs") {
|
|
|
|
include_dirs = [ "$target_gen_dir" ]
|
|
|
|
}
|
|
|
|
|
2018-09-06 14:50:27 +00:00
|
|
|
config("spvtools_internal_config") {
|
2018-07-17 17:53:15 +00:00
|
|
|
include_dirs = [
|
|
|
|
".",
|
|
|
|
"${spirv_headers}/include",
|
|
|
|
]
|
|
|
|
|
2021-07-25 17:23:16 +00:00
|
|
|
configs = [
|
|
|
|
":spvtools_public_config",
|
|
|
|
":spvtools_include_gen_dirs",
|
|
|
|
]
|
2018-09-06 14:50:27 +00:00
|
|
|
|
2021-03-10 20:19:24 +00:00
|
|
|
cflags = []
|
2018-07-17 17:53:15 +00:00
|
|
|
if (is_clang) {
|
2021-03-10 20:19:24 +00:00
|
|
|
cflags += [
|
2019-09-17 19:57:15 +00:00
|
|
|
"-Wno-implicit-fallthrough",
|
|
|
|
"-Wno-newline-eof",
|
2021-08-18 12:53:21 +00:00
|
|
|
"-Wno-unreachable-code-break",
|
|
|
|
"-Wno-unreachable-code-return",
|
2019-09-17 19:57:15 +00:00
|
|
|
]
|
2021-03-10 20:19:24 +00:00
|
|
|
} else if (!is_win) {
|
|
|
|
# Work around a false-positive on a Skia GCC 10 builder.
|
2021-03-11 10:08:33 +00:00
|
|
|
cflags += [ "-Wno-format-truncation" ]
|
2023-01-30 14:02:26 +00:00
|
|
|
} else {
|
|
|
|
# Make MSVC report the correct value for __cplusplus
|
|
|
|
cflags += [ "/Zc:__cplusplus" ]
|
2018-07-17 17:53:15 +00:00
|
|
|
}
|
2023-03-20 18:05:41 +00:00
|
|
|
|
|
|
|
if (!is_win) {
|
|
|
|
cflags += [ "-std=c++17" ]
|
|
|
|
} else {
|
|
|
|
cflags += [ "/std:c++17" ]
|
|
|
|
}
|
2018-07-17 17:53:15 +00:00
|
|
|
}
|
|
|
|
|
2018-09-06 14:50:27 +00:00
|
|
|
source_set("spvtools_headers") {
|
|
|
|
sources = [
|
2019-07-10 20:37:10 +00:00
|
|
|
"include/spirv-tools/instrument.hpp",
|
2018-09-06 14:50:27 +00:00
|
|
|
"include/spirv-tools/libspirv.h",
|
|
|
|
"include/spirv-tools/libspirv.hpp",
|
|
|
|
"include/spirv-tools/linker.hpp",
|
|
|
|
"include/spirv-tools/optimizer.hpp",
|
|
|
|
]
|
|
|
|
|
|
|
|
public_configs = [ ":spvtools_public_config" ]
|
|
|
|
}
|
|
|
|
|
2021-07-25 17:23:16 +00:00
|
|
|
group("spvtools_language_headers") {
|
|
|
|
public_deps = [
|
|
|
|
":spvtools_language_header_cldebuginfo100",
|
|
|
|
":spvtools_language_header_debuginfo",
|
|
|
|
":spvtools_language_header_vkdebuginfo100",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2018-07-17 17:53:15 +00:00
|
|
|
static_library("spvtools") {
|
|
|
|
deps = [
|
|
|
|
":spvtools_core_tables_unified1",
|
|
|
|
":spvtools_generators_inc",
|
|
|
|
":spvtools_glsl_tables_glsl1-0",
|
2019-12-19 22:16:26 +00:00
|
|
|
":spvtools_language_header_cldebuginfo100",
|
2021-03-10 20:19:24 +00:00
|
|
|
":spvtools_language_header_debuginfo",
|
2021-07-15 16:56:13 +00:00
|
|
|
":spvtools_language_header_vkdebuginfo100",
|
2018-07-17 17:53:15 +00:00
|
|
|
":spvtools_opencl_tables_opencl1-0",
|
|
|
|
]
|
2019-12-19 22:16:26 +00:00
|
|
|
foreach(table_def, spvtools_vendor_tables) {
|
|
|
|
target_name = table_def[0]
|
2018-07-17 17:53:15 +00:00
|
|
|
deps += [ ":spvtools_vendor_tables_$target_name" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
sources = [
|
|
|
|
"source/assembly_grammar.cpp",
|
|
|
|
"source/assembly_grammar.h",
|
|
|
|
"source/binary.cpp",
|
|
|
|
"source/binary.h",
|
2019-11-05 02:01:57 +00:00
|
|
|
"source/cfa.h",
|
2021-07-16 20:28:14 +00:00
|
|
|
"source/common_debug_info.h",
|
2018-07-17 17:53:15 +00:00
|
|
|
"source/diagnostic.cpp",
|
|
|
|
"source/diagnostic.h",
|
|
|
|
"source/disassemble.cpp",
|
2019-11-05 02:01:57 +00:00
|
|
|
"source/disassemble.h",
|
2018-07-17 17:53:15 +00:00
|
|
|
"source/enum_set.h",
|
|
|
|
"source/enum_string_mapping.cpp",
|
2019-11-05 02:01:57 +00:00
|
|
|
"source/enum_string_mapping.h",
|
2018-07-17 17:53:15 +00:00
|
|
|
"source/ext_inst.cpp",
|
|
|
|
"source/ext_inst.h",
|
|
|
|
"source/extensions.cpp",
|
|
|
|
"source/extensions.h",
|
|
|
|
"source/instruction.h",
|
2019-11-05 02:01:57 +00:00
|
|
|
"source/latest_version_glsl_std_450_header.h",
|
|
|
|
"source/latest_version_opencl_std_header.h",
|
|
|
|
"source/latest_version_spirv_header.h",
|
2018-07-17 17:53:15 +00:00
|
|
|
"source/libspirv.cpp",
|
|
|
|
"source/macro.h",
|
|
|
|
"source/name_mapper.cpp",
|
|
|
|
"source/name_mapper.h",
|
|
|
|
"source/opcode.cpp",
|
|
|
|
"source/opcode.h",
|
|
|
|
"source/operand.cpp",
|
|
|
|
"source/operand.h",
|
|
|
|
"source/parsed_operand.cpp",
|
|
|
|
"source/parsed_operand.h",
|
|
|
|
"source/print.cpp",
|
|
|
|
"source/print.h",
|
|
|
|
"source/spirv_constant.h",
|
|
|
|
"source/spirv_definition.h",
|
|
|
|
"source/spirv_endian.cpp",
|
|
|
|
"source/spirv_endian.h",
|
2021-07-13 18:45:01 +00:00
|
|
|
"source/spirv_fuzzer_options.cpp",
|
|
|
|
"source/spirv_fuzzer_options.h",
|
2018-09-11 13:34:42 +00:00
|
|
|
"source/spirv_optimizer_options.cpp",
|
|
|
|
"source/spirv_optimizer_options.h",
|
2021-07-13 18:45:01 +00:00
|
|
|
"source/spirv_reducer_options.cpp",
|
|
|
|
"source/spirv_reducer_options.h",
|
2018-07-17 17:53:15 +00:00
|
|
|
"source/spirv_target_env.cpp",
|
|
|
|
"source/spirv_target_env.h",
|
|
|
|
"source/spirv_validator_options.cpp",
|
|
|
|
"source/spirv_validator_options.h",
|
|
|
|
"source/table.cpp",
|
|
|
|
"source/table.h",
|
|
|
|
"source/text.cpp",
|
|
|
|
"source/text.h",
|
|
|
|
"source/text_handler.cpp",
|
|
|
|
"source/text_handler.h",
|
|
|
|
"source/util/bit_vector.cpp",
|
|
|
|
"source/util/bit_vector.h",
|
|
|
|
"source/util/bitutils.h",
|
2022-02-15 18:57:39 +00:00
|
|
|
"source/util/hash_combine.h",
|
2018-07-17 17:53:15 +00:00
|
|
|
"source/util/hex_float.h",
|
|
|
|
"source/util/ilist.h",
|
|
|
|
"source/util/ilist_node.h",
|
2018-08-14 16:44:54 +00:00
|
|
|
"source/util/make_unique.h",
|
2018-07-17 17:53:15 +00:00
|
|
|
"source/util/parse_number.cpp",
|
|
|
|
"source/util/parse_number.h",
|
|
|
|
"source/util/small_vector.h",
|
|
|
|
"source/util/string_utils.cpp",
|
|
|
|
"source/util/string_utils.h",
|
|
|
|
"source/util/timer.cpp",
|
|
|
|
"source/util/timer.h",
|
|
|
|
]
|
|
|
|
|
2018-09-06 14:50:27 +00:00
|
|
|
public_deps = [
|
2019-02-13 15:24:06 +00:00
|
|
|
":spvtools_core_enums_unified1",
|
2018-09-06 14:50:27 +00:00
|
|
|
":spvtools_headers",
|
2020-01-23 18:40:13 +00:00
|
|
|
"${spirv_headers}:spv_headers",
|
2018-09-06 14:50:27 +00:00
|
|
|
]
|
|
|
|
|
2019-07-03 20:26:06 +00:00
|
|
|
if (build_with_chromium) {
|
|
|
|
configs -= [ "//build/config/compiler:chromium_code" ]
|
|
|
|
configs += [ "//build/config/compiler:no_chromium_code" ]
|
|
|
|
}
|
2019-07-10 20:37:10 +00:00
|
|
|
configs += [ ":spvtools_internal_config" ]
|
2018-07-17 17:53:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static_library("spvtools_val") {
|
|
|
|
sources = [
|
|
|
|
"source/val/basic_block.cpp",
|
2019-11-05 02:01:57 +00:00
|
|
|
"source/val/basic_block.h",
|
2018-07-17 17:53:15 +00:00
|
|
|
"source/val/construct.cpp",
|
2019-11-05 02:01:57 +00:00
|
|
|
"source/val/construct.h",
|
|
|
|
"source/val/decoration.h",
|
2018-07-17 17:53:15 +00:00
|
|
|
"source/val/function.cpp",
|
2019-11-05 02:01:57 +00:00
|
|
|
"source/val/function.h",
|
2018-07-17 17:53:15 +00:00
|
|
|
"source/val/instruction.cpp",
|
|
|
|
"source/val/validate.cpp",
|
|
|
|
"source/val/validate.h",
|
|
|
|
"source/val/validate_adjacency.cpp",
|
2018-08-08 18:21:27 +00:00
|
|
|
"source/val/validate_annotation.cpp",
|
2018-07-17 17:53:15 +00:00
|
|
|
"source/val/validate_arithmetics.cpp",
|
|
|
|
"source/val/validate_atomics.cpp",
|
|
|
|
"source/val/validate_barriers.cpp",
|
|
|
|
"source/val/validate_bitwise.cpp",
|
|
|
|
"source/val/validate_builtins.cpp",
|
|
|
|
"source/val/validate_capability.cpp",
|
|
|
|
"source/val/validate_cfg.cpp",
|
|
|
|
"source/val/validate_composites.cpp",
|
2018-08-17 15:20:55 +00:00
|
|
|
"source/val/validate_constants.cpp",
|
2018-07-17 17:53:15 +00:00
|
|
|
"source/val/validate_conversion.cpp",
|
2018-08-08 17:47:09 +00:00
|
|
|
"source/val/validate_debug.cpp",
|
2018-07-17 17:53:15 +00:00
|
|
|
"source/val/validate_decorations.cpp",
|
|
|
|
"source/val/validate_derivatives.cpp",
|
2018-08-10 13:53:17 +00:00
|
|
|
"source/val/validate_execution_limitations.cpp",
|
2018-11-28 14:17:13 +00:00
|
|
|
"source/val/validate_extensions.cpp",
|
2018-08-10 13:53:17 +00:00
|
|
|
"source/val/validate_function.cpp",
|
2018-07-17 17:53:15 +00:00
|
|
|
"source/val/validate_id.cpp",
|
|
|
|
"source/val/validate_image.cpp",
|
|
|
|
"source/val/validate_instruction.cpp",
|
|
|
|
"source/val/validate_interfaces.cpp",
|
|
|
|
"source/val/validate_layout.cpp",
|
|
|
|
"source/val/validate_literals.cpp",
|
|
|
|
"source/val/validate_logicals.cpp",
|
2018-08-01 18:44:56 +00:00
|
|
|
"source/val/validate_memory.cpp",
|
2018-12-06 19:38:15 +00:00
|
|
|
"source/val/validate_memory_semantics.cpp",
|
2019-11-05 02:01:57 +00:00
|
|
|
"source/val/validate_memory_semantics.h",
|
2022-09-27 14:36:08 +00:00
|
|
|
"source/val/validate_mesh_shading.cpp",
|
2019-06-03 14:55:07 +00:00
|
|
|
"source/val/validate_misc.cpp",
|
2018-08-08 18:49:59 +00:00
|
|
|
"source/val/validate_mode_setting.cpp",
|
2018-07-17 17:53:15 +00:00
|
|
|
"source/val/validate_non_uniform.cpp",
|
|
|
|
"source/val/validate_primitives.cpp",
|
2022-07-20 14:12:58 +00:00
|
|
|
"source/val/validate_ray_query.cpp",
|
2022-08-08 18:45:04 +00:00
|
|
|
"source/val/validate_ray_tracing.cpp",
|
2022-11-28 18:24:44 +00:00
|
|
|
"source/val/validate_ray_tracing_reorder.cpp",
|
2018-11-29 18:48:42 +00:00
|
|
|
"source/val/validate_scopes.cpp",
|
2019-11-05 02:01:57 +00:00
|
|
|
"source/val/validate_scopes.h",
|
2019-07-11 17:05:14 +00:00
|
|
|
"source/val/validate_small_type_uses.cpp",
|
2018-08-03 15:38:51 +00:00
|
|
|
"source/val/validate_type.cpp",
|
2018-07-17 17:53:15 +00:00
|
|
|
"source/val/validation_state.cpp",
|
2019-11-05 02:01:57 +00:00
|
|
|
"source/val/validation_state.h",
|
2018-07-17 17:53:15 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
":spvtools",
|
2020-01-24 22:14:16 +00:00
|
|
|
":spvtools_language_header_cldebuginfo100",
|
|
|
|
":spvtools_language_header_debuginfo",
|
2021-07-15 16:56:13 +00:00
|
|
|
":spvtools_language_header_vkdebuginfo100",
|
2018-07-17 17:53:15 +00:00
|
|
|
]
|
2021-03-10 20:19:24 +00:00
|
|
|
public_deps = [ ":spvtools_headers" ]
|
2018-07-17 17:53:15 +00:00
|
|
|
|
2019-07-03 20:26:06 +00:00
|
|
|
if (build_with_chromium) {
|
|
|
|
configs -= [ "//build/config/compiler:chromium_code" ]
|
|
|
|
configs += [ "//build/config/compiler:no_chromium_code" ]
|
|
|
|
}
|
2019-07-10 20:37:10 +00:00
|
|
|
configs += [ ":spvtools_internal_config" ]
|
2018-07-17 17:53:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static_library("spvtools_opt") {
|
|
|
|
sources = [
|
|
|
|
"source/opt/aggressive_dead_code_elim_pass.cpp",
|
|
|
|
"source/opt/aggressive_dead_code_elim_pass.h",
|
2019-08-29 16:48:17 +00:00
|
|
|
"source/opt/amd_ext_to_khr.cpp",
|
|
|
|
"source/opt/amd_ext_to_khr.h",
|
2022-11-02 17:23:25 +00:00
|
|
|
"source/opt/analyze_live_input_pass.cpp",
|
|
|
|
"source/opt/analyze_live_input_pass.h",
|
2018-07-17 17:53:15 +00:00
|
|
|
"source/opt/basic_block.cpp",
|
|
|
|
"source/opt/basic_block.h",
|
|
|
|
"source/opt/block_merge_pass.cpp",
|
|
|
|
"source/opt/block_merge_pass.h",
|
2019-01-29 02:42:35 +00:00
|
|
|
"source/opt/block_merge_util.cpp",
|
|
|
|
"source/opt/block_merge_util.h",
|
2018-07-17 17:53:15 +00:00
|
|
|
"source/opt/build_module.cpp",
|
|
|
|
"source/opt/build_module.h",
|
|
|
|
"source/opt/ccp_pass.cpp",
|
|
|
|
"source/opt/ccp_pass.h",
|
|
|
|
"source/opt/cfg.cpp",
|
|
|
|
"source/opt/cfg.h",
|
|
|
|
"source/opt/cfg_cleanup_pass.cpp",
|
|
|
|
"source/opt/cfg_cleanup_pass.h",
|
2019-01-17 20:56:36 +00:00
|
|
|
"source/opt/code_sink.cpp",
|
|
|
|
"source/opt/code_sink.h",
|
2018-08-02 18:36:43 +00:00
|
|
|
"source/opt/combine_access_chains.cpp",
|
|
|
|
"source/opt/combine_access_chains.h",
|
2018-07-17 17:53:15 +00:00
|
|
|
"source/opt/compact_ids_pass.cpp",
|
|
|
|
"source/opt/compact_ids_pass.h",
|
|
|
|
"source/opt/composite.cpp",
|
|
|
|
"source/opt/composite.h",
|
|
|
|
"source/opt/const_folding_rules.cpp",
|
|
|
|
"source/opt/const_folding_rules.h",
|
|
|
|
"source/opt/constants.cpp",
|
|
|
|
"source/opt/constants.h",
|
2021-07-28 16:44:32 +00:00
|
|
|
"source/opt/control_dependence.cpp",
|
|
|
|
"source/opt/control_dependence.h",
|
2019-09-03 17:22:13 +00:00
|
|
|
"source/opt/convert_to_half_pass.cpp",
|
|
|
|
"source/opt/convert_to_half_pass.h",
|
2021-09-23 14:18:06 +00:00
|
|
|
"source/opt/convert_to_sampled_image_pass.cpp",
|
|
|
|
"source/opt/convert_to_sampled_image_pass.h",
|
2018-07-17 17:53:15 +00:00
|
|
|
"source/opt/copy_prop_arrays.cpp",
|
|
|
|
"source/opt/copy_prop_arrays.h",
|
2021-08-09 20:43:36 +00:00
|
|
|
"source/opt/dataflow.cpp",
|
2021-09-23 14:18:06 +00:00
|
|
|
"source/opt/dataflow.h",
|
2018-07-17 17:53:15 +00:00
|
|
|
"source/opt/dead_branch_elim_pass.cpp",
|
|
|
|
"source/opt/dead_branch_elim_pass.h",
|
|
|
|
"source/opt/dead_insert_elim_pass.cpp",
|
|
|
|
"source/opt/dead_insert_elim_pass.h",
|
|
|
|
"source/opt/dead_variable_elimination.cpp",
|
|
|
|
"source/opt/dead_variable_elimination.h",
|
2020-04-27 19:18:55 +00:00
|
|
|
"source/opt/debug_info_manager.cpp",
|
|
|
|
"source/opt/debug_info_manager.h",
|
2021-03-10 20:19:24 +00:00
|
|
|
"source/opt/decoration_manager.cpp",
|
|
|
|
"source/opt/decoration_manager.h",
|
2018-07-17 17:53:15 +00:00
|
|
|
"source/opt/def_use_manager.cpp",
|
|
|
|
"source/opt/def_use_manager.h",
|
2019-08-08 14:53:19 +00:00
|
|
|
"source/opt/desc_sroa.cpp",
|
|
|
|
"source/opt/desc_sroa.h",
|
2021-10-26 21:20:58 +00:00
|
|
|
"source/opt/desc_sroa_util.cpp",
|
|
|
|
"source/opt/desc_sroa_util.h",
|
2018-07-17 17:53:15 +00:00
|
|
|
"source/opt/dominator_analysis.cpp",
|
|
|
|
"source/opt/dominator_analysis.h",
|
|
|
|
"source/opt/dominator_tree.cpp",
|
|
|
|
"source/opt/dominator_tree.h",
|
|
|
|
"source/opt/eliminate_dead_constant_pass.cpp",
|
|
|
|
"source/opt/eliminate_dead_constant_pass.h",
|
|
|
|
"source/opt/eliminate_dead_functions_pass.cpp",
|
|
|
|
"source/opt/eliminate_dead_functions_pass.h",
|
2019-02-08 16:20:29 +00:00
|
|
|
"source/opt/eliminate_dead_functions_util.cpp",
|
|
|
|
"source/opt/eliminate_dead_functions_util.h",
|
2022-11-25 23:48:13 +00:00
|
|
|
"source/opt/eliminate_dead_io_components_pass.cpp",
|
|
|
|
"source/opt/eliminate_dead_io_components_pass.h",
|
2019-02-14 18:42:35 +00:00
|
|
|
"source/opt/eliminate_dead_members_pass.cpp",
|
|
|
|
"source/opt/eliminate_dead_members_pass.h",
|
2022-11-02 17:23:25 +00:00
|
|
|
"source/opt/eliminate_dead_output_stores_pass.cpp",
|
|
|
|
"source/opt/eliminate_dead_output_stores_pass.h",
|
2020-10-30 22:03:56 +00:00
|
|
|
"source/opt/empty_pass.h",
|
2018-07-17 17:53:15 +00:00
|
|
|
"source/opt/feature_manager.cpp",
|
|
|
|
"source/opt/feature_manager.h",
|
2022-05-06 14:39:26 +00:00
|
|
|
"source/opt/fix_func_call_arguments.cpp",
|
|
|
|
"source/opt/fix_func_call_arguments.h",
|
2019-04-05 17:12:08 +00:00
|
|
|
"source/opt/fix_storage_class.cpp",
|
|
|
|
"source/opt/fix_storage_class.h",
|
2018-07-17 17:53:15 +00:00
|
|
|
"source/opt/flatten_decoration_pass.cpp",
|
|
|
|
"source/opt/flatten_decoration_pass.h",
|
|
|
|
"source/opt/fold.cpp",
|
|
|
|
"source/opt/fold.h",
|
|
|
|
"source/opt/fold_spec_constant_op_and_composite_pass.cpp",
|
|
|
|
"source/opt/fold_spec_constant_op_and_composite_pass.h",
|
|
|
|
"source/opt/folding_rules.cpp",
|
|
|
|
"source/opt/folding_rules.h",
|
|
|
|
"source/opt/freeze_spec_constant_value_pass.cpp",
|
|
|
|
"source/opt/freeze_spec_constant_value_pass.h",
|
|
|
|
"source/opt/function.cpp",
|
|
|
|
"source/opt/function.h",
|
2019-07-30 23:52:46 +00:00
|
|
|
"source/opt/graphics_robust_access_pass.cpp",
|
|
|
|
"source/opt/graphics_robust_access_pass.h",
|
2018-07-17 17:53:15 +00:00
|
|
|
"source/opt/if_conversion.cpp",
|
|
|
|
"source/opt/if_conversion.h",
|
|
|
|
"source/opt/inline_exhaustive_pass.cpp",
|
|
|
|
"source/opt/inline_exhaustive_pass.h",
|
|
|
|
"source/opt/inline_opaque_pass.cpp",
|
|
|
|
"source/opt/inline_opaque_pass.h",
|
|
|
|
"source/opt/inline_pass.cpp",
|
|
|
|
"source/opt/inline_pass.h",
|
2018-11-08 18:54:54 +00:00
|
|
|
"source/opt/inst_bindless_check_pass.cpp",
|
|
|
|
"source/opt/inst_bindless_check_pass.h",
|
2019-08-16 13:18:34 +00:00
|
|
|
"source/opt/inst_buff_addr_check_pass.cpp",
|
|
|
|
"source/opt/inst_buff_addr_check_pass.h",
|
2020-03-12 13:19:52 +00:00
|
|
|
"source/opt/inst_debug_printf_pass.cpp",
|
|
|
|
"source/opt/inst_debug_printf_pass.h",
|
2018-07-17 17:53:15 +00:00
|
|
|
"source/opt/instruction.cpp",
|
|
|
|
"source/opt/instruction.h",
|
|
|
|
"source/opt/instruction_list.cpp",
|
|
|
|
"source/opt/instruction_list.h",
|
2018-11-08 18:54:54 +00:00
|
|
|
"source/opt/instrument_pass.cpp",
|
|
|
|
"source/opt/instrument_pass.h",
|
2022-05-09 18:04:52 +00:00
|
|
|
"source/opt/interface_var_sroa.cpp",
|
|
|
|
"source/opt/interface_var_sroa.h",
|
2021-03-31 18:26:36 +00:00
|
|
|
"source/opt/interp_fixup_pass.cpp",
|
|
|
|
"source/opt/interp_fixup_pass.h",
|
2018-07-17 17:53:15 +00:00
|
|
|
"source/opt/ir_builder.h",
|
|
|
|
"source/opt/ir_context.cpp",
|
|
|
|
"source/opt/ir_context.h",
|
|
|
|
"source/opt/ir_loader.cpp",
|
|
|
|
"source/opt/ir_loader.h",
|
|
|
|
"source/opt/iterator.h",
|
|
|
|
"source/opt/licm_pass.cpp",
|
|
|
|
"source/opt/licm_pass.h",
|
2022-11-02 17:23:25 +00:00
|
|
|
"source/opt/liveness.cpp",
|
|
|
|
"source/opt/liveness.h",
|
2018-07-17 17:53:15 +00:00
|
|
|
"source/opt/local_access_chain_convert_pass.cpp",
|
|
|
|
"source/opt/local_access_chain_convert_pass.h",
|
|
|
|
"source/opt/local_redundancy_elimination.cpp",
|
|
|
|
"source/opt/local_redundancy_elimination.h",
|
|
|
|
"source/opt/local_single_block_elim_pass.cpp",
|
|
|
|
"source/opt/local_single_block_elim_pass.h",
|
|
|
|
"source/opt/local_single_store_elim_pass.cpp",
|
|
|
|
"source/opt/local_single_store_elim_pass.h",
|
|
|
|
"source/opt/log.h",
|
|
|
|
"source/opt/loop_dependence.cpp",
|
|
|
|
"source/opt/loop_dependence.h",
|
|
|
|
"source/opt/loop_dependence_helpers.cpp",
|
|
|
|
"source/opt/loop_descriptor.cpp",
|
|
|
|
"source/opt/loop_descriptor.h",
|
|
|
|
"source/opt/loop_fission.cpp",
|
|
|
|
"source/opt/loop_fission.h",
|
|
|
|
"source/opt/loop_fusion.cpp",
|
|
|
|
"source/opt/loop_fusion.h",
|
|
|
|
"source/opt/loop_fusion_pass.cpp",
|
|
|
|
"source/opt/loop_fusion_pass.h",
|
|
|
|
"source/opt/loop_peeling.cpp",
|
|
|
|
"source/opt/loop_peeling.h",
|
|
|
|
"source/opt/loop_unroller.cpp",
|
|
|
|
"source/opt/loop_unroller.h",
|
|
|
|
"source/opt/loop_unswitch_pass.cpp",
|
|
|
|
"source/opt/loop_unswitch_pass.h",
|
|
|
|
"source/opt/loop_utils.cpp",
|
|
|
|
"source/opt/loop_utils.h",
|
|
|
|
"source/opt/mem_pass.cpp",
|
|
|
|
"source/opt/mem_pass.h",
|
|
|
|
"source/opt/merge_return_pass.cpp",
|
|
|
|
"source/opt/merge_return_pass.h",
|
|
|
|
"source/opt/module.cpp",
|
|
|
|
"source/opt/module.h",
|
|
|
|
"source/opt/null_pass.h",
|
|
|
|
"source/opt/optimizer.cpp",
|
|
|
|
"source/opt/pass.cpp",
|
|
|
|
"source/opt/pass.h",
|
|
|
|
"source/opt/pass_manager.cpp",
|
|
|
|
"source/opt/pass_manager.h",
|
|
|
|
"source/opt/passes.h",
|
|
|
|
"source/opt/private_to_local_pass.cpp",
|
|
|
|
"source/opt/private_to_local_pass.h",
|
|
|
|
"source/opt/propagator.cpp",
|
|
|
|
"source/opt/propagator.h",
|
|
|
|
"source/opt/reduce_load_size.cpp",
|
|
|
|
"source/opt/reduce_load_size.h",
|
|
|
|
"source/opt/redundancy_elimination.cpp",
|
|
|
|
"source/opt/redundancy_elimination.h",
|
|
|
|
"source/opt/reflect.h",
|
|
|
|
"source/opt/register_pressure.cpp",
|
|
|
|
"source/opt/register_pressure.h",
|
2019-09-03 17:22:13 +00:00
|
|
|
"source/opt/relax_float_ops_pass.cpp",
|
|
|
|
"source/opt/relax_float_ops_pass.h",
|
2022-03-07 17:45:17 +00:00
|
|
|
"source/opt/remove_dontinline_pass.cpp",
|
|
|
|
"source/opt/remove_dontinline_pass.h",
|
2018-07-17 17:53:15 +00:00
|
|
|
"source/opt/remove_duplicates_pass.cpp",
|
|
|
|
"source/opt/remove_duplicates_pass.h",
|
2021-07-02 14:18:19 +00:00
|
|
|
"source/opt/remove_unused_interface_variables_pass.cpp",
|
|
|
|
"source/opt/remove_unused_interface_variables_pass.h",
|
2021-10-26 21:20:58 +00:00
|
|
|
"source/opt/replace_desc_array_access_using_var_index.cpp",
|
|
|
|
"source/opt/replace_desc_array_access_using_var_index.h",
|
2018-07-17 17:53:15 +00:00
|
|
|
"source/opt/replace_invalid_opc.cpp",
|
|
|
|
"source/opt/replace_invalid_opc.h",
|
|
|
|
"source/opt/scalar_analysis.cpp",
|
|
|
|
"source/opt/scalar_analysis.h",
|
|
|
|
"source/opt/scalar_analysis_nodes.h",
|
|
|
|
"source/opt/scalar_analysis_simplification.cpp",
|
|
|
|
"source/opt/scalar_replacement_pass.cpp",
|
|
|
|
"source/opt/scalar_replacement_pass.h",
|
|
|
|
"source/opt/set_spec_constant_default_value_pass.cpp",
|
|
|
|
"source/opt/set_spec_constant_default_value_pass.h",
|
|
|
|
"source/opt/simplification_pass.cpp",
|
|
|
|
"source/opt/simplification_pass.h",
|
spirv-opt: add pass to Spread Volatile semantics (#4667)
Add a pass to spread Volatile semantics to variables with SMIDNV,
WarpIDNV, SubgroupSize, SubgroupLocalInvocationId, SubgroupEqMask,
SubgroupGeMask, SubgroupGtMask, SubgroupLeMask, or SubgroupLtMask BuiltIn
decorations or OpLoad for them when the shader model is the ray
generation, closest hit, miss, intersection, or callable shaders. This
pass can be used for VUID-StandaloneSpirv-VulkanMemoryModel-04678 and
VUID-StandaloneSpirv-VulkanMemoryModel-04679 (See "Standalone SPIR-V
Validation" section of Vulkan spec "Appendix A: Vulkan Environment for
SPIR-V").
Handle variables used by multiple entry points:
1. Update error check to make it working regardless of the order of
entry points.
2. For a variable, if it is used by two entry points E1 and E2 and
it needs the Volatile semantics for E1 while it does not for E2
- If VulkanMemoryModel capability is enabled, which means we have to
set memory operation of load instructions for the variable, we
update load instructions in E1, but do not update the ones in E2.
- If VulkanMemoryModel capability is disabled, which means we have
to add Volatile decoration for the variable, we report an error
because E1 needs to add Volatile decoration for the variable while
E2 does not.
For the simplicity of the implementation, we assume that all functions
other than entry point functions are inlined.
2022-01-25 18:14:36 +00:00
|
|
|
"source/opt/spread_volatile_semantics.cpp",
|
|
|
|
"source/opt/spread_volatile_semantics.h",
|
2018-07-17 17:53:15 +00:00
|
|
|
"source/opt/ssa_rewrite_pass.cpp",
|
|
|
|
"source/opt/ssa_rewrite_pass.h",
|
|
|
|
"source/opt/strength_reduction_pass.cpp",
|
|
|
|
"source/opt/strength_reduction_pass.h",
|
|
|
|
"source/opt/strip_debug_info_pass.cpp",
|
|
|
|
"source/opt/strip_debug_info_pass.h",
|
2021-12-15 14:55:30 +00:00
|
|
|
"source/opt/strip_nonsemantic_info_pass.cpp",
|
|
|
|
"source/opt/strip_nonsemantic_info_pass.h",
|
2018-09-17 17:00:24 +00:00
|
|
|
"source/opt/struct_cfg_analysis.cpp",
|
|
|
|
"source/opt/struct_cfg_analysis.h",
|
2018-07-17 17:53:15 +00:00
|
|
|
"source/opt/tree_iterator.h",
|
2023-07-27 15:21:23 +00:00
|
|
|
"source/opt/trim_capabilities_pass.cpp",
|
|
|
|
"source/opt/trim_capabilities_pass.h",
|
2018-07-17 17:53:15 +00:00
|
|
|
"source/opt/type_manager.cpp",
|
|
|
|
"source/opt/type_manager.h",
|
|
|
|
"source/opt/types.cpp",
|
|
|
|
"source/opt/types.h",
|
|
|
|
"source/opt/unify_const_pass.cpp",
|
|
|
|
"source/opt/unify_const_pass.h",
|
2018-12-03 14:11:56 +00:00
|
|
|
"source/opt/upgrade_memory_model.cpp",
|
|
|
|
"source/opt/upgrade_memory_model.h",
|
2018-07-17 17:53:15 +00:00
|
|
|
"source/opt/value_number_table.cpp",
|
|
|
|
"source/opt/value_number_table.h",
|
|
|
|
"source/opt/vector_dce.cpp",
|
|
|
|
"source/opt/vector_dce.h",
|
|
|
|
"source/opt/workaround1209.cpp",
|
|
|
|
"source/opt/workaround1209.h",
|
2019-08-14 13:27:12 +00:00
|
|
|
"source/opt/wrap_opkill.cpp",
|
|
|
|
"source/opt/wrap_opkill.h",
|
2018-07-17 17:53:15 +00:00
|
|
|
]
|
2018-09-06 14:50:27 +00:00
|
|
|
|
2018-07-17 17:53:15 +00:00
|
|
|
deps = [
|
|
|
|
":spvtools",
|
2020-01-24 22:14:16 +00:00
|
|
|
":spvtools_language_header_debuginfo",
|
2019-08-30 13:09:34 +00:00
|
|
|
":spvtools_vendor_tables_spv-amd-shader-ballot",
|
2018-07-17 17:53:15 +00:00
|
|
|
]
|
2021-07-26 18:27:25 +00:00
|
|
|
public_deps = [
|
|
|
|
":spvtools_headers",
|
|
|
|
":spvtools_language_header_cldebuginfo100",
|
|
|
|
":spvtools_language_header_vkdebuginfo100",
|
|
|
|
]
|
2018-07-17 17:53:15 +00:00
|
|
|
|
2019-07-03 20:26:06 +00:00
|
|
|
if (build_with_chromium) {
|
|
|
|
configs -= [ "//build/config/compiler:chromium_code" ]
|
|
|
|
configs += [ "//build/config/compiler:no_chromium_code" ]
|
|
|
|
}
|
2019-07-10 20:37:10 +00:00
|
|
|
configs += [ ":spvtools_internal_config" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
static_library("spvtools_link") {
|
2021-03-10 20:19:24 +00:00
|
|
|
sources = [ "source/link/linker.cpp" ]
|
2019-07-10 20:37:10 +00:00
|
|
|
deps = [
|
|
|
|
":spvtools",
|
2019-07-12 14:35:59 +00:00
|
|
|
":spvtools_opt",
|
2019-07-10 20:37:10 +00:00
|
|
|
":spvtools_val",
|
|
|
|
]
|
2021-03-10 20:19:24 +00:00
|
|
|
public_deps = [ ":spvtools_headers" ]
|
2019-07-10 20:37:10 +00:00
|
|
|
if (build_with_chromium) {
|
|
|
|
configs -= [ "//build/config/compiler:chromium_code" ]
|
|
|
|
configs += [ "//build/config/compiler:no_chromium_code" ]
|
|
|
|
}
|
|
|
|
configs += [ ":spvtools_internal_config" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
static_library("spvtools_reduce") {
|
|
|
|
sources = [
|
|
|
|
"source/reduce/change_operand_reduction_opportunity.cpp",
|
|
|
|
"source/reduce/change_operand_reduction_opportunity.h",
|
|
|
|
"source/reduce/change_operand_to_undef_reduction_opportunity.cpp",
|
|
|
|
"source/reduce/change_operand_to_undef_reduction_opportunity.h",
|
|
|
|
"source/reduce/conditional_branch_to_simple_conditional_branch_opportunity_finder.cpp",
|
|
|
|
"source/reduce/conditional_branch_to_simple_conditional_branch_opportunity_finder.h",
|
|
|
|
"source/reduce/conditional_branch_to_simple_conditional_branch_reduction_opportunity.cpp",
|
|
|
|
"source/reduce/conditional_branch_to_simple_conditional_branch_reduction_opportunity.h",
|
|
|
|
"source/reduce/merge_blocks_reduction_opportunity.cpp",
|
|
|
|
"source/reduce/merge_blocks_reduction_opportunity.h",
|
|
|
|
"source/reduce/merge_blocks_reduction_opportunity_finder.cpp",
|
|
|
|
"source/reduce/merge_blocks_reduction_opportunity_finder.h",
|
|
|
|
"source/reduce/operand_to_const_reduction_opportunity_finder.cpp",
|
|
|
|
"source/reduce/operand_to_const_reduction_opportunity_finder.h",
|
|
|
|
"source/reduce/operand_to_dominating_id_reduction_opportunity_finder.cpp",
|
|
|
|
"source/reduce/operand_to_dominating_id_reduction_opportunity_finder.h",
|
|
|
|
"source/reduce/operand_to_undef_reduction_opportunity_finder.cpp",
|
|
|
|
"source/reduce/operand_to_undef_reduction_opportunity_finder.h",
|
|
|
|
"source/reduce/reducer.cpp",
|
|
|
|
"source/reduce/reducer.h",
|
|
|
|
"source/reduce/reduction_opportunity.cpp",
|
|
|
|
"source/reduce/reduction_opportunity.h",
|
2020-09-11 21:20:58 +00:00
|
|
|
"source/reduce/reduction_opportunity_finder.cpp",
|
2019-11-05 02:01:57 +00:00
|
|
|
"source/reduce/reduction_opportunity_finder.h",
|
2019-07-10 20:37:10 +00:00
|
|
|
"source/reduce/reduction_pass.cpp",
|
|
|
|
"source/reduce/reduction_pass.h",
|
|
|
|
"source/reduce/reduction_util.cpp",
|
|
|
|
"source/reduce/reduction_util.h",
|
|
|
|
"source/reduce/remove_block_reduction_opportunity.cpp",
|
|
|
|
"source/reduce/remove_block_reduction_opportunity.h",
|
|
|
|
"source/reduce/remove_block_reduction_opportunity_finder.cpp",
|
|
|
|
"source/reduce/remove_block_reduction_opportunity_finder.h",
|
|
|
|
"source/reduce/remove_function_reduction_opportunity.cpp",
|
|
|
|
"source/reduce/remove_function_reduction_opportunity.h",
|
|
|
|
"source/reduce/remove_function_reduction_opportunity_finder.cpp",
|
|
|
|
"source/reduce/remove_function_reduction_opportunity_finder.h",
|
|
|
|
"source/reduce/remove_instruction_reduction_opportunity.cpp",
|
|
|
|
"source/reduce/remove_instruction_reduction_opportunity.h",
|
|
|
|
"source/reduce/remove_selection_reduction_opportunity.cpp",
|
|
|
|
"source/reduce/remove_selection_reduction_opportunity.h",
|
|
|
|
"source/reduce/remove_selection_reduction_opportunity_finder.cpp",
|
|
|
|
"source/reduce/remove_selection_reduction_opportunity_finder.h",
|
2020-05-19 19:17:58 +00:00
|
|
|
"source/reduce/remove_struct_member_reduction_opportunity.cpp",
|
|
|
|
"source/reduce/remove_struct_member_reduction_opportunity.h",
|
|
|
|
"source/reduce/remove_unused_instruction_reduction_opportunity_finder.cpp",
|
|
|
|
"source/reduce/remove_unused_instruction_reduction_opportunity_finder.h",
|
|
|
|
"source/reduce/remove_unused_struct_member_reduction_opportunity_finder.cpp",
|
|
|
|
"source/reduce/remove_unused_struct_member_reduction_opportunity_finder.h",
|
2019-07-10 20:37:10 +00:00
|
|
|
"source/reduce/simple_conditional_branch_to_branch_opportunity_finder.cpp",
|
|
|
|
"source/reduce/simple_conditional_branch_to_branch_opportunity_finder.h",
|
|
|
|
"source/reduce/simple_conditional_branch_to_branch_reduction_opportunity.cpp",
|
|
|
|
"source/reduce/simple_conditional_branch_to_branch_reduction_opportunity.h",
|
2021-07-06 06:14:36 +00:00
|
|
|
"source/reduce/structured_construct_to_block_reduction_opportunity.cpp",
|
|
|
|
"source/reduce/structured_construct_to_block_reduction_opportunity.h",
|
|
|
|
"source/reduce/structured_construct_to_block_reduction_opportunity_finder.cpp",
|
|
|
|
"source/reduce/structured_construct_to_block_reduction_opportunity_finder.h",
|
2019-07-10 20:37:10 +00:00
|
|
|
"source/reduce/structured_loop_to_selection_reduction_opportunity.cpp",
|
|
|
|
"source/reduce/structured_loop_to_selection_reduction_opportunity.h",
|
|
|
|
"source/reduce/structured_loop_to_selection_reduction_opportunity_finder.cpp",
|
|
|
|
"source/reduce/structured_loop_to_selection_reduction_opportunity_finder.h",
|
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":spvtools",
|
|
|
|
":spvtools_opt",
|
|
|
|
]
|
2021-03-10 20:19:24 +00:00
|
|
|
public_deps = [ ":spvtools_headers" ]
|
2019-07-10 20:37:10 +00:00
|
|
|
if (build_with_chromium) {
|
|
|
|
configs -= [ "//build/config/compiler:chromium_code" ]
|
|
|
|
configs += [ "//build/config/compiler:no_chromium_code" ]
|
|
|
|
}
|
|
|
|
configs += [ ":spvtools_internal_config" ]
|
2018-07-17 17:53:15 +00:00
|
|
|
}
|
|
|
|
|
2022-03-23 13:19:12 +00:00
|
|
|
if (build_with_chromium && spvtools_build_executables) {
|
2021-07-14 09:04:50 +00:00
|
|
|
# The spirv-fuzz library is only built when in a Chromium checkout
|
|
|
|
# due to its dependency on protobuf.
|
|
|
|
|
|
|
|
proto_library("spvtools_fuzz_proto") {
|
2021-07-15 16:56:13 +00:00
|
|
|
sources = [ "source/fuzz/protobufs/spvtoolsfuzz.proto" ]
|
2021-07-14 09:04:50 +00:00
|
|
|
generate_python = false
|
|
|
|
use_protobuf_full = true
|
|
|
|
}
|
|
|
|
|
|
|
|
static_library("spvtools_fuzz") {
|
|
|
|
sources = [
|
|
|
|
"source/fuzz/added_function_reducer.cpp",
|
|
|
|
"source/fuzz/added_function_reducer.h",
|
|
|
|
"source/fuzz/available_instructions.cpp",
|
|
|
|
"source/fuzz/available_instructions.h",
|
|
|
|
"source/fuzz/call_graph.cpp",
|
|
|
|
"source/fuzz/call_graph.h",
|
|
|
|
"source/fuzz/comparator_deep_blocks_first.h",
|
|
|
|
"source/fuzz/counter_overflow_id_source.cpp",
|
|
|
|
"source/fuzz/counter_overflow_id_source.h",
|
|
|
|
"source/fuzz/data_descriptor.cpp",
|
|
|
|
"source/fuzz/data_descriptor.h",
|
|
|
|
"source/fuzz/equivalence_relation.h",
|
|
|
|
"source/fuzz/fact_manager/constant_uniform_facts.cpp",
|
|
|
|
"source/fuzz/fact_manager/constant_uniform_facts.h",
|
|
|
|
"source/fuzz/fact_manager/data_synonym_and_id_equation_facts.cpp",
|
|
|
|
"source/fuzz/fact_manager/data_synonym_and_id_equation_facts.h",
|
|
|
|
"source/fuzz/fact_manager/dead_block_facts.cpp",
|
|
|
|
"source/fuzz/fact_manager/dead_block_facts.h",
|
|
|
|
"source/fuzz/fact_manager/fact_manager.cpp",
|
|
|
|
"source/fuzz/fact_manager/fact_manager.h",
|
|
|
|
"source/fuzz/fact_manager/irrelevant_value_facts.cpp",
|
|
|
|
"source/fuzz/fact_manager/irrelevant_value_facts.h",
|
|
|
|
"source/fuzz/fact_manager/livesafe_function_facts.cpp",
|
|
|
|
"source/fuzz/fact_manager/livesafe_function_facts.h",
|
|
|
|
"source/fuzz/force_render_red.cpp",
|
|
|
|
"source/fuzz/force_render_red.h",
|
|
|
|
"source/fuzz/fuzzer.cpp",
|
|
|
|
"source/fuzz/fuzzer.h",
|
|
|
|
"source/fuzz/fuzzer_context.cpp",
|
|
|
|
"source/fuzz/fuzzer_context.h",
|
|
|
|
"source/fuzz/fuzzer_pass.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass.h",
|
|
|
|
"source/fuzz/fuzzer_pass_add_access_chains.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_add_access_chains.h",
|
|
|
|
"source/fuzz/fuzzer_pass_add_bit_instruction_synonyms.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_add_bit_instruction_synonyms.h",
|
|
|
|
"source/fuzz/fuzzer_pass_add_composite_extract.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_add_composite_extract.h",
|
|
|
|
"source/fuzz/fuzzer_pass_add_composite_inserts.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_add_composite_inserts.h",
|
|
|
|
"source/fuzz/fuzzer_pass_add_composite_types.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_add_composite_types.h",
|
|
|
|
"source/fuzz/fuzzer_pass_add_copy_memory.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_add_copy_memory.h",
|
|
|
|
"source/fuzz/fuzzer_pass_add_dead_blocks.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_add_dead_blocks.h",
|
|
|
|
"source/fuzz/fuzzer_pass_add_dead_breaks.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_add_dead_breaks.h",
|
|
|
|
"source/fuzz/fuzzer_pass_add_dead_continues.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_add_dead_continues.h",
|
|
|
|
"source/fuzz/fuzzer_pass_add_equation_instructions.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_add_equation_instructions.h",
|
|
|
|
"source/fuzz/fuzzer_pass_add_function_calls.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_add_function_calls.h",
|
|
|
|
"source/fuzz/fuzzer_pass_add_global_variables.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_add_global_variables.h",
|
|
|
|
"source/fuzz/fuzzer_pass_add_image_sample_unused_components.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_add_image_sample_unused_components.h",
|
|
|
|
"source/fuzz/fuzzer_pass_add_loads.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_add_loads.h",
|
|
|
|
"source/fuzz/fuzzer_pass_add_local_variables.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_add_local_variables.h",
|
|
|
|
"source/fuzz/fuzzer_pass_add_loop_preheaders.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_add_loop_preheaders.h",
|
|
|
|
"source/fuzz/fuzzer_pass_add_loops_to_create_int_constant_synonyms.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_add_loops_to_create_int_constant_synonyms.h",
|
|
|
|
"source/fuzz/fuzzer_pass_add_no_contraction_decorations.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_add_no_contraction_decorations.h",
|
|
|
|
"source/fuzz/fuzzer_pass_add_opphi_synonyms.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_add_opphi_synonyms.h",
|
|
|
|
"source/fuzz/fuzzer_pass_add_parameters.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_add_parameters.h",
|
|
|
|
"source/fuzz/fuzzer_pass_add_relaxed_decorations.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_add_relaxed_decorations.h",
|
|
|
|
"source/fuzz/fuzzer_pass_add_stores.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_add_stores.h",
|
|
|
|
"source/fuzz/fuzzer_pass_add_synonyms.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_add_synonyms.h",
|
|
|
|
"source/fuzz/fuzzer_pass_add_vector_shuffle_instructions.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_add_vector_shuffle_instructions.h",
|
|
|
|
"source/fuzz/fuzzer_pass_adjust_branch_weights.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_adjust_branch_weights.h",
|
|
|
|
"source/fuzz/fuzzer_pass_adjust_function_controls.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_adjust_function_controls.h",
|
|
|
|
"source/fuzz/fuzzer_pass_adjust_loop_controls.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_adjust_loop_controls.h",
|
|
|
|
"source/fuzz/fuzzer_pass_adjust_memory_operands_masks.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_adjust_memory_operands_masks.h",
|
|
|
|
"source/fuzz/fuzzer_pass_adjust_selection_controls.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_adjust_selection_controls.h",
|
|
|
|
"source/fuzz/fuzzer_pass_apply_id_synonyms.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_apply_id_synonyms.h",
|
|
|
|
"source/fuzz/fuzzer_pass_construct_composites.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_construct_composites.h",
|
|
|
|
"source/fuzz/fuzzer_pass_copy_objects.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_copy_objects.h",
|
|
|
|
"source/fuzz/fuzzer_pass_donate_modules.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_donate_modules.h",
|
|
|
|
"source/fuzz/fuzzer_pass_duplicate_regions_with_selections.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_duplicate_regions_with_selections.h",
|
|
|
|
"source/fuzz/fuzzer_pass_expand_vector_reductions.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_expand_vector_reductions.h",
|
|
|
|
"source/fuzz/fuzzer_pass_flatten_conditional_branches.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_flatten_conditional_branches.h",
|
|
|
|
"source/fuzz/fuzzer_pass_inline_functions.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_inline_functions.h",
|
|
|
|
"source/fuzz/fuzzer_pass_interchange_signedness_of_integer_operands.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_interchange_signedness_of_integer_operands.h",
|
|
|
|
"source/fuzz/fuzzer_pass_interchange_zero_like_constants.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_interchange_zero_like_constants.h",
|
|
|
|
"source/fuzz/fuzzer_pass_invert_comparison_operators.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_invert_comparison_operators.h",
|
|
|
|
"source/fuzz/fuzzer_pass_make_vector_operations_dynamic.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_make_vector_operations_dynamic.h",
|
|
|
|
"source/fuzz/fuzzer_pass_merge_blocks.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_merge_blocks.h",
|
|
|
|
"source/fuzz/fuzzer_pass_merge_function_returns.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_merge_function_returns.h",
|
|
|
|
"source/fuzz/fuzzer_pass_mutate_pointers.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_mutate_pointers.h",
|
|
|
|
"source/fuzz/fuzzer_pass_obfuscate_constants.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_obfuscate_constants.h",
|
|
|
|
"source/fuzz/fuzzer_pass_outline_functions.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_outline_functions.h",
|
|
|
|
"source/fuzz/fuzzer_pass_permute_blocks.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_permute_blocks.h",
|
|
|
|
"source/fuzz/fuzzer_pass_permute_function_parameters.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_permute_function_parameters.h",
|
|
|
|
"source/fuzz/fuzzer_pass_permute_function_variables.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_permute_function_variables.h",
|
|
|
|
"source/fuzz/fuzzer_pass_permute_instructions.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_permute_instructions.h",
|
|
|
|
"source/fuzz/fuzzer_pass_permute_phi_operands.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_permute_phi_operands.h",
|
|
|
|
"source/fuzz/fuzzer_pass_propagate_instructions_down.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_propagate_instructions_down.h",
|
|
|
|
"source/fuzz/fuzzer_pass_propagate_instructions_up.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_propagate_instructions_up.h",
|
|
|
|
"source/fuzz/fuzzer_pass_push_ids_through_variables.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_push_ids_through_variables.h",
|
|
|
|
"source/fuzz/fuzzer_pass_replace_adds_subs_muls_with_carrying_extended.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_replace_adds_subs_muls_with_carrying_extended.h",
|
|
|
|
"source/fuzz/fuzzer_pass_replace_branches_from_dead_blocks_with_exits.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_replace_branches_from_dead_blocks_with_exits.h",
|
|
|
|
"source/fuzz/fuzzer_pass_replace_copy_memories_with_loads_stores.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_replace_copy_memories_with_loads_stores.h",
|
|
|
|
"source/fuzz/fuzzer_pass_replace_copy_objects_with_stores_loads.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_replace_copy_objects_with_stores_loads.h",
|
|
|
|
"source/fuzz/fuzzer_pass_replace_irrelevant_ids.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_replace_irrelevant_ids.h",
|
|
|
|
"source/fuzz/fuzzer_pass_replace_linear_algebra_instructions.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_replace_linear_algebra_instructions.h",
|
|
|
|
"source/fuzz/fuzzer_pass_replace_loads_stores_with_copy_memories.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_replace_loads_stores_with_copy_memories.h",
|
|
|
|
"source/fuzz/fuzzer_pass_replace_opphi_ids_from_dead_predecessors.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_replace_opphi_ids_from_dead_predecessors.h",
|
|
|
|
"source/fuzz/fuzzer_pass_replace_opselects_with_conditional_branches.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_replace_opselects_with_conditional_branches.h",
|
|
|
|
"source/fuzz/fuzzer_pass_replace_parameter_with_global.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_replace_parameter_with_global.h",
|
|
|
|
"source/fuzz/fuzzer_pass_replace_params_with_struct.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_replace_params_with_struct.h",
|
|
|
|
"source/fuzz/fuzzer_pass_split_blocks.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_split_blocks.h",
|
|
|
|
"source/fuzz/fuzzer_pass_swap_commutable_operands.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_swap_commutable_operands.h",
|
|
|
|
"source/fuzz/fuzzer_pass_swap_conditional_branch_operands.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_swap_conditional_branch_operands.h",
|
|
|
|
"source/fuzz/fuzzer_pass_swap_functions.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_swap_functions.h",
|
|
|
|
"source/fuzz/fuzzer_pass_toggle_access_chain_instruction.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_toggle_access_chain_instruction.h",
|
|
|
|
"source/fuzz/fuzzer_pass_wrap_regions_in_selections.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_wrap_regions_in_selections.h",
|
2021-07-20 10:01:20 +00:00
|
|
|
"source/fuzz/fuzzer_pass_wrap_vector_synonym.cpp",
|
|
|
|
"source/fuzz/fuzzer_pass_wrap_vector_synonym.h",
|
2021-07-14 09:04:50 +00:00
|
|
|
"source/fuzz/fuzzer_util.cpp",
|
|
|
|
"source/fuzz/fuzzer_util.h",
|
|
|
|
"source/fuzz/id_use_descriptor.cpp",
|
|
|
|
"source/fuzz/id_use_descriptor.h",
|
|
|
|
"source/fuzz/instruction_descriptor.cpp",
|
|
|
|
"source/fuzz/instruction_descriptor.h",
|
|
|
|
"source/fuzz/instruction_message.cpp",
|
|
|
|
"source/fuzz/instruction_message.h",
|
|
|
|
"source/fuzz/overflow_id_source.cpp",
|
|
|
|
"source/fuzz/overflow_id_source.h",
|
|
|
|
"source/fuzz/pass_management/repeated_pass_instances.h",
|
|
|
|
"source/fuzz/pass_management/repeated_pass_manager.cpp",
|
|
|
|
"source/fuzz/pass_management/repeated_pass_manager.h",
|
|
|
|
"source/fuzz/pass_management/repeated_pass_manager_looped_with_recommendations.cpp",
|
|
|
|
"source/fuzz/pass_management/repeated_pass_manager_looped_with_recommendations.h",
|
|
|
|
"source/fuzz/pass_management/repeated_pass_manager_random_with_recommendations.cpp",
|
|
|
|
"source/fuzz/pass_management/repeated_pass_manager_random_with_recommendations.h",
|
|
|
|
"source/fuzz/pass_management/repeated_pass_manager_simple.cpp",
|
|
|
|
"source/fuzz/pass_management/repeated_pass_manager_simple.h",
|
|
|
|
"source/fuzz/pass_management/repeated_pass_recommender.cpp",
|
|
|
|
"source/fuzz/pass_management/repeated_pass_recommender.h",
|
|
|
|
"source/fuzz/pass_management/repeated_pass_recommender_standard.cpp",
|
|
|
|
"source/fuzz/pass_management/repeated_pass_recommender_standard.h",
|
|
|
|
"source/fuzz/protobufs/spirvfuzz_protobufs.h",
|
|
|
|
"source/fuzz/pseudo_random_generator.cpp",
|
|
|
|
"source/fuzz/pseudo_random_generator.h",
|
|
|
|
"source/fuzz/random_generator.cpp",
|
|
|
|
"source/fuzz/random_generator.h",
|
|
|
|
"source/fuzz/replayer.cpp",
|
|
|
|
"source/fuzz/replayer.h",
|
|
|
|
"source/fuzz/shrinker.cpp",
|
|
|
|
"source/fuzz/shrinker.h",
|
|
|
|
"source/fuzz/transformation.cpp",
|
|
|
|
"source/fuzz/transformation.h",
|
|
|
|
"source/fuzz/transformation_access_chain.cpp",
|
|
|
|
"source/fuzz/transformation_access_chain.h",
|
|
|
|
"source/fuzz/transformation_add_bit_instruction_synonym.cpp",
|
|
|
|
"source/fuzz/transformation_add_bit_instruction_synonym.h",
|
|
|
|
"source/fuzz/transformation_add_constant_boolean.cpp",
|
|
|
|
"source/fuzz/transformation_add_constant_boolean.h",
|
|
|
|
"source/fuzz/transformation_add_constant_composite.cpp",
|
|
|
|
"source/fuzz/transformation_add_constant_composite.h",
|
|
|
|
"source/fuzz/transformation_add_constant_null.cpp",
|
|
|
|
"source/fuzz/transformation_add_constant_null.h",
|
|
|
|
"source/fuzz/transformation_add_constant_scalar.cpp",
|
|
|
|
"source/fuzz/transformation_add_constant_scalar.h",
|
|
|
|
"source/fuzz/transformation_add_copy_memory.cpp",
|
|
|
|
"source/fuzz/transformation_add_copy_memory.h",
|
|
|
|
"source/fuzz/transformation_add_dead_block.cpp",
|
|
|
|
"source/fuzz/transformation_add_dead_block.h",
|
|
|
|
"source/fuzz/transformation_add_dead_break.cpp",
|
|
|
|
"source/fuzz/transformation_add_dead_break.h",
|
|
|
|
"source/fuzz/transformation_add_dead_continue.cpp",
|
|
|
|
"source/fuzz/transformation_add_dead_continue.h",
|
|
|
|
"source/fuzz/transformation_add_early_terminator_wrapper.cpp",
|
|
|
|
"source/fuzz/transformation_add_early_terminator_wrapper.h",
|
|
|
|
"source/fuzz/transformation_add_function.cpp",
|
|
|
|
"source/fuzz/transformation_add_function.h",
|
|
|
|
"source/fuzz/transformation_add_global_undef.cpp",
|
|
|
|
"source/fuzz/transformation_add_global_undef.h",
|
|
|
|
"source/fuzz/transformation_add_global_variable.cpp",
|
|
|
|
"source/fuzz/transformation_add_global_variable.h",
|
|
|
|
"source/fuzz/transformation_add_image_sample_unused_components.cpp",
|
|
|
|
"source/fuzz/transformation_add_image_sample_unused_components.h",
|
|
|
|
"source/fuzz/transformation_add_local_variable.cpp",
|
|
|
|
"source/fuzz/transformation_add_local_variable.h",
|
|
|
|
"source/fuzz/transformation_add_loop_preheader.cpp",
|
|
|
|
"source/fuzz/transformation_add_loop_preheader.h",
|
|
|
|
"source/fuzz/transformation_add_loop_to_create_int_constant_synonym.cpp",
|
|
|
|
"source/fuzz/transformation_add_loop_to_create_int_constant_synonym.h",
|
|
|
|
"source/fuzz/transformation_add_no_contraction_decoration.cpp",
|
|
|
|
"source/fuzz/transformation_add_no_contraction_decoration.h",
|
|
|
|
"source/fuzz/transformation_add_opphi_synonym.cpp",
|
|
|
|
"source/fuzz/transformation_add_opphi_synonym.h",
|
|
|
|
"source/fuzz/transformation_add_parameter.cpp",
|
|
|
|
"source/fuzz/transformation_add_parameter.h",
|
|
|
|
"source/fuzz/transformation_add_relaxed_decoration.cpp",
|
|
|
|
"source/fuzz/transformation_add_relaxed_decoration.h",
|
|
|
|
"source/fuzz/transformation_add_spec_constant_op.cpp",
|
|
|
|
"source/fuzz/transformation_add_spec_constant_op.h",
|
|
|
|
"source/fuzz/transformation_add_synonym.cpp",
|
|
|
|
"source/fuzz/transformation_add_synonym.h",
|
|
|
|
"source/fuzz/transformation_add_type_array.cpp",
|
|
|
|
"source/fuzz/transformation_add_type_array.h",
|
|
|
|
"source/fuzz/transformation_add_type_boolean.cpp",
|
|
|
|
"source/fuzz/transformation_add_type_boolean.h",
|
|
|
|
"source/fuzz/transformation_add_type_float.cpp",
|
|
|
|
"source/fuzz/transformation_add_type_float.h",
|
|
|
|
"source/fuzz/transformation_add_type_function.cpp",
|
|
|
|
"source/fuzz/transformation_add_type_function.h",
|
|
|
|
"source/fuzz/transformation_add_type_int.cpp",
|
|
|
|
"source/fuzz/transformation_add_type_int.h",
|
|
|
|
"source/fuzz/transformation_add_type_matrix.cpp",
|
|
|
|
"source/fuzz/transformation_add_type_matrix.h",
|
|
|
|
"source/fuzz/transformation_add_type_pointer.cpp",
|
|
|
|
"source/fuzz/transformation_add_type_pointer.h",
|
|
|
|
"source/fuzz/transformation_add_type_struct.cpp",
|
|
|
|
"source/fuzz/transformation_add_type_struct.h",
|
|
|
|
"source/fuzz/transformation_add_type_vector.cpp",
|
|
|
|
"source/fuzz/transformation_add_type_vector.h",
|
|
|
|
"source/fuzz/transformation_adjust_branch_weights.cpp",
|
|
|
|
"source/fuzz/transformation_adjust_branch_weights.h",
|
|
|
|
"source/fuzz/transformation_composite_construct.cpp",
|
|
|
|
"source/fuzz/transformation_composite_construct.h",
|
|
|
|
"source/fuzz/transformation_composite_extract.cpp",
|
|
|
|
"source/fuzz/transformation_composite_extract.h",
|
|
|
|
"source/fuzz/transformation_composite_insert.cpp",
|
|
|
|
"source/fuzz/transformation_composite_insert.h",
|
|
|
|
"source/fuzz/transformation_compute_data_synonym_fact_closure.cpp",
|
|
|
|
"source/fuzz/transformation_compute_data_synonym_fact_closure.h",
|
|
|
|
"source/fuzz/transformation_context.cpp",
|
|
|
|
"source/fuzz/transformation_context.h",
|
|
|
|
"source/fuzz/transformation_duplicate_region_with_selection.cpp",
|
|
|
|
"source/fuzz/transformation_duplicate_region_with_selection.h",
|
|
|
|
"source/fuzz/transformation_equation_instruction.cpp",
|
|
|
|
"source/fuzz/transformation_equation_instruction.h",
|
|
|
|
"source/fuzz/transformation_expand_vector_reduction.cpp",
|
|
|
|
"source/fuzz/transformation_expand_vector_reduction.h",
|
|
|
|
"source/fuzz/transformation_flatten_conditional_branch.cpp",
|
|
|
|
"source/fuzz/transformation_flatten_conditional_branch.h",
|
|
|
|
"source/fuzz/transformation_function_call.cpp",
|
|
|
|
"source/fuzz/transformation_function_call.h",
|
|
|
|
"source/fuzz/transformation_inline_function.cpp",
|
|
|
|
"source/fuzz/transformation_inline_function.h",
|
|
|
|
"source/fuzz/transformation_invert_comparison_operator.cpp",
|
|
|
|
"source/fuzz/transformation_invert_comparison_operator.h",
|
|
|
|
"source/fuzz/transformation_load.cpp",
|
|
|
|
"source/fuzz/transformation_load.h",
|
|
|
|
"source/fuzz/transformation_make_vector_operation_dynamic.cpp",
|
|
|
|
"source/fuzz/transformation_make_vector_operation_dynamic.h",
|
|
|
|
"source/fuzz/transformation_merge_blocks.cpp",
|
|
|
|
"source/fuzz/transformation_merge_blocks.h",
|
|
|
|
"source/fuzz/transformation_merge_function_returns.cpp",
|
|
|
|
"source/fuzz/transformation_merge_function_returns.h",
|
|
|
|
"source/fuzz/transformation_move_block_down.cpp",
|
|
|
|
"source/fuzz/transformation_move_block_down.h",
|
|
|
|
"source/fuzz/transformation_move_instruction_down.cpp",
|
|
|
|
"source/fuzz/transformation_move_instruction_down.h",
|
|
|
|
"source/fuzz/transformation_mutate_pointer.cpp",
|
|
|
|
"source/fuzz/transformation_mutate_pointer.h",
|
|
|
|
"source/fuzz/transformation_outline_function.cpp",
|
|
|
|
"source/fuzz/transformation_outline_function.h",
|
|
|
|
"source/fuzz/transformation_permute_function_parameters.cpp",
|
|
|
|
"source/fuzz/transformation_permute_function_parameters.h",
|
|
|
|
"source/fuzz/transformation_permute_phi_operands.cpp",
|
|
|
|
"source/fuzz/transformation_permute_phi_operands.h",
|
|
|
|
"source/fuzz/transformation_propagate_instruction_down.cpp",
|
|
|
|
"source/fuzz/transformation_propagate_instruction_down.h",
|
|
|
|
"source/fuzz/transformation_propagate_instruction_up.cpp",
|
|
|
|
"source/fuzz/transformation_propagate_instruction_up.h",
|
|
|
|
"source/fuzz/transformation_push_id_through_variable.cpp",
|
|
|
|
"source/fuzz/transformation_push_id_through_variable.h",
|
|
|
|
"source/fuzz/transformation_record_synonymous_constants.cpp",
|
|
|
|
"source/fuzz/transformation_record_synonymous_constants.h",
|
|
|
|
"source/fuzz/transformation_replace_add_sub_mul_with_carrying_extended.cpp",
|
|
|
|
"source/fuzz/transformation_replace_add_sub_mul_with_carrying_extended.h",
|
|
|
|
"source/fuzz/transformation_replace_boolean_constant_with_constant_binary.cpp",
|
|
|
|
"source/fuzz/transformation_replace_boolean_constant_with_constant_binary.h",
|
|
|
|
"source/fuzz/transformation_replace_branch_from_dead_block_with_exit.cpp",
|
|
|
|
"source/fuzz/transformation_replace_branch_from_dead_block_with_exit.h",
|
|
|
|
"source/fuzz/transformation_replace_constant_with_uniform.cpp",
|
|
|
|
"source/fuzz/transformation_replace_constant_with_uniform.h",
|
|
|
|
"source/fuzz/transformation_replace_copy_memory_with_load_store.cpp",
|
|
|
|
"source/fuzz/transformation_replace_copy_memory_with_load_store.h",
|
|
|
|
"source/fuzz/transformation_replace_copy_object_with_store_load.cpp",
|
|
|
|
"source/fuzz/transformation_replace_copy_object_with_store_load.h",
|
|
|
|
"source/fuzz/transformation_replace_id_with_synonym.cpp",
|
|
|
|
"source/fuzz/transformation_replace_id_with_synonym.h",
|
|
|
|
"source/fuzz/transformation_replace_irrelevant_id.cpp",
|
|
|
|
"source/fuzz/transformation_replace_irrelevant_id.h",
|
|
|
|
"source/fuzz/transformation_replace_linear_algebra_instruction.cpp",
|
|
|
|
"source/fuzz/transformation_replace_linear_algebra_instruction.h",
|
|
|
|
"source/fuzz/transformation_replace_load_store_with_copy_memory.cpp",
|
|
|
|
"source/fuzz/transformation_replace_load_store_with_copy_memory.h",
|
|
|
|
"source/fuzz/transformation_replace_opphi_id_from_dead_predecessor.cpp",
|
|
|
|
"source/fuzz/transformation_replace_opphi_id_from_dead_predecessor.h",
|
|
|
|
"source/fuzz/transformation_replace_opselect_with_conditional_branch.cpp",
|
|
|
|
"source/fuzz/transformation_replace_opselect_with_conditional_branch.h",
|
|
|
|
"source/fuzz/transformation_replace_parameter_with_global.cpp",
|
|
|
|
"source/fuzz/transformation_replace_parameter_with_global.h",
|
|
|
|
"source/fuzz/transformation_replace_params_with_struct.cpp",
|
|
|
|
"source/fuzz/transformation_replace_params_with_struct.h",
|
|
|
|
"source/fuzz/transformation_set_function_control.cpp",
|
|
|
|
"source/fuzz/transformation_set_function_control.h",
|
|
|
|
"source/fuzz/transformation_set_loop_control.cpp",
|
|
|
|
"source/fuzz/transformation_set_loop_control.h",
|
|
|
|
"source/fuzz/transformation_set_memory_operands_mask.cpp",
|
|
|
|
"source/fuzz/transformation_set_memory_operands_mask.h",
|
|
|
|
"source/fuzz/transformation_set_selection_control.cpp",
|
|
|
|
"source/fuzz/transformation_set_selection_control.h",
|
|
|
|
"source/fuzz/transformation_split_block.cpp",
|
|
|
|
"source/fuzz/transformation_split_block.h",
|
|
|
|
"source/fuzz/transformation_store.cpp",
|
|
|
|
"source/fuzz/transformation_store.h",
|
|
|
|
"source/fuzz/transformation_swap_commutable_operands.cpp",
|
|
|
|
"source/fuzz/transformation_swap_commutable_operands.h",
|
|
|
|
"source/fuzz/transformation_swap_conditional_branch_operands.cpp",
|
|
|
|
"source/fuzz/transformation_swap_conditional_branch_operands.h",
|
|
|
|
"source/fuzz/transformation_swap_function_variables.cpp",
|
|
|
|
"source/fuzz/transformation_swap_function_variables.h",
|
|
|
|
"source/fuzz/transformation_swap_two_functions.cpp",
|
|
|
|
"source/fuzz/transformation_swap_two_functions.h",
|
|
|
|
"source/fuzz/transformation_toggle_access_chain_instruction.cpp",
|
|
|
|
"source/fuzz/transformation_toggle_access_chain_instruction.h",
|
|
|
|
"source/fuzz/transformation_vector_shuffle.cpp",
|
|
|
|
"source/fuzz/transformation_vector_shuffle.h",
|
|
|
|
"source/fuzz/transformation_wrap_early_terminator_in_function.cpp",
|
|
|
|
"source/fuzz/transformation_wrap_early_terminator_in_function.h",
|
|
|
|
"source/fuzz/transformation_wrap_region_in_selection.cpp",
|
|
|
|
"source/fuzz/transformation_wrap_region_in_selection.h",
|
2021-07-20 10:01:20 +00:00
|
|
|
"source/fuzz/transformation_wrap_vector_synonym.cpp",
|
|
|
|
"source/fuzz/transformation_wrap_vector_synonym.h",
|
2021-07-14 09:04:50 +00:00
|
|
|
"source/fuzz/uniform_buffer_element_descriptor.cpp",
|
|
|
|
"source/fuzz/uniform_buffer_element_descriptor.h",
|
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":spvtools",
|
2021-07-15 16:56:13 +00:00
|
|
|
":spvtools_fuzz_proto",
|
2021-07-14 09:04:50 +00:00
|
|
|
":spvtools_opt",
|
2021-07-15 16:56:13 +00:00
|
|
|
":spvtools_reduce",
|
|
|
|
"//third_party/protobuf:protobuf_full",
|
2021-07-14 09:04:50 +00:00
|
|
|
]
|
|
|
|
public_deps = [ ":spvtools_headers" ]
|
2021-07-13 18:45:01 +00:00
|
|
|
configs -= [ "//build/config/compiler:chromium_code" ]
|
|
|
|
configs += [ "//build/config/compiler:no_chromium_code" ]
|
2021-07-14 09:04:50 +00:00
|
|
|
configs += [ ":spvtools_internal_config" ]
|
2021-07-13 18:45:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-08-01 18:28:10 +00:00
|
|
|
group("SPIRV-Tools") {
|
2019-09-03 16:57:32 +00:00
|
|
|
public_deps = [
|
2018-07-17 17:53:15 +00:00
|
|
|
":spvtools",
|
2019-07-10 20:37:10 +00:00
|
|
|
":spvtools_link",
|
2018-07-17 17:53:15 +00:00
|
|
|
":spvtools_opt",
|
2019-07-10 20:37:10 +00:00
|
|
|
":spvtools_reduce",
|
2018-07-17 17:53:15 +00:00
|
|
|
":spvtools_val",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2019-02-19 15:38:38 +00:00
|
|
|
# The tests are scoped to Chromium to avoid needing to write gtest integration.
|
|
|
|
# See Chromium's third_party/googletest/BUILD.gn for a complete integration.
|
2022-03-23 13:19:12 +00:00
|
|
|
if (build_with_chromium && spvtools_build_executables) {
|
2019-02-19 15:38:38 +00:00
|
|
|
test("spvtools_test") {
|
2018-07-17 17:53:15 +00:00
|
|
|
sources = [
|
2019-02-19 15:38:38 +00:00
|
|
|
"test/assembly_context_test.cpp",
|
|
|
|
"test/assembly_format_test.cpp",
|
|
|
|
"test/binary_destroy_test.cpp",
|
|
|
|
"test/binary_endianness_test.cpp",
|
|
|
|
"test/binary_header_get_test.cpp",
|
|
|
|
"test/binary_parse_test.cpp",
|
|
|
|
"test/binary_strnlen_s_test.cpp",
|
|
|
|
"test/binary_to_text.literal_test.cpp",
|
|
|
|
"test/binary_to_text_test.cpp",
|
|
|
|
"test/comment_test.cpp",
|
|
|
|
"test/enum_set_test.cpp",
|
|
|
|
"test/enum_string_mapping_test.cpp",
|
2021-03-10 20:19:24 +00:00
|
|
|
"test/ext_inst.cldebug100_test.cpp",
|
2019-02-19 15:38:38 +00:00
|
|
|
"test/ext_inst.debuginfo_test.cpp",
|
|
|
|
"test/ext_inst.glsl_test.cpp",
|
|
|
|
"test/ext_inst.opencl_test.cpp",
|
|
|
|
"test/fix_word_test.cpp",
|
|
|
|
"test/generator_magic_number_test.cpp",
|
|
|
|
"test/hex_float_test.cpp",
|
|
|
|
"test/immediate_int_test.cpp",
|
|
|
|
"test/libspirv_macros_test.cpp",
|
|
|
|
"test/name_mapper_test.cpp",
|
|
|
|
"test/named_id_test.cpp",
|
|
|
|
"test/opcode_make_test.cpp",
|
|
|
|
"test/opcode_require_capabilities_test.cpp",
|
|
|
|
"test/opcode_split_test.cpp",
|
|
|
|
"test/opcode_table_get_test.cpp",
|
|
|
|
"test/operand_capabilities_test.cpp",
|
|
|
|
"test/operand_pattern_test.cpp",
|
|
|
|
"test/operand_test.cpp",
|
|
|
|
"test/target_env_test.cpp",
|
|
|
|
"test/test_fixture.h",
|
|
|
|
"test/text_advance_test.cpp",
|
|
|
|
"test/text_destroy_test.cpp",
|
|
|
|
"test/text_literal_test.cpp",
|
|
|
|
"test/text_start_new_inst_test.cpp",
|
|
|
|
"test/text_to_binary.annotation_test.cpp",
|
|
|
|
"test/text_to_binary.barrier_test.cpp",
|
|
|
|
"test/text_to_binary.constant_test.cpp",
|
|
|
|
"test/text_to_binary.control_flow_test.cpp",
|
|
|
|
"test/text_to_binary.debug_test.cpp",
|
|
|
|
"test/text_to_binary.device_side_enqueue_test.cpp",
|
|
|
|
"test/text_to_binary.extension_test.cpp",
|
|
|
|
"test/text_to_binary.function_test.cpp",
|
|
|
|
"test/text_to_binary.group_test.cpp",
|
|
|
|
"test/text_to_binary.image_test.cpp",
|
|
|
|
"test/text_to_binary.literal_test.cpp",
|
|
|
|
"test/text_to_binary.memory_test.cpp",
|
|
|
|
"test/text_to_binary.misc_test.cpp",
|
|
|
|
"test/text_to_binary.mode_setting_test.cpp",
|
|
|
|
"test/text_to_binary.pipe_storage_test.cpp",
|
|
|
|
"test/text_to_binary.reserved_sampling_test.cpp",
|
|
|
|
"test/text_to_binary.subgroup_dispatch_test.cpp",
|
|
|
|
"test/text_to_binary.type_declaration_test.cpp",
|
|
|
|
"test/text_to_binary_test.cpp",
|
|
|
|
"test/text_word_get_test.cpp",
|
|
|
|
"test/unit_spirv.cpp",
|
|
|
|
"test/unit_spirv.h",
|
2018-07-17 17:53:15 +00:00
|
|
|
]
|
|
|
|
|
2019-02-19 15:38:38 +00:00
|
|
|
deps = [
|
|
|
|
":spvtools",
|
2019-12-19 22:16:26 +00:00
|
|
|
":spvtools_language_header_cldebuginfo100",
|
2021-03-10 20:19:24 +00:00
|
|
|
":spvtools_language_header_debuginfo",
|
2021-07-15 16:56:13 +00:00
|
|
|
":spvtools_language_header_vkdebuginfo100",
|
2019-02-19 15:38:38 +00:00
|
|
|
":spvtools_val",
|
2019-07-10 20:37:10 +00:00
|
|
|
"//testing/gmock",
|
|
|
|
"//testing/gtest",
|
|
|
|
"//testing/gtest:gtest_main",
|
2019-09-04 16:43:26 +00:00
|
|
|
"//third_party/googletest:gmock",
|
|
|
|
"//third_party/googletest:gtest",
|
2018-07-17 17:53:15 +00:00
|
|
|
]
|
|
|
|
|
2019-02-19 15:38:38 +00:00
|
|
|
if (is_clang) {
|
|
|
|
cflags_cc = [ "-Wno-self-assign" ]
|
|
|
|
}
|
2018-09-06 14:50:27 +00:00
|
|
|
|
2019-02-19 15:38:38 +00:00
|
|
|
configs += [ ":spvtools_internal_config" ]
|
|
|
|
}
|
2018-07-17 17:53:15 +00:00
|
|
|
}
|
|
|
|
|
2018-08-02 16:48:03 +00:00
|
|
|
if (spirv_tools_standalone) {
|
2018-07-17 17:53:15 +00:00
|
|
|
group("fuzzers") {
|
|
|
|
testonly = true
|
2021-03-10 20:19:24 +00:00
|
|
|
deps = [ "test/fuzzers" ]
|
2018-07-17 17:53:15 +00:00
|
|
|
}
|
|
|
|
}
|
2018-08-15 19:26:28 +00:00
|
|
|
|
2019-07-10 20:37:10 +00:00
|
|
|
source_set("spvtools_software_version") {
|
2021-03-10 20:19:24 +00:00
|
|
|
sources = [ "source/software_version.cpp" ]
|
2019-07-10 20:37:10 +00:00
|
|
|
deps = [
|
|
|
|
":spvtools_build_version",
|
2019-07-12 14:35:59 +00:00
|
|
|
":spvtools_headers",
|
2019-07-10 20:37:10 +00:00
|
|
|
]
|
|
|
|
configs += [ ":spvtools_internal_config" ]
|
|
|
|
}
|
|
|
|
|
2023-02-27 17:45:14 +00:00
|
|
|
source_set("spvtools_tools_util") {
|
|
|
|
sources = [
|
2023-02-27 19:45:43 +00:00
|
|
|
"tools/util/flags.cpp",
|
2023-02-27 17:45:14 +00:00
|
|
|
"tools/util/cli_consumer.cpp",
|
|
|
|
"tools/util/cli_consumer.h",
|
|
|
|
]
|
|
|
|
deps = [ ":spvtools_headers" ]
|
|
|
|
configs += [ ":spvtools_internal_config" ]
|
|
|
|
}
|
|
|
|
|
2022-03-23 13:19:12 +00:00
|
|
|
if (spvtools_build_executables) {
|
|
|
|
executable("spirv-as") {
|
|
|
|
sources = [ "tools/as/as.cpp" ]
|
|
|
|
deps = [
|
|
|
|
":spvtools",
|
|
|
|
":spvtools_software_version",
|
2023-02-27 17:45:14 +00:00
|
|
|
":spvtools_tools_util",
|
2022-03-23 13:19:12 +00:00
|
|
|
]
|
|
|
|
configs += [ ":spvtools_internal_config" ]
|
|
|
|
}
|
2019-07-10 20:37:10 +00:00
|
|
|
|
2022-03-23 13:19:12 +00:00
|
|
|
executable("spirv-dis") {
|
|
|
|
sources = [ "tools/dis/dis.cpp" ]
|
|
|
|
deps = [
|
|
|
|
":spvtools",
|
|
|
|
":spvtools_software_version",
|
2023-02-27 17:45:14 +00:00
|
|
|
":spvtools_tools_util",
|
2022-03-23 13:19:12 +00:00
|
|
|
]
|
|
|
|
configs += [ ":spvtools_internal_config" ]
|
|
|
|
}
|
2019-07-10 20:37:10 +00:00
|
|
|
|
2022-03-23 13:19:12 +00:00
|
|
|
executable("spirv-val") {
|
|
|
|
sources = [ "tools/val/val.cpp" ]
|
|
|
|
deps = [
|
|
|
|
":spvtools",
|
|
|
|
":spvtools_software_version",
|
2023-02-27 17:45:14 +00:00
|
|
|
":spvtools_tools_util",
|
2022-03-23 13:19:12 +00:00
|
|
|
":spvtools_val",
|
|
|
|
]
|
|
|
|
configs += [ ":spvtools_internal_config" ]
|
|
|
|
}
|
2019-07-10 20:37:10 +00:00
|
|
|
|
2022-03-23 13:19:12 +00:00
|
|
|
executable("spirv-cfg") {
|
|
|
|
sources = [
|
|
|
|
"tools/cfg/bin_to_dot.cpp",
|
|
|
|
"tools/cfg/bin_to_dot.h",
|
|
|
|
"tools/cfg/cfg.cpp",
|
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":spvtools",
|
|
|
|
":spvtools_software_version",
|
2023-02-27 17:45:14 +00:00
|
|
|
":spvtools_tools_util",
|
2022-03-23 13:19:12 +00:00
|
|
|
]
|
|
|
|
configs += [ ":spvtools_internal_config" ]
|
|
|
|
}
|
2019-07-03 20:26:06 +00:00
|
|
|
|
2022-03-23 13:19:12 +00:00
|
|
|
executable("spirv-opt") {
|
|
|
|
sources = [ "tools/opt/opt.cpp" ]
|
|
|
|
deps = [
|
|
|
|
":spvtools",
|
|
|
|
":spvtools_opt",
|
|
|
|
":spvtools_software_version",
|
2023-02-27 17:45:14 +00:00
|
|
|
":spvtools_tools_util",
|
2022-03-23 13:19:12 +00:00
|
|
|
":spvtools_val",
|
|
|
|
]
|
|
|
|
configs += [ ":spvtools_internal_config" ]
|
|
|
|
}
|
2019-07-10 20:37:10 +00:00
|
|
|
|
2022-03-23 13:19:12 +00:00
|
|
|
executable("spirv-link") {
|
|
|
|
sources = [ "tools/link/linker.cpp" ]
|
|
|
|
deps = [
|
|
|
|
":spvtools",
|
|
|
|
":spvtools_link",
|
|
|
|
":spvtools_opt",
|
|
|
|
":spvtools_software_version",
|
2023-02-27 17:45:14 +00:00
|
|
|
":spvtools_tools_util",
|
2022-03-23 13:19:12 +00:00
|
|
|
":spvtools_val",
|
|
|
|
]
|
|
|
|
configs += [ ":spvtools_internal_config" ]
|
|
|
|
}
|
2019-07-10 20:37:10 +00:00
|
|
|
}
|
|
|
|
|
2022-03-23 13:19:12 +00:00
|
|
|
if (!is_ios && !spirv_is_winuwp && build_with_chromium && spvtools_build_executables) {
|
2021-07-14 09:04:50 +00:00
|
|
|
# iOS and UWP do not allow std::system calls which spirv-fuzz
|
|
|
|
# requires. Additionally, spirv-fuzz is only built when in a
|
|
|
|
# Chromium checkout due to its dependency on protobuf.
|
2021-07-13 18:45:01 +00:00
|
|
|
|
|
|
|
executable("spirv-fuzz") {
|
|
|
|
sources = [ "tools/fuzz/fuzz.cpp" ]
|
|
|
|
deps = [
|
|
|
|
":spvtools",
|
|
|
|
":spvtools_fuzz",
|
|
|
|
":spvtools_opt",
|
2021-07-15 16:56:13 +00:00
|
|
|
":spvtools_reduce",
|
2021-07-13 18:45:01 +00:00
|
|
|
":spvtools_software_version",
|
2023-02-27 17:45:14 +00:00
|
|
|
":spvtools_tools_util",
|
2021-07-13 18:45:01 +00:00
|
|
|
":spvtools_val",
|
2021-07-15 16:56:13 +00:00
|
|
|
"//third_party/protobuf:protobuf_full",
|
2021-07-13 18:45:01 +00:00
|
|
|
]
|
|
|
|
configs += [ ":spvtools_internal_config" ]
|
|
|
|
}
|
2021-07-14 09:04:50 +00:00
|
|
|
}
|
|
|
|
|
2022-03-23 13:19:12 +00:00
|
|
|
if (!is_ios && !spirv_is_winuwp && spvtools_build_executables) {
|
2021-07-14 09:04:50 +00:00
|
|
|
# iOS and UWP do not allow std::system calls which spirv-reduce
|
|
|
|
# requires.
|
2021-07-13 18:45:01 +00:00
|
|
|
|
2019-07-10 20:37:10 +00:00
|
|
|
executable("spirv-reduce") {
|
2021-03-10 20:19:24 +00:00
|
|
|
sources = [ "tools/reduce/reduce.cpp" ]
|
2019-07-10 20:37:10 +00:00
|
|
|
deps = [
|
|
|
|
":spvtools",
|
2019-07-12 14:35:59 +00:00
|
|
|
":spvtools_opt",
|
2019-07-10 20:37:10 +00:00
|
|
|
":spvtools_reduce",
|
|
|
|
":spvtools_software_version",
|
2023-02-27 17:45:14 +00:00
|
|
|
":spvtools_tools_util",
|
2019-07-10 20:37:10 +00:00
|
|
|
":spvtools_val",
|
|
|
|
]
|
|
|
|
configs += [ ":spvtools_internal_config" ]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-03-23 13:19:12 +00:00
|
|
|
if (spvtools_build_executables){
|
|
|
|
group("all_spirv_tools") {
|
|
|
|
deps = [
|
|
|
|
":spirv-as",
|
|
|
|
":spirv-cfg",
|
|
|
|
":spirv-dis",
|
|
|
|
":spirv-link",
|
|
|
|
":spirv-opt",
|
|
|
|
":spirv-val",
|
|
|
|
]
|
|
|
|
if (!is_ios && !spirv_is_winuwp && build_with_chromium) {
|
|
|
|
deps += [ ":spirv-fuzz" ]
|
|
|
|
}
|
|
|
|
if (!is_ios && !spirv_is_winuwp) {
|
|
|
|
deps += [ ":spirv-reduce" ]
|
|
|
|
}
|
2019-07-10 20:37:10 +00:00
|
|
|
}
|
|
|
|
}
|