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")
|
|
|
|
import("//testing/test.gni")
|
|
|
|
import("../tint_overrides_with_defaults.gni")
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# 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",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# 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") {
|
|
|
|
testonly = true
|
|
|
|
deps = [ ":gmock_and_gtest" ]
|
|
|
|
if (build_with_chromium) {
|
|
|
|
sources = [ "//gpu/tint_unittests_main.cc" ]
|
|
|
|
} else {
|
|
|
|
sources = [ "../src/test_main.cc" ]
|
2021-05-05 09:46:31 +00:00
|
|
|
configs += [ ":tint_unittests_config" ]
|
2021-04-21 19:05:14 +00:00
|
|
|
deps += [
|
|
|
|
":tint_unittests_hlsl_writer_src",
|
|
|
|
":tint_unittests_msl_writer_src",
|
2021-05-05 09:46:31 +00:00
|
|
|
":tint_unittests_spv_reader_src",
|
2021-04-21 19:05:14 +00:00
|
|
|
"${tint_root_dir}/src:libtint",
|
|
|
|
]
|
2021-03-15 08:43:11 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# Tests - For libtint core and optional modules
|
|
|
|
###############################################################################
|
|
|
|
config("tint_unittests_config") {
|
|
|
|
include_dirs = [
|
|
|
|
"${tint_googletest_dir}/googlemock/include",
|
|
|
|
"${tint_googletest_dir}/googletest/include",
|
|
|
|
]
|
|
|
|
|
|
|
|
configs = [
|
|
|
|
"${tint_root_dir}/src:tint_common_config",
|
|
|
|
"${tint_root_dir}/src:tint_public_config",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2021-04-19 15:20:03 +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 = []
|
|
|
|
}
|
2021-06-02 21:02:34 +00:00
|
|
|
deps += [
|
|
|
|
":gmock_and_gtest",
|
|
|
|
"${tint_root_dir}/src:libtint",
|
2021-06-11 13:22:27 +00:00
|
|
|
"${tint_root_dir}/src:tint_utils_io",
|
2021-06-02 21:02:34 +00:00
|
|
|
]
|
2021-04-19 15:20:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-11-11 16:23:55 +00:00
|
|
|
tint_unittests_source_set("tint_unittests_ast_src") {
|
2021-03-15 08:43:11 +00:00
|
|
|
sources = [
|
2021-04-20 15:04:21 +00:00
|
|
|
"../src/ast/alias_test.cc",
|
|
|
|
"../src/ast/array_test.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"../src/ast/assignment_statement_test.cc",
|
2021-06-17 15:48:39 +00:00
|
|
|
"../src/ast/atomic_test.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"../src/ast/binary_expression_test.cc",
|
|
|
|
"../src/ast/binding_decoration_test.cc",
|
|
|
|
"../src/ast/bitcast_expression_test.cc",
|
|
|
|
"../src/ast/block_statement_test.cc",
|
2021-11-09 09:35:00 +00:00
|
|
|
"../src/ast/bool_literal_expression_test.cc",
|
2021-04-20 15:04:21 +00:00
|
|
|
"../src/ast/bool_test.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"../src/ast/break_statement_test.cc",
|
|
|
|
"../src/ast/builtin_decoration_test.cc",
|
|
|
|
"../src/ast/call_expression_test.cc",
|
|
|
|
"../src/ast/call_statement_test.cc",
|
|
|
|
"../src/ast/case_statement_test.cc",
|
|
|
|
"../src/ast/continue_statement_test.cc",
|
2021-07-26 22:19:48 +00:00
|
|
|
"../src/ast/depth_multisampled_texture_test.cc",
|
2021-04-20 15:04:21 +00:00
|
|
|
"../src/ast/depth_texture_test.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"../src/ast/discard_statement_test.cc",
|
|
|
|
"../src/ast/else_statement_test.cc",
|
2021-04-26 14:55:25 +00:00
|
|
|
"../src/ast/external_texture_test.cc",
|
2021-04-20 15:04:21 +00:00
|
|
|
"../src/ast/f32_test.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"../src/ast/fallthrough_statement_test.cc",
|
2021-11-09 09:35:00 +00:00
|
|
|
"../src/ast/float_literal_expression_test.cc",
|
2021-07-02 19:27:42 +00:00
|
|
|
"../src/ast/for_loop_statement_test.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"../src/ast/function_test.cc",
|
|
|
|
"../src/ast/group_decoration_test.cc",
|
2021-04-20 15:04:21 +00:00
|
|
|
"../src/ast/i32_test.cc",
|
2021-11-09 09:35:00 +00:00
|
|
|
"../src/ast/index_accessor_expression_test.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"../src/ast/identifier_expression_test.cc",
|
|
|
|
"../src/ast/if_statement_test.cc",
|
2021-11-09 09:35:00 +00:00
|
|
|
"../src/ast/int_literal_expression_test.cc",
|
2021-06-28 18:20:23 +00:00
|
|
|
"../src/ast/interpolate_decoration_test.cc",
|
2021-06-02 21:02:34 +00:00
|
|
|
"../src/ast/intrinsic_texture_helper_test.cc",
|
|
|
|
"../src/ast/intrinsic_texture_helper_test.h",
|
2021-07-12 11:44:51 +00:00
|
|
|
"../src/ast/invariant_decoration_test.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"../src/ast/location_decoration_test.cc",
|
|
|
|
"../src/ast/loop_statement_test.cc",
|
2021-04-20 15:04:21 +00:00
|
|
|
"../src/ast/matrix_test.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"../src/ast/member_accessor_expression_test.cc",
|
|
|
|
"../src/ast/module_clone_test.cc",
|
|
|
|
"../src/ast/module_test.cc",
|
2021-04-20 15:04:21 +00:00
|
|
|
"../src/ast/multisampled_texture_test.cc",
|
2021-04-30 17:14:19 +00:00
|
|
|
"../src/ast/override_decoration_test.cc",
|
2021-10-21 18:33:14 +00:00
|
|
|
"../src/ast/phony_expression_test.cc",
|
2021-04-20 15:04:21 +00:00
|
|
|
"../src/ast/pointer_test.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"../src/ast/return_statement_test.cc",
|
2021-04-20 15:04:21 +00:00
|
|
|
"../src/ast/sampled_texture_test.cc",
|
|
|
|
"../src/ast/sampler_test.cc",
|
2021-11-09 09:35:00 +00:00
|
|
|
"../src/ast/sint_literal_expression_test.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"../src/ast/stage_decoration_test.cc",
|
2021-04-20 15:04:21 +00:00
|
|
|
"../src/ast/storage_texture_test.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"../src/ast/stride_decoration_test.cc",
|
2021-03-15 10:43:11 +00:00
|
|
|
"../src/ast/struct_member_align_decoration_test.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"../src/ast/struct_member_offset_decoration_test.cc",
|
2021-03-15 10:43:11 +00:00
|
|
|
"../src/ast/struct_member_size_decoration_test.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"../src/ast/struct_member_test.cc",
|
|
|
|
"../src/ast/struct_test.cc",
|
|
|
|
"../src/ast/switch_statement_test.cc",
|
|
|
|
"../src/ast/test_helper.h",
|
2021-04-20 15:04:21 +00:00
|
|
|
"../src/ast/texture_test.cc",
|
2021-10-21 20:38:54 +00:00
|
|
|
"../src/ast/traverse_expressions_test.cc",
|
2021-04-20 15:04:21 +00:00
|
|
|
"../src/ast/u32_test.cc",
|
2021-11-09 09:35:00 +00:00
|
|
|
"../src/ast/uint_literal_expression_test.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"../src/ast/unary_op_expression_test.cc",
|
|
|
|
"../src/ast/variable_decl_statement_test.cc",
|
|
|
|
"../src/ast/variable_test.cc",
|
2021-04-20 15:04:21 +00:00
|
|
|
"../src/ast/vector_test.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"../src/ast/workgroup_decoration_test.cc",
|
2021-11-11 16:23:55 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
tint_unittests_source_set("tint_unittests_diagnostic_src") {
|
|
|
|
sources = [
|
2021-03-15 08:43:11 +00:00
|
|
|
"../src/diagnostic/formatter_test.cc",
|
|
|
|
"../src/diagnostic/printer_test.cc",
|
2021-11-11 16:23:55 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
tint_unittests_source_set("tint_unittests_inspector_src") {
|
|
|
|
sources = [
|
2021-03-15 08:43:11 +00:00
|
|
|
"../src/inspector/inspector_test.cc",
|
2021-07-13 15:34:45 +00:00
|
|
|
"../src/inspector/test_inspector_builder.cc",
|
|
|
|
"../src/inspector/test_inspector_builder.h",
|
2021-07-27 15:42:51 +00:00
|
|
|
"../src/inspector/test_inspector_runner.cc",
|
|
|
|
"../src/inspector/test_inspector_runner.h",
|
2021-11-11 16:23:55 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
tint_unittests_source_set("tint_unittests_resolver_src") {
|
|
|
|
sources = [
|
2021-09-07 14:48:24 +00:00
|
|
|
"../src/resolver/array_accessor_test.cc",
|
2021-03-18 21:14:44 +00:00
|
|
|
"../src/resolver/assignment_validation_test.cc",
|
2021-06-17 19:56:14 +00:00
|
|
|
"../src/resolver/atomics_test.cc",
|
|
|
|
"../src/resolver/atomics_validation_test.cc",
|
2021-03-22 17:42:06 +00:00
|
|
|
"../src/resolver/builtins_validation_test.cc",
|
2021-06-09 20:17:59 +00:00
|
|
|
"../src/resolver/call_test.cc",
|
2021-06-11 13:22:27 +00:00
|
|
|
"../src/resolver/call_validation_test.cc",
|
2021-07-14 09:44:41 +00:00
|
|
|
"../src/resolver/compound_statement_test.cc",
|
2021-03-25 12:55:27 +00:00
|
|
|
"../src/resolver/control_block_validation_test.cc",
|
2021-03-18 17:59:54 +00:00
|
|
|
"../src/resolver/decoration_validation_test.cc",
|
2021-04-06 15:51:47 +00:00
|
|
|
"../src/resolver/entry_point_validation_test.cc",
|
2021-03-19 14:04:51 +00:00
|
|
|
"../src/resolver/function_validation_test.cc",
|
2021-03-18 21:03:24 +00:00
|
|
|
"../src/resolver/host_shareable_validation_test.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"../src/resolver/intrinsic_test.cc",
|
2021-06-03 16:07:34 +00:00
|
|
|
"../src/resolver/intrinsic_validation_test.cc",
|
2021-03-18 21:03:24 +00:00
|
|
|
"../src/resolver/is_host_shareable_test.cc",
|
2021-03-15 10:43:11 +00:00
|
|
|
"../src/resolver/is_storeable_test.cc",
|
2021-05-27 20:46:46 +00:00
|
|
|
"../src/resolver/pipeline_overridable_constant_test.cc",
|
2021-05-18 10:28:48 +00:00
|
|
|
"../src/resolver/ptr_ref_test.cc",
|
|
|
|
"../src/resolver/ptr_ref_validation_test.cc",
|
2021-07-13 12:18:13 +00:00
|
|
|
"../src/resolver/resolver_constants_test.cc",
|
2021-04-21 09:18:52 +00:00
|
|
|
"../src/resolver/resolver_test.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"../src/resolver/resolver_test_helper.cc",
|
|
|
|
"../src/resolver/resolver_test_helper.h",
|
2021-07-15 19:09:25 +00:00
|
|
|
"../src/resolver/storage_class_layout_validation_test.cc",
|
2021-04-16 09:26:14 +00:00
|
|
|
"../src/resolver/storage_class_validation_test.cc",
|
2021-03-15 10:43:11 +00:00
|
|
|
"../src/resolver/struct_layout_test.cc",
|
2021-03-31 15:42:17 +00:00
|
|
|
"../src/resolver/struct_pipeline_stage_use_test.cc",
|
2021-03-17 22:47:33 +00:00
|
|
|
"../src/resolver/struct_storage_class_use_test.cc",
|
2021-03-31 12:46:52 +00:00
|
|
|
"../src/resolver/type_constructor_validation_test.cc",
|
2021-03-18 17:59:54 +00:00
|
|
|
"../src/resolver/type_validation_test.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"../src/resolver/validation_test.cc",
|
2021-05-18 10:28:48 +00:00
|
|
|
"../src/resolver/var_let_test.cc",
|
|
|
|
"../src/resolver/var_let_validation_test.cc",
|
2021-11-11 16:23:55 +00:00
|
|
|
]
|
|
|
|
deps = [
|
|
|
|
":tint_unittests_ast_src",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
tint_unittests_source_set("tint_unittests_sem_src") {
|
|
|
|
sources = [
|
2021-06-17 15:48:39 +00:00
|
|
|
"../src/sem/atomic_type_test.cc",
|
2021-04-19 22:54:43 +00:00
|
|
|
"../src/sem/bool_type_test.cc",
|
2021-07-26 22:19:48 +00:00
|
|
|
"../src/sem/depth_multisampled_texture_type_test.cc",
|
2021-04-19 22:54:43 +00:00
|
|
|
"../src/sem/depth_texture_type_test.cc",
|
|
|
|
"../src/sem/external_texture_type_test.cc",
|
|
|
|
"../src/sem/f32_type_test.cc",
|
|
|
|
"../src/sem/i32_type_test.cc",
|
2021-11-11 16:23:55 +00:00
|
|
|
"../src/sem/intrinsic_test.cc",
|
2021-04-19 22:54:43 +00:00
|
|
|
"../src/sem/matrix_type_test.cc",
|
|
|
|
"../src/sem/multisampled_texture_type_test.cc",
|
|
|
|
"../src/sem/pointer_type_test.cc",
|
2021-05-10 19:45:46 +00:00
|
|
|
"../src/sem/reference_type_test.cc",
|
2021-04-19 22:54:43 +00:00
|
|
|
"../src/sem/sampled_texture_type_test.cc",
|
|
|
|
"../src/sem/sampler_type_test.cc",
|
2021-05-07 20:58:34 +00:00
|
|
|
"../src/sem/sem_array_test.cc",
|
2021-05-07 14:49:34 +00:00
|
|
|
"../src/sem/sem_struct_test.cc",
|
2021-04-19 22:54:43 +00:00
|
|
|
"../src/sem/storage_texture_type_test.cc",
|
|
|
|
"../src/sem/texture_type_test.cc",
|
|
|
|
"../src/sem/type_manager_test.cc",
|
|
|
|
"../src/sem/u32_type_test.cc",
|
|
|
|
"../src/sem/vector_type_test.cc",
|
2021-11-11 16:23:55 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
tint_unittests_source_set("tint_unittests_transform_src") {
|
|
|
|
sources = [
|
2021-09-07 18:59:21 +00:00
|
|
|
"../src/transform/add_empty_entry_point_test.cc",
|
2021-06-19 00:33:35 +00:00
|
|
|
"../src/transform/array_length_from_uniform_test.cc",
|
2021-03-29 21:25:45 +00:00
|
|
|
"../src/transform/binding_remapper_test.cc",
|
2021-04-09 10:28:48 +00:00
|
|
|
"../src/transform/calculate_array_length_test.cc",
|
2021-03-31 17:44:27 +00:00
|
|
|
"../src/transform/canonicalize_entry_point_io_test.cc",
|
2021-06-18 21:15:25 +00:00
|
|
|
"../src/transform/decompose_memory_access_test.cc",
|
2021-07-27 08:17:29 +00:00
|
|
|
"../src/transform/decompose_strided_matrix_test.cc",
|
2021-05-05 16:38:12 +00:00
|
|
|
"../src/transform/external_texture_transform_test.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"../src/transform/first_index_offset_test.cc",
|
2021-07-02 21:15:44 +00:00
|
|
|
"../src/transform/fold_constants_test.cc",
|
|
|
|
"../src/transform/fold_trivial_single_use_lets_test.cc",
|
2021-07-08 10:00:17 +00:00
|
|
|
"../src/transform/for_loop_to_loop_test.cc",
|
2021-05-19 19:16:32 +00:00
|
|
|
"../src/transform/inline_pointer_lets_test.cc",
|
2021-07-02 22:17:25 +00:00
|
|
|
"../src/transform/loop_to_for_loop_test.cc",
|
2021-09-07 18:59:21 +00:00
|
|
|
"../src/transform/module_scope_var_to_entry_point_param_test.cc",
|
2021-11-17 12:10:16 +00:00
|
|
|
"../src/transform/multiplanar_external_texture_test.cc",
|
2021-09-13 17:11:58 +00:00
|
|
|
"../src/transform/num_workgroups_from_uniform_test.cc",
|
2021-06-16 09:50:11 +00:00
|
|
|
"../src/transform/pad_array_elements_test.cc",
|
2021-06-01 12:08:20 +00:00
|
|
|
"../src/transform/promote_initializers_to_const_var_test.cc",
|
2021-10-25 14:26:55 +00:00
|
|
|
"../src/transform/remove_phonies_test.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"../src/transform/renamer_test.cc",
|
2021-06-30 13:23:36 +00:00
|
|
|
"../src/transform/robustness_test.cc",
|
2021-05-21 21:01:23 +00:00
|
|
|
"../src/transform/simplify_test.cc",
|
2021-04-28 15:33:03 +00:00
|
|
|
"../src/transform/single_entry_point_test.cc",
|
2021-06-02 21:02:34 +00:00
|
|
|
"../src/transform/test_helper.h",
|
2021-05-04 18:13:21 +00:00
|
|
|
"../src/transform/transform_test.cc",
|
2021-10-25 19:20:31 +00:00
|
|
|
"../src/transform/vectorize_scalar_matrix_constructors_test.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"../src/transform/vertex_pulling_test.cc",
|
2021-06-16 09:19:36 +00:00
|
|
|
"../src/transform/wrap_arrays_in_structs_test.cc",
|
2021-06-18 22:44:31 +00:00
|
|
|
"../src/transform/zero_init_workgroup_memory_test.cc",
|
2021-11-11 16:23:55 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
tint_unittests_source_set("tint_unittests_utils_src") {
|
|
|
|
sources = [
|
2021-07-08 10:00:17 +00:00
|
|
|
"../src/utils/defer_test.cc",
|
2021-06-03 15:53:34 +00:00
|
|
|
"../src/utils/enum_set_test.cc",
|
2021-04-07 11:16:01 +00:00
|
|
|
"../src/utils/get_or_create_test.cc",
|
2021-03-29 15:13:55 +00:00
|
|
|
"../src/utils/hash_test.cc",
|
2021-06-02 21:02:34 +00:00
|
|
|
"../src/utils/io/command_test.cc",
|
|
|
|
"../src/utils/io/tmpfile_test.cc",
|
2021-03-15 13:37:41 +00:00
|
|
|
"../src/utils/math_test.cc",
|
2021-09-08 15:18:36 +00:00
|
|
|
"../src/utils/reverse_test.cc",
|
2021-05-19 16:11:04 +00:00
|
|
|
"../src/utils/scoped_assignment_test.cc",
|
2021-10-14 20:24:50 +00:00
|
|
|
"../src/utils/string_test.cc",
|
2021-11-12 13:04:06 +00:00
|
|
|
"../src/utils/transform_test.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"../src/utils/unique_vector_test.cc",
|
2021-11-11 16:23:55 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
tint_unittests_source_set("tint_unittests_writer_src") {
|
|
|
|
sources = [
|
2021-03-22 21:05:47 +00:00
|
|
|
"../src/writer/append_vector_test.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"../src/writer/float_to_string_test.cc",
|
2021-06-29 11:53:15 +00:00
|
|
|
"../src/writer/text_generator_test.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2021-04-19 15:20:03 +00:00
|
|
|
tint_unittests_source_set("tint_unittests_spv_reader_src") {
|
2021-03-15 08:43:11 +00:00
|
|
|
sources = [
|
|
|
|
"../src/reader/spirv/enum_converter_test.cc",
|
|
|
|
"../src/reader/spirv/fail_stream_test.cc",
|
|
|
|
"../src/reader/spirv/function_arithmetic_test.cc",
|
|
|
|
"../src/reader/spirv/function_bit_test.cc",
|
|
|
|
"../src/reader/spirv/function_call_test.cc",
|
|
|
|
"../src/reader/spirv/function_cfg_test.cc",
|
|
|
|
"../src/reader/spirv/function_composite_test.cc",
|
|
|
|
"../src/reader/spirv/function_conversion_test.cc",
|
|
|
|
"../src/reader/spirv/function_decl_test.cc",
|
|
|
|
"../src/reader/spirv/function_glsl_std_450_test.cc",
|
|
|
|
"../src/reader/spirv/function_logical_test.cc",
|
|
|
|
"../src/reader/spirv/function_memory_test.cc",
|
|
|
|
"../src/reader/spirv/function_misc_test.cc",
|
|
|
|
"../src/reader/spirv/function_var_test.cc",
|
|
|
|
"../src/reader/spirv/namer_test.cc",
|
2021-03-22 19:27:06 +00:00
|
|
|
"../src/reader/spirv/parser_impl_barrier_test.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"../src/reader/spirv/parser_impl_convert_member_decoration_test.cc",
|
|
|
|
"../src/reader/spirv/parser_impl_convert_type_test.cc",
|
|
|
|
"../src/reader/spirv/parser_impl_function_decl_test.cc",
|
|
|
|
"../src/reader/spirv/parser_impl_get_decorations_test.cc",
|
|
|
|
"../src/reader/spirv/parser_impl_handle_test.cc",
|
|
|
|
"../src/reader/spirv/parser_impl_import_test.cc",
|
|
|
|
"../src/reader/spirv/parser_impl_module_var_test.cc",
|
|
|
|
"../src/reader/spirv/parser_impl_named_types_test.cc",
|
|
|
|
"../src/reader/spirv/parser_impl_test.cc",
|
2021-05-05 09:46:31 +00:00
|
|
|
"../src/reader/spirv/parser_impl_test_helper.cc",
|
|
|
|
"../src/reader/spirv/parser_impl_test_helper.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"../src/reader/spirv/parser_impl_user_name_test.cc",
|
|
|
|
"../src/reader/spirv/parser_test.cc",
|
2021-05-14 17:51:13 +00:00
|
|
|
"../src/reader/spirv/parser_type_test.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"../src/reader/spirv/spirv_tools_helpers_test.cc",
|
|
|
|
"../src/reader/spirv/spirv_tools_helpers_test.h",
|
|
|
|
"../src/reader/spirv/usage_test.cc",
|
|
|
|
]
|
|
|
|
|
2021-06-02 21:02:34 +00:00
|
|
|
deps = [
|
|
|
|
"${tint_root_dir}/src:libtint_spv_reader_src",
|
|
|
|
]
|
2021-03-15 08:43:11 +00:00
|
|
|
}
|
|
|
|
|
2021-04-19 15:20:03 +00:00
|
|
|
tint_unittests_source_set("tint_unittests_spv_writer_src") {
|
2021-03-15 08:43:11 +00:00
|
|
|
sources = [
|
|
|
|
"../src/writer/spirv/binary_writer_test.cc",
|
|
|
|
"../src/writer/spirv/builder_accessor_expression_test.cc",
|
|
|
|
"../src/writer/spirv/builder_assign_test.cc",
|
|
|
|
"../src/writer/spirv/builder_binary_expression_test.cc",
|
|
|
|
"../src/writer/spirv/builder_bitcast_expression_test.cc",
|
|
|
|
"../src/writer/spirv/builder_block_test.cc",
|
|
|
|
"../src/writer/spirv/builder_call_test.cc",
|
|
|
|
"../src/writer/spirv/builder_constructor_expression_test.cc",
|
|
|
|
"../src/writer/spirv/builder_discard_test.cc",
|
|
|
|
"../src/writer/spirv/builder_entry_point_test.cc",
|
|
|
|
"../src/writer/spirv/builder_format_conversion_test.cc",
|
|
|
|
"../src/writer/spirv/builder_function_decoration_test.cc",
|
|
|
|
"../src/writer/spirv/builder_function_test.cc",
|
|
|
|
"../src/writer/spirv/builder_function_variable_test.cc",
|
|
|
|
"../src/writer/spirv/builder_global_variable_test.cc",
|
|
|
|
"../src/writer/spirv/builder_ident_expression_test.cc",
|
|
|
|
"../src/writer/spirv/builder_if_test.cc",
|
|
|
|
"../src/writer/spirv/builder_intrinsic_test.cc",
|
|
|
|
"../src/writer/spirv/builder_intrinsic_texture_test.cc",
|
|
|
|
"../src/writer/spirv/builder_literal_test.cc",
|
|
|
|
"../src/writer/spirv/builder_loop_test.cc",
|
|
|
|
"../src/writer/spirv/builder_return_test.cc",
|
|
|
|
"../src/writer/spirv/builder_switch_test.cc",
|
|
|
|
"../src/writer/spirv/builder_test.cc",
|
|
|
|
"../src/writer/spirv/builder_type_test.cc",
|
|
|
|
"../src/writer/spirv/builder_unary_op_expression_test.cc",
|
|
|
|
"../src/writer/spirv/instruction_test.cc",
|
|
|
|
"../src/writer/spirv/operand_test.cc",
|
2021-03-22 15:32:35 +00:00
|
|
|
"../src/writer/spirv/scalar_constant_test.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"../src/writer/spirv/spv_dump.cc",
|
|
|
|
"../src/writer/spirv/spv_dump.h",
|
|
|
|
"../src/writer/spirv/test_helper.h",
|
|
|
|
]
|
|
|
|
|
2021-04-21 09:18:52 +00:00
|
|
|
deps = [
|
2021-11-11 16:23:55 +00:00
|
|
|
":tint_unittests_ast_src",
|
2021-04-21 09:18:52 +00:00
|
|
|
"${tint_root_dir}/src:libtint_spv_writer_src",
|
|
|
|
"${tint_spirv_tools_dir}/:spvtools",
|
|
|
|
]
|
2021-03-15 08:43:11 +00:00
|
|
|
}
|
|
|
|
|
2021-04-19 15:20:03 +00:00
|
|
|
tint_unittests_source_set("tint_unittests_wgsl_reader_src") {
|
2021-03-15 08:43:11 +00:00
|
|
|
sources = [
|
|
|
|
"../src/reader/wgsl/lexer_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_additive_expression_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_and_expression_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_argument_expression_list_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_assignment_stmt_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_body_stmt_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_break_stmt_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_bug_cases_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_call_stmt_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_case_body_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_const_expr_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_const_literal_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_continue_stmt_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_continuing_stmt_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_depth_texture_type_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_else_stmt_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_elseif_stmt_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_equality_expression_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_error_msg_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_error_resync_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_exclusive_or_expression_test.cc",
|
2021-04-22 22:47:03 +00:00
|
|
|
"../src/reader/wgsl/parser_impl_external_texture_type_test.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"../src/reader/wgsl/parser_impl_for_stmt_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_function_decl_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_function_decoration_list_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_function_decoration_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_function_header_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_global_constant_decl_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_global_decl_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_global_variable_decl_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_if_stmt_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_image_storage_type_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_inclusive_or_expression_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_logical_and_expression_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_logical_or_expression_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_loop_stmt_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_multiplicative_expression_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_param_list_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_paren_rhs_stmt_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_pipeline_stage_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_primary_expression_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_relational_expression_test.cc",
|
2021-07-05 21:48:37 +00:00
|
|
|
"../src/reader/wgsl/parser_impl_reserved_keyword_test.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"../src/reader/wgsl/parser_impl_sampled_texture_type_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_sampler_type_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_shift_expression_test.cc",
|
2021-04-29 15:02:15 +00:00
|
|
|
"../src/reader/wgsl/parser_impl_singular_expression_test.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"../src/reader/wgsl/parser_impl_statement_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_statements_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_storage_class_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_storage_texture_type_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_struct_body_decl_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_struct_decl_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_struct_decoration_decl_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_struct_decoration_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_struct_member_decoration_decl_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_struct_member_decoration_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_struct_member_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_switch_body_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_switch_stmt_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_test_helper.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_test_helper.h",
|
|
|
|
"../src/reader/wgsl/parser_impl_texture_sampler_types_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_type_alias_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_type_decl_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_unary_expression_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_variable_decl_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_variable_decoration_list_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_variable_decoration_test.cc",
|
|
|
|
"../src/reader/wgsl/parser_impl_variable_ident_decl_test.cc",
|
2021-06-04 20:41:47 +00:00
|
|
|
"../src/reader/wgsl/parser_impl_variable_qualifier_test.cc",
|
2021-06-09 20:17:59 +00:00
|
|
|
"../src/reader/wgsl/parser_impl_variable_stmt_test.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"../src/reader/wgsl/parser_test.cc",
|
|
|
|
"../src/reader/wgsl/token_test.cc",
|
|
|
|
]
|
|
|
|
|
2021-06-02 21:02:34 +00:00
|
|
|
deps = [
|
|
|
|
"${tint_root_dir}/src:libtint_wgsl_reader_src",
|
|
|
|
]
|
2021-03-15 08:43:11 +00:00
|
|
|
}
|
|
|
|
|
2021-04-19 15:20:03 +00:00
|
|
|
tint_unittests_source_set("tint_unittests_wgsl_writer_src") {
|
2021-03-15 08:43:11 +00:00
|
|
|
sources = [
|
|
|
|
"../src/writer/wgsl/generator_impl_alias_type_test.cc",
|
|
|
|
"../src/writer/wgsl/generator_impl_array_accessor_test.cc",
|
|
|
|
"../src/writer/wgsl/generator_impl_assign_test.cc",
|
|
|
|
"../src/writer/wgsl/generator_impl_binary_test.cc",
|
|
|
|
"../src/writer/wgsl/generator_impl_bitcast_test.cc",
|
|
|
|
"../src/writer/wgsl/generator_impl_block_test.cc",
|
|
|
|
"../src/writer/wgsl/generator_impl_break_test.cc",
|
|
|
|
"../src/writer/wgsl/generator_impl_call_test.cc",
|
|
|
|
"../src/writer/wgsl/generator_impl_case_test.cc",
|
|
|
|
"../src/writer/wgsl/generator_impl_cast_test.cc",
|
|
|
|
"../src/writer/wgsl/generator_impl_constructor_test.cc",
|
|
|
|
"../src/writer/wgsl/generator_impl_continue_test.cc",
|
|
|
|
"../src/writer/wgsl/generator_impl_discard_test.cc",
|
|
|
|
"../src/writer/wgsl/generator_impl_fallthrough_test.cc",
|
|
|
|
"../src/writer/wgsl/generator_impl_function_test.cc",
|
|
|
|
"../src/writer/wgsl/generator_impl_global_decl_test.cc",
|
|
|
|
"../src/writer/wgsl/generator_impl_identifier_test.cc",
|
|
|
|
"../src/writer/wgsl/generator_impl_if_test.cc",
|
2021-05-27 20:46:46 +00:00
|
|
|
"../src/writer/wgsl/generator_impl_literal_test.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"../src/writer/wgsl/generator_impl_loop_test.cc",
|
|
|
|
"../src/writer/wgsl/generator_impl_member_accessor_test.cc",
|
|
|
|
"../src/writer/wgsl/generator_impl_return_test.cc",
|
|
|
|
"../src/writer/wgsl/generator_impl_switch_test.cc",
|
|
|
|
"../src/writer/wgsl/generator_impl_test.cc",
|
|
|
|
"../src/writer/wgsl/generator_impl_type_test.cc",
|
|
|
|
"../src/writer/wgsl/generator_impl_unary_op_test.cc",
|
|
|
|
"../src/writer/wgsl/generator_impl_variable_decl_statement_test.cc",
|
|
|
|
"../src/writer/wgsl/generator_impl_variable_test.cc",
|
|
|
|
"../src/writer/wgsl/test_helper.h",
|
|
|
|
]
|
|
|
|
|
2021-06-02 21:02:34 +00:00
|
|
|
deps = [
|
2021-11-11 16:23:55 +00:00
|
|
|
":tint_unittests_ast_src",
|
2021-06-02 21:02:34 +00:00
|
|
|
"${tint_root_dir}/src:libtint_wgsl_writer_src",
|
|
|
|
]
|
2021-03-15 08:43:11 +00:00
|
|
|
}
|
|
|
|
|
2021-04-19 15:20:03 +00:00
|
|
|
tint_unittests_source_set("tint_unittests_msl_writer_src") {
|
2021-03-15 08:43:11 +00:00
|
|
|
sources = [
|
|
|
|
"../src/writer/msl/generator_impl_array_accessor_test.cc",
|
|
|
|
"../src/writer/msl/generator_impl_assign_test.cc",
|
|
|
|
"../src/writer/msl/generator_impl_binary_test.cc",
|
|
|
|
"../src/writer/msl/generator_impl_bitcast_test.cc",
|
|
|
|
"../src/writer/msl/generator_impl_block_test.cc",
|
|
|
|
"../src/writer/msl/generator_impl_break_test.cc",
|
|
|
|
"../src/writer/msl/generator_impl_call_test.cc",
|
|
|
|
"../src/writer/msl/generator_impl_case_test.cc",
|
|
|
|
"../src/writer/msl/generator_impl_cast_test.cc",
|
|
|
|
"../src/writer/msl/generator_impl_constructor_test.cc",
|
|
|
|
"../src/writer/msl/generator_impl_continue_test.cc",
|
|
|
|
"../src/writer/msl/generator_impl_discard_test.cc",
|
|
|
|
"../src/writer/msl/generator_impl_function_test.cc",
|
|
|
|
"../src/writer/msl/generator_impl_identifier_test.cc",
|
|
|
|
"../src/writer/msl/generator_impl_if_test.cc",
|
|
|
|
"../src/writer/msl/generator_impl_import_test.cc",
|
|
|
|
"../src/writer/msl/generator_impl_intrinsic_test.cc",
|
|
|
|
"../src/writer/msl/generator_impl_intrinsic_texture_test.cc",
|
|
|
|
"../src/writer/msl/generator_impl_loop_test.cc",
|
|
|
|
"../src/writer/msl/generator_impl_member_accessor_test.cc",
|
|
|
|
"../src/writer/msl/generator_impl_module_constant_test.cc",
|
|
|
|
"../src/writer/msl/generator_impl_return_test.cc",
|
2021-11-19 04:11:33 +00:00
|
|
|
"../src/writer/msl/generator_impl_sanitizer_test.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"../src/writer/msl/generator_impl_switch_test.cc",
|
|
|
|
"../src/writer/msl/generator_impl_test.cc",
|
|
|
|
"../src/writer/msl/generator_impl_type_test.cc",
|
|
|
|
"../src/writer/msl/generator_impl_unary_op_test.cc",
|
|
|
|
"../src/writer/msl/generator_impl_variable_decl_statement_test.cc",
|
|
|
|
"../src/writer/msl/test_helper.h",
|
|
|
|
]
|
|
|
|
|
2021-06-02 21:02:34 +00:00
|
|
|
deps = [
|
2021-11-11 16:23:55 +00:00
|
|
|
":tint_unittests_ast_src",
|
2021-06-02 21:02:34 +00:00
|
|
|
"${tint_root_dir}/src:libtint_msl_writer_src",
|
|
|
|
]
|
2021-03-15 08:43:11 +00:00
|
|
|
}
|
|
|
|
|
2021-04-19 15:20:03 +00:00
|
|
|
tint_unittests_source_set("tint_unittests_hlsl_writer_src") {
|
2021-03-15 08:43:11 +00:00
|
|
|
sources = [
|
|
|
|
"../src/writer/hlsl/generator_impl_array_accessor_test.cc",
|
|
|
|
"../src/writer/hlsl/generator_impl_assign_test.cc",
|
|
|
|
"../src/writer/hlsl/generator_impl_binary_test.cc",
|
|
|
|
"../src/writer/hlsl/generator_impl_bitcast_test.cc",
|
|
|
|
"../src/writer/hlsl/generator_impl_block_test.cc",
|
|
|
|
"../src/writer/hlsl/generator_impl_break_test.cc",
|
|
|
|
"../src/writer/hlsl/generator_impl_call_test.cc",
|
|
|
|
"../src/writer/hlsl/generator_impl_case_test.cc",
|
|
|
|
"../src/writer/hlsl/generator_impl_cast_test.cc",
|
|
|
|
"../src/writer/hlsl/generator_impl_constructor_test.cc",
|
|
|
|
"../src/writer/hlsl/generator_impl_continue_test.cc",
|
|
|
|
"../src/writer/hlsl/generator_impl_discard_test.cc",
|
|
|
|
"../src/writer/hlsl/generator_impl_function_test.cc",
|
|
|
|
"../src/writer/hlsl/generator_impl_identifier_test.cc",
|
|
|
|
"../src/writer/hlsl/generator_impl_if_test.cc",
|
|
|
|
"../src/writer/hlsl/generator_impl_import_test.cc",
|
|
|
|
"../src/writer/hlsl/generator_impl_intrinsic_test.cc",
|
|
|
|
"../src/writer/hlsl/generator_impl_intrinsic_texture_test.cc",
|
|
|
|
"../src/writer/hlsl/generator_impl_loop_test.cc",
|
|
|
|
"../src/writer/hlsl/generator_impl_member_accessor_test.cc",
|
|
|
|
"../src/writer/hlsl/generator_impl_module_constant_test.cc",
|
|
|
|
"../src/writer/hlsl/generator_impl_return_test.cc",
|
|
|
|
"../src/writer/hlsl/generator_impl_sanitizer_test.cc",
|
|
|
|
"../src/writer/hlsl/generator_impl_switch_test.cc",
|
|
|
|
"../src/writer/hlsl/generator_impl_test.cc",
|
|
|
|
"../src/writer/hlsl/generator_impl_type_test.cc",
|
|
|
|
"../src/writer/hlsl/generator_impl_unary_op_test.cc",
|
|
|
|
"../src/writer/hlsl/generator_impl_variable_decl_statement_test.cc",
|
2021-03-30 20:55:08 +00:00
|
|
|
"../src/writer/hlsl/generator_impl_workgroup_var_test.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"../src/writer/hlsl/test_helper.h",
|
|
|
|
]
|
|
|
|
|
2021-06-02 21:02:34 +00:00
|
|
|
deps = [
|
2021-11-11 16:23:55 +00:00
|
|
|
":tint_unittests_ast_src",
|
2021-06-02 21:02:34 +00:00
|
|
|
"${tint_root_dir}/src:libtint_hlsl_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
|
|
|
tint_unittests_source_set("tint_unittests_glsl_writer_src") {
|
|
|
|
sources = [
|
|
|
|
"../src/transform/glsl_test.cc",
|
|
|
|
"../src/writer/glsl/generator_impl_array_accessor_test.cc",
|
|
|
|
"../src/writer/glsl/generator_impl_assign_test.cc",
|
|
|
|
"../src/writer/glsl/generator_impl_binary_test.cc",
|
|
|
|
"../src/writer/glsl/generator_impl_bitcast_test.cc",
|
|
|
|
"../src/writer/glsl/generator_impl_block_test.cc",
|
|
|
|
"../src/writer/glsl/generator_impl_break_test.cc",
|
|
|
|
"../src/writer/glsl/generator_impl_call_test.cc",
|
|
|
|
"../src/writer/glsl/generator_impl_case_test.cc",
|
|
|
|
"../src/writer/glsl/generator_impl_cast_test.cc",
|
|
|
|
"../src/writer/glsl/generator_impl_constructor_test.cc",
|
|
|
|
"../src/writer/glsl/generator_impl_continue_test.cc",
|
|
|
|
"../src/writer/glsl/generator_impl_discard_test.cc",
|
|
|
|
"../src/writer/glsl/generator_impl_function_test.cc",
|
|
|
|
"../src/writer/glsl/generator_impl_identifier_test.cc",
|
|
|
|
"../src/writer/glsl/generator_impl_if_test.cc",
|
|
|
|
"../src/writer/glsl/generator_impl_import_test.cc",
|
|
|
|
"../src/writer/glsl/generator_impl_intrinsic_test.cc",
|
|
|
|
"../src/writer/glsl/generator_impl_intrinsic_texture_test.cc",
|
|
|
|
"../src/writer/glsl/generator_impl_loop_test.cc",
|
|
|
|
"../src/writer/glsl/generator_impl_member_accessor_test.cc",
|
|
|
|
"../src/writer/glsl/generator_impl_module_constant_test.cc",
|
|
|
|
"../src/writer/glsl/generator_impl_return_test.cc",
|
|
|
|
"../src/writer/glsl/generator_impl_sanitizer_test.cc",
|
|
|
|
"../src/writer/glsl/generator_impl_switch_test.cc",
|
|
|
|
"../src/writer/glsl/generator_impl_test.cc",
|
|
|
|
"../src/writer/glsl/generator_impl_type_test.cc",
|
|
|
|
"../src/writer/glsl/generator_impl_unary_op_test.cc",
|
|
|
|
"../src/writer/glsl/generator_impl_variable_decl_statement_test.cc",
|
|
|
|
"../src/writer/glsl/generator_impl_workgroup_var_test.cc",
|
|
|
|
"../src/writer/glsl/test_helper.h",
|
|
|
|
]
|
|
|
|
|
|
|
|
deps = [
|
2021-11-11 16:23:55 +00:00
|
|
|
":tint_unittests_ast_src",
|
|
|
|
":tint_unittests_transform_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
|
|
|
"${tint_root_dir}/src:libtint_glsl_writer_src",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2021-11-12 11:33:17 +00:00
|
|
|
tint_unittests_source_set("tint_unittests_core_src") {
|
2021-11-11 16:23:55 +00:00
|
|
|
sources = [
|
|
|
|
"../src/block_allocator_test.cc",
|
|
|
|
"../src/castable_test.cc",
|
|
|
|
"../src/clone_context_test.cc",
|
|
|
|
"../src/debug_test.cc",
|
|
|
|
"../src/demangler_test.cc",
|
|
|
|
"../src/intrinsic_table_test.cc",
|
|
|
|
"../src/program_builder_test.cc",
|
|
|
|
"../src/program_test.cc",
|
|
|
|
"../src/scope_stack_test.cc",
|
|
|
|
"../src/symbol_table_test.cc",
|
|
|
|
"../src/symbol_test.cc",
|
|
|
|
"../src/traits_test.cc",
|
|
|
|
]
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
":tint_unittests_ast_src",
|
2021-11-12 11:33:17 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
source_set("tint_unittests_src") {
|
|
|
|
testonly = true
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
":tint_unittests_ast_src",
|
|
|
|
":tint_unittests_core_src",
|
2021-11-11 16:23:55 +00:00
|
|
|
":tint_unittests_diagnostic_src",
|
|
|
|
":tint_unittests_inspector_src",
|
|
|
|
":tint_unittests_resolver_src",
|
|
|
|
":tint_unittests_sem_src",
|
|
|
|
":tint_unittests_transform_src",
|
|
|
|
":tint_unittests_utils_src",
|
|
|
|
":tint_unittests_writer_src",
|
|
|
|
"${tint_root_dir}/src:libtint_wgsl_reader_src",
|
|
|
|
"${tint_root_dir}/src:libtint_wgsl_writer_src",
|
|
|
|
]
|
2021-03-15 08:43:11 +00:00
|
|
|
|
|
|
|
if (tint_build_spv_reader) {
|
|
|
|
deps += [ ":tint_unittests_spv_reader_src" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tint_build_spv_writer) {
|
|
|
|
deps += [ ":tint_unittests_spv_writer_src" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tint_build_wgsl_reader) {
|
|
|
|
deps += [ ":tint_unittests_wgsl_reader_src" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tint_build_wgsl_writer) {
|
|
|
|
deps += [ ":tint_unittests_wgsl_writer_src" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tint_build_msl_writer) {
|
|
|
|
deps += [ ":tint_unittests_msl_writer_src" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tint_build_hlsl_writer) {
|
|
|
|
deps += [ ":tint_unittests_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) {
|
|
|
|
deps += [ ":tint_unittests_glsl_writer_src" ]
|
|
|
|
}
|
|
|
|
|
2021-03-15 08:43:11 +00:00
|
|
|
configs += [ ":tint_unittests_config" ]
|
|
|
|
|
|
|
|
if (build_with_chromium) {
|
|
|
|
configs -= [ "//build/config/compiler:chromium_code" ]
|
|
|
|
configs += [ "//build/config/compiler:no_chromium_code" ]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
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",
|
|
|
|
]
|
|
|
|
|
|
|
|
deps += [ ":tint_unittests_main" ]
|
|
|
|
|
|
|
|
configs += [ ":tint_unittests_config" ]
|
|
|
|
|
|
|
|
if (build_with_chromium) {
|
|
|
|
configs -= [ "//build/config/compiler:chromium_code" ]
|
|
|
|
configs += [ "//build/config/compiler:no_chromium_code" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
testonly = true
|
|
|
|
}
|