2021-03-15 08:43:11 +00:00
|
|
|
# Copyright 2021 The Tint Authors
|
|
|
|
#
|
|
|
|
# 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")
|
2022-11-03 14:25:37 +00:00
|
|
|
|
2022-02-21 15:19:07 +00:00
|
|
|
import("../../tint_overrides_with_defaults.gni")
|
2021-03-15 08:43:11 +00:00
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
if (tint_build_unittests) {
|
|
|
|
import("//testing/test.gni")
|
|
|
|
}
|
|
|
|
|
2021-03-15 08:43:11 +00:00
|
|
|
###############################################################################
|
|
|
|
# Common - Configs, etc. shared across targets
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
config("tint_common_config") {
|
|
|
|
include_dirs = [
|
|
|
|
"${target_gen_dir}",
|
|
|
|
"${tint_root_dir}/",
|
|
|
|
"${tint_spirv_headers_dir}/include",
|
|
|
|
"${tint_spirv_tools_dir}/",
|
|
|
|
"${tint_spirv_tools_dir}/include",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
config("tint_public_config") {
|
|
|
|
defines = []
|
|
|
|
if (tint_build_spv_reader) {
|
|
|
|
defines += [ "TINT_BUILD_SPV_READER=1" ]
|
|
|
|
} else {
|
|
|
|
defines += [ "TINT_BUILD_SPV_READER=0" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tint_build_spv_writer) {
|
|
|
|
defines += [ "TINT_BUILD_SPV_WRITER=1" ]
|
|
|
|
} else {
|
|
|
|
defines += [ "TINT_BUILD_SPV_WRITER=0" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tint_build_wgsl_reader) {
|
|
|
|
defines += [ "TINT_BUILD_WGSL_READER=1" ]
|
|
|
|
} else {
|
|
|
|
defines += [ "TINT_BUILD_WGSL_READER=0" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tint_build_wgsl_writer) {
|
|
|
|
defines += [ "TINT_BUILD_WGSL_WRITER=1" ]
|
|
|
|
} else {
|
|
|
|
defines += [ "TINT_BUILD_WGSL_WRITER=0" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tint_build_msl_writer) {
|
|
|
|
defines += [ "TINT_BUILD_MSL_WRITER=1" ]
|
|
|
|
} else {
|
|
|
|
defines += [ "TINT_BUILD_MSL_WRITER=0" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tint_build_hlsl_writer) {
|
|
|
|
defines += [ "TINT_BUILD_HLSL_WRITER=1" ]
|
|
|
|
} else {
|
|
|
|
defines += [ "TINT_BUILD_HLSL_WRITER=0" ]
|
|
|
|
}
|
|
|
|
|
Implement GLSL writer backend.
This is a modified version of the HLSL writer.
Basic types, arrays, entry points, reserved keywords, uniforms,
builtin uniforms, structs, some builtin functions, zero initialization
are implemented. Textures, SSBOs and storage textures in particular are
unimplemented. All the unit tests "pass", but the output is not correct
in many cases.
triangle.wgsl outputs correct vertex and fragment shaders that pass
GLSL validation via glslang. compute_boids.wgsl outputs a valid but not
correct compute shader.
Change-Id: I96c7aaf60cf2d4237e45d732e5f51b345aea0552
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/57780
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-10-06 18:55:10 +00:00
|
|
|
if (tint_build_glsl_writer) {
|
|
|
|
defines += [ "TINT_BUILD_GLSL_WRITER=1" ]
|
|
|
|
} else {
|
|
|
|
defines += [ "TINT_BUILD_GLSL_WRITER=0" ]
|
|
|
|
}
|
|
|
|
|
2021-03-15 08:43:11 +00:00
|
|
|
include_dirs = [
|
|
|
|
"${tint_root_dir}/",
|
|
|
|
"${tint_root_dir}/include/",
|
|
|
|
"${tint_spirv_headers_dir}/include",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
config("tint_config") {
|
|
|
|
include_dirs = []
|
|
|
|
if (tint_build_spv_reader || tint_build_spv_writer) {
|
|
|
|
include_dirs += [ "${tint_spirv_tools_dir}/include/" ]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-02 21:02:34 +00:00
|
|
|
###############################################################################
|
|
|
|
# Helper library for IO operations
|
|
|
|
# Only to be used by tests and sample executable
|
|
|
|
###############################################################################
|
|
|
|
source_set("tint_utils_io") {
|
|
|
|
sources = [
|
|
|
|
"utils/io/command.h",
|
|
|
|
"utils/io/tmpfile.h",
|
|
|
|
]
|
|
|
|
|
|
|
|
if (is_linux || is_mac) {
|
|
|
|
sources += [ "utils/io/command_posix.cc" ]
|
|
|
|
sources += [ "utils/io/tmpfile_posix.cc" ]
|
|
|
|
} else if (is_win) {
|
|
|
|
sources += [ "utils/io/command_windows.cc" ]
|
|
|
|
sources += [ "utils/io/tmpfile_windows.cc" ]
|
|
|
|
} else {
|
|
|
|
sources += [ "utils/io/command_other.cc" ]
|
|
|
|
sources += [ "utils/io/tmpfile_other.cc" ]
|
|
|
|
}
|
|
|
|
|
2023-01-25 19:22:25 +00:00
|
|
|
deps = [ ":libtint_base_src" ]
|
2021-06-02 21:02:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# Helper library for validating generated shaders
|
|
|
|
# As this depends on tint_utils_io, this is only to be used by tests and sample
|
|
|
|
# executable
|
|
|
|
###############################################################################
|
|
|
|
source_set("tint_val") {
|
|
|
|
sources = [
|
2021-06-08 19:38:27 +00:00
|
|
|
"val/hlsl.cc",
|
|
|
|
"val/msl.cc",
|
2021-06-02 21:02:34 +00:00
|
|
|
"val/val.h",
|
|
|
|
]
|
2023-01-21 18:50:20 +00:00
|
|
|
deps = [
|
2023-02-15 04:37:30 +00:00
|
|
|
":libtint_ast_src",
|
2023-01-25 18:39:00 +00:00
|
|
|
":libtint_base_src",
|
2023-02-15 04:37:30 +00:00
|
|
|
":libtint_program_src",
|
2023-01-21 18:50:20 +00:00
|
|
|
":tint_utils_io",
|
|
|
|
]
|
2021-06-02 21:02:34 +00:00
|
|
|
}
|
|
|
|
|
2021-03-15 08:43:11 +00:00
|
|
|
###############################################################################
|
|
|
|
# Library - Tint core and optional modules of libtint
|
|
|
|
###############################################################################
|
|
|
|
# Targets that want to use tint as a library should depend on ":libtint" and
|
|
|
|
# use the build flags to control what is included, instead of trying to specify
|
|
|
|
# the subsets that they want.
|
|
|
|
|
2021-04-19 15:20:03 +00:00
|
|
|
template("libtint_source_set") {
|
|
|
|
source_set(target_name) {
|
|
|
|
forward_variables_from(invoker, "*", [ "configs" ])
|
|
|
|
|
|
|
|
if (!defined(invoker.deps)) {
|
|
|
|
deps = []
|
|
|
|
}
|
|
|
|
deps += [
|
|
|
|
"${tint_spirv_headers_dir}:spv_headers",
|
2021-07-20 12:34:00 +00:00
|
|
|
"${tint_spirv_tools_dir}:spvtools_core_enums_unified1",
|
|
|
|
"${tint_spirv_tools_dir}:spvtools_core_tables_unified1",
|
2021-09-13 17:11:58 +00:00
|
|
|
"${tint_spirv_tools_dir}:spvtools_headers",
|
2021-07-20 12:34:00 +00:00
|
|
|
"${tint_spirv_tools_dir}:spvtools_language_header_cldebuginfo100",
|
|
|
|
"${tint_spirv_tools_dir}:spvtools_language_header_debuginfo",
|
2021-09-13 17:11:58 +00:00
|
|
|
"${tint_spirv_tools_dir}:spvtools_language_header_vkdebuginfo100",
|
2021-04-19 15:20:03 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
if (defined(invoker.configs)) {
|
|
|
|
configs += invoker.configs
|
|
|
|
}
|
|
|
|
configs += [ ":tint_common_config" ]
|
|
|
|
if (build_with_chromium) {
|
|
|
|
configs -= [ "//build/config/compiler:chromium_code" ]
|
|
|
|
configs += [ "//build/config/compiler:no_chromium_code" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!defined(invoker.public_configs)) {
|
|
|
|
public_configs = []
|
|
|
|
}
|
|
|
|
public_configs += [ ":tint_public_config" ]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-25 18:39:00 +00:00
|
|
|
libtint_source_set("libtint_base_src") {
|
|
|
|
sources = [
|
|
|
|
"castable.cc",
|
|
|
|
"castable.h",
|
|
|
|
"debug.cc",
|
|
|
|
"debug.h",
|
|
|
|
"diagnostic/diagnostic.cc",
|
|
|
|
"diagnostic/diagnostic.h",
|
|
|
|
"diagnostic/formatter.cc",
|
|
|
|
"diagnostic/formatter.h",
|
|
|
|
"diagnostic/printer.cc",
|
|
|
|
"diagnostic/printer.h",
|
|
|
|
"number.cc",
|
|
|
|
"number.h",
|
|
|
|
"program_id.cc",
|
|
|
|
"program_id.h",
|
2023-01-25 19:15:42 +00:00
|
|
|
"reflection.h",
|
|
|
|
"scope_stack.h",
|
2023-01-25 18:39:00 +00:00
|
|
|
"source.cc",
|
|
|
|
"source.h",
|
|
|
|
"symbol.cc",
|
|
|
|
"symbol.h",
|
|
|
|
"symbol_table.cc",
|
|
|
|
"symbol_table.h",
|
|
|
|
"traits.h",
|
|
|
|
"utils/bitcast.h",
|
|
|
|
"utils/bitset.h",
|
|
|
|
"utils/block_allocator.h",
|
|
|
|
"utils/compiler_macros.h",
|
|
|
|
"utils/concat.h",
|
|
|
|
"utils/crc32.h",
|
|
|
|
"utils/debugger.cc",
|
|
|
|
"utils/debugger.h",
|
|
|
|
"utils/defer.h",
|
|
|
|
"utils/enum_set.h",
|
|
|
|
"utils/foreach_macro.h",
|
|
|
|
"utils/hash.h",
|
|
|
|
"utils/hashmap.h",
|
|
|
|
"utils/hashmap_base.h",
|
|
|
|
"utils/hashset.h",
|
|
|
|
"utils/map.h",
|
|
|
|
"utils/math.h",
|
|
|
|
"utils/scoped_assignment.h",
|
|
|
|
"utils/string.cc",
|
|
|
|
"utils/string.h",
|
|
|
|
"utils/unique_allocator.h",
|
|
|
|
"utils/unique_vector.h",
|
|
|
|
"utils/vector.h",
|
|
|
|
]
|
|
|
|
|
|
|
|
if (is_linux || is_mac) {
|
|
|
|
sources += [ "diagnostic/printer_posix.cc" ]
|
|
|
|
} else if (is_win) {
|
|
|
|
sources += [ "diagnostic/printer_windows.cc" ]
|
|
|
|
} else {
|
|
|
|
sources += [ "diagnostic/printer_other.cc" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
deps = [ ":libtint_text_src" ]
|
|
|
|
}
|
|
|
|
|
2023-02-15 04:37:30 +00:00
|
|
|
libtint_source_set("libtint_clone_context_hdrs") {
|
|
|
|
sources = [ "clone_context.h" ]
|
|
|
|
deps = [ ":libtint_base_src" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
libtint_source_set("libtint_program_src") {
|
2021-03-15 08:43:11 +00:00
|
|
|
sources = [
|
|
|
|
"clone_context.cc",
|
2021-04-21 09:18:52 +00:00
|
|
|
"program.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"program_builder.cc",
|
2022-06-01 23:57:20 +00:00
|
|
|
"resolver/const_eval.cc",
|
|
|
|
"resolver/const_eval.h",
|
2021-11-22 11:44:57 +00:00
|
|
|
"resolver/dependency_graph.cc",
|
|
|
|
"resolver/dependency_graph.h",
|
2022-11-02 17:07:25 +00:00
|
|
|
"resolver/init_conv_intrinsic.cc",
|
|
|
|
"resolver/init_conv_intrinsic.h",
|
2022-05-06 15:13:01 +00:00
|
|
|
"resolver/intrinsic_table.cc",
|
|
|
|
"resolver/intrinsic_table.h",
|
2022-11-02 17:07:25 +00:00
|
|
|
"resolver/intrinsic_table.inl",
|
2021-03-15 08:43:11 +00:00
|
|
|
"resolver/resolver.cc",
|
2022-04-19 15:00:44 +00:00
|
|
|
"resolver/sem_helper.cc",
|
|
|
|
"resolver/sem_helper.h",
|
2022-05-11 22:05:15 +00:00
|
|
|
"resolver/uniformity.cc",
|
|
|
|
"resolver/uniformity.h",
|
2022-04-21 13:40:16 +00:00
|
|
|
"resolver/validator.cc",
|
|
|
|
"resolver/validator.h",
|
2023-01-21 23:41:56 +00:00
|
|
|
]
|
2023-02-15 04:37:30 +00:00
|
|
|
public = [
|
|
|
|
"program.h",
|
|
|
|
"program_builder.h",
|
|
|
|
"resolver/resolver.h",
|
|
|
|
]
|
|
|
|
friend = [
|
|
|
|
":tint_unittests_resolver_src", # For resolver test access
|
|
|
|
]
|
|
|
|
|
|
|
|
public_deps = [ ":libtint_clone_context_hdrs" ]
|
2023-01-21 23:41:56 +00:00
|
|
|
|
2023-01-25 18:39:00 +00:00
|
|
|
deps = [
|
2023-02-15 04:37:30 +00:00
|
|
|
":libtint_ast_hdrs",
|
2023-01-25 18:39:00 +00:00
|
|
|
":libtint_base_src",
|
|
|
|
":libtint_constant_src",
|
2023-02-15 04:37:30 +00:00
|
|
|
":libtint_sem_src",
|
2023-01-25 18:39:00 +00:00
|
|
|
":libtint_text_src",
|
|
|
|
":libtint_type_src",
|
|
|
|
]
|
2023-01-23 16:27:05 +00:00
|
|
|
}
|
|
|
|
|
2023-02-15 04:35:01 +00:00
|
|
|
libtint_source_set("libtint_demangler_src") {
|
|
|
|
sources = [
|
|
|
|
"demangler.cc",
|
|
|
|
"demangler.h",
|
|
|
|
]
|
2023-02-15 04:37:30 +00:00
|
|
|
deps = [ ":libtint_program_src" ]
|
2023-02-15 04:35:01 +00:00
|
|
|
}
|
|
|
|
|
2023-01-25 19:15:42 +00:00
|
|
|
libtint_source_set("libtint_initializer_src") {
|
|
|
|
sources = [ "tint.cc" ]
|
|
|
|
}
|
|
|
|
|
2023-01-25 18:41:40 +00:00
|
|
|
libtint_source_set("libtint_inspector_src") {
|
|
|
|
sources = [
|
|
|
|
"inspector/entry_point.cc",
|
|
|
|
"inspector/entry_point.h",
|
|
|
|
"inspector/inspector.cc",
|
|
|
|
"inspector/inspector.h",
|
|
|
|
"inspector/resource_binding.cc",
|
|
|
|
"inspector/resource_binding.h",
|
|
|
|
"inspector/scalar.cc",
|
|
|
|
"inspector/scalar.h",
|
|
|
|
]
|
|
|
|
deps = [
|
2023-02-15 04:37:30 +00:00
|
|
|
":libtint_ast_src",
|
2023-01-25 18:41:40 +00:00
|
|
|
":libtint_base_src",
|
2023-02-15 04:37:30 +00:00
|
|
|
":libtint_program_src",
|
|
|
|
":libtint_sem_src",
|
2023-01-25 18:41:40 +00:00
|
|
|
":libtint_type_src",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2023-01-23 16:27:05 +00:00
|
|
|
libtint_source_set("libtint_text_src") {
|
|
|
|
sources = [
|
|
|
|
"text/unicode.cc",
|
|
|
|
"text/unicode.h",
|
|
|
|
]
|
2023-01-21 23:41:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
libtint_source_set("libtint_transform_src") {
|
|
|
|
sources = [
|
2022-09-02 19:19:10 +00:00
|
|
|
"transform/add_block_attribute.cc",
|
|
|
|
"transform/add_block_attribute.h",
|
2021-09-07 18:59:21 +00:00
|
|
|
"transform/add_empty_entry_point.cc",
|
|
|
|
"transform/add_empty_entry_point.h",
|
2021-06-19 00:33:35 +00:00
|
|
|
"transform/array_length_from_uniform.cc",
|
|
|
|
"transform/array_length_from_uniform.h",
|
2021-03-29 21:25:45 +00:00
|
|
|
"transform/binding_remapper.cc",
|
|
|
|
"transform/binding_remapper.h",
|
2022-02-22 23:13:39 +00:00
|
|
|
"transform/builtin_polyfill.cc",
|
|
|
|
"transform/builtin_polyfill.h",
|
2021-04-09 10:28:48 +00:00
|
|
|
"transform/calculate_array_length.cc",
|
|
|
|
"transform/calculate_array_length.h",
|
2021-03-31 17:44:27 +00:00
|
|
|
"transform/canonicalize_entry_point_io.cc",
|
|
|
|
"transform/canonicalize_entry_point_io.h",
|
2022-10-11 09:52:25 +00:00
|
|
|
"transform/clamp_frag_depth.cc",
|
|
|
|
"transform/clamp_frag_depth.h",
|
2022-01-24 17:17:22 +00:00
|
|
|
"transform/combine_samplers.cc",
|
|
|
|
"transform/combine_samplers.h",
|
2021-06-18 21:15:25 +00:00
|
|
|
"transform/decompose_memory_access.cc",
|
|
|
|
"transform/decompose_memory_access.h",
|
2022-02-04 15:39:34 +00:00
|
|
|
"transform/decompose_strided_array.cc",
|
|
|
|
"transform/decompose_strided_array.h",
|
2021-07-27 08:17:29 +00:00
|
|
|
"transform/decompose_strided_matrix.cc",
|
|
|
|
"transform/decompose_strided_matrix.h",
|
2022-11-09 15:40:06 +00:00
|
|
|
"transform/demote_to_helper.cc",
|
|
|
|
"transform/demote_to_helper.h",
|
2022-12-01 18:49:09 +00:00
|
|
|
"transform/direct_variable_access.cc",
|
|
|
|
"transform/direct_variable_access.h",
|
2022-05-11 13:50:33 +00:00
|
|
|
"transform/disable_uniformity_analysis.cc",
|
|
|
|
"transform/disable_uniformity_analysis.h",
|
2022-04-07 11:36:06 +00:00
|
|
|
"transform/expand_compound_assignment.cc",
|
|
|
|
"transform/expand_compound_assignment.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"transform/first_index_offset.cc",
|
|
|
|
"transform/first_index_offset.h",
|
2021-07-08 10:00:17 +00:00
|
|
|
"transform/for_loop_to_loop.cc",
|
|
|
|
"transform/for_loop_to_loop.h",
|
2021-12-13 15:55:11 +00:00
|
|
|
"transform/localize_struct_array_assignment.cc",
|
|
|
|
"transform/localize_struct_array_assignment.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"transform/manager.cc",
|
|
|
|
"transform/manager.h",
|
2022-10-31 14:49:03 +00:00
|
|
|
"transform/merge_return.cc",
|
|
|
|
"transform/merge_return.h",
|
2021-09-07 18:59:21 +00:00
|
|
|
"transform/module_scope_var_to_entry_point_param.cc",
|
|
|
|
"transform/module_scope_var_to_entry_point_param.h",
|
2021-11-17 12:10:16 +00:00
|
|
|
"transform/multiplanar_external_texture.cc",
|
|
|
|
"transform/multiplanar_external_texture.h",
|
2021-09-13 17:11:58 +00:00
|
|
|
"transform/num_workgroups_from_uniform.cc",
|
|
|
|
"transform/num_workgroups_from_uniform.h",
|
2022-10-27 14:36:49 +00:00
|
|
|
"transform/packed_vec3.cc",
|
|
|
|
"transform/packed_vec3.h",
|
2022-09-13 19:48:51 +00:00
|
|
|
"transform/pad_structs.cc",
|
|
|
|
"transform/pad_structs.h",
|
2022-12-06 18:32:19 +00:00
|
|
|
"transform/preserve_padding.cc",
|
|
|
|
"transform/preserve_padding.h",
|
2022-06-27 20:20:25 +00:00
|
|
|
"transform/promote_initializers_to_let.cc",
|
|
|
|
"transform/promote_initializers_to_let.h",
|
2022-03-15 15:03:03 +00:00
|
|
|
"transform/promote_side_effects_to_decl.cc",
|
|
|
|
"transform/promote_side_effects_to_decl.h",
|
2022-03-31 15:02:25 +00:00
|
|
|
"transform/remove_continue_in_switch.cc",
|
|
|
|
"transform/remove_continue_in_switch.h",
|
2021-10-21 23:04:44 +00:00
|
|
|
"transform/remove_phonies.cc",
|
|
|
|
"transform/remove_phonies.h",
|
2021-12-03 17:51:48 +00:00
|
|
|
"transform/remove_unreachable_statements.cc",
|
|
|
|
"transform/remove_unreachable_statements.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"transform/renamer.cc",
|
|
|
|
"transform/renamer.h",
|
2021-06-30 13:23:36 +00:00
|
|
|
"transform/robustness.cc",
|
|
|
|
"transform/robustness.h",
|
2021-11-23 20:45:51 +00:00
|
|
|
"transform/simplify_pointers.cc",
|
|
|
|
"transform/simplify_pointers.h",
|
2021-04-28 15:33:03 +00:00
|
|
|
"transform/single_entry_point.cc",
|
|
|
|
"transform/single_entry_point.h",
|
2022-06-24 22:28:23 +00:00
|
|
|
"transform/spirv_atomic.cc",
|
|
|
|
"transform/spirv_atomic.h",
|
2022-09-01 22:12:19 +00:00
|
|
|
"transform/std140.cc",
|
|
|
|
"transform/std140.h",
|
2022-07-22 16:05:06 +00:00
|
|
|
"transform/substitute_override.cc",
|
|
|
|
"transform/substitute_override.h",
|
2023-01-07 04:09:25 +00:00
|
|
|
"transform/texture_1d_to_2d.cc",
|
|
|
|
"transform/texture_1d_to_2d.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"transform/transform.cc",
|
|
|
|
"transform/transform.h",
|
2022-11-22 21:30:10 +00:00
|
|
|
"transform/truncate_interstage_variables.cc",
|
|
|
|
"transform/truncate_interstage_variables.h",
|
2021-11-23 20:45:51 +00:00
|
|
|
"transform/unshadow.cc",
|
|
|
|
"transform/unshadow.h",
|
2022-03-30 20:11:35 +00:00
|
|
|
"transform/utils/get_insertion_point.cc",
|
|
|
|
"transform/utils/get_insertion_point.h",
|
2022-02-10 18:50:38 +00:00
|
|
|
"transform/utils/hoist_to_decl_before.cc",
|
|
|
|
"transform/utils/hoist_to_decl_before.h",
|
|
|
|
"transform/var_for_dynamic_index.cc",
|
|
|
|
"transform/var_for_dynamic_index.h",
|
2022-09-01 03:08:20 +00:00
|
|
|
"transform/vectorize_matrix_conversions.cc",
|
|
|
|
"transform/vectorize_matrix_conversions.h",
|
2022-10-20 13:38:28 +00:00
|
|
|
"transform/vectorize_scalar_matrix_initializers.cc",
|
|
|
|
"transform/vectorize_scalar_matrix_initializers.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"transform/vertex_pulling.cc",
|
|
|
|
"transform/vertex_pulling.h",
|
2022-06-16 12:01:27 +00:00
|
|
|
"transform/while_to_loop.cc",
|
|
|
|
"transform/while_to_loop.h",
|
2021-06-18 22:44:31 +00:00
|
|
|
"transform/zero_init_workgroup_memory.cc",
|
|
|
|
"transform/zero_init_workgroup_memory.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
]
|
2023-01-23 16:27:05 +00:00
|
|
|
deps = [
|
2023-02-15 04:37:30 +00:00
|
|
|
":libtint_ast_src",
|
2023-01-25 18:39:00 +00:00
|
|
|
":libtint_base_src",
|
2023-02-17 21:56:35 +00:00
|
|
|
":libtint_builtins_src",
|
2023-02-15 04:37:30 +00:00
|
|
|
":libtint_program_src",
|
|
|
|
":libtint_sem_src",
|
2023-01-23 16:27:05 +00:00
|
|
|
":libtint_text_src",
|
2023-01-25 18:39:00 +00:00
|
|
|
":libtint_type_src",
|
2023-01-23 16:27:05 +00:00
|
|
|
]
|
2021-04-19 15:20:03 +00:00
|
|
|
}
|
2021-03-15 08:43:11 +00:00
|
|
|
|
2023-02-15 04:37:30 +00:00
|
|
|
libtint_source_set("libtint_ast_hdrs") {
|
2023-01-25 22:40:28 +00:00
|
|
|
sources = [
|
2023-02-05 12:36:50 +00:00
|
|
|
"ast/accessor_expression.h",
|
2023-01-25 22:40:28 +00:00
|
|
|
"ast/alias.h",
|
|
|
|
"ast/assignment_statement.h",
|
|
|
|
"ast/attribute.h",
|
|
|
|
"ast/binary_expression.h",
|
|
|
|
"ast/binding_attribute.h",
|
|
|
|
"ast/bitcast_expression.h",
|
|
|
|
"ast/block_statement.h",
|
|
|
|
"ast/bool_literal_expression.h",
|
|
|
|
"ast/break_if_statement.h",
|
|
|
|
"ast/break_statement.h",
|
|
|
|
"ast/builtin_attribute.h",
|
|
|
|
"ast/call_expression.h",
|
|
|
|
"ast/call_statement.h",
|
|
|
|
"ast/case_selector.h",
|
|
|
|
"ast/case_statement.h",
|
|
|
|
"ast/compound_assignment_statement.h",
|
|
|
|
"ast/const.h",
|
|
|
|
"ast/const_assert.h",
|
|
|
|
"ast/continue_statement.h",
|
|
|
|
"ast/diagnostic_attribute.h",
|
|
|
|
"ast/diagnostic_control.h",
|
2023-02-04 12:20:55 +00:00
|
|
|
"ast/diagnostic_directive.h",
|
2023-01-25 22:40:28 +00:00
|
|
|
"ast/disable_validation_attribute.h",
|
|
|
|
"ast/discard_statement.h",
|
|
|
|
"ast/enable.h",
|
|
|
|
"ast/expression.h",
|
|
|
|
"ast/extension.h",
|
|
|
|
"ast/float_literal_expression.h",
|
|
|
|
"ast/for_loop_statement.h",
|
|
|
|
"ast/function.h",
|
|
|
|
"ast/group_attribute.h",
|
|
|
|
"ast/id_attribute.h",
|
2023-02-02 15:04:31 +00:00
|
|
|
"ast/identifier.h",
|
2023-01-25 22:40:28 +00:00
|
|
|
"ast/identifier_expression.h",
|
|
|
|
"ast/if_statement.h",
|
|
|
|
"ast/increment_decrement_statement.h",
|
|
|
|
"ast/index_accessor_expression.h",
|
|
|
|
"ast/int_literal_expression.h",
|
|
|
|
"ast/internal_attribute.h",
|
|
|
|
"ast/interpolate_attribute.h",
|
|
|
|
"ast/invariant_attribute.h",
|
|
|
|
"ast/let.h",
|
|
|
|
"ast/literal_expression.h",
|
|
|
|
"ast/location_attribute.h",
|
|
|
|
"ast/loop_statement.h",
|
|
|
|
"ast/member_accessor_expression.h",
|
|
|
|
"ast/module.h",
|
|
|
|
"ast/node.h",
|
|
|
|
"ast/node_id.h",
|
|
|
|
"ast/override.h",
|
|
|
|
"ast/parameter.h",
|
|
|
|
"ast/phony_expression.h",
|
|
|
|
"ast/pipeline_stage.h",
|
|
|
|
"ast/return_statement.h",
|
|
|
|
"ast/stage_attribute.h",
|
|
|
|
"ast/statement.h",
|
|
|
|
"ast/stride_attribute.h",
|
|
|
|
"ast/struct.h",
|
|
|
|
"ast/struct_member.h",
|
|
|
|
"ast/struct_member_align_attribute.h",
|
|
|
|
"ast/struct_member_offset_attribute.h",
|
|
|
|
"ast/struct_member_size_attribute.h",
|
|
|
|
"ast/switch_statement.h",
|
2023-02-03 13:24:18 +00:00
|
|
|
"ast/templated_identifier.h",
|
2023-01-25 22:40:28 +00:00
|
|
|
"ast/traverse_expressions.h",
|
|
|
|
"ast/type.h",
|
|
|
|
"ast/type_decl.h",
|
|
|
|
"ast/unary_op.h",
|
|
|
|
"ast/unary_op_expression.h",
|
|
|
|
"ast/var.h",
|
|
|
|
"ast/variable.h",
|
|
|
|
"ast/variable_decl_statement.h",
|
|
|
|
"ast/while_statement.h",
|
|
|
|
"ast/workgroup_attribute.h",
|
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":libtint_base_src",
|
2023-02-17 21:56:35 +00:00
|
|
|
":libtint_builtins_src",
|
2023-02-15 04:37:30 +00:00
|
|
|
":libtint_clone_context_hdrs",
|
|
|
|
":libtint_type_src",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
libtint_source_set("libtint_ast_src") {
|
|
|
|
sources = [
|
|
|
|
"ast/accessor_expression.cc",
|
|
|
|
"ast/alias.cc",
|
|
|
|
"ast/assignment_statement.cc",
|
|
|
|
"ast/attribute.cc",
|
|
|
|
"ast/binary_expression.cc",
|
|
|
|
"ast/binding_attribute.cc",
|
|
|
|
"ast/bitcast_expression.cc",
|
|
|
|
"ast/block_statement.cc",
|
|
|
|
"ast/bool_literal_expression.cc",
|
|
|
|
"ast/break_if_statement.cc",
|
|
|
|
"ast/break_statement.cc",
|
|
|
|
"ast/builtin_attribute.cc",
|
|
|
|
"ast/call_expression.cc",
|
|
|
|
"ast/call_statement.cc",
|
|
|
|
"ast/case_selector.cc",
|
|
|
|
"ast/case_statement.cc",
|
|
|
|
"ast/compound_assignment_statement.cc",
|
|
|
|
"ast/const.cc",
|
|
|
|
"ast/const_assert.cc",
|
|
|
|
"ast/continue_statement.cc",
|
|
|
|
"ast/diagnostic_attribute.cc",
|
|
|
|
"ast/diagnostic_control.cc",
|
|
|
|
"ast/diagnostic_directive.cc",
|
|
|
|
"ast/disable_validation_attribute.cc",
|
|
|
|
"ast/discard_statement.cc",
|
|
|
|
"ast/enable.cc",
|
|
|
|
"ast/expression.cc",
|
|
|
|
"ast/extension.cc",
|
|
|
|
"ast/float_literal_expression.cc",
|
|
|
|
"ast/for_loop_statement.cc",
|
|
|
|
"ast/function.cc",
|
|
|
|
"ast/group_attribute.cc",
|
|
|
|
"ast/id_attribute.cc",
|
|
|
|
"ast/identifier.cc",
|
|
|
|
"ast/identifier_expression.cc",
|
|
|
|
"ast/if_statement.cc",
|
|
|
|
"ast/increment_decrement_statement.cc",
|
|
|
|
"ast/index_accessor_expression.cc",
|
|
|
|
"ast/int_literal_expression.cc",
|
|
|
|
"ast/internal_attribute.cc",
|
|
|
|
"ast/interpolate_attribute.cc",
|
|
|
|
"ast/invariant_attribute.cc",
|
|
|
|
"ast/let.cc",
|
|
|
|
"ast/literal_expression.cc",
|
|
|
|
"ast/location_attribute.cc",
|
|
|
|
"ast/loop_statement.cc",
|
|
|
|
"ast/member_accessor_expression.cc",
|
|
|
|
"ast/module.cc",
|
|
|
|
"ast/node.cc",
|
|
|
|
"ast/override.cc",
|
|
|
|
"ast/parameter.cc",
|
|
|
|
"ast/phony_expression.cc",
|
|
|
|
"ast/pipeline_stage.cc",
|
|
|
|
"ast/return_statement.cc",
|
|
|
|
"ast/stage_attribute.cc",
|
|
|
|
"ast/statement.cc",
|
|
|
|
"ast/stride_attribute.cc",
|
|
|
|
"ast/struct.cc",
|
|
|
|
"ast/struct_member.cc",
|
|
|
|
"ast/struct_member_align_attribute.cc",
|
|
|
|
"ast/struct_member_offset_attribute.cc",
|
|
|
|
"ast/struct_member_size_attribute.cc",
|
|
|
|
"ast/switch_statement.cc",
|
|
|
|
"ast/templated_identifier.cc",
|
|
|
|
"ast/type.cc",
|
|
|
|
"ast/type_decl.cc",
|
|
|
|
"ast/unary_op.cc",
|
|
|
|
"ast/unary_op_expression.cc",
|
|
|
|
"ast/var.cc",
|
|
|
|
"ast/variable.cc",
|
|
|
|
"ast/variable_decl_statement.cc",
|
|
|
|
"ast/while_statement.cc",
|
|
|
|
"ast/workgroup_attribute.cc",
|
|
|
|
]
|
|
|
|
public_deps = [ ":libtint_ast_hdrs" ]
|
|
|
|
deps = [
|
|
|
|
":libtint_base_src",
|
|
|
|
":libtint_program_src",
|
2023-01-25 22:40:28 +00:00
|
|
|
":libtint_type_src",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2021-04-21 09:18:52 +00:00
|
|
|
libtint_source_set("libtint_sem_src") {
|
|
|
|
sources = [
|
2022-12-01 23:45:18 +00:00
|
|
|
"sem/array_count.cc",
|
|
|
|
"sem/array_count.h",
|
2021-11-30 13:25:12 +00:00
|
|
|
"sem/behavior.cc",
|
|
|
|
"sem/behavior.h",
|
2021-07-14 09:44:41 +00:00
|
|
|
"sem/binding_point.h",
|
2021-05-15 14:48:46 +00:00
|
|
|
"sem/block_statement.cc",
|
2023-01-26 02:15:50 +00:00
|
|
|
"sem/block_statement.h",
|
2022-10-20 22:45:50 +00:00
|
|
|
"sem/break_if_statement.cc",
|
|
|
|
"sem/break_if_statement.h",
|
2022-02-02 23:07:11 +00:00
|
|
|
"sem/builtin.cc",
|
|
|
|
"sem/builtin.h",
|
2023-02-09 15:35:27 +00:00
|
|
|
"sem/builtin_enum_expression.cc",
|
|
|
|
"sem/builtin_enum_expression.h",
|
2022-11-02 17:07:25 +00:00
|
|
|
"sem/builtin_type.cc",
|
|
|
|
"sem/builtin_type.h",
|
2021-04-21 09:18:52 +00:00
|
|
|
"sem/call.cc",
|
2021-07-14 09:44:41 +00:00
|
|
|
"sem/call.h",
|
2021-04-21 09:18:52 +00:00
|
|
|
"sem/call_target.cc",
|
2021-07-14 09:44:41 +00:00
|
|
|
"sem/call_target.h",
|
2022-07-15 23:46:31 +00:00
|
|
|
"sem/evaluation_stage.h",
|
2023-02-05 22:59:40 +00:00
|
|
|
"sem/expression.cc",
|
|
|
|
"sem/expression.h",
|
2021-07-14 09:44:41 +00:00
|
|
|
"sem/for_loop_statement.cc",
|
|
|
|
"sem/for_loop_statement.h",
|
2021-04-21 09:18:52 +00:00
|
|
|
"sem/function.cc",
|
2023-01-26 02:15:50 +00:00
|
|
|
"sem/function.h",
|
2023-02-14 00:33:43 +00:00
|
|
|
"sem/function_expression.cc",
|
|
|
|
"sem/function_expression.h",
|
2021-07-14 09:44:41 +00:00
|
|
|
"sem/if_statement.cc",
|
|
|
|
"sem/if_statement.h",
|
2022-06-24 20:34:00 +00:00
|
|
|
"sem/index_accessor_expression.cc",
|
|
|
|
"sem/index_accessor_expression.h",
|
2021-04-21 09:18:52 +00:00
|
|
|
"sem/info.cc",
|
2021-07-14 09:44:41 +00:00
|
|
|
"sem/info.h",
|
2022-12-14 01:50:52 +00:00
|
|
|
"sem/load.cc",
|
|
|
|
"sem/load.h",
|
2021-07-14 09:44:41 +00:00
|
|
|
"sem/loop_statement.cc",
|
|
|
|
"sem/loop_statement.h",
|
2022-05-19 19:32:29 +00:00
|
|
|
"sem/materialize.cc",
|
|
|
|
"sem/materialize.h",
|
2021-04-21 09:18:52 +00:00
|
|
|
"sem/member_accessor_expression.cc",
|
2023-01-26 02:15:50 +00:00
|
|
|
"sem/member_accessor_expression.h",
|
2022-02-09 23:55:51 +00:00
|
|
|
"sem/module.cc",
|
|
|
|
"sem/module.h",
|
2021-04-21 09:18:52 +00:00
|
|
|
"sem/node.cc",
|
2021-07-14 09:44:41 +00:00
|
|
|
"sem/node.h",
|
2022-11-02 17:07:25 +00:00
|
|
|
"sem/parameter_usage.cc",
|
|
|
|
"sem/parameter_usage.h",
|
2021-07-14 09:44:41 +00:00
|
|
|
"sem/pipeline_stage_set.h",
|
2023-01-26 02:15:50 +00:00
|
|
|
"sem/sampler_texture_pair.h",
|
2021-04-21 09:18:52 +00:00
|
|
|
"sem/statement.cc",
|
2023-01-26 02:15:50 +00:00
|
|
|
"sem/statement.h",
|
2021-04-21 09:18:52 +00:00
|
|
|
"sem/struct.cc",
|
2022-12-08 14:14:10 +00:00
|
|
|
"sem/struct.h",
|
2021-07-14 09:44:41 +00:00
|
|
|
"sem/switch_statement.cc",
|
|
|
|
"sem/switch_statement.h",
|
2021-11-15 20:45:50 +00:00
|
|
|
"sem/type_conversion.cc",
|
|
|
|
"sem/type_conversion.h",
|
2023-02-09 15:35:27 +00:00
|
|
|
"sem/type_expression.cc",
|
|
|
|
"sem/type_expression.h",
|
2022-10-20 13:38:28 +00:00
|
|
|
"sem/type_initializer.cc",
|
|
|
|
"sem/type_initializer.h",
|
2021-07-14 09:44:41 +00:00
|
|
|
"sem/type_mappings.h",
|
2023-02-04 21:20:26 +00:00
|
|
|
"sem/value_expression.cc",
|
|
|
|
"sem/value_expression.h",
|
2021-04-21 09:18:52 +00:00
|
|
|
"sem/variable.cc",
|
2023-01-26 02:15:50 +00:00
|
|
|
"sem/variable.h",
|
2022-06-16 12:01:27 +00:00
|
|
|
"sem/while_statement.cc",
|
|
|
|
"sem/while_statement.h",
|
2021-04-21 09:18:52 +00:00
|
|
|
]
|
|
|
|
|
2023-01-25 18:39:00 +00:00
|
|
|
deps = [
|
2023-02-15 04:37:30 +00:00
|
|
|
":libtint_ast_hdrs",
|
2023-01-25 18:39:00 +00:00
|
|
|
":libtint_base_src",
|
|
|
|
":libtint_constant_src",
|
|
|
|
":libtint_type_src",
|
|
|
|
]
|
2021-04-21 09:18:52 +00:00
|
|
|
}
|
|
|
|
|
2023-02-17 21:56:35 +00:00
|
|
|
libtint_source_set("libtint_builtins_src") {
|
|
|
|
sources = [
|
|
|
|
"builtin/builtin_value.cc",
|
|
|
|
"builtin/builtin_value.h",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2022-12-08 00:32:27 +00:00
|
|
|
libtint_source_set("libtint_type_src") {
|
|
|
|
sources = [
|
2022-12-08 15:33:01 +00:00
|
|
|
"type/abstract_float.cc",
|
|
|
|
"type/abstract_float.h",
|
|
|
|
"type/abstract_int.cc",
|
|
|
|
"type/abstract_int.h",
|
|
|
|
"type/abstract_numeric.cc",
|
|
|
|
"type/abstract_numeric.h",
|
2023-01-21 23:44:38 +00:00
|
|
|
"type/access.cc",
|
|
|
|
"type/access.h",
|
2023-01-21 19:56:49 +00:00
|
|
|
"type/address_space.cc",
|
|
|
|
"type/address_space.h",
|
2022-12-08 22:21:24 +00:00
|
|
|
"type/array.cc",
|
|
|
|
"type/array.h",
|
2022-12-08 00:32:27 +00:00
|
|
|
"type/array_count.cc",
|
|
|
|
"type/array_count.h",
|
2022-12-08 22:21:24 +00:00
|
|
|
"type/atomic.cc",
|
|
|
|
"type/atomic.h",
|
2022-12-08 16:39:59 +00:00
|
|
|
"type/bool.cc",
|
|
|
|
"type/bool.h",
|
2023-02-07 13:35:58 +00:00
|
|
|
"type/builtin.cc",
|
|
|
|
"type/builtin.h",
|
2023-01-05 21:07:15 +00:00
|
|
|
"type/clone_context.h",
|
2022-12-08 14:14:10 +00:00
|
|
|
"type/depth_multisampled_texture.cc",
|
|
|
|
"type/depth_multisampled_texture.h",
|
|
|
|
"type/depth_texture.cc",
|
|
|
|
"type/depth_texture.h",
|
|
|
|
"type/external_texture.cc",
|
|
|
|
"type/external_texture.h",
|
2022-12-08 16:39:59 +00:00
|
|
|
"type/f16.cc",
|
|
|
|
"type/f16.h",
|
|
|
|
"type/f32.cc",
|
|
|
|
"type/f32.h",
|
|
|
|
"type/i32.cc",
|
|
|
|
"type/i32.h",
|
2022-12-09 05:00:07 +00:00
|
|
|
"type/manager.cc",
|
|
|
|
"type/manager.h",
|
2022-12-08 22:21:24 +00:00
|
|
|
"type/matrix.cc",
|
|
|
|
"type/matrix.h",
|
2022-12-08 14:14:10 +00:00
|
|
|
"type/multisampled_texture.cc",
|
|
|
|
"type/multisampled_texture.h",
|
2022-12-08 00:32:27 +00:00
|
|
|
"type/node.cc",
|
|
|
|
"type/node.h",
|
2022-12-08 17:50:50 +00:00
|
|
|
"type/pointer.cc",
|
|
|
|
"type/pointer.h",
|
|
|
|
"type/reference.cc",
|
|
|
|
"type/reference.h",
|
2022-12-08 14:14:10 +00:00
|
|
|
"type/sampled_texture.cc",
|
|
|
|
"type/sampled_texture.h",
|
2022-12-08 15:25:18 +00:00
|
|
|
"type/sampler.cc",
|
|
|
|
"type/sampler.h",
|
2023-01-23 16:24:12 +00:00
|
|
|
"type/sampler_kind.cc",
|
|
|
|
"type/sampler_kind.h",
|
2022-12-08 14:14:10 +00:00
|
|
|
"type/storage_texture.cc",
|
|
|
|
"type/storage_texture.h",
|
2022-12-08 22:21:24 +00:00
|
|
|
"type/struct.cc",
|
|
|
|
"type/struct.h",
|
2023-01-21 23:51:25 +00:00
|
|
|
"type/texel_format.cc",
|
|
|
|
"type/texel_format.h",
|
2022-12-08 14:14:10 +00:00
|
|
|
"type/texture.cc",
|
|
|
|
"type/texture.h",
|
2023-01-21 19:16:15 +00:00
|
|
|
"type/texture_dimension.cc",
|
|
|
|
"type/texture_dimension.h",
|
2022-12-08 00:32:27 +00:00
|
|
|
"type/type.cc",
|
|
|
|
"type/type.h",
|
2022-12-08 16:39:59 +00:00
|
|
|
"type/u32.cc",
|
|
|
|
"type/u32.h",
|
2022-12-16 15:31:19 +00:00
|
|
|
"type/unique_node.cc",
|
|
|
|
"type/unique_node.h",
|
2022-12-08 22:21:24 +00:00
|
|
|
"type/vector.cc",
|
|
|
|
"type/vector.h",
|
2022-12-08 16:39:59 +00:00
|
|
|
"type/void.cc",
|
|
|
|
"type/void.h",
|
2022-12-08 00:32:27 +00:00
|
|
|
]
|
|
|
|
|
2023-01-25 18:39:00 +00:00
|
|
|
deps = [ ":libtint_base_src" ]
|
2022-12-08 00:32:27 +00:00
|
|
|
}
|
|
|
|
|
2022-12-13 14:17:50 +00:00
|
|
|
libtint_source_set("libtint_constant_src") {
|
|
|
|
sources = [
|
2023-01-06 02:57:36 +00:00
|
|
|
"constant/clone_context.h",
|
2022-12-14 18:13:37 +00:00
|
|
|
"constant/composite.cc",
|
|
|
|
"constant/composite.h",
|
2022-12-13 22:36:04 +00:00
|
|
|
"constant/node.cc",
|
|
|
|
"constant/node.h",
|
2022-12-14 18:13:37 +00:00
|
|
|
"constant/scalar.cc",
|
|
|
|
"constant/scalar.h",
|
|
|
|
"constant/splat.cc",
|
|
|
|
"constant/splat.h",
|
2022-12-15 16:25:31 +00:00
|
|
|
"constant/value.cc",
|
|
|
|
"constant/value.h",
|
2022-12-13 14:17:50 +00:00
|
|
|
]
|
2023-01-25 18:39:00 +00:00
|
|
|
deps = [
|
|
|
|
":libtint_base_src",
|
|
|
|
":libtint_type_src",
|
|
|
|
]
|
2022-12-13 14:17:50 +00:00
|
|
|
}
|
|
|
|
|
2023-01-21 18:50:20 +00:00
|
|
|
libtint_source_set("libtint_reader_src") {
|
|
|
|
sources = [
|
|
|
|
"reader/reader.cc",
|
|
|
|
"reader/reader.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
]
|
2023-01-21 18:50:20 +00:00
|
|
|
|
2023-01-25 19:22:25 +00:00
|
|
|
public_deps = [
|
2023-02-15 04:37:30 +00:00
|
|
|
":libtint_program_src",
|
2023-01-25 19:22:25 +00:00
|
|
|
":libtint_transform_src",
|
|
|
|
]
|
2021-03-15 08:43:11 +00:00
|
|
|
}
|
|
|
|
|
2021-04-19 15:20:03 +00:00
|
|
|
libtint_source_set("libtint_spv_reader_src") {
|
2021-03-15 08:43:11 +00:00
|
|
|
sources = [
|
|
|
|
"reader/spirv/construct.cc",
|
|
|
|
"reader/spirv/construct.h",
|
2021-04-29 00:09:04 +00:00
|
|
|
"reader/spirv/entry_point_info.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"reader/spirv/entry_point_info.h",
|
|
|
|
"reader/spirv/enum_converter.cc",
|
|
|
|
"reader/spirv/enum_converter.h",
|
|
|
|
"reader/spirv/fail_stream.h",
|
|
|
|
"reader/spirv/function.cc",
|
|
|
|
"reader/spirv/function.h",
|
|
|
|
"reader/spirv/namer.cc",
|
|
|
|
"reader/spirv/namer.h",
|
|
|
|
"reader/spirv/parser.cc",
|
|
|
|
"reader/spirv/parser.h",
|
|
|
|
"reader/spirv/parser_impl.cc",
|
|
|
|
"reader/spirv/parser_impl.h",
|
2021-05-14 17:51:13 +00:00
|
|
|
"reader/spirv/parser_type.cc",
|
|
|
|
"reader/spirv/parser_type.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"reader/spirv/usage.cc",
|
|
|
|
"reader/spirv/usage.h",
|
|
|
|
]
|
|
|
|
|
2023-01-21 18:50:20 +00:00
|
|
|
deps = [
|
2023-02-15 04:37:30 +00:00
|
|
|
":libtint_ast_src",
|
2023-01-25 18:39:00 +00:00
|
|
|
":libtint_base_src",
|
2023-02-17 21:56:35 +00:00
|
|
|
":libtint_builtins_src",
|
2023-02-15 04:37:30 +00:00
|
|
|
":libtint_program_src",
|
2023-01-21 18:50:20 +00:00
|
|
|
":libtint_reader_src",
|
2023-02-15 04:37:30 +00:00
|
|
|
":libtint_sem_src",
|
2023-01-25 18:39:00 +00:00
|
|
|
":libtint_type_src",
|
2021-04-21 09:18:52 +00:00
|
|
|
"${tint_spirv_tools_dir}/:spvtools_opt",
|
|
|
|
]
|
2021-07-20 12:34:00 +00:00
|
|
|
|
2021-09-13 17:11:58 +00:00
|
|
|
public_configs = [ "${tint_spirv_tools_dir}/:spvtools_internal_config" ]
|
2021-03-15 08:43:11 +00:00
|
|
|
}
|
|
|
|
|
2023-01-21 18:50:20 +00:00
|
|
|
libtint_source_set("libtint_writer_src") {
|
|
|
|
sources = [
|
|
|
|
"writer/append_vector.cc",
|
|
|
|
"writer/append_vector.h",
|
|
|
|
"writer/array_length_from_uniform_options.cc",
|
|
|
|
"writer/array_length_from_uniform_options.h",
|
|
|
|
"writer/check_supported_extensions.cc",
|
|
|
|
"writer/check_supported_extensions.h",
|
|
|
|
"writer/flatten_bindings.cc",
|
|
|
|
"writer/flatten_bindings.h",
|
|
|
|
"writer/float_to_string.cc",
|
|
|
|
"writer/float_to_string.h",
|
|
|
|
"writer/generate_external_texture_bindings.cc",
|
|
|
|
"writer/generate_external_texture_bindings.h",
|
|
|
|
"writer/text.cc",
|
|
|
|
"writer/text.h",
|
|
|
|
"writer/text_generator.cc",
|
|
|
|
"writer/text_generator.h",
|
|
|
|
"writer/writer.cc",
|
|
|
|
"writer/writer.h",
|
|
|
|
]
|
|
|
|
|
2023-01-21 23:41:56 +00:00
|
|
|
deps = [
|
2023-02-15 04:37:30 +00:00
|
|
|
":libtint_ast_src",
|
2023-01-25 18:39:00 +00:00
|
|
|
":libtint_base_src",
|
2023-01-25 18:41:40 +00:00
|
|
|
":libtint_inspector_src",
|
2023-02-15 04:37:30 +00:00
|
|
|
":libtint_program_src",
|
|
|
|
":libtint_sem_src",
|
2023-01-21 23:41:56 +00:00
|
|
|
":libtint_transform_src",
|
2023-01-25 18:39:00 +00:00
|
|
|
":libtint_type_src",
|
2023-01-21 23:41:56 +00:00
|
|
|
]
|
2023-01-21 18:50:20 +00:00
|
|
|
}
|
|
|
|
|
2021-04-19 15:20:03 +00:00
|
|
|
libtint_source_set("libtint_spv_writer_src") {
|
2021-03-15 08:43:11 +00:00
|
|
|
sources = [
|
|
|
|
"writer/spirv/binary_writer.cc",
|
|
|
|
"writer/spirv/binary_writer.h",
|
|
|
|
"writer/spirv/builder.cc",
|
|
|
|
"writer/spirv/builder.h",
|
|
|
|
"writer/spirv/function.cc",
|
|
|
|
"writer/spirv/function.h",
|
|
|
|
"writer/spirv/generator.cc",
|
|
|
|
"writer/spirv/generator.h",
|
2022-04-11 21:10:20 +00:00
|
|
|
"writer/spirv/generator_impl.cc",
|
|
|
|
"writer/spirv/generator_impl.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"writer/spirv/instruction.cc",
|
|
|
|
"writer/spirv/instruction.h",
|
|
|
|
"writer/spirv/operand.cc",
|
|
|
|
"writer/spirv/operand.h",
|
2021-03-22 15:32:35 +00:00
|
|
|
"writer/spirv/scalar_constant.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
]
|
|
|
|
|
2023-01-21 18:50:20 +00:00
|
|
|
deps = [
|
2023-02-15 04:37:30 +00:00
|
|
|
":libtint_ast_src",
|
2023-01-25 18:39:00 +00:00
|
|
|
":libtint_base_src",
|
2023-01-25 19:52:28 +00:00
|
|
|
":libtint_constant_src",
|
2023-02-15 04:37:30 +00:00
|
|
|
":libtint_program_src",
|
2023-01-26 02:15:50 +00:00
|
|
|
":libtint_sem_src",
|
2023-01-21 23:41:56 +00:00
|
|
|
":libtint_transform_src",
|
2023-01-25 19:52:28 +00:00
|
|
|
":libtint_type_src",
|
2023-01-21 18:50:20 +00:00
|
|
|
":libtint_writer_src",
|
|
|
|
]
|
2021-03-15 08:43:11 +00:00
|
|
|
}
|
|
|
|
|
2021-04-19 15:20:03 +00:00
|
|
|
libtint_source_set("libtint_wgsl_reader_src") {
|
2021-03-15 08:43:11 +00:00
|
|
|
sources = [
|
2023-01-24 17:56:57 +00:00
|
|
|
"reader/wgsl/classify_template_args.cc",
|
|
|
|
"reader/wgsl/classify_template_args.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"reader/wgsl/lexer.cc",
|
|
|
|
"reader/wgsl/lexer.h",
|
|
|
|
"reader/wgsl/parser.cc",
|
|
|
|
"reader/wgsl/parser.h",
|
|
|
|
"reader/wgsl/parser_impl.cc",
|
|
|
|
"reader/wgsl/parser_impl.h",
|
|
|
|
"reader/wgsl/parser_impl_detail.h",
|
|
|
|
"reader/wgsl/token.cc",
|
|
|
|
"reader/wgsl/token.h",
|
|
|
|
]
|
|
|
|
|
2023-01-21 18:50:20 +00:00
|
|
|
deps = [
|
2023-02-15 04:37:30 +00:00
|
|
|
":libtint_ast_src",
|
2023-01-25 18:39:00 +00:00
|
|
|
":libtint_base_src",
|
2023-02-15 04:37:30 +00:00
|
|
|
":libtint_program_src",
|
2023-01-21 18:50:20 +00:00
|
|
|
":libtint_reader_src",
|
2023-01-23 16:27:05 +00:00
|
|
|
":libtint_text_src",
|
2023-01-25 18:39:00 +00:00
|
|
|
":libtint_type_src",
|
2023-01-21 18:50:20 +00:00
|
|
|
]
|
2021-03-15 08:43:11 +00:00
|
|
|
}
|
|
|
|
|
2021-04-19 15:20:03 +00:00
|
|
|
libtint_source_set("libtint_wgsl_writer_src") {
|
2021-03-15 08:43:11 +00:00
|
|
|
sources = [
|
|
|
|
"writer/wgsl/generator.cc",
|
|
|
|
"writer/wgsl/generator.h",
|
|
|
|
"writer/wgsl/generator_impl.cc",
|
|
|
|
"writer/wgsl/generator_impl.h",
|
|
|
|
]
|
|
|
|
|
2023-01-21 18:50:20 +00:00
|
|
|
deps = [
|
2023-02-15 04:37:30 +00:00
|
|
|
":libtint_ast_src",
|
2023-01-25 18:39:00 +00:00
|
|
|
":libtint_base_src",
|
2023-02-15 04:37:30 +00:00
|
|
|
":libtint_program_src",
|
|
|
|
":libtint_sem_src",
|
2023-01-25 19:52:28 +00:00
|
|
|
":libtint_type_src",
|
2023-01-21 18:50:20 +00:00
|
|
|
":libtint_writer_src",
|
|
|
|
]
|
2021-03-15 08:43:11 +00:00
|
|
|
}
|
|
|
|
|
2021-04-19 15:20:03 +00:00
|
|
|
libtint_source_set("libtint_msl_writer_src") {
|
2021-03-15 08:43:11 +00:00
|
|
|
sources = [
|
|
|
|
"writer/msl/generator.cc",
|
|
|
|
"writer/msl/generator.h",
|
|
|
|
"writer/msl/generator_impl.cc",
|
|
|
|
"writer/msl/generator_impl.h",
|
|
|
|
]
|
|
|
|
|
2023-01-21 18:50:20 +00:00
|
|
|
deps = [
|
2023-02-15 04:37:30 +00:00
|
|
|
":libtint_ast_src",
|
2023-01-25 18:39:00 +00:00
|
|
|
":libtint_base_src",
|
2023-01-25 19:52:28 +00:00
|
|
|
":libtint_constant_src",
|
2023-02-15 04:37:30 +00:00
|
|
|
":libtint_program_src",
|
2023-01-26 02:15:50 +00:00
|
|
|
":libtint_sem_src",
|
2023-01-21 23:41:56 +00:00
|
|
|
":libtint_transform_src",
|
2023-01-25 19:52:28 +00:00
|
|
|
":libtint_type_src",
|
2023-01-21 18:50:20 +00:00
|
|
|
":libtint_writer_src",
|
|
|
|
]
|
2021-03-15 08:43:11 +00:00
|
|
|
}
|
|
|
|
|
2021-04-19 15:20:03 +00:00
|
|
|
libtint_source_set("libtint_hlsl_writer_src") {
|
2021-03-15 08:43:11 +00:00
|
|
|
sources = [
|
|
|
|
"writer/hlsl/generator.cc",
|
|
|
|
"writer/hlsl/generator.h",
|
|
|
|
"writer/hlsl/generator_impl.cc",
|
|
|
|
"writer/hlsl/generator_impl.h",
|
|
|
|
]
|
|
|
|
|
2023-01-21 18:50:20 +00:00
|
|
|
deps = [
|
2023-02-15 04:37:30 +00:00
|
|
|
":libtint_ast_src",
|
2023-01-25 18:39:00 +00:00
|
|
|
":libtint_base_src",
|
2023-01-25 19:52:28 +00:00
|
|
|
":libtint_constant_src",
|
2023-02-15 04:37:30 +00:00
|
|
|
":libtint_program_src",
|
2023-01-26 02:15:50 +00:00
|
|
|
":libtint_sem_src",
|
2023-01-21 23:41:56 +00:00
|
|
|
":libtint_transform_src",
|
2023-01-25 19:52:28 +00:00
|
|
|
":libtint_type_src",
|
2023-01-21 18:50:20 +00:00
|
|
|
":libtint_writer_src",
|
|
|
|
]
|
2021-03-15 08:43:11 +00:00
|
|
|
}
|
|
|
|
|
Implement GLSL writer backend.
This is a modified version of the HLSL writer.
Basic types, arrays, entry points, reserved keywords, uniforms,
builtin uniforms, structs, some builtin functions, zero initialization
are implemented. Textures, SSBOs and storage textures in particular are
unimplemented. All the unit tests "pass", but the output is not correct
in many cases.
triangle.wgsl outputs correct vertex and fragment shaders that pass
GLSL validation via glslang. compute_boids.wgsl outputs a valid but not
correct compute shader.
Change-Id: I96c7aaf60cf2d4237e45d732e5f51b345aea0552
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/57780
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-10-06 18:55:10 +00:00
|
|
|
libtint_source_set("libtint_glsl_writer_src") {
|
|
|
|
sources = [
|
|
|
|
"writer/glsl/generator.cc",
|
|
|
|
"writer/glsl/generator.h",
|
|
|
|
"writer/glsl/generator_impl.cc",
|
|
|
|
"writer/glsl/generator_impl.h",
|
|
|
|
]
|
|
|
|
|
2023-01-21 18:50:20 +00:00
|
|
|
deps = [
|
2023-02-15 04:37:30 +00:00
|
|
|
":libtint_ast_src",
|
2023-01-25 18:39:00 +00:00
|
|
|
":libtint_base_src",
|
2023-01-25 19:52:28 +00:00
|
|
|
":libtint_constant_src",
|
2023-02-15 04:37:30 +00:00
|
|
|
":libtint_program_src",
|
2023-01-26 02:15:50 +00:00
|
|
|
":libtint_sem_src",
|
2023-01-21 23:41:56 +00:00
|
|
|
":libtint_transform_src",
|
2023-01-25 19:52:28 +00:00
|
|
|
":libtint_type_src",
|
2023-01-21 18:50:20 +00:00
|
|
|
":libtint_writer_src",
|
|
|
|
]
|
Implement GLSL writer backend.
This is a modified version of the HLSL writer.
Basic types, arrays, entry points, reserved keywords, uniforms,
builtin uniforms, structs, some builtin functions, zero initialization
are implemented. Textures, SSBOs and storage textures in particular are
unimplemented. All the unit tests "pass", but the output is not correct
in many cases.
triangle.wgsl outputs correct vertex and fragment shaders that pass
GLSL validation via glslang. compute_boids.wgsl outputs a valid but not
correct compute shader.
Change-Id: I96c7aaf60cf2d4237e45d732e5f51b345aea0552
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/57780
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-10-06 18:55:10 +00:00
|
|
|
}
|
|
|
|
|
2021-03-15 08:43:11 +00:00
|
|
|
source_set("libtint") {
|
2023-01-25 19:52:28 +00:00
|
|
|
public_deps = [
|
2023-01-25 22:40:28 +00:00
|
|
|
":libtint_ast_src",
|
2023-01-25 19:52:28 +00:00
|
|
|
":libtint_base_src",
|
|
|
|
":libtint_constant_src",
|
2023-02-15 04:35:01 +00:00
|
|
|
":libtint_demangler_src",
|
2023-01-25 19:52:28 +00:00
|
|
|
":libtint_initializer_src",
|
|
|
|
":libtint_inspector_src",
|
2023-02-15 04:37:30 +00:00
|
|
|
":libtint_program_src",
|
2023-01-25 19:52:28 +00:00
|
|
|
":libtint_sem_src",
|
|
|
|
":libtint_text_src",
|
|
|
|
":libtint_transform_src",
|
|
|
|
":libtint_type_src",
|
|
|
|
":libtint_writer_src",
|
|
|
|
]
|
2021-03-15 08:43:11 +00:00
|
|
|
|
|
|
|
if (tint_build_spv_reader) {
|
|
|
|
public_deps += [ ":libtint_spv_reader_src" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tint_build_spv_writer) {
|
|
|
|
public_deps += [ ":libtint_spv_writer_src" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tint_build_wgsl_reader) {
|
|
|
|
public_deps += [ ":libtint_wgsl_reader_src" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tint_build_wgsl_writer) {
|
|
|
|
public_deps += [ ":libtint_wgsl_writer_src" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tint_build_msl_writer) {
|
|
|
|
public_deps += [ ":libtint_msl_writer_src" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tint_build_hlsl_writer) {
|
|
|
|
public_deps += [ ":libtint_hlsl_writer_src" ]
|
|
|
|
}
|
|
|
|
|
Implement GLSL writer backend.
This is a modified version of the HLSL writer.
Basic types, arrays, entry points, reserved keywords, uniforms,
builtin uniforms, structs, some builtin functions, zero initialization
are implemented. Textures, SSBOs and storage textures in particular are
unimplemented. All the unit tests "pass", but the output is not correct
in many cases.
triangle.wgsl outputs correct vertex and fragment shaders that pass
GLSL validation via glslang. compute_boids.wgsl outputs a valid but not
correct compute shader.
Change-Id: I96c7aaf60cf2d4237e45d732e5f51b345aea0552
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/57780
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-10-06 18:55:10 +00:00
|
|
|
if (tint_build_glsl_writer) {
|
|
|
|
public_deps += [ ":libtint_glsl_writer_src" ]
|
|
|
|
}
|
|
|
|
|
2021-03-15 08:43:11 +00:00
|
|
|
configs += [ ":tint_common_config" ]
|
|
|
|
public_configs = [ ":tint_public_config" ]
|
|
|
|
|
|
|
|
if (build_with_chromium) {
|
|
|
|
configs -= [ "//build/config/compiler:chromium_code" ]
|
|
|
|
configs += [ "//build/config/compiler:no_chromium_code" ]
|
|
|
|
}
|
|
|
|
}
|
2022-06-17 13:01:59 +00:00
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
if (tint_build_unittests) {
|
|
|
|
###############################################################################
|
|
|
|
# Gtest Gmock - Handle building inside and outside of Chromium.
|
|
|
|
###############################################################################
|
|
|
|
# When building outside of Chromium we need to define our own targets for GTest
|
|
|
|
# and GMock. However when compiling inside of Chromium we need to reuse the
|
|
|
|
# existing targets, both because Chromium has a special harness for swarming
|
|
|
|
# and because otherwise the "gn check" fails.
|
|
|
|
|
|
|
|
if (!build_with_chromium) {
|
|
|
|
# When we aren't in Chromium we define out own targets based on the location
|
|
|
|
# of the googletest repo.
|
|
|
|
config("gtest_config") {
|
|
|
|
include_dirs = [
|
|
|
|
"${tint_googletest_dir}/googletest",
|
|
|
|
"${tint_googletest_dir}/googletest/include",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
static_library("gtest") {
|
|
|
|
testonly = true
|
|
|
|
sources = [ "${tint_googletest_dir}/googletest/src/gtest-all.cc" ]
|
|
|
|
public_configs = [ ":gtest_config" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
config("gmock_config") {
|
|
|
|
include_dirs = [
|
|
|
|
"${tint_googletest_dir}/googlemock",
|
|
|
|
"${tint_googletest_dir}/googlemock/include",
|
|
|
|
"${tint_googletest_dir}/googletest/include",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
static_library("gmock") {
|
|
|
|
testonly = true
|
|
|
|
sources = [ "${tint_googletest_dir}/googlemock/src/gmock-all.cc" ]
|
|
|
|
public_configs = [ ":gmock_config" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
group("gmock_and_gtest") {
|
|
|
|
testonly = true
|
|
|
|
public_deps = [
|
|
|
|
":gmock",
|
|
|
|
":gtest",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
# When we are in Chromium we reuse its targets, and also add some deps that
|
|
|
|
# are needed to launch the test in swarming mode.
|
|
|
|
group("gmock_and_gtest") {
|
|
|
|
testonly = true
|
|
|
|
public_deps = [
|
|
|
|
"//base",
|
|
|
|
"//base/test:test_support",
|
|
|
|
"//testing/gmock",
|
|
|
|
"//testing/gtest",
|
|
|
|
"//third_party/googletest:gmock",
|
|
|
|
]
|
|
|
|
}
|
2022-06-17 13:01:59 +00:00
|
|
|
}
|
2022-06-22 12:40:43 +00:00
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# Wrapping of Chromium targets
|
|
|
|
###############################################################################
|
|
|
|
# These targets are separated because they are Chromium sources files that
|
|
|
|
# can't use the tint_internal config, otherwise Tint's warning flags get
|
|
|
|
# applied while compiling a bunch of Chromium's //base (via header inclusion)
|
|
|
|
source_set("tint_unittests_main") {
|
2022-06-17 13:01:59 +00:00
|
|
|
testonly = true
|
2022-06-22 12:40:43 +00:00
|
|
|
deps = [ ":gmock_and_gtest" ]
|
|
|
|
if (build_with_chromium) {
|
|
|
|
sources = [ "//gpu/tint_unittests_main.cc" ]
|
|
|
|
} else {
|
|
|
|
sources = [ "test_main.cc" ]
|
|
|
|
configs += [ ":tint_unittests_config" ]
|
2023-01-19 21:17:42 +00:00
|
|
|
deps += [ ":libtint" ]
|
|
|
|
|
|
|
|
if (tint_build_hlsl_writer) {
|
|
|
|
deps += [ ":tint_unittests_hlsl_writer_src" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tint_build_msl_writer) {
|
|
|
|
deps += [ ":tint_unittests_msl_writer_src" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tint_build_spv_reader) {
|
|
|
|
deps += [ ":tint_unittests_spv_reader_src" ]
|
|
|
|
}
|
2022-06-22 12:40:43 +00:00
|
|
|
}
|
2022-06-17 13:01:59 +00:00
|
|
|
}
|
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
###############################################################################
|
|
|
|
# Tests - For libtint core and optional modules
|
|
|
|
###############################################################################
|
|
|
|
config("tint_unittests_config") {
|
2022-06-17 13:01:59 +00:00
|
|
|
include_dirs = [
|
|
|
|
"${tint_googletest_dir}/googlemock/include",
|
|
|
|
"${tint_googletest_dir}/googletest/include",
|
|
|
|
]
|
2022-06-22 12:40:43 +00:00
|
|
|
|
|
|
|
configs = [
|
|
|
|
":tint_common_config",
|
|
|
|
":tint_public_config",
|
|
|
|
]
|
2022-06-17 13:01:59 +00:00
|
|
|
}
|
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
template("tint_unittests_source_set") {
|
|
|
|
source_set(target_name) {
|
|
|
|
forward_variables_from(invoker, "*", [ "configs" ])
|
|
|
|
|
|
|
|
if (defined(invoker.configs)) {
|
|
|
|
configs += invoker.configs
|
|
|
|
}
|
|
|
|
configs += [ ":tint_unittests_config" ]
|
|
|
|
if (build_with_chromium) {
|
|
|
|
configs -= [ "//build/config/compiler:chromium_code" ]
|
|
|
|
configs += [ "//build/config/compiler:no_chromium_code" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
testonly = true
|
|
|
|
|
|
|
|
if (!defined(invoker.deps)) {
|
|
|
|
deps = []
|
|
|
|
}
|
|
|
|
deps += [
|
|
|
|
":gmock_and_gtest",
|
|
|
|
":libtint",
|
|
|
|
":tint_utils_io",
|
|
|
|
]
|
|
|
|
}
|
2022-06-17 13:01:59 +00:00
|
|
|
}
|
|
|
|
|
2023-02-10 19:24:24 +00:00
|
|
|
tint_unittests_source_set("libtint_unittests_ast_helper") {
|
|
|
|
sources = [
|
|
|
|
"ast/test_helper.h",
|
|
|
|
"ast/test_helper_test.cc",
|
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":libtint_ast_src",
|
|
|
|
":libtint_base_src",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
tint_unittests_source_set("tint_unittests_ast_src") {
|
|
|
|
sources = [
|
|
|
|
"ast/alias_test.cc",
|
|
|
|
"ast/assignment_statement_test.cc",
|
|
|
|
"ast/binary_expression_test.cc",
|
|
|
|
"ast/binding_attribute_test.cc",
|
|
|
|
"ast/bitcast_expression_test.cc",
|
|
|
|
"ast/block_statement_test.cc",
|
|
|
|
"ast/bool_literal_expression_test.cc",
|
2022-10-20 22:45:50 +00:00
|
|
|
"ast/break_if_statement_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"ast/break_statement_test.cc",
|
|
|
|
"ast/builtin_attribute_test.cc",
|
|
|
|
"ast/builtin_texture_helper_test.cc",
|
|
|
|
"ast/builtin_texture_helper_test.h",
|
|
|
|
"ast/call_expression_test.cc",
|
|
|
|
"ast/call_statement_test.cc",
|
2022-10-19 15:55:02 +00:00
|
|
|
"ast/case_selector_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"ast/case_statement_test.cc",
|
|
|
|
"ast/compound_assignment_statement_test.cc",
|
2023-01-24 14:59:43 +00:00
|
|
|
"ast/const_assert_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"ast/continue_statement_test.cc",
|
2023-01-24 18:44:27 +00:00
|
|
|
"ast/diagnostic_attribute_test.cc",
|
2023-01-23 17:55:55 +00:00
|
|
|
"ast/diagnostic_control_test.cc",
|
2023-02-04 12:20:55 +00:00
|
|
|
"ast/diagnostic_directive_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"ast/discard_statement_test.cc",
|
|
|
|
"ast/enable_test.cc",
|
2022-11-02 17:07:25 +00:00
|
|
|
"ast/extension_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"ast/float_literal_expression_test.cc",
|
|
|
|
"ast/for_loop_statement_test.cc",
|
|
|
|
"ast/function_test.cc",
|
|
|
|
"ast/group_attribute_test.cc",
|
|
|
|
"ast/id_attribute_test.cc",
|
|
|
|
"ast/identifier_expression_test.cc",
|
2023-02-02 15:04:31 +00:00
|
|
|
"ast/identifier_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"ast/if_statement_test.cc",
|
|
|
|
"ast/increment_decrement_statement_test.cc",
|
|
|
|
"ast/index_accessor_expression_test.cc",
|
|
|
|
"ast/int_literal_expression_test.cc",
|
|
|
|
"ast/interpolate_attribute_test.cc",
|
|
|
|
"ast/invariant_attribute_test.cc",
|
|
|
|
"ast/location_attribute_test.cc",
|
|
|
|
"ast/loop_statement_test.cc",
|
|
|
|
"ast/member_accessor_expression_test.cc",
|
|
|
|
"ast/module_test.cc",
|
|
|
|
"ast/phony_expression_test.cc",
|
|
|
|
"ast/return_statement_test.cc",
|
|
|
|
"ast/stage_attribute_test.cc",
|
|
|
|
"ast/stride_attribute_test.cc",
|
|
|
|
"ast/struct_member_align_attribute_test.cc",
|
|
|
|
"ast/struct_member_offset_attribute_test.cc",
|
|
|
|
"ast/struct_member_size_attribute_test.cc",
|
|
|
|
"ast/struct_member_test.cc",
|
|
|
|
"ast/struct_test.cc",
|
|
|
|
"ast/switch_statement_test.cc",
|
2023-02-03 13:24:18 +00:00
|
|
|
"ast/templated_identifier_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"ast/traverse_expressions_test.cc",
|
|
|
|
"ast/unary_op_expression_test.cc",
|
|
|
|
"ast/variable_decl_statement_test.cc",
|
|
|
|
"ast/variable_test.cc",
|
|
|
|
"ast/while_statement_test.cc",
|
|
|
|
"ast/workgroup_attribute_test.cc",
|
2022-06-17 13:01:59 +00:00
|
|
|
]
|
2023-01-25 18:39:00 +00:00
|
|
|
deps = [
|
2023-01-25 22:40:28 +00:00
|
|
|
":libtint_ast_src",
|
2023-01-25 18:39:00 +00:00
|
|
|
":libtint_base_src",
|
|
|
|
":libtint_transform_src",
|
2023-02-10 19:24:24 +00:00
|
|
|
":libtint_unittests_ast_helper",
|
2023-01-25 18:39:00 +00:00
|
|
|
]
|
2023-01-24 15:16:43 +00:00
|
|
|
|
|
|
|
if (tint_build_wgsl_reader && tint_build_wgsl_writer) {
|
|
|
|
# This AST test relies on the WGSL reader and writer
|
|
|
|
sources += [ "ast/module_clone_test.cc" ]
|
|
|
|
}
|
2022-06-17 13:01:59 +00:00
|
|
|
}
|
2022-06-22 12:40:43 +00:00
|
|
|
|
2023-02-17 21:56:35 +00:00
|
|
|
tint_unittests_source_set("tint_unittests_builtins_src") {
|
|
|
|
sources = [ "builtin/builtin_value_test.cc" ]
|
|
|
|
deps = [ ":libtint_builtins_src" ]
|
|
|
|
}
|
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
tint_unittests_source_set("tint_unittests_diagnostic_src") {
|
|
|
|
sources = [
|
|
|
|
"diagnostic/diagnostic_test.cc",
|
|
|
|
"diagnostic/formatter_test.cc",
|
|
|
|
"diagnostic/printer_test.cc",
|
2022-06-17 13:01:59 +00:00
|
|
|
]
|
2023-01-25 18:39:00 +00:00
|
|
|
deps = [ ":libtint_base_src" ]
|
2022-06-17 13:01:59 +00:00
|
|
|
}
|
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
tint_unittests_source_set("tint_unittests_inspector_src") {
|
|
|
|
sources = [
|
|
|
|
"inspector/inspector_test.cc",
|
|
|
|
"inspector/test_inspector_builder.cc",
|
|
|
|
"inspector/test_inspector_builder.h",
|
|
|
|
"inspector/test_inspector_runner.cc",
|
|
|
|
"inspector/test_inspector_runner.h",
|
2022-06-17 13:01:59 +00:00
|
|
|
]
|
2023-01-25 18:41:40 +00:00
|
|
|
deps = [ ":libtint_inspector_src" ]
|
2022-06-17 13:01:59 +00:00
|
|
|
}
|
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
tint_unittests_source_set("tint_unittests_resolver_src") {
|
|
|
|
sources = [
|
2022-10-03 14:05:23 +00:00
|
|
|
"resolver/address_space_layout_validation_test.cc",
|
|
|
|
"resolver/address_space_validation_test.cc",
|
2022-11-17 17:27:27 +00:00
|
|
|
"resolver/alias_analysis_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"resolver/array_accessor_test.cc",
|
|
|
|
"resolver/assignment_validation_test.cc",
|
|
|
|
"resolver/atomics_test.cc",
|
|
|
|
"resolver/atomics_validation_test.cc",
|
|
|
|
"resolver/attribute_validation_test.cc",
|
|
|
|
"resolver/bitcast_validation_test.cc",
|
|
|
|
"resolver/builtin_test.cc",
|
|
|
|
"resolver/builtin_validation_test.cc",
|
|
|
|
"resolver/builtins_validation_test.cc",
|
|
|
|
"resolver/call_test.cc",
|
|
|
|
"resolver/call_validation_test.cc",
|
|
|
|
"resolver/compound_assignment_validation_test.cc",
|
|
|
|
"resolver/compound_statement_test.cc",
|
2023-01-24 14:59:43 +00:00
|
|
|
"resolver/const_assert_test.cc",
|
2022-10-13 19:27:30 +00:00
|
|
|
"resolver/const_eval_binary_op_test.cc",
|
2022-12-20 18:34:06 +00:00
|
|
|
"resolver/const_eval_bitcast_test.cc",
|
2022-10-13 19:27:30 +00:00
|
|
|
"resolver/const_eval_builtin_test.cc",
|
|
|
|
"resolver/const_eval_construction_test.cc",
|
|
|
|
"resolver/const_eval_conversion_test.cc",
|
|
|
|
"resolver/const_eval_indexing_test.cc",
|
|
|
|
"resolver/const_eval_member_access_test.cc",
|
2023-02-06 18:52:13 +00:00
|
|
|
"resolver/const_eval_runtime_semantics_test.cc",
|
2022-10-13 19:27:30 +00:00
|
|
|
"resolver/const_eval_test.h",
|
|
|
|
"resolver/const_eval_unary_op_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"resolver/control_block_validation_test.cc",
|
|
|
|
"resolver/dependency_graph_test.cc",
|
2023-01-24 21:01:36 +00:00
|
|
|
"resolver/diagnostic_control_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"resolver/entry_point_validation_test.cc",
|
2022-07-15 23:46:31 +00:00
|
|
|
"resolver/evaluation_stage_test.cc",
|
2023-02-09 15:35:27 +00:00
|
|
|
"resolver/expression_kind_test.cc",
|
2022-12-14 11:09:47 +00:00
|
|
|
"resolver/f16_extension_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"resolver/function_validation_test.cc",
|
|
|
|
"resolver/host_shareable_validation_test.cc",
|
|
|
|
"resolver/increment_decrement_validation_test.cc",
|
2022-08-02 17:03:35 +00:00
|
|
|
"resolver/inferred_type_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"resolver/intrinsic_table_test.cc",
|
|
|
|
"resolver/is_host_shareable_test.cc",
|
|
|
|
"resolver/is_storeable_test.cc",
|
2022-12-17 02:20:04 +00:00
|
|
|
"resolver/load_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"resolver/materialize_test.cc",
|
2022-07-27 20:50:40 +00:00
|
|
|
"resolver/override_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"resolver/ptr_ref_test.cc",
|
|
|
|
"resolver/ptr_ref_validation_test.cc",
|
|
|
|
"resolver/resolver_behavior_test.cc",
|
|
|
|
"resolver/resolver_test.cc",
|
|
|
|
"resolver/resolver_test_helper.cc",
|
|
|
|
"resolver/resolver_test_helper.h",
|
2022-11-09 12:16:56 +00:00
|
|
|
"resolver/root_identifier_test.cc",
|
2022-11-15 00:30:33 +00:00
|
|
|
"resolver/side_effects_test.cc",
|
2022-10-03 14:05:23 +00:00
|
|
|
"resolver/struct_address_space_use_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"resolver/struct_layout_test.cc",
|
|
|
|
"resolver/struct_pipeline_stage_use_test.cc",
|
2022-10-20 13:38:28 +00:00
|
|
|
"resolver/type_initializer_validation_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"resolver/type_validation_test.cc",
|
|
|
|
"resolver/uniformity_test.cc",
|
|
|
|
"resolver/validation_test.cc",
|
|
|
|
"resolver/validator_is_storeable_test.cc",
|
2022-06-24 21:26:39 +00:00
|
|
|
"resolver/variable_test.cc",
|
|
|
|
"resolver/variable_validation_test.cc",
|
2022-06-17 13:01:59 +00:00
|
|
|
]
|
2023-01-21 23:41:56 +00:00
|
|
|
deps = [
|
2023-01-25 18:39:00 +00:00
|
|
|
":libtint_base_src",
|
2023-01-21 23:41:56 +00:00
|
|
|
":libtint_transform_src",
|
|
|
|
":tint_unittests_ast_src",
|
|
|
|
]
|
2022-06-17 13:01:59 +00:00
|
|
|
}
|
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
tint_unittests_source_set("tint_unittests_sem_src") {
|
|
|
|
sources = [
|
|
|
|
"sem/builtin_test.cc",
|
2023-01-25 01:24:46 +00:00
|
|
|
"sem/diagnostic_severity_test.cc",
|
2022-10-17 13:24:38 +00:00
|
|
|
"sem/struct_test.cc",
|
2023-02-04 21:20:26 +00:00
|
|
|
"sem/value_expression_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
]
|
|
|
|
}
|
2022-06-17 13:01:59 +00:00
|
|
|
|
2023-01-06 02:57:36 +00:00
|
|
|
tint_unittests_source_set("tint_unittests_constant_src") {
|
|
|
|
sources = [
|
|
|
|
"constant/composite_test.cc",
|
|
|
|
"constant/scalar_test.cc",
|
|
|
|
"constant/splat_test.cc",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2022-12-08 00:32:27 +00:00
|
|
|
tint_unittests_source_set("tint_unittests_type_src") {
|
2022-12-08 12:03:53 +00:00
|
|
|
sources = [
|
2023-01-21 23:44:38 +00:00
|
|
|
"type/access_test.cc",
|
2023-01-21 19:56:49 +00:00
|
|
|
"type/address_space_test.cc",
|
2022-12-08 22:21:24 +00:00
|
|
|
"type/atomic_test.cc",
|
2022-12-08 16:39:59 +00:00
|
|
|
"type/bool_test.cc",
|
2023-02-07 13:35:58 +00:00
|
|
|
"type/builtin_test.cc",
|
2022-12-08 14:14:10 +00:00
|
|
|
"type/depth_multisampled_texture_test.cc",
|
|
|
|
"type/depth_texture_test.cc",
|
|
|
|
"type/external_texture_test.cc",
|
2022-12-08 16:39:59 +00:00
|
|
|
"type/f16_test.cc",
|
|
|
|
"type/f32_test.cc",
|
|
|
|
"type/i32_test.cc",
|
2022-12-09 05:00:07 +00:00
|
|
|
"type/manager_test.cc",
|
2022-12-08 22:21:24 +00:00
|
|
|
"type/matrix_test.cc",
|
2022-12-08 14:14:10 +00:00
|
|
|
"type/multisampled_texture_test.cc",
|
2022-12-08 17:50:50 +00:00
|
|
|
"type/pointer_test.cc",
|
|
|
|
"type/reference_test.cc",
|
2022-12-08 14:14:10 +00:00
|
|
|
"type/sampled_texture_test.cc",
|
2022-12-08 15:25:18 +00:00
|
|
|
"type/sampler_test.cc",
|
2022-12-08 14:14:10 +00:00
|
|
|
"type/storage_texture_test.cc",
|
2022-12-08 22:21:24 +00:00
|
|
|
"type/struct_test.cc",
|
2023-01-21 23:51:25 +00:00
|
|
|
"type/texel_format_test.cc",
|
2022-12-08 14:14:10 +00:00
|
|
|
"type/texture_test.cc",
|
2022-12-08 12:03:53 +00:00
|
|
|
"type/type_test.cc",
|
2022-12-08 16:39:59 +00:00
|
|
|
"type/u32_test.cc",
|
2022-12-08 22:21:24 +00:00
|
|
|
"type/vector_test.cc",
|
2022-12-08 12:03:53 +00:00
|
|
|
]
|
2023-01-25 18:39:00 +00:00
|
|
|
deps = [ ":libtint_base_src" ]
|
2022-12-08 00:32:27 +00:00
|
|
|
}
|
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
tint_unittests_source_set("tint_unittests_text_src") {
|
|
|
|
sources = [ "text/unicode_test.cc" ]
|
2023-01-23 16:27:05 +00:00
|
|
|
deps = [ ":libtint_text_src" ]
|
2022-06-22 12:40:43 +00:00
|
|
|
}
|
2022-06-17 13:01:59 +00:00
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
tint_unittests_source_set("tint_unittests_transform_src") {
|
|
|
|
sources = [
|
2022-09-02 19:19:10 +00:00
|
|
|
"transform/add_block_attribute_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"transform/add_empty_entry_point_test.cc",
|
|
|
|
"transform/array_length_from_uniform_test.cc",
|
|
|
|
"transform/binding_remapper_test.cc",
|
|
|
|
"transform/builtin_polyfill_test.cc",
|
|
|
|
"transform/calculate_array_length_test.cc",
|
|
|
|
"transform/canonicalize_entry_point_io_test.cc",
|
2022-10-11 09:52:25 +00:00
|
|
|
"transform/clamp_frag_depth_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"transform/combine_samplers_test.cc",
|
|
|
|
"transform/decompose_memory_access_test.cc",
|
|
|
|
"transform/decompose_strided_array_test.cc",
|
|
|
|
"transform/decompose_strided_matrix_test.cc",
|
2022-11-09 15:40:06 +00:00
|
|
|
"transform/demote_to_helper_test.cc",
|
2022-12-01 18:49:09 +00:00
|
|
|
"transform/direct_variable_access_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"transform/disable_uniformity_analysis_test.cc",
|
|
|
|
"transform/expand_compound_assignment_test.cc",
|
|
|
|
"transform/first_index_offset_test.cc",
|
|
|
|
"transform/for_loop_to_loop_test.cc",
|
|
|
|
"transform/localize_struct_array_assignment_test.cc",
|
2022-10-31 14:49:03 +00:00
|
|
|
"transform/merge_return_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"transform/module_scope_var_to_entry_point_param_test.cc",
|
|
|
|
"transform/multiplanar_external_texture_test.cc",
|
|
|
|
"transform/num_workgroups_from_uniform_test.cc",
|
2022-10-27 14:36:49 +00:00
|
|
|
"transform/packed_vec3_test.cc",
|
2022-09-13 19:48:51 +00:00
|
|
|
"transform/pad_structs_test.cc",
|
2022-12-06 18:32:19 +00:00
|
|
|
"transform/preserve_padding_test.cc",
|
2022-06-27 20:20:25 +00:00
|
|
|
"transform/promote_initializers_to_let_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"transform/promote_side_effects_to_decl_test.cc",
|
|
|
|
"transform/remove_continue_in_switch_test.cc",
|
|
|
|
"transform/remove_phonies_test.cc",
|
|
|
|
"transform/remove_unreachable_statements_test.cc",
|
|
|
|
"transform/renamer_test.cc",
|
|
|
|
"transform/robustness_test.cc",
|
|
|
|
"transform/simplify_pointers_test.cc",
|
|
|
|
"transform/single_entry_point_test.cc",
|
2022-06-24 22:28:23 +00:00
|
|
|
"transform/spirv_atomic_test.cc",
|
2022-10-11 07:55:00 +00:00
|
|
|
"transform/std140_exhaustive_test.cc",
|
2022-11-24 05:25:35 +00:00
|
|
|
"transform/std140_f16_test.cc",
|
|
|
|
"transform/std140_f32_test.cc",
|
2022-09-01 22:12:19 +00:00
|
|
|
"transform/std140_test.cc",
|
2022-07-22 16:05:06 +00:00
|
|
|
"transform/substitute_override_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"transform/test_helper.h",
|
2023-01-07 04:09:25 +00:00
|
|
|
"transform/texture_1d_to_2d_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"transform/transform_test.cc",
|
2022-11-22 21:30:10 +00:00
|
|
|
"transform/truncate_interstage_variables_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"transform/unshadow_test.cc",
|
|
|
|
"transform/utils/get_insertion_point_test.cc",
|
|
|
|
"transform/utils/hoist_to_decl_before_test.cc",
|
|
|
|
"transform/var_for_dynamic_index_test.cc",
|
2022-09-01 03:08:20 +00:00
|
|
|
"transform/vectorize_matrix_conversions_test.cc",
|
2022-10-20 13:38:28 +00:00
|
|
|
"transform/vectorize_scalar_matrix_initializers_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"transform/vertex_pulling_test.cc",
|
|
|
|
"transform/while_to_loop_test.cc",
|
|
|
|
"transform/zero_init_workgroup_memory_test.cc",
|
|
|
|
]
|
2023-01-21 23:41:56 +00:00
|
|
|
|
2023-01-24 15:16:43 +00:00
|
|
|
deps = [
|
2023-01-25 18:39:00 +00:00
|
|
|
":libtint_base_src",
|
2023-01-24 15:16:43 +00:00
|
|
|
":libtint_transform_src",
|
2023-02-14 13:52:43 +00:00
|
|
|
":libtint_unittests_ast_helper",
|
2023-01-24 15:16:43 +00:00
|
|
|
":libtint_wgsl_reader_src",
|
|
|
|
":libtint_wgsl_writer_src",
|
|
|
|
]
|
2022-06-22 12:40:43 +00:00
|
|
|
}
|
2022-06-17 13:01:59 +00:00
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
tint_unittests_source_set("tint_unittests_utils_src") {
|
|
|
|
sources = [
|
|
|
|
"utils/bitcast_test.cc",
|
2022-07-21 23:32:24 +00:00
|
|
|
"utils/bitset_test.cc",
|
2023-01-25 18:39:00 +00:00
|
|
|
"utils/block_allocator_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"utils/crc32_test.cc",
|
|
|
|
"utils/defer_test.cc",
|
|
|
|
"utils/enum_set_test.cc",
|
|
|
|
"utils/hash_test.cc",
|
2022-08-17 16:28:23 +00:00
|
|
|
"utils/hashmap_test.cc",
|
|
|
|
"utils/hashset_test.cc",
|
2022-08-18 14:37:17 +00:00
|
|
|
"utils/io/command_test.cc",
|
|
|
|
"utils/io/tmpfile_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"utils/map_test.cc",
|
|
|
|
"utils/math_test.cc",
|
|
|
|
"utils/result_test.cc",
|
|
|
|
"utils/reverse_test.cc",
|
|
|
|
"utils/scoped_assignment_test.cc",
|
|
|
|
"utils/string_test.cc",
|
|
|
|
"utils/transform_test.cc",
|
|
|
|
"utils/unique_allocator_test.cc",
|
|
|
|
"utils/unique_vector_test.cc",
|
2022-07-21 19:34:05 +00:00
|
|
|
"utils/vector_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
]
|
2023-01-25 18:39:00 +00:00
|
|
|
deps = [ ":libtint_base_src" ]
|
2022-06-22 12:40:43 +00:00
|
|
|
}
|
2022-06-17 13:01:59 +00:00
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
tint_unittests_source_set("tint_unittests_writer_src") {
|
|
|
|
sources = [
|
|
|
|
"writer/append_vector_test.cc",
|
2022-10-14 13:38:27 +00:00
|
|
|
"writer/check_supported_extensions_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"writer/flatten_bindings_test.cc",
|
|
|
|
"writer/float_to_string_test.cc",
|
|
|
|
"writer/generate_external_texture_bindings_test.cc",
|
|
|
|
"writer/text_generator_test.cc",
|
|
|
|
]
|
2023-01-25 18:39:00 +00:00
|
|
|
deps = [
|
|
|
|
":libtint_base_src",
|
2023-02-14 13:52:43 +00:00
|
|
|
":libtint_unittests_ast_helper",
|
2023-01-25 18:39:00 +00:00
|
|
|
":libtint_writer_src",
|
|
|
|
]
|
2022-06-22 12:40:43 +00:00
|
|
|
}
|
2022-06-17 13:01:59 +00:00
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
tint_unittests_source_set("tint_unittests_spv_reader_src") {
|
|
|
|
sources = [
|
|
|
|
"reader/spirv/enum_converter_test.cc",
|
|
|
|
"reader/spirv/fail_stream_test.cc",
|
|
|
|
"reader/spirv/function_arithmetic_test.cc",
|
|
|
|
"reader/spirv/function_bit_test.cc",
|
|
|
|
"reader/spirv/function_call_test.cc",
|
|
|
|
"reader/spirv/function_cfg_test.cc",
|
|
|
|
"reader/spirv/function_composite_test.cc",
|
|
|
|
"reader/spirv/function_conversion_test.cc",
|
|
|
|
"reader/spirv/function_decl_test.cc",
|
|
|
|
"reader/spirv/function_glsl_std_450_test.cc",
|
|
|
|
"reader/spirv/function_logical_test.cc",
|
|
|
|
"reader/spirv/function_memory_test.cc",
|
|
|
|
"reader/spirv/function_misc_test.cc",
|
|
|
|
"reader/spirv/function_var_test.cc",
|
|
|
|
"reader/spirv/namer_test.cc",
|
|
|
|
"reader/spirv/parser_impl_barrier_test.cc",
|
2023-02-03 22:00:07 +00:00
|
|
|
"reader/spirv/parser_impl_constant_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"reader/spirv/parser_impl_convert_member_decoration_test.cc",
|
|
|
|
"reader/spirv/parser_impl_convert_type_test.cc",
|
|
|
|
"reader/spirv/parser_impl_function_decl_test.cc",
|
|
|
|
"reader/spirv/parser_impl_get_decorations_test.cc",
|
|
|
|
"reader/spirv/parser_impl_handle_test.cc",
|
|
|
|
"reader/spirv/parser_impl_import_test.cc",
|
|
|
|
"reader/spirv/parser_impl_module_var_test.cc",
|
|
|
|
"reader/spirv/parser_impl_named_types_test.cc",
|
|
|
|
"reader/spirv/parser_impl_test.cc",
|
|
|
|
"reader/spirv/parser_impl_test_helper.cc",
|
|
|
|
"reader/spirv/parser_impl_test_helper.h",
|
|
|
|
"reader/spirv/parser_impl_user_name_test.cc",
|
|
|
|
"reader/spirv/parser_test.cc",
|
|
|
|
"reader/spirv/parser_type_test.cc",
|
|
|
|
"reader/spirv/spirv_tools_helpers_test.cc",
|
|
|
|
"reader/spirv/spirv_tools_helpers_test.h",
|
|
|
|
"reader/spirv/usage_test.cc",
|
|
|
|
]
|
2022-06-17 13:01:59 +00:00
|
|
|
|
2023-01-21 18:50:20 +00:00
|
|
|
deps = [
|
2023-01-25 18:39:00 +00:00
|
|
|
":libtint_base_src",
|
2023-01-21 18:50:20 +00:00
|
|
|
":libtint_spv_reader_src",
|
2023-01-24 15:16:43 +00:00
|
|
|
":libtint_wgsl_writer_src",
|
2023-01-21 18:50:20 +00:00
|
|
|
"${tint_spirv_tools_dir}/:spvtools_opt",
|
|
|
|
]
|
2022-06-22 12:40:43 +00:00
|
|
|
}
|
2022-06-17 13:01:59 +00:00
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
tint_unittests_source_set("tint_unittests_spv_writer_src") {
|
|
|
|
sources = [
|
|
|
|
"writer/spirv/binary_writer_test.cc",
|
|
|
|
"writer/spirv/builder_accessor_expression_test.cc",
|
|
|
|
"writer/spirv/builder_assign_test.cc",
|
|
|
|
"writer/spirv/builder_binary_expression_test.cc",
|
|
|
|
"writer/spirv/builder_bitcast_expression_test.cc",
|
|
|
|
"writer/spirv/builder_block_test.cc",
|
|
|
|
"writer/spirv/builder_builtin_test.cc",
|
|
|
|
"writer/spirv/builder_builtin_texture_test.cc",
|
|
|
|
"writer/spirv/builder_call_test.cc",
|
2023-01-24 14:59:43 +00:00
|
|
|
"writer/spirv/builder_const_assert_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"writer/spirv/builder_discard_test.cc",
|
|
|
|
"writer/spirv/builder_entry_point_test.cc",
|
|
|
|
"writer/spirv/builder_format_conversion_test.cc",
|
|
|
|
"writer/spirv/builder_function_attribute_test.cc",
|
|
|
|
"writer/spirv/builder_function_test.cc",
|
|
|
|
"writer/spirv/builder_function_variable_test.cc",
|
|
|
|
"writer/spirv/builder_global_variable_test.cc",
|
|
|
|
"writer/spirv/builder_ident_expression_test.cc",
|
|
|
|
"writer/spirv/builder_if_test.cc",
|
2022-10-20 13:38:28 +00:00
|
|
|
"writer/spirv/builder_initializer_expression_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"writer/spirv/builder_literal_test.cc",
|
|
|
|
"writer/spirv/builder_loop_test.cc",
|
|
|
|
"writer/spirv/builder_return_test.cc",
|
|
|
|
"writer/spirv/builder_switch_test.cc",
|
|
|
|
"writer/spirv/builder_test.cc",
|
|
|
|
"writer/spirv/builder_type_test.cc",
|
|
|
|
"writer/spirv/builder_unary_op_expression_test.cc",
|
|
|
|
"writer/spirv/instruction_test.cc",
|
|
|
|
"writer/spirv/operand_test.cc",
|
|
|
|
"writer/spirv/scalar_constant_test.cc",
|
|
|
|
"writer/spirv/spv_dump.cc",
|
|
|
|
"writer/spirv/spv_dump.h",
|
|
|
|
"writer/spirv/test_helper.h",
|
|
|
|
]
|
2022-06-17 13:01:59 +00:00
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
deps = [
|
2023-01-25 18:39:00 +00:00
|
|
|
":libtint_base_src",
|
2023-02-17 21:56:35 +00:00
|
|
|
":libtint_builtins_src",
|
2022-06-22 12:40:43 +00:00
|
|
|
":libtint_spv_writer_src",
|
|
|
|
":tint_unittests_ast_src",
|
|
|
|
"${tint_spirv_tools_dir}/:spvtools",
|
|
|
|
]
|
|
|
|
}
|
2022-06-17 13:01:59 +00:00
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
tint_unittests_source_set("tint_unittests_wgsl_reader_src") {
|
|
|
|
sources = [
|
2023-01-24 17:56:57 +00:00
|
|
|
"reader/wgsl/classify_template_args_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"reader/wgsl/lexer_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_additive_expression_test.cc",
|
2022-10-03 14:05:23 +00:00
|
|
|
"reader/wgsl/parser_impl_address_space_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"reader/wgsl/parser_impl_argument_expression_list_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_assignment_stmt_test.cc",
|
2022-08-18 14:37:17 +00:00
|
|
|
"reader/wgsl/parser_impl_bitwise_expression_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"reader/wgsl/parser_impl_break_stmt_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_bug_cases_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_call_stmt_test.cc",
|
2022-08-22 16:15:04 +00:00
|
|
|
"reader/wgsl/parser_impl_callable_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"reader/wgsl/parser_impl_case_body_test.cc",
|
2022-08-05 14:53:47 +00:00
|
|
|
"reader/wgsl/parser_impl_compound_stmt_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"reader/wgsl/parser_impl_const_literal_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_continue_stmt_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_continuing_stmt_test.cc",
|
2022-08-17 16:30:30 +00:00
|
|
|
"reader/wgsl/parser_impl_core_lhs_expression_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"reader/wgsl/parser_impl_depth_texture_test.cc",
|
2023-01-24 21:01:36 +00:00
|
|
|
"reader/wgsl/parser_impl_diagnostic_attribute_test.cc",
|
2023-01-24 21:01:36 +00:00
|
|
|
"reader/wgsl/parser_impl_diagnostic_control_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_diagnostic_directive_test.cc",
|
2022-08-19 21:26:01 +00:00
|
|
|
"reader/wgsl/parser_impl_element_count_expression_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"reader/wgsl/parser_impl_enable_directive_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_error_msg_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_error_resync_test.cc",
|
2022-08-22 14:06:44 +00:00
|
|
|
"reader/wgsl/parser_impl_expression_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"reader/wgsl/parser_impl_external_texture_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_for_stmt_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_function_attribute_list_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_function_attribute_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_function_decl_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_function_header_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_global_constant_decl_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_global_decl_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_global_variable_decl_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_if_stmt_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_increment_decrement_stmt_test.cc",
|
2022-08-17 16:30:30 +00:00
|
|
|
"reader/wgsl/parser_impl_lhs_expression_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"reader/wgsl/parser_impl_loop_stmt_test.cc",
|
2022-08-19 21:26:01 +00:00
|
|
|
"reader/wgsl/parser_impl_math_expression_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"reader/wgsl/parser_impl_multiplicative_expression_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_param_list_test.cc",
|
2022-07-22 16:07:36 +00:00
|
|
|
"reader/wgsl/parser_impl_paren_expression_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"reader/wgsl/parser_impl_primary_expression_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_relational_expression_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_reserved_keyword_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_sampled_texture_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_sampler_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_shift_expression_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_singular_expression_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_statement_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_statements_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_storage_texture_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_struct_attribute_decl_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_struct_body_decl_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_struct_decl_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_struct_member_attribute_decl_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_struct_member_attribute_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_struct_member_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_switch_body_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_switch_stmt_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_test_helper.cc",
|
|
|
|
"reader/wgsl/parser_impl_test_helper.h",
|
|
|
|
"reader/wgsl/parser_impl_texel_format_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_texture_sampler_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_type_alias_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_type_decl_test.cc",
|
2022-08-22 16:15:04 +00:00
|
|
|
"reader/wgsl/parser_impl_type_decl_without_ident_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"reader/wgsl/parser_impl_unary_expression_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_variable_attribute_list_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_variable_attribute_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_variable_decl_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_variable_ident_decl_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_variable_qualifier_test.cc",
|
|
|
|
"reader/wgsl/parser_impl_variable_stmt_test.cc",
|
2022-08-22 16:15:04 +00:00
|
|
|
"reader/wgsl/parser_impl_vec_mat_prefix_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"reader/wgsl/parser_impl_while_stmt_test.cc",
|
|
|
|
"reader/wgsl/parser_test.cc",
|
|
|
|
"reader/wgsl/token_test.cc",
|
|
|
|
]
|
2022-06-17 13:01:59 +00:00
|
|
|
|
2023-01-25 18:39:00 +00:00
|
|
|
deps = [
|
|
|
|
":libtint_base_src",
|
2023-02-10 19:24:24 +00:00
|
|
|
":libtint_unittests_ast_helper",
|
2023-01-25 18:39:00 +00:00
|
|
|
":libtint_wgsl_reader_src",
|
|
|
|
]
|
2022-06-22 12:40:43 +00:00
|
|
|
}
|
2022-06-17 13:01:59 +00:00
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
tint_unittests_source_set("tint_unittests_wgsl_writer_src") {
|
|
|
|
sources = [
|
|
|
|
"writer/wgsl/generator_impl_alias_type_test.cc",
|
|
|
|
"writer/wgsl/generator_impl_array_accessor_test.cc",
|
|
|
|
"writer/wgsl/generator_impl_assign_test.cc",
|
|
|
|
"writer/wgsl/generator_impl_binary_test.cc",
|
|
|
|
"writer/wgsl/generator_impl_bitcast_test.cc",
|
|
|
|
"writer/wgsl/generator_impl_block_test.cc",
|
|
|
|
"writer/wgsl/generator_impl_break_test.cc",
|
|
|
|
"writer/wgsl/generator_impl_call_test.cc",
|
|
|
|
"writer/wgsl/generator_impl_case_test.cc",
|
|
|
|
"writer/wgsl/generator_impl_cast_test.cc",
|
2023-01-24 14:59:43 +00:00
|
|
|
"writer/wgsl/generator_impl_const_assert_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"writer/wgsl/generator_impl_continue_test.cc",
|
2023-01-24 21:01:36 +00:00
|
|
|
"writer/wgsl/generator_impl_diagnostic_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"writer/wgsl/generator_impl_discard_test.cc",
|
|
|
|
"writer/wgsl/generator_impl_enable_test.cc",
|
|
|
|
"writer/wgsl/generator_impl_function_test.cc",
|
|
|
|
"writer/wgsl/generator_impl_global_decl_test.cc",
|
|
|
|
"writer/wgsl/generator_impl_identifier_test.cc",
|
|
|
|
"writer/wgsl/generator_impl_if_test.cc",
|
2022-10-20 13:38:28 +00:00
|
|
|
"writer/wgsl/generator_impl_initializer_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"writer/wgsl/generator_impl_literal_test.cc",
|
|
|
|
"writer/wgsl/generator_impl_loop_test.cc",
|
|
|
|
"writer/wgsl/generator_impl_member_accessor_test.cc",
|
|
|
|
"writer/wgsl/generator_impl_return_test.cc",
|
|
|
|
"writer/wgsl/generator_impl_switch_test.cc",
|
|
|
|
"writer/wgsl/generator_impl_test.cc",
|
|
|
|
"writer/wgsl/generator_impl_type_test.cc",
|
|
|
|
"writer/wgsl/generator_impl_unary_op_test.cc",
|
|
|
|
"writer/wgsl/generator_impl_variable_decl_statement_test.cc",
|
|
|
|
"writer/wgsl/generator_impl_variable_test.cc",
|
|
|
|
"writer/wgsl/test_helper.h",
|
|
|
|
]
|
2022-06-17 13:01:59 +00:00
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
deps = [
|
|
|
|
":libtint_wgsl_writer_src",
|
|
|
|
":tint_unittests_ast_src",
|
|
|
|
]
|
|
|
|
}
|
2022-06-17 13:01:59 +00:00
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
tint_unittests_source_set("tint_unittests_msl_writer_src") {
|
|
|
|
sources = [
|
|
|
|
"writer/msl/generator_impl_array_accessor_test.cc",
|
|
|
|
"writer/msl/generator_impl_assign_test.cc",
|
|
|
|
"writer/msl/generator_impl_binary_test.cc",
|
|
|
|
"writer/msl/generator_impl_bitcast_test.cc",
|
|
|
|
"writer/msl/generator_impl_block_test.cc",
|
|
|
|
"writer/msl/generator_impl_break_test.cc",
|
|
|
|
"writer/msl/generator_impl_builtin_test.cc",
|
|
|
|
"writer/msl/generator_impl_builtin_texture_test.cc",
|
|
|
|
"writer/msl/generator_impl_call_test.cc",
|
|
|
|
"writer/msl/generator_impl_case_test.cc",
|
|
|
|
"writer/msl/generator_impl_cast_test.cc",
|
2023-01-24 14:59:43 +00:00
|
|
|
"writer/msl/generator_impl_const_assert_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"writer/msl/generator_impl_continue_test.cc",
|
|
|
|
"writer/msl/generator_impl_discard_test.cc",
|
|
|
|
"writer/msl/generator_impl_function_test.cc",
|
|
|
|
"writer/msl/generator_impl_identifier_test.cc",
|
|
|
|
"writer/msl/generator_impl_if_test.cc",
|
|
|
|
"writer/msl/generator_impl_import_test.cc",
|
2022-10-20 13:38:28 +00:00
|
|
|
"writer/msl/generator_impl_initializer_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"writer/msl/generator_impl_loop_test.cc",
|
|
|
|
"writer/msl/generator_impl_member_accessor_test.cc",
|
|
|
|
"writer/msl/generator_impl_module_constant_test.cc",
|
|
|
|
"writer/msl/generator_impl_return_test.cc",
|
|
|
|
"writer/msl/generator_impl_sanitizer_test.cc",
|
|
|
|
"writer/msl/generator_impl_switch_test.cc",
|
|
|
|
"writer/msl/generator_impl_test.cc",
|
|
|
|
"writer/msl/generator_impl_type_test.cc",
|
|
|
|
"writer/msl/generator_impl_unary_op_test.cc",
|
|
|
|
"writer/msl/generator_impl_variable_decl_statement_test.cc",
|
|
|
|
"writer/msl/test_helper.h",
|
|
|
|
]
|
2022-06-17 13:01:59 +00:00
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
deps = [
|
|
|
|
":libtint_msl_writer_src",
|
|
|
|
":tint_unittests_ast_src",
|
|
|
|
]
|
|
|
|
}
|
2022-06-17 13:01:59 +00:00
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
tint_unittests_source_set("tint_unittests_hlsl_writer_src") {
|
|
|
|
sources = [
|
|
|
|
"writer/hlsl/generator_impl_array_accessor_test.cc",
|
|
|
|
"writer/hlsl/generator_impl_assign_test.cc",
|
|
|
|
"writer/hlsl/generator_impl_binary_test.cc",
|
|
|
|
"writer/hlsl/generator_impl_bitcast_test.cc",
|
|
|
|
"writer/hlsl/generator_impl_block_test.cc",
|
|
|
|
"writer/hlsl/generator_impl_break_test.cc",
|
|
|
|
"writer/hlsl/generator_impl_builtin_test.cc",
|
|
|
|
"writer/hlsl/generator_impl_builtin_texture_test.cc",
|
|
|
|
"writer/hlsl/generator_impl_call_test.cc",
|
|
|
|
"writer/hlsl/generator_impl_case_test.cc",
|
|
|
|
"writer/hlsl/generator_impl_cast_test.cc",
|
2023-01-24 14:59:43 +00:00
|
|
|
"writer/hlsl/generator_impl_const_assert_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"writer/hlsl/generator_impl_continue_test.cc",
|
|
|
|
"writer/hlsl/generator_impl_discard_test.cc",
|
|
|
|
"writer/hlsl/generator_impl_function_test.cc",
|
|
|
|
"writer/hlsl/generator_impl_identifier_test.cc",
|
|
|
|
"writer/hlsl/generator_impl_if_test.cc",
|
|
|
|
"writer/hlsl/generator_impl_import_test.cc",
|
2022-10-20 13:38:28 +00:00
|
|
|
"writer/hlsl/generator_impl_initializer_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"writer/hlsl/generator_impl_loop_test.cc",
|
|
|
|
"writer/hlsl/generator_impl_member_accessor_test.cc",
|
|
|
|
"writer/hlsl/generator_impl_module_constant_test.cc",
|
|
|
|
"writer/hlsl/generator_impl_return_test.cc",
|
|
|
|
"writer/hlsl/generator_impl_sanitizer_test.cc",
|
|
|
|
"writer/hlsl/generator_impl_switch_test.cc",
|
|
|
|
"writer/hlsl/generator_impl_test.cc",
|
|
|
|
"writer/hlsl/generator_impl_type_test.cc",
|
|
|
|
"writer/hlsl/generator_impl_unary_op_test.cc",
|
|
|
|
"writer/hlsl/generator_impl_variable_decl_statement_test.cc",
|
|
|
|
"writer/hlsl/generator_impl_workgroup_var_test.cc",
|
|
|
|
"writer/hlsl/test_helper.h",
|
|
|
|
]
|
2022-06-17 13:01:59 +00:00
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
deps = [
|
|
|
|
":libtint_hlsl_writer_src",
|
2023-01-21 23:41:56 +00:00
|
|
|
":libtint_transform_src",
|
2022-06-22 12:40:43 +00:00
|
|
|
":tint_unittests_ast_src",
|
|
|
|
]
|
|
|
|
}
|
2022-06-17 13:01:59 +00:00
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
tint_unittests_source_set("tint_unittests_glsl_writer_src") {
|
|
|
|
sources = [
|
|
|
|
"writer/glsl/generator_impl_array_accessor_test.cc",
|
|
|
|
"writer/glsl/generator_impl_assign_test.cc",
|
|
|
|
"writer/glsl/generator_impl_binary_test.cc",
|
|
|
|
"writer/glsl/generator_impl_bitcast_test.cc",
|
|
|
|
"writer/glsl/generator_impl_block_test.cc",
|
|
|
|
"writer/glsl/generator_impl_break_test.cc",
|
|
|
|
"writer/glsl/generator_impl_builtin_test.cc",
|
|
|
|
"writer/glsl/generator_impl_builtin_texture_test.cc",
|
|
|
|
"writer/glsl/generator_impl_call_test.cc",
|
|
|
|
"writer/glsl/generator_impl_case_test.cc",
|
|
|
|
"writer/glsl/generator_impl_cast_test.cc",
|
|
|
|
"writer/glsl/generator_impl_continue_test.cc",
|
|
|
|
"writer/glsl/generator_impl_discard_test.cc",
|
|
|
|
"writer/glsl/generator_impl_function_test.cc",
|
|
|
|
"writer/glsl/generator_impl_identifier_test.cc",
|
|
|
|
"writer/glsl/generator_impl_if_test.cc",
|
|
|
|
"writer/glsl/generator_impl_import_test.cc",
|
2022-10-20 13:38:28 +00:00
|
|
|
"writer/glsl/generator_impl_initializer_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"writer/glsl/generator_impl_loop_test.cc",
|
|
|
|
"writer/glsl/generator_impl_member_accessor_test.cc",
|
|
|
|
"writer/glsl/generator_impl_module_constant_test.cc",
|
|
|
|
"writer/glsl/generator_impl_return_test.cc",
|
|
|
|
"writer/glsl/generator_impl_sanitizer_test.cc",
|
|
|
|
"writer/glsl/generator_impl_storage_buffer_test.cc",
|
|
|
|
"writer/glsl/generator_impl_switch_test.cc",
|
|
|
|
"writer/glsl/generator_impl_test.cc",
|
|
|
|
"writer/glsl/generator_impl_type_test.cc",
|
|
|
|
"writer/glsl/generator_impl_unary_op_test.cc",
|
|
|
|
"writer/glsl/generator_impl_uniform_buffer_test.cc",
|
|
|
|
"writer/glsl/generator_impl_variable_decl_statement_test.cc",
|
|
|
|
"writer/glsl/generator_impl_workgroup_var_test.cc",
|
|
|
|
"writer/glsl/test_helper.h",
|
|
|
|
]
|
2022-06-17 13:01:59 +00:00
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
deps = [
|
2023-01-25 18:39:00 +00:00
|
|
|
":libtint_base_src",
|
2022-06-22 12:40:43 +00:00
|
|
|
":libtint_glsl_writer_src",
|
2023-01-21 23:41:56 +00:00
|
|
|
":libtint_transform_src",
|
2022-06-22 12:40:43 +00:00
|
|
|
":tint_unittests_ast_src",
|
|
|
|
]
|
|
|
|
}
|
2022-06-17 13:01:59 +00:00
|
|
|
|
2023-01-25 18:39:00 +00:00
|
|
|
tint_unittests_source_set("tint_unittests_base_src") {
|
2022-06-22 12:40:43 +00:00
|
|
|
sources = [
|
|
|
|
"castable_test.cc",
|
|
|
|
"debug_test.cc",
|
|
|
|
"number_test.cc",
|
2023-01-25 19:15:42 +00:00
|
|
|
"reflection_test.cc",
|
|
|
|
"scope_stack_test.cc",
|
2022-06-22 12:40:43 +00:00
|
|
|
"source_test.cc",
|
|
|
|
"symbol_table_test.cc",
|
|
|
|
"symbol_test.cc",
|
|
|
|
"traits_test.cc",
|
|
|
|
]
|
2023-01-25 18:39:00 +00:00
|
|
|
deps = [ ":libtint_base_src" ]
|
|
|
|
}
|
2022-06-17 13:01:59 +00:00
|
|
|
|
2023-01-25 18:39:00 +00:00
|
|
|
tint_unittests_source_set("tint_unittests_core_src") {
|
|
|
|
sources = [
|
|
|
|
"clone_context_test.cc",
|
|
|
|
"program_builder_test.cc",
|
|
|
|
"program_test.cc",
|
|
|
|
]
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
":libtint_base_src",
|
2023-02-10 19:24:24 +00:00
|
|
|
":libtint_unittests_ast_helper",
|
2023-01-25 18:39:00 +00:00
|
|
|
":tint_unittests_ast_src",
|
|
|
|
]
|
2022-06-22 12:40:43 +00:00
|
|
|
}
|
2022-06-17 13:01:59 +00:00
|
|
|
|
2023-02-15 04:35:01 +00:00
|
|
|
tint_unittests_source_set("tint_unittests_demangler_src") {
|
|
|
|
sources = [ "demangler_test.cc" ]
|
|
|
|
deps = [ ":libtint_demangler_src" ]
|
|
|
|
}
|
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
if (build_with_chromium) {
|
|
|
|
tint_unittests_source_set("tint_unittests_fuzzer_src") {
|
|
|
|
sources = [ "fuzzers/random_generator_test.cc" ]
|
2022-06-17 13:01:59 +00:00
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
deps = [
|
|
|
|
":tint_unittests_core_src",
|
|
|
|
"fuzzers:tint_fuzzer_common_src",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
2022-06-17 13:01:59 +00:00
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
source_set("tint_unittests_src") {
|
|
|
|
testonly = true
|
2022-06-17 13:01:59 +00:00
|
|
|
|
|
|
|
deps = [
|
2022-06-22 12:40:43 +00:00
|
|
|
":libtint_wgsl_reader_src",
|
|
|
|
":libtint_wgsl_writer_src",
|
|
|
|
":tint_unittests_ast_src",
|
2023-01-25 18:39:00 +00:00
|
|
|
":tint_unittests_base_src",
|
2023-02-17 21:56:35 +00:00
|
|
|
":tint_unittests_builtins_src",
|
2023-01-06 02:57:36 +00:00
|
|
|
":tint_unittests_constant_src",
|
2022-06-17 13:01:59 +00:00
|
|
|
":tint_unittests_core_src",
|
2023-02-15 04:35:01 +00:00
|
|
|
":tint_unittests_demangler_src",
|
2022-06-22 12:40:43 +00:00
|
|
|
":tint_unittests_diagnostic_src",
|
|
|
|
":tint_unittests_inspector_src",
|
|
|
|
":tint_unittests_resolver_src",
|
|
|
|
":tint_unittests_sem_src",
|
|
|
|
":tint_unittests_text_src",
|
|
|
|
":tint_unittests_transform_src",
|
2022-12-08 00:32:27 +00:00
|
|
|
":tint_unittests_type_src",
|
2022-06-22 12:40:43 +00:00
|
|
|
":tint_unittests_utils_src",
|
|
|
|
":tint_unittests_writer_src",
|
2022-06-17 13:01:59 +00:00
|
|
|
]
|
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
if (tint_build_spv_reader) {
|
|
|
|
deps += [ ":tint_unittests_spv_reader_src" ]
|
|
|
|
}
|
2022-06-17 13:01:59 +00:00
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
if (tint_build_spv_writer) {
|
|
|
|
deps += [ ":tint_unittests_spv_writer_src" ]
|
|
|
|
}
|
2022-06-17 13:01:59 +00:00
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
if (tint_build_wgsl_reader) {
|
|
|
|
deps += [ ":tint_unittests_wgsl_reader_src" ]
|
|
|
|
}
|
2022-06-17 13:01:59 +00:00
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
if (tint_build_wgsl_writer) {
|
|
|
|
deps += [ ":tint_unittests_wgsl_writer_src" ]
|
|
|
|
}
|
2022-06-17 13:01:59 +00:00
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
if (tint_build_msl_writer) {
|
|
|
|
deps += [ ":tint_unittests_msl_writer_src" ]
|
|
|
|
}
|
2022-06-17 13:01:59 +00:00
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
if (tint_build_hlsl_writer) {
|
|
|
|
deps += [ ":tint_unittests_hlsl_writer_src" ]
|
|
|
|
}
|
2022-06-17 13:01:59 +00:00
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
if (tint_build_glsl_writer) {
|
|
|
|
deps += [ ":tint_unittests_glsl_writer_src" ]
|
|
|
|
}
|
2022-06-17 13:01:59 +00:00
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
if (build_with_chromium) {
|
|
|
|
deps += [ ":tint_unittests_fuzzer_src" ]
|
|
|
|
}
|
2022-06-17 13:01:59 +00:00
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
configs += [ ":tint_unittests_config" ]
|
2022-06-17 13:01:59 +00:00
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
if (build_with_chromium) {
|
|
|
|
configs -= [ "//build/config/compiler:chromium_code" ]
|
|
|
|
configs += [ "//build/config/compiler:no_chromium_code" ]
|
|
|
|
}
|
2022-06-17 13:01:59 +00:00
|
|
|
}
|
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
test("tint_unittests") {
|
|
|
|
deps = [
|
|
|
|
":gmock_and_gtest",
|
|
|
|
":tint_unittests_src",
|
|
|
|
"${tint_spirv_tools_dir}/:spvtools",
|
|
|
|
"${tint_spirv_tools_dir}/:spvtools_opt",
|
|
|
|
"${tint_spirv_tools_dir}/:spvtools_val",
|
|
|
|
]
|
2022-06-17 13:01:59 +00:00
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
deps += [ ":tint_unittests_main" ]
|
2022-06-17 13:01:59 +00:00
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
configs += [ ":tint_unittests_config" ]
|
2022-06-17 13:01:59 +00:00
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
if (build_with_chromium) {
|
|
|
|
configs -= [ "//build/config/compiler:chromium_code" ]
|
|
|
|
configs += [ "//build/config/compiler:no_chromium_code" ]
|
|
|
|
}
|
2022-06-17 13:01:59 +00:00
|
|
|
|
2022-06-22 12:40:43 +00:00
|
|
|
testonly = true
|
|
|
|
}
|
2022-06-17 13:01:59 +00:00
|
|
|
}
|