Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 1 | # Copyright 2020 The Tint Authors. |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
| 15 | function(tint_spvtools_compile_options TARGET) |
| 16 | # We'll use the optimizer for its nice SPIR-V in-memory representation |
| 17 | target_link_libraries(${TARGET} SPIRV-Tools-opt SPIRV-Tools) |
| 18 | |
| 19 | # We'll be cheating: using internal interfaces to the SPIRV-Tools |
| 20 | # optimizer. |
| 21 | target_include_directories(${TARGET} PRIVATE |
| 22 | ${spirv-tools_SOURCE_DIR} |
| 23 | ${spirv-tools_BINARY_DIR} |
| 24 | ) |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 25 | endfunction() |
| 26 | |
dan sinclair | 16b4cf8 | 2022-11-03 21:10:40 +0000 | [diff] [blame] | 27 | set(TINT_LIB_SRCS) |
| 28 | set(TINT_BENCHMARK_SRCS) |
| 29 | set(TINT_TEST_SRCS) |
| 30 | |
| 31 | # Add a generated file set into the build. |
| 32 | # |
| 33 | # Params: |
| 34 | # TARGET - the target name to add (without extension) |
| 35 | # BENCH - set if the target has a benchmark file |
| 36 | # TEST - set if the target has a test file |
| 37 | # |
| 38 | function(tint_generated TARGET) |
| 39 | cmake_parse_arguments(PARSE_ARGV 0 TINT_GEN "BENCH;TEST" "" "") |
| 40 | |
| 41 | list(APPEND TINT_LIB_SRCS |
| 42 | ${TARGET}.cc |
| 43 | ${TARGET}.h |
| 44 | ) |
| 45 | set(TINT_LIB_SRCS ${TINT_LIB_SRCS} PARENT_SCOPE) |
| 46 | |
| 47 | if(${TINT_GEN_BENCH}) |
| 48 | list(APPEND TINT_BENCHMARK_SRCS ${TARGET}_bench.cc) |
| 49 | set(TINT_BENCHMARK_SRCS ${TINT_BENCHMARK_SRCS} PARENT_SCOPE) |
| 50 | endif() |
| 51 | if(${TINT_GEN_TEST}) |
| 52 | list(APPEND TINT_TEST_SRCS ${TARGET}_test.cc) |
| 53 | set(TINT_TEST_SRCS ${TINT_TEST_SRCS} PARENT_SCOPE) |
| 54 | endif() |
| 55 | endfunction() |
| 56 | |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 57 | ## Tint diagnostic utilities. Used by libtint and tint_utils_io. |
| 58 | add_library(tint_diagnostic_utils |
dan sinclair | 22b4dd2 | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 59 | utils/debug/debug.cc |
| 60 | utils/debug/debug.h |
| 61 | utils/diagnostic/diagnostic.cc |
| 62 | utils/diagnostic/diagnostic.h |
| 63 | utils/diagnostic/formatter.cc |
| 64 | utils/diagnostic/formatter.h |
| 65 | utils/diagnostic/printer.cc |
| 66 | utils/diagnostic/printer.h |
| 67 | utils/diagnostic/source.cc |
| 68 | utils/diagnostic/source.h |
| 69 | utils/debug/debugger.cc |
| 70 | utils/debug/debugger.h |
| 71 | utils/text/unicode.cc |
| 72 | utils/text/unicode.h |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 73 | ) |
| 74 | tint_default_compile_options(tint_diagnostic_utils) |
| 75 | |
| 76 | if (TINT_ENABLE_BREAK_IN_DEBUGGER) |
dan sinclair | 22b4dd2 | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 77 | set_source_files_properties(utils/debug/debugger.cc |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 78 | PROPERTIES COMPILE_DEFINITIONS "TINT_ENABLE_BREAK_IN_DEBUGGER=1" ) |
| 79 | endif() |
| 80 | |
dan sinclair | 16b4cf8 | 2022-11-03 21:10:40 +0000 | [diff] [blame] | 81 | list(APPEND TINT_LIB_SRCS |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 82 | ../../include/tint/tint.h |
dan sinclair | 46725bd | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 83 | clone_context.cc |
| 84 | clone_context.h |
| 85 | lang/core/builtin/fluent_types.h |
| 86 | lang/core/builtin/number.cc |
| 87 | lang/core/builtin/number.h |
| 88 | lang/core/constant/clone_context.h |
| 89 | lang/core/constant/composite.cc |
| 90 | lang/core/constant/composite.h |
| 91 | lang/core/constant/manager.cc |
| 92 | lang/core/constant/manager.h |
| 93 | lang/core/constant/node.cc |
| 94 | lang/core/constant/node.h |
| 95 | lang/core/constant/scalar.cc |
| 96 | lang/core/constant/scalar.h |
| 97 | lang/core/constant/splat.cc |
| 98 | lang/core/constant/splat.h |
| 99 | lang/core/constant/value.cc |
| 100 | lang/core/constant/value.h |
| 101 | lang/core/type/abstract_float.cc |
| 102 | lang/core/type/abstract_float.h |
| 103 | lang/core/type/abstract_int.cc |
| 104 | lang/core/type/abstract_int.h |
| 105 | lang/core/type/abstract_numeric.cc |
| 106 | lang/core/type/abstract_numeric.h |
| 107 | lang/core/type/array.cc |
| 108 | lang/core/type/array.h |
| 109 | lang/core/type/array_count.cc |
| 110 | lang/core/type/array_count.h |
| 111 | lang/core/type/atomic.cc |
| 112 | lang/core/type/atomic.h |
| 113 | lang/core/type/bool.cc |
| 114 | lang/core/type/bool.h |
| 115 | lang/core/type/builtin_structs.cc |
| 116 | lang/core/type/builtin_structs.h |
| 117 | lang/core/type/clone_context.h |
| 118 | lang/core/type/depth_multisampled_texture.cc |
| 119 | lang/core/type/depth_multisampled_texture.h |
| 120 | lang/core/type/depth_texture.cc |
| 121 | lang/core/type/depth_texture.h |
| 122 | lang/core/type/external_texture.cc |
| 123 | lang/core/type/external_texture.h |
| 124 | lang/core/type/f16.cc |
| 125 | lang/core/type/f16.h |
| 126 | lang/core/type/f32.cc |
| 127 | lang/core/type/f32.h |
| 128 | lang/core/type/i32.cc |
| 129 | lang/core/type/i32.h |
| 130 | lang/core/type/manager.cc |
| 131 | lang/core/type/manager.h |
| 132 | lang/core/type/matrix.cc |
| 133 | lang/core/type/matrix.h |
| 134 | lang/core/type/multisampled_texture.cc |
| 135 | lang/core/type/multisampled_texture.h |
| 136 | lang/core/type/node.cc |
| 137 | lang/core/type/node.h |
| 138 | lang/core/type/numeric_scalar.cc |
| 139 | lang/core/type/numeric_scalar.h |
| 140 | lang/core/type/pointer.cc |
| 141 | lang/core/type/pointer.h |
| 142 | lang/core/type/reference.cc |
| 143 | lang/core/type/reference.h |
| 144 | lang/core/type/sampled_texture.cc |
| 145 | lang/core/type/sampled_texture.h |
| 146 | lang/core/type/sampler.cc |
| 147 | lang/core/type/sampler.h |
| 148 | lang/core/type/sampler_kind.cc |
| 149 | lang/core/type/sampler_kind.h |
| 150 | lang/core/type/scalar.cc |
| 151 | lang/core/type/scalar.h |
| 152 | lang/core/type/storage_texture.cc |
| 153 | lang/core/type/storage_texture.h |
| 154 | lang/core/type/struct.cc |
| 155 | lang/core/type/struct.h |
| 156 | lang/core/type/texture.cc |
| 157 | lang/core/type/texture.h |
| 158 | lang/core/type/texture_dimension.cc |
| 159 | lang/core/type/texture_dimension.h |
| 160 | lang/core/type/type.cc |
| 161 | lang/core/type/type.h |
| 162 | lang/core/type/u32.cc |
| 163 | lang/core/type/u32.h |
| 164 | lang/core/type/unique_node.cc |
| 165 | lang/core/type/unique_node.h |
| 166 | lang/core/type/vector.cc |
| 167 | lang/core/type/vector.h |
| 168 | lang/core/type/void.cc |
| 169 | lang/core/type/void.h |
dan sinclair | 99181d8 | 2023-07-20 01:14:15 +0000 | [diff] [blame] | 170 | lang/wgsl/ast/accessor_expression.cc |
| 171 | lang/wgsl/ast/accessor_expression.h |
| 172 | lang/wgsl/ast/alias.cc |
| 173 | lang/wgsl/ast/alias.h |
| 174 | lang/wgsl/ast/assignment_statement.cc |
| 175 | lang/wgsl/ast/assignment_statement.h |
| 176 | lang/wgsl/ast/attribute.cc |
| 177 | lang/wgsl/ast/attribute.h |
| 178 | lang/wgsl/ast/binary_expression.cc |
| 179 | lang/wgsl/ast/binary_expression.h |
| 180 | lang/wgsl/ast/binding_attribute.cc |
| 181 | lang/wgsl/ast/binding_attribute.h |
| 182 | lang/wgsl/ast/bitcast_expression.cc |
| 183 | lang/wgsl/ast/bitcast_expression.h |
| 184 | lang/wgsl/ast/block_statement.cc |
| 185 | lang/wgsl/ast/block_statement.h |
| 186 | lang/wgsl/ast/bool_literal_expression.cc |
| 187 | lang/wgsl/ast/bool_literal_expression.h |
| 188 | lang/wgsl/ast/break_if_statement.cc |
| 189 | lang/wgsl/ast/break_if_statement.h |
| 190 | lang/wgsl/ast/break_statement.cc |
| 191 | lang/wgsl/ast/break_statement.h |
| 192 | lang/wgsl/ast/builtin_attribute.cc |
| 193 | lang/wgsl/ast/builtin_attribute.h |
| 194 | lang/wgsl/ast/call_expression.cc |
| 195 | lang/wgsl/ast/call_expression.h |
| 196 | lang/wgsl/ast/call_statement.cc |
| 197 | lang/wgsl/ast/call_statement.h |
| 198 | lang/wgsl/ast/case_selector.cc |
| 199 | lang/wgsl/ast/case_selector.h |
| 200 | lang/wgsl/ast/case_statement.cc |
| 201 | lang/wgsl/ast/case_statement.h |
| 202 | lang/wgsl/ast/compound_assignment_statement.cc |
| 203 | lang/wgsl/ast/compound_assignment_statement.h |
| 204 | lang/wgsl/ast/const.cc |
| 205 | lang/wgsl/ast/const.h |
| 206 | lang/wgsl/ast/const_assert.cc |
| 207 | lang/wgsl/ast/const_assert.h |
| 208 | lang/wgsl/ast/continue_statement.cc |
| 209 | lang/wgsl/ast/continue_statement.h |
| 210 | lang/wgsl/ast/diagnostic_attribute.cc |
| 211 | lang/wgsl/ast/diagnostic_attribute.h |
| 212 | lang/wgsl/ast/diagnostic_control.cc |
| 213 | lang/wgsl/ast/diagnostic_control.h |
| 214 | lang/wgsl/ast/diagnostic_directive.cc |
| 215 | lang/wgsl/ast/diagnostic_directive.h |
| 216 | lang/wgsl/ast/diagnostic_rule_name.cc |
| 217 | lang/wgsl/ast/diagnostic_rule_name.h |
| 218 | lang/wgsl/ast/disable_validation_attribute.cc |
| 219 | lang/wgsl/ast/disable_validation_attribute.h |
| 220 | lang/wgsl/ast/discard_statement.cc |
| 221 | lang/wgsl/ast/discard_statement.h |
| 222 | lang/wgsl/ast/enable.cc |
| 223 | lang/wgsl/ast/enable.h |
| 224 | lang/wgsl/ast/expression.cc |
| 225 | lang/wgsl/ast/expression.h |
| 226 | lang/wgsl/ast/extension.cc |
| 227 | lang/wgsl/ast/extension.h |
| 228 | lang/wgsl/ast/float_literal_expression.cc |
| 229 | lang/wgsl/ast/float_literal_expression.h |
| 230 | lang/wgsl/ast/for_loop_statement.cc |
| 231 | lang/wgsl/ast/for_loop_statement.h |
| 232 | lang/wgsl/ast/function.cc |
| 233 | lang/wgsl/ast/function.h |
| 234 | lang/wgsl/ast/group_attribute.cc |
| 235 | lang/wgsl/ast/group_attribute.h |
| 236 | lang/wgsl/ast/id_attribute.cc |
| 237 | lang/wgsl/ast/id_attribute.h |
| 238 | lang/wgsl/ast/identifier.cc |
| 239 | lang/wgsl/ast/identifier.h |
| 240 | lang/wgsl/ast/identifier_expression.cc |
| 241 | lang/wgsl/ast/identifier_expression.h |
| 242 | lang/wgsl/ast/if_statement.cc |
| 243 | lang/wgsl/ast/if_statement.h |
| 244 | lang/wgsl/ast/increment_decrement_statement.cc |
| 245 | lang/wgsl/ast/increment_decrement_statement.h |
| 246 | lang/wgsl/ast/index_accessor_expression.cc |
| 247 | lang/wgsl/ast/index_accessor_expression.h |
| 248 | lang/wgsl/ast/index_attribute.cc |
| 249 | lang/wgsl/ast/index_attribute.h |
| 250 | lang/wgsl/ast/int_literal_expression.cc |
| 251 | lang/wgsl/ast/int_literal_expression.h |
| 252 | lang/wgsl/ast/internal_attribute.cc |
| 253 | lang/wgsl/ast/internal_attribute.h |
| 254 | lang/wgsl/ast/interpolate_attribute.cc |
| 255 | lang/wgsl/ast/interpolate_attribute.h |
| 256 | lang/wgsl/ast/invariant_attribute.cc |
| 257 | lang/wgsl/ast/invariant_attribute.h |
| 258 | lang/wgsl/ast/let.cc |
| 259 | lang/wgsl/ast/let.h |
| 260 | lang/wgsl/ast/literal_expression.cc |
| 261 | lang/wgsl/ast/literal_expression.h |
| 262 | lang/wgsl/ast/location_attribute.cc |
| 263 | lang/wgsl/ast/location_attribute.h |
| 264 | lang/wgsl/ast/loop_statement.cc |
| 265 | lang/wgsl/ast/loop_statement.h |
| 266 | lang/wgsl/ast/member_accessor_expression.cc |
| 267 | lang/wgsl/ast/member_accessor_expression.h |
| 268 | lang/wgsl/ast/module.cc |
| 269 | lang/wgsl/ast/module.h |
| 270 | lang/wgsl/ast/must_use_attribute.cc |
| 271 | lang/wgsl/ast/must_use_attribute.h |
dan sinclair | 99181d8 | 2023-07-20 01:14:15 +0000 | [diff] [blame] | 272 | lang/wgsl/ast/node.cc |
| 273 | lang/wgsl/ast/node.h |
dan sinclair | 46725bd | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 274 | lang/wgsl/ast/node_id.h |
dan sinclair | 99181d8 | 2023-07-20 01:14:15 +0000 | [diff] [blame] | 275 | lang/wgsl/ast/override.cc |
| 276 | lang/wgsl/ast/override.h |
| 277 | lang/wgsl/ast/parameter.cc |
| 278 | lang/wgsl/ast/parameter.h |
| 279 | lang/wgsl/ast/phony_expression.cc |
| 280 | lang/wgsl/ast/phony_expression.h |
| 281 | lang/wgsl/ast/pipeline_stage.cc |
| 282 | lang/wgsl/ast/pipeline_stage.h |
| 283 | lang/wgsl/ast/return_statement.cc |
| 284 | lang/wgsl/ast/return_statement.h |
| 285 | lang/wgsl/ast/stage_attribute.cc |
| 286 | lang/wgsl/ast/stage_attribute.h |
| 287 | lang/wgsl/ast/statement.cc |
| 288 | lang/wgsl/ast/statement.h |
| 289 | lang/wgsl/ast/stride_attribute.cc |
| 290 | lang/wgsl/ast/stride_attribute.h |
dan sinclair | 46725bd | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 291 | lang/wgsl/ast/struct.cc |
| 292 | lang/wgsl/ast/struct.h |
| 293 | lang/wgsl/ast/struct_member.cc |
| 294 | lang/wgsl/ast/struct_member.h |
dan sinclair | 99181d8 | 2023-07-20 01:14:15 +0000 | [diff] [blame] | 295 | lang/wgsl/ast/struct_member_align_attribute.cc |
| 296 | lang/wgsl/ast/struct_member_align_attribute.h |
| 297 | lang/wgsl/ast/struct_member_offset_attribute.cc |
| 298 | lang/wgsl/ast/struct_member_offset_attribute.h |
| 299 | lang/wgsl/ast/struct_member_size_attribute.cc |
| 300 | lang/wgsl/ast/struct_member_size_attribute.h |
dan sinclair | 99181d8 | 2023-07-20 01:14:15 +0000 | [diff] [blame] | 301 | lang/wgsl/ast/switch_statement.cc |
| 302 | lang/wgsl/ast/switch_statement.h |
| 303 | lang/wgsl/ast/templated_identifier.cc |
| 304 | lang/wgsl/ast/templated_identifier.h |
dan sinclair | 99181d8 | 2023-07-20 01:14:15 +0000 | [diff] [blame] | 305 | lang/wgsl/ast/transform/add_block_attribute.cc |
| 306 | lang/wgsl/ast/transform/add_block_attribute.h |
dan sinclair | 46725bd | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 307 | lang/wgsl/ast/transform/add_empty_entry_point.cc |
| 308 | lang/wgsl/ast/transform/add_empty_entry_point.h |
dan sinclair | 99181d8 | 2023-07-20 01:14:15 +0000 | [diff] [blame] | 309 | lang/wgsl/ast/transform/array_length_from_uniform.cc |
| 310 | lang/wgsl/ast/transform/array_length_from_uniform.h |
| 311 | lang/wgsl/ast/transform/binding_remapper.cc |
| 312 | lang/wgsl/ast/transform/binding_remapper.h |
| 313 | lang/wgsl/ast/transform/builtin_polyfill.cc |
| 314 | lang/wgsl/ast/transform/builtin_polyfill.h |
| 315 | lang/wgsl/ast/transform/calculate_array_length.cc |
| 316 | lang/wgsl/ast/transform/calculate_array_length.h |
dan sinclair | 99181d8 | 2023-07-20 01:14:15 +0000 | [diff] [blame] | 317 | lang/wgsl/ast/transform/canonicalize_entry_point_io.cc |
| 318 | lang/wgsl/ast/transform/canonicalize_entry_point_io.h |
dan sinclair | 46725bd | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 319 | lang/wgsl/ast/transform/clamp_frag_depth.cc |
| 320 | lang/wgsl/ast/transform/clamp_frag_depth.h |
dan sinclair | 99181d8 | 2023-07-20 01:14:15 +0000 | [diff] [blame] | 321 | lang/wgsl/ast/transform/combine_samplers.cc |
| 322 | lang/wgsl/ast/transform/combine_samplers.h |
| 323 | lang/wgsl/ast/transform/decompose_memory_access.cc |
| 324 | lang/wgsl/ast/transform/decompose_memory_access.h |
| 325 | lang/wgsl/ast/transform/decompose_strided_array.cc |
| 326 | lang/wgsl/ast/transform/decompose_strided_array.h |
| 327 | lang/wgsl/ast/transform/decompose_strided_matrix.cc |
| 328 | lang/wgsl/ast/transform/decompose_strided_matrix.h |
| 329 | lang/wgsl/ast/transform/demote_to_helper.cc |
| 330 | lang/wgsl/ast/transform/demote_to_helper.h |
| 331 | lang/wgsl/ast/transform/direct_variable_access.cc |
| 332 | lang/wgsl/ast/transform/direct_variable_access.h |
| 333 | lang/wgsl/ast/transform/disable_uniformity_analysis.cc |
| 334 | lang/wgsl/ast/transform/disable_uniformity_analysis.h |
| 335 | lang/wgsl/ast/transform/expand_compound_assignment.cc |
| 336 | lang/wgsl/ast/transform/expand_compound_assignment.h |
| 337 | lang/wgsl/ast/transform/first_index_offset.cc |
| 338 | lang/wgsl/ast/transform/first_index_offset.h |
| 339 | lang/wgsl/ast/transform/fold_trivial_lets.cc |
| 340 | lang/wgsl/ast/transform/fold_trivial_lets.h |
| 341 | lang/wgsl/ast/transform/for_loop_to_loop.cc |
| 342 | lang/wgsl/ast/transform/for_loop_to_loop.h |
| 343 | lang/wgsl/ast/transform/localize_struct_array_assignment.cc |
| 344 | lang/wgsl/ast/transform/localize_struct_array_assignment.h |
| 345 | lang/wgsl/ast/transform/merge_return.cc |
| 346 | lang/wgsl/ast/transform/merge_return.h |
| 347 | lang/wgsl/ast/transform/module_scope_var_to_entry_point_param.cc |
| 348 | lang/wgsl/ast/transform/module_scope_var_to_entry_point_param.h |
| 349 | lang/wgsl/ast/transform/multiplanar_external_texture.cc |
| 350 | lang/wgsl/ast/transform/multiplanar_external_texture.h |
| 351 | lang/wgsl/ast/transform/num_workgroups_from_uniform.cc |
| 352 | lang/wgsl/ast/transform/num_workgroups_from_uniform.h |
| 353 | lang/wgsl/ast/transform/packed_vec3.cc |
| 354 | lang/wgsl/ast/transform/packed_vec3.h |
| 355 | lang/wgsl/ast/transform/pad_structs.cc |
| 356 | lang/wgsl/ast/transform/pad_structs.h |
| 357 | lang/wgsl/ast/transform/preserve_padding.cc |
| 358 | lang/wgsl/ast/transform/preserve_padding.h |
| 359 | lang/wgsl/ast/transform/promote_initializers_to_let.cc |
| 360 | lang/wgsl/ast/transform/promote_initializers_to_let.h |
| 361 | lang/wgsl/ast/transform/promote_side_effects_to_decl.cc |
| 362 | lang/wgsl/ast/transform/promote_side_effects_to_decl.h |
| 363 | lang/wgsl/ast/transform/remove_continue_in_switch.cc |
| 364 | lang/wgsl/ast/transform/remove_continue_in_switch.h |
| 365 | lang/wgsl/ast/transform/remove_phonies.cc |
| 366 | lang/wgsl/ast/transform/remove_phonies.h |
| 367 | lang/wgsl/ast/transform/remove_unreachable_statements.cc |
| 368 | lang/wgsl/ast/transform/remove_unreachable_statements.h |
| 369 | lang/wgsl/ast/transform/renamer.cc |
| 370 | lang/wgsl/ast/transform/renamer.h |
| 371 | lang/wgsl/ast/transform/robustness.cc |
| 372 | lang/wgsl/ast/transform/robustness.h |
| 373 | lang/wgsl/ast/transform/simplify_pointers.cc |
| 374 | lang/wgsl/ast/transform/simplify_pointers.h |
| 375 | lang/wgsl/ast/transform/single_entry_point.cc |
| 376 | lang/wgsl/ast/transform/single_entry_point.h |
| 377 | lang/wgsl/ast/transform/spirv_atomic.cc |
| 378 | lang/wgsl/ast/transform/spirv_atomic.h |
| 379 | lang/wgsl/ast/transform/std140.cc |
| 380 | lang/wgsl/ast/transform/std140.h |
| 381 | lang/wgsl/ast/transform/substitute_override.cc |
| 382 | lang/wgsl/ast/transform/substitute_override.h |
| 383 | lang/wgsl/ast/transform/texture_1d_to_2d.cc |
| 384 | lang/wgsl/ast/transform/texture_1d_to_2d.h |
| 385 | lang/wgsl/ast/transform/transform.cc |
| 386 | lang/wgsl/ast/transform/transform.h |
| 387 | lang/wgsl/ast/transform/truncate_interstage_variables.cc |
| 388 | lang/wgsl/ast/transform/truncate_interstage_variables.h |
| 389 | lang/wgsl/ast/transform/unshadow.cc |
| 390 | lang/wgsl/ast/transform/unshadow.h |
| 391 | lang/wgsl/ast/transform/utils/get_insertion_point.cc |
| 392 | lang/wgsl/ast/transform/utils/get_insertion_point.h |
| 393 | lang/wgsl/ast/transform/utils/hoist_to_decl_before.cc |
| 394 | lang/wgsl/ast/transform/utils/hoist_to_decl_before.h |
| 395 | lang/wgsl/ast/transform/var_for_dynamic_index.cc |
| 396 | lang/wgsl/ast/transform/var_for_dynamic_index.h |
| 397 | lang/wgsl/ast/transform/vectorize_matrix_conversions.cc |
| 398 | lang/wgsl/ast/transform/vectorize_matrix_conversions.h |
| 399 | lang/wgsl/ast/transform/vectorize_scalar_matrix_initializers.cc |
| 400 | lang/wgsl/ast/transform/vectorize_scalar_matrix_initializers.h |
| 401 | lang/wgsl/ast/transform/vertex_pulling.cc |
| 402 | lang/wgsl/ast/transform/vertex_pulling.h |
| 403 | lang/wgsl/ast/transform/while_to_loop.cc |
| 404 | lang/wgsl/ast/transform/while_to_loop.h |
| 405 | lang/wgsl/ast/transform/zero_init_workgroup_memory.cc |
| 406 | lang/wgsl/ast/transform/zero_init_workgroup_memory.h |
dan sinclair | 46725bd | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 407 | lang/wgsl/ast/traverse_expressions.h |
| 408 | lang/wgsl/ast/type.cc |
| 409 | lang/wgsl/ast/type.h |
| 410 | lang/wgsl/ast/type_decl.cc |
| 411 | lang/wgsl/ast/type_decl.h |
| 412 | lang/wgsl/ast/unary_op.cc |
| 413 | lang/wgsl/ast/unary_op.h |
| 414 | lang/wgsl/ast/unary_op_expression.cc |
| 415 | lang/wgsl/ast/unary_op_expression.h |
| 416 | lang/wgsl/ast/var.cc |
| 417 | lang/wgsl/ast/var.h |
| 418 | lang/wgsl/ast/variable.cc |
| 419 | lang/wgsl/ast/variable.h |
| 420 | lang/wgsl/ast/variable_decl_statement.cc |
| 421 | lang/wgsl/ast/variable_decl_statement.h |
| 422 | lang/wgsl/ast/while_statement.cc |
| 423 | lang/wgsl/ast/while_statement.h |
| 424 | lang/wgsl/ast/workgroup_attribute.cc |
| 425 | lang/wgsl/ast/workgroup_attribute.h |
| 426 | lang/wgsl/helpers/append_vector.cc |
| 427 | lang/wgsl/helpers/append_vector.h |
| 428 | lang/wgsl/helpers/check_supported_extensions.cc |
| 429 | lang/wgsl/helpers/check_supported_extensions.h |
| 430 | lang/wgsl/helpers/flatten_bindings.cc |
| 431 | lang/wgsl/helpers/flatten_bindings.h |
| 432 | lang/wgsl/inspector/entry_point.cc |
| 433 | lang/wgsl/inspector/entry_point.h |
| 434 | lang/wgsl/inspector/inspector.cc |
| 435 | lang/wgsl/inspector/inspector.h |
| 436 | lang/wgsl/inspector/resource_binding.cc |
| 437 | lang/wgsl/inspector/resource_binding.h |
| 438 | lang/wgsl/inspector/scalar.cc |
| 439 | lang/wgsl/inspector/scalar.h |
| 440 | lang/wgsl/program/program.cc |
| 441 | lang/wgsl/program/program.h |
| 442 | lang/wgsl/program/program_builder.cc |
| 443 | lang/wgsl/program/program_builder.h |
| 444 | lang/wgsl/sem/accessor_expression.cc |
| 445 | lang/wgsl/sem/accessor_expression.h |
| 446 | lang/wgsl/sem/array_count.cc |
| 447 | lang/wgsl/sem/array_count.h |
| 448 | lang/wgsl/sem/behavior.cc |
| 449 | lang/wgsl/sem/behavior.h |
| 450 | lang/wgsl/sem/binding_point.h |
| 451 | lang/wgsl/sem/block_statement.cc |
| 452 | lang/wgsl/sem/block_statement.h |
| 453 | lang/wgsl/sem/break_if_statement.cc |
| 454 | lang/wgsl/sem/break_if_statement.h |
| 455 | lang/wgsl/sem/builtin.cc |
| 456 | lang/wgsl/sem/builtin.h |
| 457 | lang/wgsl/sem/builtin_enum_expression.cc |
| 458 | lang/wgsl/sem/builtin_enum_expression.h |
| 459 | lang/wgsl/sem/call.cc |
| 460 | lang/wgsl/sem/call.h |
| 461 | lang/wgsl/sem/call_target.cc |
| 462 | lang/wgsl/sem/call_target.h |
| 463 | lang/wgsl/sem/evaluation_stage.h |
| 464 | lang/wgsl/sem/expression.cc |
| 465 | lang/wgsl/sem/expression.h |
| 466 | lang/wgsl/sem/external_texture.h |
| 467 | lang/wgsl/sem/for_loop_statement.cc |
| 468 | lang/wgsl/sem/for_loop_statement.h |
| 469 | lang/wgsl/sem/function.cc |
| 470 | lang/wgsl/sem/function_expression.cc |
| 471 | lang/wgsl/sem/function_expression.h |
| 472 | lang/wgsl/sem/if_statement.cc |
| 473 | lang/wgsl/sem/if_statement.h |
| 474 | lang/wgsl/sem/index_accessor_expression.cc |
| 475 | lang/wgsl/sem/index_accessor_expression.h |
| 476 | lang/wgsl/sem/info.cc |
| 477 | lang/wgsl/sem/info.h |
| 478 | lang/wgsl/sem/load.cc |
| 479 | lang/wgsl/sem/load.h |
| 480 | lang/wgsl/sem/loop_statement.cc |
| 481 | lang/wgsl/sem/loop_statement.h |
| 482 | lang/wgsl/sem/materialize.cc |
| 483 | lang/wgsl/sem/materialize.h |
| 484 | lang/wgsl/sem/member_accessor_expression.cc |
| 485 | lang/wgsl/sem/module.cc |
| 486 | lang/wgsl/sem/module.h |
| 487 | lang/wgsl/sem/node.cc |
| 488 | lang/wgsl/sem/node.h |
| 489 | lang/wgsl/sem/pipeline_stage_set.h |
| 490 | lang/wgsl/sem/sampler_texture_pair.h |
| 491 | lang/wgsl/sem/statement.cc |
| 492 | lang/wgsl/sem/struct.cc |
| 493 | lang/wgsl/sem/struct.h |
| 494 | lang/wgsl/sem/switch_statement.cc |
| 495 | lang/wgsl/sem/switch_statement.h |
| 496 | lang/wgsl/sem/type_expression.cc |
| 497 | lang/wgsl/sem/type_expression.h |
| 498 | lang/wgsl/sem/type_mappings.h |
| 499 | lang/wgsl/sem/value_constructor.cc |
| 500 | lang/wgsl/sem/value_constructor.h |
| 501 | lang/wgsl/sem/value_conversion.cc |
| 502 | lang/wgsl/sem/value_conversion.h |
| 503 | lang/wgsl/sem/value_expression.cc |
| 504 | lang/wgsl/sem/value_expression.h |
| 505 | lang/wgsl/sem/variable.cc |
| 506 | lang/wgsl/sem/while_statement.cc |
| 507 | lang/wgsl/sem/while_statement.h |
| 508 | program_id.cc |
| 509 | program_id.h |
| 510 | reader/reader.cc |
| 511 | reader/reader.h |
dan sinclair | 9d97f22 | 2023-07-24 17:11:53 +0000 | [diff] [blame] | 512 | lang/wgsl/resolver/const_eval.cc |
| 513 | lang/wgsl/resolver/const_eval.h |
| 514 | lang/wgsl/resolver/dependency_graph.cc |
| 515 | lang/wgsl/resolver/dependency_graph.h |
| 516 | lang/wgsl/resolver/intrinsic_table.cc |
| 517 | lang/wgsl/resolver/intrinsic_table.h |
| 518 | lang/wgsl/resolver/intrinsic_table.inl |
| 519 | lang/wgsl/resolver/resolver.cc |
| 520 | lang/wgsl/resolver/resolver.h |
| 521 | lang/wgsl/resolver/sem_helper.cc |
| 522 | lang/wgsl/resolver/sem_helper.h |
| 523 | lang/wgsl/resolver/uniformity.cc |
| 524 | lang/wgsl/resolver/uniformity.h |
| 525 | lang/wgsl/resolver/validator.cc |
| 526 | lang/wgsl/resolver/validator.h |
dan sinclair | 46725bd | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 527 | tint.cc |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 528 | transform/manager.cc |
| 529 | transform/manager.h |
James Price | 0e6534e | 2023-05-17 01:21:45 +0000 | [diff] [blame] | 530 | transform/transform.cc |
| 531 | transform/transform.h |
dan sinclair | 22b4dd2 | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 532 | utils/cli/cli.cc |
| 533 | utils/cli/cli.h |
dan sinclair | 46725bd | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 534 | utils/containers/bitset.h |
dan sinclair | 22b4dd2 | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 535 | utils/containers/enum_set.h |
dan sinclair | 22b4dd2 | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 536 | utils/containers/hashmap.h |
dan sinclair | 46725bd | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 537 | utils/containers/hashmap_base.h |
dan sinclair | 22b4dd2 | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 538 | utils/containers/hashset.h |
| 539 | utils/containers/map.h |
dan sinclair | 46725bd | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 540 | utils/containers/predicates.h |
| 541 | utils/containers/scope_stack.h |
| 542 | utils/containers/slice.h |
| 543 | utils/containers/unique_allocator.h |
| 544 | utils/containers/unique_vector.h |
| 545 | utils/containers/vector.h |
| 546 | utils/macros/compiler.h |
| 547 | utils/macros/concat.h |
| 548 | utils/macros/foreach.h |
| 549 | utils/macros/scoped_assignment.h |
| 550 | utils/math/crc32.h |
| 551 | utils/math/hash.h |
dan sinclair | 22b4dd2 | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 552 | utils/math/math.h |
dan sinclair | 46725bd | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 553 | utils/memory/bitcast.h |
| 554 | utils/memory/block_allocator.h |
| 555 | utils/memory/bump_allocator.h |
| 556 | utils/reflection/reflection.h |
| 557 | utils/rtti/castable.cc |
| 558 | utils/rtti/castable.h |
| 559 | utils/rtti/switch.h |
| 560 | utils/text/float_to_string.cc |
| 561 | utils/text/float_to_string.h |
dan sinclair | 22b4dd2 | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 562 | utils/text/parse_num.cc |
| 563 | utils/text/parse_num.h |
dan sinclair | 22b4dd2 | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 564 | utils/text/string.cc |
| 565 | utils/text/string.h |
| 566 | utils/text/string_stream.cc |
| 567 | utils/text/string_stream.h |
dan sinclair | 46725bd | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 568 | utils/text/symbol.cc |
| 569 | utils/text/symbol.h |
| 570 | utils/text/symbol_table.cc |
| 571 | utils/text/symbol_table.h |
| 572 | utils/text/text_generator.cc |
| 573 | utils/text/text_generator.h |
dan sinclair | 22b4dd2 | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 574 | utils/traits/traits.h |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 575 | writer/array_length_from_uniform_options.cc |
| 576 | writer/array_length_from_uniform_options.h |
dan sinclair | c0f0ab7 | 2023-06-23 16:57:00 +0000 | [diff] [blame] | 577 | writer/ast_text_generator.cc |
| 578 | writer/ast_text_generator.h |
dan sinclair | eebbdef | 2023-03-08 02:48:42 +0000 | [diff] [blame] | 579 | writer/binding_point.h |
dan sinclair | 39d4065 | 2023-03-15 13:41:46 +0000 | [diff] [blame] | 580 | writer/binding_remapper_options.cc |
| 581 | writer/binding_remapper_options.h |
dan sinclair | e95b59c | 2023-03-10 11:34:26 +0000 | [diff] [blame] | 582 | writer/external_texture_options.cc |
| 583 | writer/external_texture_options.h |
dan sinclair | cadd0c0 | 2023-06-26 13:50:42 +0000 | [diff] [blame] | 584 | writer/ir_text_generator.cc |
| 585 | writer/ir_text_generator.h |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 586 | writer/text.cc |
| 587 | writer/text.h |
| 588 | writer/writer.cc |
| 589 | writer/writer.h |
| 590 | ) |
| 591 | |
dan sinclair | 352f8c8 | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 592 | tint_generated(lang/core/builtin/access BENCH TEST) |
| 593 | tint_generated(lang/core/builtin/address_space BENCH TEST) |
| 594 | tint_generated(lang/core/builtin/attribute BENCH TEST) |
| 595 | tint_generated(lang/core/builtin/builtin BENCH TEST) |
| 596 | tint_generated(lang/core/builtin/builtin_value BENCH TEST) |
| 597 | tint_generated(lang/core/builtin/diagnostic_rule BENCH TEST) |
| 598 | tint_generated(lang/core/builtin/diagnostic_severity BENCH TEST) |
| 599 | tint_generated(lang/core/builtin/extension BENCH TEST) |
| 600 | tint_generated(lang/core/builtin/function) |
| 601 | tint_generated(lang/core/builtin/interpolation_sampling BENCH TEST) |
| 602 | tint_generated(lang/core/builtin/interpolation_type BENCH TEST) |
| 603 | tint_generated(lang/core/builtin/texel_format BENCH TEST) |
dan sinclair | 993a658 | 2023-02-20 08:37:45 +0000 | [diff] [blame] | 604 | |
dan sinclair | 9d97f22 | 2023-07-24 17:11:53 +0000 | [diff] [blame] | 605 | tint_generated(lang/wgsl/resolver/ctor_conv_intrinsic) |
dan sinclair | d3b1369 | 2023-07-20 01:14:15 +0000 | [diff] [blame] | 606 | tint_generated(lang/wgsl/sem/parameter_usage) |
dan sinclair | 16b4cf8 | 2022-11-03 21:10:40 +0000 | [diff] [blame] | 607 | |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 608 | if(UNIX) |
dan sinclair | 22b4dd2 | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 609 | list(APPEND TINT_LIB_SRCS utils/diagnostic/printer_posix.cc) |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 610 | elseif(WIN32) |
dan sinclair | 22b4dd2 | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 611 | list(APPEND TINT_LIB_SRCS utils/diagnostic/printer_windows.cc) |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 612 | else() |
dan sinclair | 22b4dd2 | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 613 | list(APPEND TINT_LIB_SRCS utils/diagnostic/printer_other.cc) |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 614 | endif() |
| 615 | |
| 616 | if(${TINT_BUILD_SPV_READER}) |
| 617 | list(APPEND TINT_LIB_SRCS |
dan sinclair | b2e4549 | 2023-07-20 01:14:15 +0000 | [diff] [blame] | 618 | lang/spirv/reader/attributes.h |
| 619 | lang/spirv/reader/construct.h |
| 620 | lang/spirv/reader/construct.cc |
| 621 | lang/spirv/reader/entry_point_info.h |
| 622 | lang/spirv/reader/entry_point_info.cc |
| 623 | lang/spirv/reader/enum_converter.h |
| 624 | lang/spirv/reader/enum_converter.cc |
| 625 | lang/spirv/reader/fail_stream.h |
| 626 | lang/spirv/reader/function.cc |
| 627 | lang/spirv/reader/function.h |
| 628 | lang/spirv/reader/namer.cc |
| 629 | lang/spirv/reader/namer.h |
| 630 | lang/spirv/reader/parser_type.cc |
| 631 | lang/spirv/reader/parser_type.h |
| 632 | lang/spirv/reader/parser.cc |
| 633 | lang/spirv/reader/parser.h |
| 634 | lang/spirv/reader/parser_impl.cc |
| 635 | lang/spirv/reader/parser_impl.h |
| 636 | lang/spirv/reader/usage.cc |
| 637 | lang/spirv/reader/usage.h |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 638 | ) |
| 639 | endif() |
| 640 | |
| 641 | if(${TINT_BUILD_WGSL_READER}) |
| 642 | list(APPEND TINT_LIB_SRCS |
dan sinclair | 7cf568f | 2023-07-20 01:14:15 +0000 | [diff] [blame] | 643 | lang/wgsl/reader/classify_template_args.cc |
| 644 | lang/wgsl/reader/classify_template_args.h |
| 645 | lang/wgsl/reader/lexer.cc |
| 646 | lang/wgsl/reader/lexer.h |
| 647 | lang/wgsl/reader/parser.cc |
| 648 | lang/wgsl/reader/parser.h |
| 649 | lang/wgsl/reader/parser_impl.cc |
| 650 | lang/wgsl/reader/parser_impl.h |
| 651 | lang/wgsl/reader/parser_impl_detail.h |
| 652 | lang/wgsl/reader/token.cc |
| 653 | lang/wgsl/reader/token.h |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 654 | ) |
| 655 | endif() |
| 656 | |
| 657 | if(${TINT_BUILD_SPV_WRITER}) |
| 658 | list(APPEND TINT_LIB_SRCS |
James Price | 74d04a8 | 2023-07-20 14:44:22 +0000 | [diff] [blame] | 659 | lang/spirv/ast_writer/binary_writer.cc |
| 660 | lang/spirv/ast_writer/binary_writer.h |
| 661 | lang/spirv/ast_writer/builder.cc |
| 662 | lang/spirv/ast_writer/builder.h |
| 663 | lang/spirv/ast_writer/function.cc |
| 664 | lang/spirv/ast_writer/function.h |
| 665 | lang/spirv/ast_writer/generator.cc |
| 666 | lang/spirv/ast_writer/generator.h |
| 667 | lang/spirv/ast_writer/generator_impl.cc |
| 668 | lang/spirv/ast_writer/generator_impl.h |
| 669 | lang/spirv/ast_writer/instruction.cc |
| 670 | lang/spirv/ast_writer/instruction.h |
| 671 | lang/spirv/ast_writer/module.cc |
| 672 | lang/spirv/ast_writer/module.h |
| 673 | lang/spirv/ast_writer/operand.cc |
| 674 | lang/spirv/ast_writer/operand.h |
| 675 | lang/spirv/ast_writer/scalar_constant.h |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 676 | ) |
James Price | 8f9ea96 | 2023-05-04 01:31:36 +0000 | [diff] [blame] | 677 | |
| 678 | if(${TINT_BUILD_IR}) |
| 679 | list(APPEND TINT_LIB_SRCS |
dan sinclair | 97c3727 | 2023-07-24 17:11:53 +0000 | [diff] [blame^] | 680 | lang/core/ir/transform/builtin_polyfill_spirv.cc |
| 681 | lang/core/ir/transform/builtin_polyfill_spirv.h |
| 682 | lang/core/ir/transform/expand_implicit_splats.cc |
| 683 | lang/core/ir/transform/expand_implicit_splats.h |
| 684 | lang/core/ir/transform/handle_matrix_arithmetic.cc |
| 685 | lang/core/ir/transform/handle_matrix_arithmetic.h |
| 686 | lang/core/ir/transform/merge_return.cc |
| 687 | lang/core/ir/transform/merge_return.h |
| 688 | lang/core/ir/transform/shader_io_spirv.cc |
| 689 | lang/core/ir/transform/shader_io_spirv.h |
| 690 | lang/core/ir/transform/var_for_dynamic_index.cc |
| 691 | lang/core/ir/transform/var_for_dynamic_index.h |
James Price | 2280cc6 | 2023-07-21 03:42:48 +0000 | [diff] [blame] | 692 | lang/spirv/writer/writer.cc |
| 693 | lang/spirv/writer/writer.h |
James Price | 8f9ea96 | 2023-05-04 01:31:36 +0000 | [diff] [blame] | 694 | ) |
| 695 | endif() |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 696 | endif() |
| 697 | |
| 698 | if(${TINT_BUILD_WGSL_WRITER}) |
| 699 | list(APPEND TINT_LIB_SRCS |
dan sinclair | ff6eba5 | 2023-07-20 01:14:15 +0000 | [diff] [blame] | 700 | lang/wgsl/ast_writer/generator.cc |
| 701 | lang/wgsl/ast_writer/generator.h |
| 702 | lang/wgsl/ast_writer/generator_impl.cc |
| 703 | lang/wgsl/ast_writer/generator_impl.h |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 704 | ) |
| 705 | endif() |
| 706 | |
| 707 | if(${TINT_BUILD_MSL_WRITER}) |
| 708 | list(APPEND TINT_LIB_SRCS |
dan sinclair | d5575ce | 2023-07-20 01:14:15 +0000 | [diff] [blame] | 709 | lang/msl/ast_writer/generator.cc |
| 710 | lang/msl/ast_writer/generator.h |
| 711 | lang/msl/ast_writer/generator_impl.cc |
| 712 | lang/msl/ast_writer/generator_impl.h |
| 713 | lang/msl/ast_writer/generator_support.cc |
| 714 | lang/msl/ast_writer/generator_support.h |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 715 | ) |
dan sinclair | cadd0c0 | 2023-06-26 13:50:42 +0000 | [diff] [blame] | 716 | |
| 717 | if(${TINT_BUILD_IR}) |
| 718 | list(APPEND TINT_LIB_SRCS |
dan sinclair | d5575ce | 2023-07-20 01:14:15 +0000 | [diff] [blame] | 719 | lang/msl/writer/generator_impl_ir.cc |
| 720 | lang/msl/writer/generator_impl_ir.h |
dan sinclair | cadd0c0 | 2023-06-26 13:50:42 +0000 | [diff] [blame] | 721 | ) |
| 722 | endif() |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 723 | endif() |
| 724 | |
| 725 | if(${TINT_BUILD_GLSL_WRITER}) |
| 726 | list(APPEND TINT_LIB_SRCS |
dan sinclair | 8046fbb | 2023-07-20 01:14:15 +0000 | [diff] [blame] | 727 | lang/glsl/ast_writer/generator.cc |
| 728 | lang/glsl/ast_writer/generator.h |
| 729 | lang/glsl/ast_writer/generator_impl.cc |
| 730 | lang/glsl/ast_writer/generator_impl.h |
| 731 | lang/glsl/ast_writer/version.h |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 732 | ) |
| 733 | endif() |
| 734 | |
| 735 | if(${TINT_BUILD_HLSL_WRITER}) |
| 736 | list(APPEND TINT_LIB_SRCS |
dan sinclair | 5fbe1f6 | 2023-07-20 01:14:15 +0000 | [diff] [blame] | 737 | lang/hlsl/ast_writer/generator.cc |
| 738 | lang/hlsl/ast_writer/generator.h |
| 739 | lang/hlsl/ast_writer/generator_impl.cc |
| 740 | lang/hlsl/ast_writer/generator_impl.h |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 741 | ) |
| 742 | endif() |
| 743 | |
dan sinclair | 0917fbb | 2023-03-07 18:28:38 +0000 | [diff] [blame] | 744 | if(${TINT_BUILD_SYNTAX_TREE_WRITER}) |
| 745 | list(APPEND TINT_LIB_SRCS |
dan sinclair | b7294dc | 2023-07-20 01:14:15 +0000 | [diff] [blame] | 746 | lang/wgsl/syntax_tree_writer/generator.cc |
| 747 | lang/wgsl/syntax_tree_writer/generator.h |
| 748 | lang/wgsl/syntax_tree_writer/generator_impl.cc |
| 749 | lang/wgsl/syntax_tree_writer/generator_impl.h |
dan sinclair | 0917fbb | 2023-03-07 18:28:38 +0000 | [diff] [blame] | 750 | ) |
| 751 | endif() |
| 752 | |
dan sinclair | 9261261 | 2022-11-01 18:15:50 +0000 | [diff] [blame] | 753 | if(${TINT_BUILD_IR}) |
| 754 | list(APPEND TINT_LIB_SRCS |
dan sinclair | 97c3727 | 2023-07-24 17:11:53 +0000 | [diff] [blame^] | 755 | lang/core/ir/access.cc |
| 756 | lang/core/ir/access.h |
| 757 | lang/core/ir/binary.cc |
| 758 | lang/core/ir/binary.h |
| 759 | lang/core/ir/binding_point.h |
| 760 | lang/core/ir/bitcast.cc |
| 761 | lang/core/ir/bitcast.h |
| 762 | lang/core/ir/block.cc |
| 763 | lang/core/ir/block.h |
| 764 | lang/core/ir/block_param.cc |
| 765 | lang/core/ir/block_param.h |
| 766 | lang/core/ir/break_if.cc |
| 767 | lang/core/ir/break_if.h |
| 768 | lang/core/ir/builder.cc |
| 769 | lang/core/ir/builder.h |
| 770 | lang/core/ir/builtin_call.cc |
| 771 | lang/core/ir/builtin_call.h |
| 772 | lang/core/ir/call.cc |
| 773 | lang/core/ir/call.h |
| 774 | lang/core/ir/constant.cc |
| 775 | lang/core/ir/constant.h |
| 776 | lang/core/ir/construct.cc |
| 777 | lang/core/ir/construct.h |
| 778 | lang/core/ir/continue.cc |
| 779 | lang/core/ir/continue.h |
| 780 | lang/core/ir/control_instruction.cc |
| 781 | lang/core/ir/control_instruction.h |
| 782 | lang/core/ir/convert.cc |
| 783 | lang/core/ir/convert.h |
| 784 | lang/core/ir/core_builtin_call.cc |
| 785 | lang/core/ir/core_builtin_call.h |
| 786 | lang/core/ir/disassembler.cc |
| 787 | lang/core/ir/disassembler.h |
| 788 | lang/core/ir/discard.cc |
| 789 | lang/core/ir/discard.h |
| 790 | lang/core/ir/exit_if.cc |
| 791 | lang/core/ir/exit_if.h |
| 792 | lang/core/ir/exit_loop.cc |
| 793 | lang/core/ir/exit_loop.h |
| 794 | lang/core/ir/exit_switch.cc |
| 795 | lang/core/ir/exit_switch.h |
| 796 | lang/core/ir/exit.cc |
| 797 | lang/core/ir/exit.h |
| 798 | lang/core/ir/from_program.cc |
| 799 | lang/core/ir/from_program.h |
| 800 | lang/core/ir/function.cc |
| 801 | lang/core/ir/function.h |
| 802 | lang/core/ir/function_param.cc |
| 803 | lang/core/ir/function_param.h |
| 804 | lang/core/ir/if.cc |
| 805 | lang/core/ir/if.h |
| 806 | lang/core/ir/instruction.cc |
| 807 | lang/core/ir/instruction.h |
| 808 | lang/core/ir/instruction_result.cc |
| 809 | lang/core/ir/instruction_result.h |
| 810 | lang/core/ir/intrinsic_call.cc |
| 811 | lang/core/ir/intrinsic_call.h |
| 812 | lang/core/ir/let.cc |
| 813 | lang/core/ir/let.h |
| 814 | lang/core/ir/load.cc |
| 815 | lang/core/ir/load.h |
| 816 | lang/core/ir/load_vector_element.cc |
| 817 | lang/core/ir/load_vector_element.h |
| 818 | lang/core/ir/location.h |
| 819 | lang/core/ir/loop.cc |
| 820 | lang/core/ir/loop.h |
| 821 | lang/core/ir/module.cc |
| 822 | lang/core/ir/module.h |
| 823 | lang/core/ir/multi_in_block.cc |
| 824 | lang/core/ir/multi_in_block.h |
| 825 | lang/core/ir/next_iteration.cc |
| 826 | lang/core/ir/next_iteration.h |
| 827 | lang/core/ir/operand_instruction.cc |
| 828 | lang/core/ir/operand_instruction.h |
| 829 | lang/core/ir/return.cc |
| 830 | lang/core/ir/return.h |
| 831 | lang/core/ir/store.cc |
| 832 | lang/core/ir/store.h |
| 833 | lang/core/ir/store_vector_element.cc |
| 834 | lang/core/ir/store_vector_element.h |
| 835 | lang/core/ir/switch.cc |
| 836 | lang/core/ir/switch.h |
| 837 | lang/core/ir/swizzle.cc |
| 838 | lang/core/ir/swizzle.h |
| 839 | lang/core/ir/terminate_invocation.cc |
| 840 | lang/core/ir/terminate_invocation.h |
| 841 | lang/core/ir/terminator.cc |
| 842 | lang/core/ir/terminator.h |
| 843 | lang/core/ir/to_program.cc |
| 844 | lang/core/ir/to_program.h |
| 845 | lang/core/ir/unary.cc |
| 846 | lang/core/ir/unary.h |
| 847 | lang/core/ir/unreachable.cc |
| 848 | lang/core/ir/unreachable.h |
| 849 | lang/core/ir/user_call.cc |
| 850 | lang/core/ir/user_call.h |
| 851 | lang/core/ir/validator.cc |
| 852 | lang/core/ir/validator.h |
| 853 | lang/core/ir/value.cc |
| 854 | lang/core/ir/value.h |
| 855 | lang/core/ir/var.cc |
| 856 | lang/core/ir/var.h |
| 857 | lang/core/ir/transform/add_empty_entry_point.cc |
| 858 | lang/core/ir/transform/add_empty_entry_point.h |
| 859 | lang/core/ir/transform/block_decorated_structs.cc |
| 860 | lang/core/ir/transform/block_decorated_structs.h |
| 861 | lang/core/ir/transform/demote_to_helper.cc |
| 862 | lang/core/ir/transform/demote_to_helper.h |
| 863 | lang/core/ir/transform/rename_conflicts_wgsl.cc |
| 864 | lang/core/ir/transform/rename_conflicts_wgsl.h |
| 865 | lang/core/ir/transform/shader_io.cc |
| 866 | lang/core/ir/transform/shader_io.h |
| 867 | lang/core/ir/transform/transform.cc |
| 868 | lang/core/ir/transform/transform.h |
dan sinclair | 9261261 | 2022-11-01 18:15:50 +0000 | [diff] [blame] | 869 | ) |
| 870 | endif() |
| 871 | |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 872 | if(MSVC) |
| 873 | list(APPEND TINT_LIB_SRCS |
| 874 | tint.natvis |
| 875 | ) |
| 876 | endif() |
| 877 | |
| 878 | ## Tint IO utilities. Used by tint_val. |
| 879 | add_library(tint_utils_io |
dan sinclair | 22b4dd2 | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 880 | utils/command/command_${TINT_OS_CC_SUFFIX}.cc |
| 881 | utils/command/command.h |
| 882 | utils/file/tmpfile_${TINT_OS_CC_SUFFIX}.cc |
| 883 | utils/file/tmpfile.h |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 884 | ) |
| 885 | tint_default_compile_options(tint_utils_io) |
| 886 | target_link_libraries(tint_utils_io tint_diagnostic_utils) |
| 887 | |
| 888 | ## Tint validation utilities. Used by tests and the tint executable. |
| 889 | add_library(tint_val |
dan sinclair | 8a5d5bf | 2023-07-20 09:21:10 +0000 | [diff] [blame] | 890 | lang/hlsl/validate/hlsl.cc |
| 891 | lang/hlsl/validate/val.h |
| 892 | lang/msl/validate/msl.cc |
| 893 | lang/msl/validate/val.h |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 894 | ) |
| 895 | |
| 896 | # If we're building on mac / ios and we have CoreGraphics, then we can use the |
| 897 | # metal API to validate our shaders. This is roughly 4x faster than invoking |
| 898 | # the metal shader compiler executable. |
| 899 | if(APPLE) |
| 900 | find_library(LIB_CORE_GRAPHICS CoreGraphics) |
| 901 | if(LIB_CORE_GRAPHICS) |
dan sinclair | 8a5d5bf | 2023-07-20 09:21:10 +0000 | [diff] [blame] | 902 | target_sources(tint_val PRIVATE "lang/msl/validate/msl_metal.mm") |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 903 | target_compile_definitions(tint_val PUBLIC "-DTINT_ENABLE_MSL_VALIDATION_USING_METAL_API=1") |
| 904 | target_compile_options(tint_val PRIVATE "-fmodules" "-fcxx-modules") |
| 905 | target_link_options(tint_val PUBLIC "-framework" "CoreGraphics") |
| 906 | endif() |
| 907 | endif() |
| 908 | |
| 909 | tint_default_compile_options(tint_val) |
| 910 | target_link_libraries(tint_val tint_utils_io) |
| 911 | |
| 912 | ## Tint library |
| 913 | add_library(libtint ${TINT_LIB_SRCS}) |
| 914 | tint_default_compile_options(libtint) |
dan sinclair | 2fe7f19 | 2023-03-07 18:20:23 +0000 | [diff] [blame] | 915 | target_link_libraries(libtint tint_diagnostic_utils absl_strings) |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 916 | set_target_properties(libtint PROPERTIES OUTPUT_NAME "tint") |
| 917 | |
| 918 | if (${TINT_BUILD_FUZZERS}) |
| 919 | # Tint library with fuzzer instrumentation |
| 920 | add_library(libtint-fuzz ${TINT_LIB_SRCS}) |
| 921 | tint_default_compile_options(libtint-fuzz) |
dan sinclair | 2fe7f19 | 2023-03-07 18:20:23 +0000 | [diff] [blame] | 922 | target_link_libraries(libtint-fuzz tint_diagnostic_utils absl_strings) |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 923 | if (${COMPILER_IS_LIKE_GNU}) |
| 924 | target_compile_options(libtint-fuzz PRIVATE -fvisibility=hidden) |
| 925 | endif() |
| 926 | |
| 927 | if (NOT ${TINT_LIB_FUZZING_ENGINE_LINK_OPTIONS} STREQUAL "") |
| 928 | # This is set when the fuzzers are being built by OSS-Fuzz. In this case the |
| 929 | # variable provides the necessary linker flags, and OSS-Fuzz will take care |
| 930 | # of passing suitable compiler flags. |
| 931 | target_link_options(libtint-fuzz PUBLIC ${TINT_LIB_FUZZING_ENGINE_LINK_OPTIONS}) |
| 932 | else() |
| 933 | # When the fuzzers are being built outside of OSS-Fuzz, specific libFuzzer |
| 934 | # arguments to enable fuzzing are used. |
| 935 | target_compile_options(libtint-fuzz PUBLIC -fsanitize=fuzzer -fsanitize-coverage=trace-cmp) |
| 936 | target_link_options(libtint-fuzz PUBLIC -fsanitize=fuzzer -fsanitize-coverage=trace-cmp) |
| 937 | endif() |
| 938 | endif() |
| 939 | |
| 940 | if(${TINT_BUILD_SPV_READER} OR ${TINT_BUILD_SPV_WRITER}) |
| 941 | tint_spvtools_compile_options(libtint) |
| 942 | if (${TINT_BUILD_FUZZERS}) |
| 943 | tint_spvtools_compile_options(libtint-fuzz) |
| 944 | endif() |
| 945 | endif() |
| 946 | |
Ben Clayton | ba200e8 | 2022-11-07 17:24:10 +0000 | [diff] [blame] | 947 | |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 948 | ################################################################################ |
| 949 | # Tests |
| 950 | ################################################################################ |
| 951 | if(TINT_BUILD_TESTS) |
dan sinclair | 16b4cf8 | 2022-11-03 21:10:40 +0000 | [diff] [blame] | 952 | list(APPEND TINT_TEST_SRCS |
dan sinclair | 46725bd | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 953 | clone_context_test.cc |
| 954 | lang/core/builtin/number_test.cc |
| 955 | lang/core/constant/composite_test.cc |
| 956 | lang/core/constant/manager_test.cc |
| 957 | lang/core/constant/scalar_test.cc |
| 958 | lang/core/constant/splat_test.cc |
| 959 | lang/core/constant/value_test.cc |
| 960 | lang/core/type/array_test.cc |
| 961 | lang/core/type/atomic_test.cc |
| 962 | lang/core/type/bool_test.cc |
| 963 | lang/core/type/builtin_structs_test.cc |
| 964 | lang/core/type/depth_multisampled_texture_test.cc |
| 965 | lang/core/type/depth_texture_test.cc |
| 966 | lang/core/type/external_texture_test.cc |
| 967 | lang/core/type/f16_test.cc |
| 968 | lang/core/type/f32_test.cc |
| 969 | lang/core/type/i32_test.cc |
| 970 | lang/core/type/manager_test.cc |
| 971 | lang/core/type/matrix_test.cc |
| 972 | lang/core/type/multisampled_texture_test.cc |
| 973 | lang/core/type/pointer_test.cc |
| 974 | lang/core/type/reference_test.cc |
| 975 | lang/core/type/sampled_texture_test.cc |
| 976 | lang/core/type/sampler_test.cc |
| 977 | lang/core/type/storage_texture_test.cc |
| 978 | lang/core/type/struct_test.cc |
| 979 | lang/core/type/texture_test.cc |
| 980 | lang/core/type/type_test.cc |
| 981 | lang/core/type/u32_test.cc |
| 982 | lang/core/type/vector_test.cc |
dan sinclair | 99181d8 | 2023-07-20 01:14:15 +0000 | [diff] [blame] | 983 | lang/wgsl/ast/alias_test.cc |
| 984 | lang/wgsl/ast/assignment_statement_test.cc |
| 985 | lang/wgsl/ast/binary_expression_test.cc |
| 986 | lang/wgsl/ast/binding_attribute_test.cc |
| 987 | lang/wgsl/ast/bitcast_expression_test.cc |
| 988 | lang/wgsl/ast/block_statement_test.cc |
| 989 | lang/wgsl/ast/bool_literal_expression_test.cc |
| 990 | lang/wgsl/ast/break_if_statement_test.cc |
| 991 | lang/wgsl/ast/break_statement_test.cc |
| 992 | lang/wgsl/ast/builtin_attribute_test.cc |
| 993 | lang/wgsl/ast/builtin_texture_helper_test.cc |
| 994 | lang/wgsl/ast/builtin_texture_helper_test.h |
| 995 | lang/wgsl/ast/call_expression_test.cc |
| 996 | lang/wgsl/ast/call_statement_test.cc |
| 997 | lang/wgsl/ast/case_selector_test.cc |
| 998 | lang/wgsl/ast/case_statement_test.cc |
| 999 | lang/wgsl/ast/compound_assignment_statement_test.cc |
| 1000 | lang/wgsl/ast/const_assert_test.cc |
| 1001 | lang/wgsl/ast/continue_statement_test.cc |
| 1002 | lang/wgsl/ast/diagnostic_attribute_test.cc |
| 1003 | lang/wgsl/ast/diagnostic_control_test.cc |
| 1004 | lang/wgsl/ast/diagnostic_directive_test.cc |
| 1005 | lang/wgsl/ast/diagnostic_rule_name_test.cc |
| 1006 | lang/wgsl/ast/discard_statement_test.cc |
| 1007 | lang/wgsl/ast/enable_test.cc |
| 1008 | lang/wgsl/ast/float_literal_expression_test.cc |
| 1009 | lang/wgsl/ast/for_loop_statement_test.cc |
| 1010 | lang/wgsl/ast/function_test.cc |
| 1011 | lang/wgsl/ast/group_attribute_test.cc |
| 1012 | lang/wgsl/ast/id_attribute_test.cc |
dan sinclair | 99181d8 | 2023-07-20 01:14:15 +0000 | [diff] [blame] | 1013 | lang/wgsl/ast/identifier_expression_test.cc |
dan sinclair | 46725bd | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 1014 | lang/wgsl/ast/identifier_test.cc |
dan sinclair | 99181d8 | 2023-07-20 01:14:15 +0000 | [diff] [blame] | 1015 | lang/wgsl/ast/if_statement_test.cc |
| 1016 | lang/wgsl/ast/increment_decrement_statement_test.cc |
| 1017 | lang/wgsl/ast/index_accessor_expression_test.cc |
| 1018 | lang/wgsl/ast/index_attribute_test.cc |
| 1019 | lang/wgsl/ast/int_literal_expression_test.cc |
| 1020 | lang/wgsl/ast/interpolate_attribute_test.cc |
| 1021 | lang/wgsl/ast/location_attribute_test.cc |
| 1022 | lang/wgsl/ast/loop_statement_test.cc |
| 1023 | lang/wgsl/ast/member_accessor_expression_test.cc |
| 1024 | lang/wgsl/ast/module_test.cc |
| 1025 | lang/wgsl/ast/phony_expression_test.cc |
| 1026 | lang/wgsl/ast/return_statement_test.cc |
| 1027 | lang/wgsl/ast/stage_attribute_test.cc |
| 1028 | lang/wgsl/ast/stride_attribute_test.cc |
| 1029 | lang/wgsl/ast/struct_member_align_attribute_test.cc |
| 1030 | lang/wgsl/ast/struct_member_offset_attribute_test.cc |
| 1031 | lang/wgsl/ast/struct_member_size_attribute_test.cc |
| 1032 | lang/wgsl/ast/struct_member_test.cc |
| 1033 | lang/wgsl/ast/struct_test.cc |
| 1034 | lang/wgsl/ast/switch_statement_test.cc |
| 1035 | lang/wgsl/ast/templated_identifier_test.cc |
| 1036 | lang/wgsl/ast/test_helper.h |
| 1037 | lang/wgsl/ast/test_helper_test.cc |
dan sinclair | 46725bd | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 1038 | lang/wgsl/ast/transform/transform_test.cc |
dan sinclair | 99181d8 | 2023-07-20 01:14:15 +0000 | [diff] [blame] | 1039 | lang/wgsl/ast/traverse_expressions_test.cc |
| 1040 | lang/wgsl/ast/unary_op_expression_test.cc |
| 1041 | lang/wgsl/ast/variable_decl_statement_test.cc |
| 1042 | lang/wgsl/ast/variable_test.cc |
| 1043 | lang/wgsl/ast/while_statement_test.cc |
| 1044 | lang/wgsl/ast/workgroup_attribute_test.cc |
dan sinclair | 46725bd | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 1045 | lang/wgsl/helpers/append_vector_test.cc |
| 1046 | lang/wgsl/helpers/check_supported_extensions_test.cc |
| 1047 | lang/wgsl/helpers/flatten_bindings_test.cc |
dan sinclair | 96db554 | 2023-07-20 09:21:10 +0000 | [diff] [blame] | 1048 | lang/wgsl/program/program_builder_test.cc |
| 1049 | lang/wgsl/program/program_test.cc |
dan sinclair | 46725bd | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 1050 | lang/wgsl/sem/builtin_test.cc |
| 1051 | lang/wgsl/sem/diagnostic_severity_test.cc |
| 1052 | lang/wgsl/sem/struct_test.cc |
| 1053 | lang/wgsl/sem/value_expression_test.cc |
dan sinclair | 9d97f22 | 2023-07-24 17:11:53 +0000 | [diff] [blame] | 1054 | lang/wgsl/resolver/address_space_layout_validation_test.cc |
| 1055 | lang/wgsl/resolver/address_space_validation_test.cc |
| 1056 | lang/wgsl/resolver/alias_analysis_test.cc |
| 1057 | lang/wgsl/resolver/array_accessor_test.cc |
| 1058 | lang/wgsl/resolver/assignment_validation_test.cc |
| 1059 | lang/wgsl/resolver/atomics_test.cc |
| 1060 | lang/wgsl/resolver/atomics_validation_test.cc |
| 1061 | lang/wgsl/resolver/attribute_validation_test.cc |
| 1062 | lang/wgsl/resolver/bitcast_validation_test.cc |
| 1063 | lang/wgsl/resolver/builtin_enum_test.cc |
| 1064 | lang/wgsl/resolver/builtin_structs_test.cc |
| 1065 | lang/wgsl/resolver/builtin_test.cc |
| 1066 | lang/wgsl/resolver/builtin_validation_test.cc |
| 1067 | lang/wgsl/resolver/builtins_validation_test.cc |
| 1068 | lang/wgsl/resolver/call_test.cc |
| 1069 | lang/wgsl/resolver/call_validation_test.cc |
| 1070 | lang/wgsl/resolver/compound_assignment_validation_test.cc |
| 1071 | lang/wgsl/resolver/compound_statement_test.cc |
| 1072 | lang/wgsl/resolver/const_assert_test.cc |
| 1073 | lang/wgsl/resolver/const_eval_binary_op_test.cc |
| 1074 | lang/wgsl/resolver/const_eval_bitcast_test.cc |
| 1075 | lang/wgsl/resolver/const_eval_builtin_test.cc |
| 1076 | lang/wgsl/resolver/const_eval_construction_test.cc |
| 1077 | lang/wgsl/resolver/const_eval_conversion_test.cc |
| 1078 | lang/wgsl/resolver/const_eval_indexing_test.cc |
| 1079 | lang/wgsl/resolver/const_eval_member_access_test.cc |
| 1080 | lang/wgsl/resolver/const_eval_runtime_semantics_test.cc |
| 1081 | lang/wgsl/resolver/const_eval_test.h |
| 1082 | lang/wgsl/resolver/const_eval_unary_op_test.cc |
| 1083 | lang/wgsl/resolver/control_block_validation_test.cc |
| 1084 | lang/wgsl/resolver/dependency_graph_test.cc |
| 1085 | lang/wgsl/resolver/diagnostic_control_test.cc |
| 1086 | lang/wgsl/resolver/dual_source_blending_extension_test.cc |
| 1087 | lang/wgsl/resolver/entry_point_validation_test.cc |
| 1088 | lang/wgsl/resolver/evaluation_stage_test.cc |
| 1089 | lang/wgsl/resolver/expression_kind_test.cc |
| 1090 | lang/wgsl/resolver/f16_extension_test.cc |
| 1091 | lang/wgsl/resolver/function_validation_test.cc |
| 1092 | lang/wgsl/resolver/host_shareable_validation_test.cc |
| 1093 | lang/wgsl/resolver/increment_decrement_validation_test.cc |
| 1094 | lang/wgsl/resolver/inferred_type_test.cc |
| 1095 | lang/wgsl/resolver/intrinsic_table_test.cc |
| 1096 | lang/wgsl/resolver/is_host_shareable_test.cc |
| 1097 | lang/wgsl/resolver/is_storeable_test.cc |
| 1098 | lang/wgsl/resolver/load_test.cc |
| 1099 | lang/wgsl/resolver/materialize_test.cc |
| 1100 | lang/wgsl/resolver/override_test.cc |
| 1101 | lang/wgsl/resolver/ptr_ref_test.cc |
| 1102 | lang/wgsl/resolver/ptr_ref_validation_test.cc |
| 1103 | lang/wgsl/resolver/resolver_behavior_test.cc |
| 1104 | lang/wgsl/resolver/resolver_test.cc |
| 1105 | lang/wgsl/resolver/resolver_test_helper.cc |
| 1106 | lang/wgsl/resolver/resolver_test_helper.h |
| 1107 | lang/wgsl/resolver/root_identifier_test.cc |
| 1108 | lang/wgsl/resolver/side_effects_test.cc |
| 1109 | lang/wgsl/resolver/struct_address_space_use_test.cc |
| 1110 | lang/wgsl/resolver/struct_layout_test.cc |
| 1111 | lang/wgsl/resolver/struct_pipeline_stage_use_test.cc |
| 1112 | lang/wgsl/resolver/type_validation_test.cc |
| 1113 | lang/wgsl/resolver/unresolved_identifier_test.cc |
| 1114 | lang/wgsl/resolver/validation_test.cc |
| 1115 | lang/wgsl/resolver/validator_is_storeable_test.cc |
| 1116 | lang/wgsl/resolver/value_constructor_validation_test.cc |
| 1117 | lang/wgsl/resolver/variable_test.cc |
| 1118 | lang/wgsl/resolver/variable_validation_test.cc |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 1119 | test_main.cc |
James Price | 95b0612 | 2023-05-17 15:52:05 +0000 | [diff] [blame] | 1120 | transform/manager_test.cc |
dan sinclair | 22b4dd2 | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 1121 | utils/cli/cli_test.cc |
dan sinclair | 22b4dd2 | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 1122 | utils/command/command_test.cc |
dan sinclair | 46725bd | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 1123 | utils/containers/bitset_test.cc |
| 1124 | utils/containers/enum_set_test.cc |
dan sinclair | 22b4dd2 | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 1125 | utils/containers/hashmap_test.cc |
| 1126 | utils/containers/hashset_test.cc |
| 1127 | utils/containers/map_test.cc |
dan sinclair | 22b4dd2 | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 1128 | utils/containers/predicates_test.cc |
dan sinclair | 22b4dd2 | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 1129 | utils/containers/reverse_test.cc |
dan sinclair | 46725bd | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 1130 | utils/containers/scope_stack_test.cc |
dan sinclair | 22b4dd2 | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 1131 | utils/containers/slice_test.cc |
dan sinclair | 22b4dd2 | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 1132 | utils/containers/transform_test.cc |
dan sinclair | 22b4dd2 | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 1133 | utils/containers/unique_allocator_test.cc |
| 1134 | utils/containers/unique_vector_test.cc |
| 1135 | utils/containers/vector_test.cc |
dan sinclair | 46725bd | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 1136 | utils/debug/debug_test.cc |
| 1137 | utils/diagnostic/diagnostic_test.cc |
| 1138 | utils/diagnostic/formatter_test.cc |
| 1139 | utils/diagnostic/printer_test.cc |
| 1140 | utils/diagnostic/source_test.cc |
| 1141 | utils/file/tmpfile_test.cc |
| 1142 | utils/macros/defer_test.cc |
| 1143 | utils/macros/scoped_assignment_test.cc |
| 1144 | utils/math/crc32_test.cc |
| 1145 | utils/math/hash_test.cc |
| 1146 | utils/math/math_test.cc |
| 1147 | utils/memory/bitcast_test.cc |
| 1148 | utils/memory/block_allocator_test.cc |
| 1149 | utils/memory/bump_allocator_test.cc |
| 1150 | utils/reflection/reflection_test.cc |
| 1151 | utils/result/result_test.cc |
| 1152 | utils/rtti/castable_test.cc |
| 1153 | utils/rtti/switch_test.cc |
dan sinclair | 22b4dd2 | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 1154 | utils/text/float_to_string_test.cc |
dan sinclair | 46725bd | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 1155 | utils/text/string_stream_test.cc |
| 1156 | utils/text/string_test.cc |
| 1157 | utils/text/symbol_table_test.cc |
| 1158 | utils/text/symbol_test.cc |
| 1159 | utils/text/unicode_test.cc |
| 1160 | utils/traits/traits_test.cc |
| 1161 | writer/ast_text_generator_test.cc |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 1162 | ) |
| 1163 | |
dan sinclair | 6521a35 | 2023-03-14 16:18:24 +0000 | [diff] [blame] | 1164 | # Noet, the source files are included here otherwise the cmd sources would not be included in the |
| 1165 | # test binary. |
| 1166 | list(APPEND TINT_TEST_SRCS |
| 1167 | cmd/generate_external_texture_bindings.cc |
| 1168 | cmd/generate_external_texture_bindings.h |
| 1169 | cmd/generate_external_texture_bindings_test.cc |
| 1170 | ) |
| 1171 | |
James Price | be656f7 | 2022-05-11 22:05:15 +0000 | [diff] [blame] | 1172 | # Uniformity analysis tests depend on WGSL reader |
| 1173 | if(${TINT_BUILD_WGSL_READER}) |
| 1174 | list(APPEND TINT_TEST_SRCS |
dan sinclair | 9d97f22 | 2023-07-24 17:11:53 +0000 | [diff] [blame] | 1175 | lang/wgsl/resolver/uniformity_test.cc |
James Price | be656f7 | 2022-05-11 22:05:15 +0000 | [diff] [blame] | 1176 | ) |
| 1177 | endif() |
| 1178 | |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 1179 | # Inspector tests depend on WGSL reader |
| 1180 | if(${TINT_BUILD_WGSL_READER}) |
| 1181 | list(APPEND TINT_TEST_SRCS |
dan sinclair | d5ac960 | 2023-07-20 09:21:10 +0000 | [diff] [blame] | 1182 | lang/wgsl/inspector/inspector_test.cc |
| 1183 | lang/wgsl/inspector/test_inspector_builder.cc |
| 1184 | lang/wgsl/inspector/test_inspector_builder.h |
| 1185 | lang/wgsl/inspector/test_inspector_runner.cc |
| 1186 | lang/wgsl/inspector/test_inspector_runner.h |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 1187 | ) |
| 1188 | endif() |
| 1189 | |
| 1190 | if(${TINT_BUILD_SPV_READER} AND ${TINT_BUILD_WGSL_WRITER}) |
| 1191 | list(APPEND TINT_TEST_SRCS |
dan sinclair | b2e4549 | 2023-07-20 01:14:15 +0000 | [diff] [blame] | 1192 | lang/spirv/reader/enum_converter_test.cc |
| 1193 | lang/spirv/reader/fail_stream_test.cc |
| 1194 | lang/spirv/reader/function_arithmetic_test.cc |
| 1195 | lang/spirv/reader/function_bit_test.cc |
| 1196 | lang/spirv/reader/function_cfg_test.cc |
| 1197 | lang/spirv/reader/function_call_test.cc |
| 1198 | lang/spirv/reader/function_composite_test.cc |
| 1199 | lang/spirv/reader/function_conversion_test.cc |
| 1200 | lang/spirv/reader/function_decl_test.cc |
| 1201 | lang/spirv/reader/function_glsl_std_450_test.cc |
| 1202 | lang/spirv/reader/function_logical_test.cc |
| 1203 | lang/spirv/reader/function_memory_test.cc |
| 1204 | lang/spirv/reader/function_misc_test.cc |
| 1205 | lang/spirv/reader/function_var_test.cc |
| 1206 | lang/spirv/reader/namer_test.cc |
| 1207 | lang/spirv/reader/parser_impl_barrier_test.cc |
| 1208 | lang/spirv/reader/parser_impl_constant_test.cc |
| 1209 | lang/spirv/reader/parser_impl_convert_member_decoration_test.cc |
| 1210 | lang/spirv/reader/parser_impl_convert_type_test.cc |
| 1211 | lang/spirv/reader/parser_impl_function_decl_test.cc |
| 1212 | lang/spirv/reader/parser_impl_get_decorations_test.cc |
| 1213 | lang/spirv/reader/parser_impl_handle_test.cc |
| 1214 | lang/spirv/reader/parser_impl_import_test.cc |
| 1215 | lang/spirv/reader/parser_impl_module_var_test.cc |
| 1216 | lang/spirv/reader/parser_impl_named_types_test.cc |
| 1217 | lang/spirv/reader/parser_impl_test_helper.cc |
| 1218 | lang/spirv/reader/parser_impl_test_helper.h |
| 1219 | lang/spirv/reader/parser_impl_test.cc |
| 1220 | lang/spirv/reader/parser_impl_user_name_test.cc |
| 1221 | lang/spirv/reader/parser_type_test.cc |
| 1222 | lang/spirv/reader/parser_test.cc |
| 1223 | lang/spirv/reader/spirv_tools_helpers_test.cc |
| 1224 | lang/spirv/reader/spirv_tools_helpers_test.h |
| 1225 | lang/spirv/reader/usage_test.cc |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 1226 | ) |
| 1227 | endif() |
| 1228 | |
| 1229 | if(${TINT_BUILD_WGSL_READER}) |
| 1230 | list(APPEND TINT_TEST_SRCS |
dan sinclair | 7cf568f | 2023-07-20 01:14:15 +0000 | [diff] [blame] | 1231 | lang/wgsl/reader/classify_template_args_test.cc |
| 1232 | lang/wgsl/reader/lexer_test.cc |
| 1233 | lang/wgsl/reader/parser_test.cc |
| 1234 | lang/wgsl/reader/parser_impl_additive_expression_test.cc |
| 1235 | lang/wgsl/reader/parser_impl_argument_expression_list_test.cc |
| 1236 | lang/wgsl/reader/parser_impl_assignment_stmt_test.cc |
| 1237 | lang/wgsl/reader/parser_impl_bitwise_expression_test.cc |
| 1238 | lang/wgsl/reader/parser_impl_break_stmt_test.cc |
| 1239 | lang/wgsl/reader/parser_impl_bug_cases_test.cc |
| 1240 | lang/wgsl/reader/parser_impl_call_stmt_test.cc |
| 1241 | lang/wgsl/reader/parser_impl_compound_stmt_test.cc |
| 1242 | lang/wgsl/reader/parser_impl_const_literal_test.cc |
| 1243 | lang/wgsl/reader/parser_impl_continue_stmt_test.cc |
| 1244 | lang/wgsl/reader/parser_impl_continuing_stmt_test.cc |
| 1245 | lang/wgsl/reader/parser_impl_core_lhs_expression_test.cc |
| 1246 | lang/wgsl/reader/parser_impl_diagnostic_attribute_test.cc |
| 1247 | lang/wgsl/reader/parser_impl_diagnostic_control_test.cc |
| 1248 | lang/wgsl/reader/parser_impl_diagnostic_directive_test.cc |
| 1249 | lang/wgsl/reader/parser_impl_enable_directive_test.cc |
| 1250 | lang/wgsl/reader/parser_impl_error_msg_test.cc |
| 1251 | lang/wgsl/reader/parser_impl_error_resync_test.cc |
| 1252 | lang/wgsl/reader/parser_impl_expression_test.cc |
| 1253 | lang/wgsl/reader/parser_impl_for_stmt_test.cc |
| 1254 | lang/wgsl/reader/parser_impl_function_decl_test.cc |
| 1255 | lang/wgsl/reader/parser_impl_function_attribute_list_test.cc |
| 1256 | lang/wgsl/reader/parser_impl_function_attribute_test.cc |
| 1257 | lang/wgsl/reader/parser_impl_function_header_test.cc |
| 1258 | lang/wgsl/reader/parser_impl_global_constant_decl_test.cc |
| 1259 | lang/wgsl/reader/parser_impl_global_decl_test.cc |
| 1260 | lang/wgsl/reader/parser_impl_global_variable_decl_test.cc |
| 1261 | lang/wgsl/reader/parser_impl_if_stmt_test.cc |
| 1262 | lang/wgsl/reader/parser_impl_increment_decrement_stmt_test.cc |
| 1263 | lang/wgsl/reader/parser_impl_lhs_expression_test.cc |
| 1264 | lang/wgsl/reader/parser_impl_loop_stmt_test.cc |
| 1265 | lang/wgsl/reader/parser_impl_math_expression_test.cc |
| 1266 | lang/wgsl/reader/parser_impl_multiplicative_expression_test.cc |
| 1267 | lang/wgsl/reader/parser_impl_param_list_test.cc |
| 1268 | lang/wgsl/reader/parser_impl_paren_expression_test.cc |
| 1269 | lang/wgsl/reader/parser_impl_primary_expression_test.cc |
| 1270 | lang/wgsl/reader/parser_impl_relational_expression_test.cc |
| 1271 | lang/wgsl/reader/parser_impl_reserved_keyword_test.cc |
| 1272 | lang/wgsl/reader/parser_impl_require_directive_test.cc |
| 1273 | lang/wgsl/reader/parser_impl_shift_expression_test.cc |
| 1274 | lang/wgsl/reader/parser_impl_singular_expression_test.cc |
| 1275 | lang/wgsl/reader/parser_impl_statement_test.cc |
| 1276 | lang/wgsl/reader/parser_impl_statements_test.cc |
| 1277 | lang/wgsl/reader/parser_impl_struct_body_decl_test.cc |
| 1278 | lang/wgsl/reader/parser_impl_struct_decl_test.cc |
| 1279 | lang/wgsl/reader/parser_impl_struct_attribute_decl_test.cc |
| 1280 | lang/wgsl/reader/parser_impl_struct_member_attribute_decl_test.cc |
| 1281 | lang/wgsl/reader/parser_impl_struct_member_attribute_test.cc |
| 1282 | lang/wgsl/reader/parser_impl_struct_member_test.cc |
| 1283 | lang/wgsl/reader/parser_impl_switch_body_test.cc |
| 1284 | lang/wgsl/reader/parser_impl_switch_stmt_test.cc |
| 1285 | lang/wgsl/reader/parser_impl_test.cc |
| 1286 | lang/wgsl/reader/parser_impl_test_helper.cc |
| 1287 | lang/wgsl/reader/parser_impl_test_helper.h |
| 1288 | lang/wgsl/reader/parser_impl_type_alias_test.cc |
| 1289 | lang/wgsl/reader/parser_impl_type_decl_test.cc |
| 1290 | lang/wgsl/reader/parser_impl_unary_expression_test.cc |
| 1291 | lang/wgsl/reader/parser_impl_variable_decl_test.cc |
| 1292 | lang/wgsl/reader/parser_impl_variable_attribute_list_test.cc |
| 1293 | lang/wgsl/reader/parser_impl_variable_attribute_test.cc |
| 1294 | lang/wgsl/reader/parser_impl_variable_ident_decl_test.cc |
| 1295 | lang/wgsl/reader/parser_impl_variable_stmt_test.cc |
| 1296 | lang/wgsl/reader/parser_impl_variable_qualifier_test.cc |
| 1297 | lang/wgsl/reader/parser_impl_while_stmt_test.cc |
| 1298 | lang/wgsl/reader/token_test.cc |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 1299 | ) |
| 1300 | endif() |
| 1301 | |
| 1302 | if(${TINT_BUILD_SPV_WRITER}) |
| 1303 | list(APPEND TINT_TEST_SRCS |
James Price | 74d04a8 | 2023-07-20 14:44:22 +0000 | [diff] [blame] | 1304 | lang/spirv/ast_writer/binary_writer_test.cc |
| 1305 | lang/spirv/ast_writer/builder_accessor_expression_test.cc |
| 1306 | lang/spirv/ast_writer/builder_assign_test.cc |
| 1307 | lang/spirv/ast_writer/builder_binary_expression_test.cc |
| 1308 | lang/spirv/ast_writer/builder_bitcast_expression_test.cc |
| 1309 | lang/spirv/ast_writer/builder_block_test.cc |
| 1310 | lang/spirv/ast_writer/builder_builtin_test.cc |
| 1311 | lang/spirv/ast_writer/builder_builtin_texture_test.cc |
| 1312 | lang/spirv/ast_writer/builder_call_test.cc |
| 1313 | lang/spirv/ast_writer/builder_const_assert_test.cc |
| 1314 | lang/spirv/ast_writer/builder_constructor_expression_test.cc |
| 1315 | lang/spirv/ast_writer/builder_discard_test.cc |
| 1316 | lang/spirv/ast_writer/builder_entry_point_test.cc |
| 1317 | lang/spirv/ast_writer/builder_format_conversion_test.cc |
| 1318 | lang/spirv/ast_writer/builder_function_attribute_test.cc |
| 1319 | lang/spirv/ast_writer/builder_function_test.cc |
| 1320 | lang/spirv/ast_writer/builder_function_variable_test.cc |
| 1321 | lang/spirv/ast_writer/builder_global_variable_test.cc |
| 1322 | lang/spirv/ast_writer/builder_ident_expression_test.cc |
| 1323 | lang/spirv/ast_writer/builder_if_test.cc |
| 1324 | lang/spirv/ast_writer/builder_literal_test.cc |
| 1325 | lang/spirv/ast_writer/builder_loop_test.cc |
| 1326 | lang/spirv/ast_writer/builder_return_test.cc |
| 1327 | lang/spirv/ast_writer/builder_switch_test.cc |
| 1328 | lang/spirv/ast_writer/builder_test.cc |
| 1329 | lang/spirv/ast_writer/builder_type_test.cc |
| 1330 | lang/spirv/ast_writer/builder_unary_op_expression_test.cc |
| 1331 | lang/spirv/ast_writer/instruction_test.cc |
| 1332 | lang/spirv/ast_writer/module_test.cc |
| 1333 | lang/spirv/ast_writer/operand_test.cc |
| 1334 | lang/spirv/ast_writer/scalar_constant_test.cc |
| 1335 | lang/spirv/ast_writer/spv_dump.cc |
| 1336 | lang/spirv/ast_writer/spv_dump.h |
| 1337 | lang/spirv/ast_writer/test_helper.h |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 1338 | ) |
James Price | 8f9ea96 | 2023-05-04 01:31:36 +0000 | [diff] [blame] | 1339 | |
| 1340 | if(${TINT_BUILD_IR}) |
| 1341 | list(APPEND TINT_TEST_SRCS |
dan sinclair | 97c3727 | 2023-07-24 17:11:53 +0000 | [diff] [blame^] | 1342 | lang/core/ir/transform/builtin_polyfill_spirv_test.cc |
| 1343 | lang/core/ir/transform/handle_matrix_arithmetic_test.cc |
| 1344 | lang/core/ir/transform/expand_implicit_splats_test.cc |
| 1345 | lang/core/ir/transform/merge_return_test.cc |
| 1346 | lang/core/ir/transform/shader_io_spirv_test.cc |
| 1347 | lang/core/ir/transform/var_for_dynamic_index_test.cc |
James Price | 2280cc6 | 2023-07-21 03:42:48 +0000 | [diff] [blame] | 1348 | lang/spirv/writer/access_test.cc |
| 1349 | lang/spirv/writer/atomic_builtin_test.cc |
| 1350 | lang/spirv/writer/binary_test.cc |
| 1351 | lang/spirv/writer/bitcast_test.cc |
| 1352 | lang/spirv/writer/builtin_test.cc |
| 1353 | lang/spirv/writer/constant_test.cc |
| 1354 | lang/spirv/writer/construct_test.cc |
| 1355 | lang/spirv/writer/convert_test.cc |
| 1356 | lang/spirv/writer/discard_test.cc |
| 1357 | lang/spirv/writer/function_test.cc |
| 1358 | lang/spirv/writer/if_test.cc |
| 1359 | lang/spirv/writer/let_test.cc |
| 1360 | lang/spirv/writer/loop_test.cc |
| 1361 | lang/spirv/writer/switch_test.cc |
| 1362 | lang/spirv/writer/swizzle_test.cc |
| 1363 | lang/spirv/writer/test_helper.h |
| 1364 | lang/spirv/writer/texture_builtin_test.cc |
| 1365 | lang/spirv/writer/type_test.cc |
| 1366 | lang/spirv/writer/unary_test.cc |
| 1367 | lang/spirv/writer/var_test.cc |
| 1368 | lang/spirv/writer/writer_test.cc |
James Price | 8f9ea96 | 2023-05-04 01:31:36 +0000 | [diff] [blame] | 1369 | ) |
Ben Clayton | 8041661 | 2023-07-24 14:03:34 +0000 | [diff] [blame] | 1370 | |
| 1371 | if (${TINT_BUILD_WGSL_WRITER}) |
| 1372 | list(APPEND TINT_TEST_SRCS |
dan sinclair | 97c3727 | 2023-07-24 17:11:53 +0000 | [diff] [blame^] | 1373 | lang/core/ir/transform/rename_conflicts_wgsl_test.cc |
Ben Clayton | 8041661 | 2023-07-24 14:03:34 +0000 | [diff] [blame] | 1374 | ) |
| 1375 | endif() |
James Price | 8f9ea96 | 2023-05-04 01:31:36 +0000 | [diff] [blame] | 1376 | endif() |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 1377 | endif() |
| 1378 | |
| 1379 | if(${TINT_BUILD_WGSL_WRITER}) |
| 1380 | list(APPEND TINT_TEST_SRCS |
dan sinclair | ff6eba5 | 2023-07-20 01:14:15 +0000 | [diff] [blame] | 1381 | lang/wgsl/ast_writer/generator_impl_test.cc |
| 1382 | lang/wgsl/ast_writer/generator_impl_alias_type_test.cc |
| 1383 | lang/wgsl/ast_writer/generator_impl_array_accessor_test.cc |
| 1384 | lang/wgsl/ast_writer/generator_impl_assign_test.cc |
| 1385 | lang/wgsl/ast_writer/generator_impl_binary_test.cc |
| 1386 | lang/wgsl/ast_writer/generator_impl_bitcast_test.cc |
| 1387 | lang/wgsl/ast_writer/generator_impl_block_test.cc |
| 1388 | lang/wgsl/ast_writer/generator_impl_break_test.cc |
| 1389 | lang/wgsl/ast_writer/generator_impl_call_test.cc |
| 1390 | lang/wgsl/ast_writer/generator_impl_case_test.cc |
| 1391 | lang/wgsl/ast_writer/generator_impl_cast_test.cc |
| 1392 | lang/wgsl/ast_writer/generator_impl_const_assert_test.cc |
| 1393 | lang/wgsl/ast_writer/generator_impl_constructor_test.cc |
| 1394 | lang/wgsl/ast_writer/generator_impl_continue_test.cc |
| 1395 | lang/wgsl/ast_writer/generator_impl_diagnostic_test.cc |
| 1396 | lang/wgsl/ast_writer/generator_impl_discard_test.cc |
| 1397 | lang/wgsl/ast_writer/generator_impl_enable_test.cc |
| 1398 | lang/wgsl/ast_writer/generator_impl_function_test.cc |
| 1399 | lang/wgsl/ast_writer/generator_impl_global_decl_test.cc |
| 1400 | lang/wgsl/ast_writer/generator_impl_identifier_test.cc |
| 1401 | lang/wgsl/ast_writer/generator_impl_if_test.cc |
| 1402 | lang/wgsl/ast_writer/generator_impl_loop_test.cc |
| 1403 | lang/wgsl/ast_writer/generator_impl_literal_test.cc |
| 1404 | lang/wgsl/ast_writer/generator_impl_member_accessor_test.cc |
| 1405 | lang/wgsl/ast_writer/generator_impl_return_test.cc |
| 1406 | lang/wgsl/ast_writer/generator_impl_switch_test.cc |
| 1407 | lang/wgsl/ast_writer/generator_impl_type_test.cc |
| 1408 | lang/wgsl/ast_writer/generator_impl_unary_op_test.cc |
| 1409 | lang/wgsl/ast_writer/generator_impl_variable_decl_statement_test.cc |
| 1410 | lang/wgsl/ast_writer/generator_impl_variable_test.cc |
| 1411 | lang/wgsl/ast_writer/test_helper.h |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 1412 | ) |
| 1413 | endif() |
| 1414 | |
| 1415 | if(${TINT_BUILD_WGSL_READER} AND ${TINT_BUILD_WGSL_WRITER}) |
| 1416 | list(APPEND TINT_TEST_SRCS |
dan sinclair | 99181d8 | 2023-07-20 01:14:15 +0000 | [diff] [blame] | 1417 | lang/wgsl/ast/module_clone_test.cc |
| 1418 | lang/wgsl/ast/transform/add_empty_entry_point_test.cc |
| 1419 | lang/wgsl/ast/transform/add_block_attribute_test.cc |
| 1420 | lang/wgsl/ast/transform/array_length_from_uniform_test.cc |
| 1421 | lang/wgsl/ast/transform/binding_remapper_test.cc |
| 1422 | lang/wgsl/ast/transform/builtin_polyfill_test.cc |
| 1423 | lang/wgsl/ast/transform/calculate_array_length_test.cc |
| 1424 | lang/wgsl/ast/transform/clamp_frag_depth_test.cc |
| 1425 | lang/wgsl/ast/transform/canonicalize_entry_point_io_test.cc |
| 1426 | lang/wgsl/ast/transform/combine_samplers_test.cc |
| 1427 | lang/wgsl/ast/transform/decompose_memory_access_test.cc |
| 1428 | lang/wgsl/ast/transform/decompose_strided_array_test.cc |
| 1429 | lang/wgsl/ast/transform/decompose_strided_matrix_test.cc |
| 1430 | lang/wgsl/ast/transform/demote_to_helper_test.cc |
| 1431 | lang/wgsl/ast/transform/direct_variable_access_test.cc |
| 1432 | lang/wgsl/ast/transform/disable_uniformity_analysis_test.cc |
| 1433 | lang/wgsl/ast/transform/expand_compound_assignment_test.cc |
| 1434 | lang/wgsl/ast/transform/first_index_offset_test.cc |
| 1435 | lang/wgsl/ast/transform/fold_trivial_lets_test.cc |
| 1436 | lang/wgsl/ast/transform/for_loop_to_loop_test.cc |
| 1437 | lang/wgsl/ast/transform/expand_compound_assignment_test.cc |
| 1438 | lang/wgsl/ast/transform/localize_struct_array_assignment_test.cc |
| 1439 | lang/wgsl/ast/transform/merge_return_test.cc |
| 1440 | lang/wgsl/ast/transform/module_scope_var_to_entry_point_param_test.cc |
| 1441 | lang/wgsl/ast/transform/multiplanar_external_texture_test.cc |
| 1442 | lang/wgsl/ast/transform/num_workgroups_from_uniform_test.cc |
| 1443 | lang/wgsl/ast/transform/packed_vec3_test.cc |
| 1444 | lang/wgsl/ast/transform/pad_structs_test.cc |
| 1445 | lang/wgsl/ast/transform/preserve_padding_test.cc |
| 1446 | lang/wgsl/ast/transform/promote_initializers_to_let_test.cc |
| 1447 | lang/wgsl/ast/transform/promote_side_effects_to_decl_test.cc |
| 1448 | lang/wgsl/ast/transform/remove_continue_in_switch_test.cc |
| 1449 | lang/wgsl/ast/transform/remove_phonies_test.cc |
| 1450 | lang/wgsl/ast/transform/remove_unreachable_statements_test.cc |
| 1451 | lang/wgsl/ast/transform/renamer_test.cc |
| 1452 | lang/wgsl/ast/transform/robustness_test.cc |
| 1453 | lang/wgsl/ast/transform/simplify_pointers_test.cc |
| 1454 | lang/wgsl/ast/transform/single_entry_point_test.cc |
| 1455 | lang/wgsl/ast/transform/spirv_atomic_test.cc |
| 1456 | lang/wgsl/ast/transform/std140_exhaustive_test.cc |
| 1457 | lang/wgsl/ast/transform/std140_f16_test.cc |
| 1458 | lang/wgsl/ast/transform/std140_f32_test.cc |
| 1459 | lang/wgsl/ast/transform/std140_test.cc |
| 1460 | lang/wgsl/ast/transform/substitute_override_test.cc |
| 1461 | lang/wgsl/ast/transform/test_helper.h |
| 1462 | lang/wgsl/ast/transform/texture_1d_to_2d_test.cc |
| 1463 | lang/wgsl/ast/transform/truncate_interstage_variables_test.cc |
| 1464 | lang/wgsl/ast/transform/unshadow_test.cc |
| 1465 | lang/wgsl/ast/transform/var_for_dynamic_index_test.cc |
| 1466 | lang/wgsl/ast/transform/vectorize_matrix_conversions_test.cc |
| 1467 | lang/wgsl/ast/transform/vectorize_scalar_matrix_initializers_test.cc |
| 1468 | lang/wgsl/ast/transform/vertex_pulling_test.cc |
| 1469 | lang/wgsl/ast/transform/while_to_loop_test.cc |
| 1470 | lang/wgsl/ast/transform/zero_init_workgroup_memory_test.cc |
| 1471 | lang/wgsl/ast/transform/utils/get_insertion_point_test.cc |
| 1472 | lang/wgsl/ast/transform/utils/hoist_to_decl_before_test.cc |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 1473 | ) |
| 1474 | endif() |
| 1475 | |
| 1476 | if(${TINT_BUILD_MSL_WRITER}) |
| 1477 | list(APPEND TINT_TEST_SRCS |
dan sinclair | d5575ce | 2023-07-20 01:14:15 +0000 | [diff] [blame] | 1478 | lang/msl/ast_writer/generator_impl_array_accessor_test.cc |
| 1479 | lang/msl/ast_writer/generator_impl_assign_test.cc |
| 1480 | lang/msl/ast_writer/generator_impl_binary_test.cc |
| 1481 | lang/msl/ast_writer/generator_impl_bitcast_test.cc |
| 1482 | lang/msl/ast_writer/generator_impl_block_test.cc |
| 1483 | lang/msl/ast_writer/generator_impl_break_test.cc |
| 1484 | lang/msl/ast_writer/generator_impl_builtin_test.cc |
| 1485 | lang/msl/ast_writer/generator_impl_builtin_texture_test.cc |
| 1486 | lang/msl/ast_writer/generator_impl_call_test.cc |
| 1487 | lang/msl/ast_writer/generator_impl_case_test.cc |
| 1488 | lang/msl/ast_writer/generator_impl_cast_test.cc |
| 1489 | lang/msl/ast_writer/generator_impl_const_assert_test.cc |
| 1490 | lang/msl/ast_writer/generator_impl_constructor_test.cc |
| 1491 | lang/msl/ast_writer/generator_impl_continue_test.cc |
| 1492 | lang/msl/ast_writer/generator_impl_discard_test.cc |
| 1493 | lang/msl/ast_writer/generator_impl_function_test.cc |
| 1494 | lang/msl/ast_writer/generator_impl_identifier_test.cc |
| 1495 | lang/msl/ast_writer/generator_impl_if_test.cc |
| 1496 | lang/msl/ast_writer/generator_impl_import_test.cc |
| 1497 | lang/msl/ast_writer/generator_impl_loop_test.cc |
| 1498 | lang/msl/ast_writer/generator_impl_member_accessor_test.cc |
| 1499 | lang/msl/ast_writer/generator_impl_module_constant_test.cc |
| 1500 | lang/msl/ast_writer/generator_impl_return_test.cc |
| 1501 | lang/msl/ast_writer/generator_impl_sanitizer_test.cc |
| 1502 | lang/msl/ast_writer/generator_impl_switch_test.cc |
| 1503 | lang/msl/ast_writer/generator_impl_test.cc |
| 1504 | lang/msl/ast_writer/generator_impl_type_test.cc |
| 1505 | lang/msl/ast_writer/generator_impl_unary_op_test.cc |
| 1506 | lang/msl/ast_writer/generator_impl_variable_decl_statement_test.cc |
| 1507 | lang/msl/ast_writer/generator_support_test.cc |
| 1508 | lang/msl/ast_writer/test_helper.h |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 1509 | ) |
dan sinclair | cadd0c0 | 2023-06-26 13:50:42 +0000 | [diff] [blame] | 1510 | |
| 1511 | if(${TINT_BUILD_IR}) |
| 1512 | list(APPEND TINT_TEST_SRCS |
dan sinclair | d5575ce | 2023-07-20 01:14:15 +0000 | [diff] [blame] | 1513 | lang/msl/writer/generator_impl_ir_constant_test.cc |
| 1514 | lang/msl/writer/generator_impl_ir_function_test.cc |
| 1515 | lang/msl/writer/generator_impl_ir_type_test.cc |
| 1516 | lang/msl/writer/test_helper_ir.h |
dan sinclair | cadd0c0 | 2023-06-26 13:50:42 +0000 | [diff] [blame] | 1517 | ) |
| 1518 | endif() |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 1519 | endif() |
| 1520 | |
| 1521 | if (${TINT_BUILD_GLSL_WRITER}) |
| 1522 | list(APPEND TINT_TEST_SRCS |
dan sinclair | 8046fbb | 2023-07-20 01:14:15 +0000 | [diff] [blame] | 1523 | lang/glsl/ast_writer/generator_impl_array_accessor_test.cc |
| 1524 | lang/glsl/ast_writer/generator_impl_assign_test.cc |
| 1525 | lang/glsl/ast_writer/generator_impl_binary_test.cc |
| 1526 | lang/glsl/ast_writer/generator_impl_bitcast_test.cc |
| 1527 | lang/glsl/ast_writer/generator_impl_block_test.cc |
| 1528 | lang/glsl/ast_writer/generator_impl_break_test.cc |
| 1529 | lang/glsl/ast_writer/generator_impl_builtin_test.cc |
| 1530 | lang/glsl/ast_writer/generator_impl_builtin_texture_test.cc |
| 1531 | lang/glsl/ast_writer/generator_impl_call_test.cc |
| 1532 | lang/glsl/ast_writer/generator_impl_case_test.cc |
| 1533 | lang/glsl/ast_writer/generator_impl_cast_test.cc |
| 1534 | lang/glsl/ast_writer/generator_impl_constructor_test.cc |
| 1535 | lang/glsl/ast_writer/generator_impl_continue_test.cc |
| 1536 | lang/glsl/ast_writer/generator_impl_discard_test.cc |
| 1537 | lang/glsl/ast_writer/generator_impl_function_test.cc |
| 1538 | lang/glsl/ast_writer/generator_impl_identifier_test.cc |
| 1539 | lang/glsl/ast_writer/generator_impl_if_test.cc |
| 1540 | lang/glsl/ast_writer/generator_impl_import_test.cc |
| 1541 | lang/glsl/ast_writer/generator_impl_loop_test.cc |
| 1542 | lang/glsl/ast_writer/generator_impl_member_accessor_test.cc |
| 1543 | lang/glsl/ast_writer/generator_impl_module_constant_test.cc |
| 1544 | lang/glsl/ast_writer/generator_impl_return_test.cc |
| 1545 | lang/glsl/ast_writer/generator_impl_sanitizer_test.cc |
| 1546 | lang/glsl/ast_writer/generator_impl_storage_buffer_test.cc |
| 1547 | lang/glsl/ast_writer/generator_impl_switch_test.cc |
| 1548 | lang/glsl/ast_writer/generator_impl_test.cc |
| 1549 | lang/glsl/ast_writer/generator_impl_type_test.cc |
| 1550 | lang/glsl/ast_writer/generator_impl_unary_op_test.cc |
| 1551 | lang/glsl/ast_writer/generator_impl_uniform_buffer_test.cc |
| 1552 | lang/glsl/ast_writer/generator_impl_variable_decl_statement_test.cc |
| 1553 | lang/glsl/ast_writer/generator_impl_workgroup_var_test.cc |
| 1554 | lang/glsl/ast_writer/test_helper.h |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 1555 | ) |
| 1556 | endif() |
| 1557 | |
| 1558 | if (${TINT_BUILD_HLSL_WRITER}) |
| 1559 | list(APPEND TINT_TEST_SRCS |
dan sinclair | 5fbe1f6 | 2023-07-20 01:14:15 +0000 | [diff] [blame] | 1560 | lang/hlsl/ast_writer/generator_impl_array_accessor_test.cc |
| 1561 | lang/hlsl/ast_writer/generator_impl_assign_test.cc |
| 1562 | lang/hlsl/ast_writer/generator_impl_binary_test.cc |
| 1563 | lang/hlsl/ast_writer/generator_impl_bitcast_test.cc |
| 1564 | lang/hlsl/ast_writer/generator_impl_block_test.cc |
| 1565 | lang/hlsl/ast_writer/generator_impl_break_test.cc |
| 1566 | lang/hlsl/ast_writer/generator_impl_builtin_test.cc |
| 1567 | lang/hlsl/ast_writer/generator_impl_builtin_texture_test.cc |
| 1568 | lang/hlsl/ast_writer/generator_impl_call_test.cc |
| 1569 | lang/hlsl/ast_writer/generator_impl_case_test.cc |
| 1570 | lang/hlsl/ast_writer/generator_impl_cast_test.cc |
| 1571 | lang/hlsl/ast_writer/generator_impl_const_assert_test.cc |
| 1572 | lang/hlsl/ast_writer/generator_impl_constructor_test.cc |
| 1573 | lang/hlsl/ast_writer/generator_impl_continue_test.cc |
| 1574 | lang/hlsl/ast_writer/generator_impl_discard_test.cc |
| 1575 | lang/hlsl/ast_writer/generator_impl_function_test.cc |
| 1576 | lang/hlsl/ast_writer/generator_impl_identifier_test.cc |
| 1577 | lang/hlsl/ast_writer/generator_impl_if_test.cc |
| 1578 | lang/hlsl/ast_writer/generator_impl_import_test.cc |
| 1579 | lang/hlsl/ast_writer/generator_impl_loop_test.cc |
| 1580 | lang/hlsl/ast_writer/generator_impl_member_accessor_test.cc |
| 1581 | lang/hlsl/ast_writer/generator_impl_module_constant_test.cc |
| 1582 | lang/hlsl/ast_writer/generator_impl_return_test.cc |
| 1583 | lang/hlsl/ast_writer/generator_impl_sanitizer_test.cc |
| 1584 | lang/hlsl/ast_writer/generator_impl_switch_test.cc |
| 1585 | lang/hlsl/ast_writer/generator_impl_test.cc |
| 1586 | lang/hlsl/ast_writer/generator_impl_type_test.cc |
| 1587 | lang/hlsl/ast_writer/generator_impl_unary_op_test.cc |
| 1588 | lang/hlsl/ast_writer/generator_impl_variable_decl_statement_test.cc |
| 1589 | lang/hlsl/ast_writer/generator_impl_workgroup_var_test.cc |
| 1590 | lang/hlsl/ast_writer/test_helper.h |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 1591 | ) |
| 1592 | endif() |
| 1593 | |
dan sinclair | 9261261 | 2022-11-01 18:15:50 +0000 | [diff] [blame] | 1594 | if (${TINT_BUILD_IR}) |
| 1595 | list(APPEND TINT_TEST_SRCS |
dan sinclair | 97c3727 | 2023-07-24 17:11:53 +0000 | [diff] [blame^] | 1596 | lang/core/ir/access_test.cc |
| 1597 | lang/core/ir/binary_test.cc |
| 1598 | lang/core/ir/bitcast_test.cc |
| 1599 | lang/core/ir/block_param_test.cc |
| 1600 | lang/core/ir/block_test.cc |
| 1601 | lang/core/ir/break_if_test.cc |
| 1602 | lang/core/ir/constant_test.cc |
| 1603 | lang/core/ir/construct_test.cc |
| 1604 | lang/core/ir/continue_test.cc |
| 1605 | lang/core/ir/convert_test.cc |
| 1606 | lang/core/ir/core_builtin_call_test.cc |
| 1607 | lang/core/ir/discard_test.cc |
| 1608 | lang/core/ir/exit_if_test.cc |
| 1609 | lang/core/ir/exit_loop_test.cc |
| 1610 | lang/core/ir/exit_switch_test.cc |
| 1611 | lang/core/ir/from_program_accessor_test.cc |
| 1612 | lang/core/ir/from_program_binary_test.cc |
| 1613 | lang/core/ir/from_program_builtin_test.cc |
| 1614 | lang/core/ir/from_program_call_test.cc |
| 1615 | lang/core/ir/from_program_function_test.cc |
| 1616 | lang/core/ir/from_program_let_test.cc |
| 1617 | lang/core/ir/from_program_literal_test.cc |
| 1618 | lang/core/ir/from_program_materialize_test.cc |
| 1619 | lang/core/ir/from_program_store_test.cc |
| 1620 | lang/core/ir/from_program_test.cc |
| 1621 | lang/core/ir/from_program_unary_test.cc |
| 1622 | lang/core/ir/from_program_var_test.cc |
| 1623 | lang/core/ir/function_param_test.cc |
| 1624 | lang/core/ir/function_test.cc |
| 1625 | lang/core/ir/if_test.cc |
| 1626 | lang/core/ir/instruction_result_test.cc |
| 1627 | lang/core/ir/instruction_test.cc |
| 1628 | lang/core/ir/intrinsic_call_test.cc |
| 1629 | lang/core/ir/ir_test_helper.h |
| 1630 | lang/core/ir/let_test.cc |
| 1631 | lang/core/ir/load_test.cc |
| 1632 | lang/core/ir/load_vector_element_test.cc |
| 1633 | lang/core/ir/loop_test.cc |
| 1634 | lang/core/ir/module_test.cc |
| 1635 | lang/core/ir/multi_in_block_test.cc |
| 1636 | lang/core/ir/next_iteration_test.cc |
| 1637 | lang/core/ir/operand_instruction_test.cc |
| 1638 | lang/core/ir/program_test_helper.h |
| 1639 | lang/core/ir/return_test.cc |
| 1640 | lang/core/ir/store_test.cc |
| 1641 | lang/core/ir/store_vector_element_test.cc |
| 1642 | lang/core/ir/switch_test.cc |
| 1643 | lang/core/ir/swizzle_test.cc |
| 1644 | lang/core/ir/transform/add_empty_entry_point_test.cc |
| 1645 | lang/core/ir/transform/block_decorated_structs_test.cc |
| 1646 | lang/core/ir/transform/demote_to_helper_test.cc |
| 1647 | lang/core/ir/unary_test.cc |
| 1648 | lang/core/ir/user_call_test.cc |
| 1649 | lang/core/ir/validator_test.cc |
| 1650 | lang/core/ir/value_test.cc |
| 1651 | lang/core/ir/var_test.cc |
dan sinclair | 9261261 | 2022-11-01 18:15:50 +0000 | [diff] [blame] | 1652 | ) |
| 1653 | endif() |
| 1654 | |
Ben Clayton | 9940c7b | 2023-05-16 22:07:39 +0000 | [diff] [blame] | 1655 | if (${TINT_BUILD_IR} AND ${TINT_BUILD_WGSL_READER} AND ${TINT_BUILD_WGSL_WRITER}) |
| 1656 | list(APPEND TINT_TEST_SRCS |
dan sinclair | 97c3727 | 2023-07-24 17:11:53 +0000 | [diff] [blame^] | 1657 | lang/core/ir/to_program_roundtrip_test.cc |
Ben Clayton | 9940c7b | 2023-05-16 22:07:39 +0000 | [diff] [blame] | 1658 | ) |
| 1659 | endif() |
| 1660 | |
Ben Clayton | fa5a1d9 | 2023-07-21 12:29:08 +0000 | [diff] [blame] | 1661 | if (${TINT_BUILD_IR} AND ${TINT_BUILD_WGSL_READER}) |
| 1662 | list(APPEND TINT_TEST_SRCS |
dan sinclair | 97c3727 | 2023-07-24 17:11:53 +0000 | [diff] [blame^] | 1663 | lang/core/ir/from_program_shadowing_test.cc |
Ben Clayton | fa5a1d9 | 2023-07-21 12:29:08 +0000 | [diff] [blame] | 1664 | ) |
| 1665 | endif() |
| 1666 | |
Ben Clayton | 7afd2c4 | 2023-06-22 17:15:43 +0000 | [diff] [blame] | 1667 | if (${TINT_BUILD_IR} AND ${TINT_BUILD_WGSL_WRITER}) |
| 1668 | list(APPEND TINT_TEST_SRCS |
dan sinclair | 97c3727 | 2023-07-24 17:11:53 +0000 | [diff] [blame^] | 1669 | lang/core/ir/to_program_inlining_test.cc |
| 1670 | lang/core/ir/to_program_test.cc |
Ben Clayton | 7afd2c4 | 2023-06-22 17:15:43 +0000 | [diff] [blame] | 1671 | ) |
| 1672 | endif() |
Ben Clayton | 9940c7b | 2023-05-16 22:07:39 +0000 | [diff] [blame] | 1673 | |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 1674 | if (${TINT_BUILD_FUZZERS}) |
| 1675 | list(APPEND TINT_TEST_SRCS |
| 1676 | fuzzers/mersenne_twister_engine.cc |
| 1677 | fuzzers/mersenne_twister_engine.h |
| 1678 | fuzzers/random_generator.cc |
| 1679 | fuzzers/random_generator.h |
| 1680 | fuzzers/random_generator_engine.cc |
| 1681 | fuzzers/random_generator_engine.h |
| 1682 | fuzzers/random_generator_test.cc |
| 1683 | ) |
| 1684 | endif() |
| 1685 | |
| 1686 | add_executable(tint_unittests ${TINT_TEST_SRCS}) |
| 1687 | set_target_properties(${target} PROPERTIES FOLDER "Tests") |
| 1688 | |
Ben Clayton | ba200e8 | 2022-11-07 17:24:10 +0000 | [diff] [blame] | 1689 | if(MSVC) |
| 1690 | # TODO(crbug.com/tint/1749): MSVC debug builds can suffer from stack |
| 1691 | # overflows when resolving deeply nested expression chains or statements. |
| 1692 | # Production builds neither use MSVC nor debug, so just bump the stack size |
| 1693 | # for this build combination. |
Ben Clayton | 9418152 | 2022-11-09 20:55:33 +0000 | [diff] [blame] | 1694 | if (IS_DEBUG_BUILD) |
| 1695 | target_link_options(tint_unittests PRIVATE "/STACK:4194304") # 4MB, default is 1MB |
Ben Clayton | ba200e8 | 2022-11-07 17:24:10 +0000 | [diff] [blame] | 1696 | endif() |
| 1697 | else() |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 1698 | target_compile_options(tint_unittests PRIVATE |
| 1699 | -Wno-global-constructors |
| 1700 | -Wno-weak-vtables |
| 1701 | ) |
| 1702 | endif() |
| 1703 | |
| 1704 | ## Test executable |
| 1705 | target_include_directories( |
| 1706 | tint_unittests PRIVATE ${gmock_SOURCE_DIR}/include) |
| 1707 | target_link_libraries(tint_unittests libtint gmock tint_utils_io) |
| 1708 | tint_default_compile_options(tint_unittests) |
| 1709 | |
| 1710 | if(${TINT_BUILD_SPV_READER} OR ${TINT_BUILD_SPV_WRITER}) |
| 1711 | tint_spvtools_compile_options(tint_unittests) |
| 1712 | endif() |
| 1713 | |
| 1714 | add_test(NAME tint_unittests COMMAND tint_unittests) |
| 1715 | endif(TINT_BUILD_TESTS) |
| 1716 | |
| 1717 | ################################################################################ |
| 1718 | # Benchmarks |
| 1719 | ################################################################################ |
| 1720 | if(TINT_BUILD_BENCHMARKS) |
| 1721 | if(NOT TINT_BUILD_WGSL_READER) |
| 1722 | message(FATAL_ERROR "TINT_BUILD_BENCHMARKS requires TINT_BUILD_WGSL_READER") |
| 1723 | endif() |
| 1724 | |
dan sinclair | 16b4cf8 | 2022-11-03 21:10:40 +0000 | [diff] [blame] | 1725 | list(APPEND TINT_BENCHMARK_SRCS |
dan sinclair | 22b4dd2 | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 1726 | "utils/rtti/switch_bench.cc" |
dan sinclair | 11cecc1 | 2022-11-03 16:28:51 +0000 | [diff] [blame] | 1727 | "bench/benchmark.cc" |
dan sinclair | 7cf568f | 2023-07-20 01:14:15 +0000 | [diff] [blame] | 1728 | "lang/wgsl/reader/parser_bench.cc" |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 1729 | ) |
| 1730 | |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 1731 | if (${TINT_BUILD_GLSL_WRITER}) |
dan sinclair | 8046fbb | 2023-07-20 01:14:15 +0000 | [diff] [blame] | 1732 | list(APPEND TINT_BENCHMARK_SRCS lang/glsl/ast_writer/generator_bench.cc) |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 1733 | endif() |
| 1734 | if (${TINT_BUILD_HLSL_WRITER}) |
dan sinclair | 5fbe1f6 | 2023-07-20 01:14:15 +0000 | [diff] [blame] | 1735 | list(APPEND TINT_BENCHMARK_SRCS lang/hlsl/ast_writer/generator_bench.cc) |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 1736 | endif() |
| 1737 | if (${TINT_BUILD_MSL_WRITER}) |
dan sinclair | d5575ce | 2023-07-20 01:14:15 +0000 | [diff] [blame] | 1738 | list(APPEND TINT_BENCHMARK_SRCS lang/msl/ast_writer/generator_bench.cc) |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 1739 | endif() |
| 1740 | if (${TINT_BUILD_SPV_WRITER}) |
James Price | 74d04a8 | 2023-07-20 14:44:22 +0000 | [diff] [blame] | 1741 | list(APPEND TINT_BENCHMARK_SRCS lang/spirv/ast_writer/generator_bench.cc) |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 1742 | endif() |
| 1743 | if (${TINT_BUILD_WGSL_WRITER}) |
dan sinclair | ff6eba5 | 2023-07-20 01:14:15 +0000 | [diff] [blame] | 1744 | list(APPEND TINT_BENCHMARK_SRCS lang/wgsl/ast_writer/generator_bench.cc) |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 1745 | endif() |
| 1746 | |
dan sinclair | 16b4cf8 | 2022-11-03 21:10:40 +0000 | [diff] [blame] | 1747 | add_executable(tint-benchmark ${TINT_BENCHMARK_SRCS}) |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 1748 | set_target_properties(${target} PROPERTIES FOLDER "Benchmarks") |
| 1749 | |
| 1750 | tint_core_compile_options(tint-benchmark) |
| 1751 | |
| 1752 | target_link_libraries(tint-benchmark PRIVATE benchmark::benchmark libtint) |
Ben Clayton | 8fc9b86 | 2023-04-19 15:03:19 +0000 | [diff] [blame] | 1753 | |
| 1754 | if (TINT_EXTERNAL_BENCHMARK_CORPUS_DIR) |
| 1755 | # Glob all the files at TINT_EXTERNAL_BENCHMARK_CORPUS_DIR, and create a header |
Ben Clayton | 1a8bc1d | 2023-05-14 01:36:30 +0000 | [diff] [blame] | 1756 | # that lists these with the macros: |
| 1757 | # TINT_BENCHMARK_EXTERNAL_WGSL_PROGRAMS() |
| 1758 | # TINT_BENCHMARK_EXTERNAL_SPV_PROGRAMS() |
Ben Clayton | 8fc9b86 | 2023-04-19 15:03:19 +0000 | [diff] [blame] | 1759 | set(TINT_BENCHMARK_GEN_DIR "${DAWN_BUILD_GEN_DIR}/src/tint/benchmark/") |
Ben Clayton | 1a8bc1d | 2023-05-14 01:36:30 +0000 | [diff] [blame] | 1760 | set(TINT_BENCHMARK_EXTERNAL_SHADERS_HEADER "${TINT_BENCHMARK_GEN_DIR}/external_wgsl_programs.h") |
Ben Clayton | 8fc9b86 | 2023-04-19 15:03:19 +0000 | [diff] [blame] | 1761 | message("Globbing ${TINT_EXTERNAL_BENCHMARK_CORPUS_DIR}...") |
Ben Clayton | 1a8bc1d | 2023-05-14 01:36:30 +0000 | [diff] [blame] | 1762 | |
Ben Clayton | 8fc9b86 | 2023-04-19 15:03:19 +0000 | [diff] [blame] | 1763 | file(GLOB_RECURSE |
Ben Clayton | 1a8bc1d | 2023-05-14 01:36:30 +0000 | [diff] [blame] | 1764 | TINT_EXTERNAL_WGSL_BENCHMARK_FILES |
Ben Clayton | 8fc9b86 | 2023-04-19 15:03:19 +0000 | [diff] [blame] | 1765 | RELATIVE "${TINT_EXTERNAL_BENCHMARK_CORPUS_DIR}" |
| 1766 | "${TINT_EXTERNAL_BENCHMARK_CORPUS_DIR}/**.wgsl") |
Ben Clayton | 1a8bc1d | 2023-05-14 01:36:30 +0000 | [diff] [blame] | 1767 | list(TRANSFORM TINT_EXTERNAL_WGSL_BENCHMARK_FILES REPLACE |
Ben Clayton | 8fc9b86 | 2023-04-19 15:03:19 +0000 | [diff] [blame] | 1768 | "(.+)" |
| 1769 | " BENCHMARK_CAPTURE\(FUNC, \"\\1\", \"${TINT_EXTERNAL_BENCHMARK_CORPUS_DIR}/\\1\")") |
Ben Clayton | 1a8bc1d | 2023-05-14 01:36:30 +0000 | [diff] [blame] | 1770 | list(JOIN TINT_EXTERNAL_WGSL_BENCHMARK_FILES "; \\\n" TINT_EXTERNAL_WGSL_BENCHMARK_FILES) |
| 1771 | |
| 1772 | file(GLOB_RECURSE |
| 1773 | TINT_EXTERNAL_SPV_BENCHMARK_FILES |
| 1774 | RELATIVE "${TINT_EXTERNAL_BENCHMARK_CORPUS_DIR}" |
| 1775 | "${TINT_EXTERNAL_BENCHMARK_CORPUS_DIR}/**.spv") |
| 1776 | |
| 1777 | list(TRANSFORM TINT_EXTERNAL_SPV_BENCHMARK_FILES REPLACE |
| 1778 | "(.+)" |
| 1779 | " BENCHMARK_CAPTURE\(FUNC, \"\\1\", \"${TINT_EXTERNAL_BENCHMARK_CORPUS_DIR}/\\1\")") |
| 1780 | list(JOIN TINT_EXTERNAL_SPV_BENCHMARK_FILES "; \\\n" TINT_EXTERNAL_SPV_BENCHMARK_FILES) |
| 1781 | |
Ben Clayton | 8fc9b86 | 2023-04-19 15:03:19 +0000 | [diff] [blame] | 1782 | file(CONFIGURE |
Ben Clayton | 1a8bc1d | 2023-05-14 01:36:30 +0000 | [diff] [blame] | 1783 | OUTPUT "${TINT_BENCHMARK_EXTERNAL_SHADERS_HEADER}" |
| 1784 | CONTENT " |
| 1785 | #define TINT_BENCHMARK_EXTERNAL_WGSL_PROGRAMS(FUNC) \\ |
| 1786 | ${TINT_EXTERNAL_WGSL_BENCHMARK_FILES}; |
| 1787 | |
| 1788 | #define TINT_BENCHMARK_EXTERNAL_SPV_PROGRAMS(FUNC) \\ |
| 1789 | ${TINT_EXTERNAL_SPV_BENCHMARK_FILES};") |
| 1790 | # Define TINT_BENCHMARK_EXTERNAL_SHADERS_HEADER to the generated header path |
Ben Clayton | 8fc9b86 | 2023-04-19 15:03:19 +0000 | [diff] [blame] | 1791 | target_compile_definitions(tint-benchmark PRIVATE |
Ben Clayton | 1a8bc1d | 2023-05-14 01:36:30 +0000 | [diff] [blame] | 1792 | "TINT_BENCHMARK_EXTERNAL_SHADERS_HEADER=\"${TINT_BENCHMARK_EXTERNAL_SHADERS_HEADER}\"") |
Ben Clayton | 8fc9b86 | 2023-04-19 15:03:19 +0000 | [diff] [blame] | 1793 | endif() |
Ryan Harrison | dbc13af | 2022-02-21 15:19:07 +0000 | [diff] [blame] | 1794 | endif(TINT_BUILD_BENCHMARKS) |