From cc923c5165d399f97d258deea68ae04d662c3b79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Thu, 15 Jan 2026 20:44:27 -0800 Subject: [PATCH] =?UTF-8?q?Update=20=D0=A2int=20(#3553)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Trimmed Tint. * Updated Tint. --- 3rdparty/dawn/include/webgpu/webgpu.h | 1 + .../src/tint/lang/core/ir/binary/decode.cc | 2097 -- .../src/tint/lang/core/ir/binary/decode.h | 53 - .../src/tint/lang/core/ir/binary/encode.cc | 1462 - .../src/tint/lang/core/ir/binary/encode.h | 55 - .../dawn/src/tint/lang/core/ir/reflection.cc | 4 +- .../dawn/src/tint/lang/core/ir/reflection.h | 5 + .../core/ir/transform/builtin_polyfill.cc | 30 +- .../lang/core/ir/transform/builtin_polyfill.h | 5 +- .../dawn/src/tint/lang/core/ir/validator.cc | 104 +- .../tint/lang/null/writer/common/options.cc | 40 - .../tint/lang/null/writer/common/options.h | 64 - .../tint/lang/null/writer/common/output.cc | 40 - .../src/tint/lang/null/writer/common/output.h | 70 - .../src/tint/lang/null/writer/raise/raise.cc | 43 - .../src/tint/lang/null/writer/raise/raise.h | 49 - .../dawn/src/tint/lang/null/writer/writer.cc | 54 - .../dawn/src/tint/lang/null/writer/writer.h | 51 - .../tint/lang/spirv/writer/common/options.h | 6 +- .../src/tint/lang/spirv/writer/raise/raise.cc | 1 + 3rdparty/dawn/src/tint/lang/wgsl/enums.cc | 5 - 3rdparty/dawn/src/tint/lang/wgsl/enums.h | 3 - .../src/tint/lang/wgsl/reader/lower/lower.cc | 270 - .../src/tint/lang/wgsl/reader/lower/lower.h | 43 - .../dawn/src/tint/lang/wgsl/reader/options.h | 47 - .../reader/parser/classify_template_args.cc | 157 - .../reader/parser/classify_template_args.h | 41 - .../src/tint/lang/wgsl/reader/parser/detail.h | 77 - .../src/tint/lang/wgsl/reader/parser/lexer.cc | 1343 - .../src/tint/lang/wgsl/reader/parser/lexer.h | 134 - .../tint/lang/wgsl/reader/parser/parser.cc | 3542 --- .../src/tint/lang/wgsl/reader/parser/parser.h | 927 - .../src/tint/lang/wgsl/reader/parser/token.cc | 290 - .../src/tint/lang/wgsl/reader/parser/token.h | 382 - .../reader/program_to_ir/program_to_ir.cc | 1408 - .../wgsl/reader/program_to_ir/program_to_ir.h | 52 - .../dawn/src/tint/lang/wgsl/reader/reader.cc | 80 - .../dawn/src/tint/lang/wgsl/reader/reader.h | 75 - .../writer/ir_to_program/ir_to_program.cc | 10 - 3rdparty/dawn/src/tint/utils/math/math.h | 4 +- .../dawn/src/tint/utils/protos/ir/ir.pb.cc | 21506 -------------- .../dawn/src/tint/utils/protos/ir/ir.pb.h | 23930 ---------------- .../dawn/src/tint/utils/strconv/parse_num.cc | 115 - .../dawn/src/tint/utils/strconv/parse_num.h | 145 - 3rdparty/dawn/third_party/abseil-cpp/LICENSE | 203 - .../abseil-cpp/absl/algorithm/algorithm.h | 64 - .../abseil-cpp/absl/algorithm/container.h | 1864 -- .../abseil-cpp/absl/base/attributes.h | 1077 - .../abseil-cpp/absl/base/c_header_test.c | 30 - .../abseil-cpp/absl/base/call_once.h | 227 - .../third_party/abseil-cpp/absl/base/casts.h | 180 - .../third_party/abseil-cpp/absl/base/config.h | 877 - .../abseil-cpp/absl/base/const_init.h | 76 - .../absl/base/dynamic_annotations.h | 477 - .../abseil-cpp/absl/base/fast_type_id.h | 45 - .../absl/base/internal/atomic_hook.h | 200 - .../absl/base/internal/cycleclock.h | 144 - .../absl/base/internal/cycleclock_config.h | 55 - .../absl/base/internal/direct_mmap.h | 170 - .../abseil-cpp/absl/base/internal/endian.h | 279 - .../absl/base/internal/errno_saver.h | 43 - .../abseil-cpp/absl/base/internal/hide_ptr.h | 51 - .../abseil-cpp/absl/base/internal/identity.h | 39 - .../absl/base/internal/iterator_traits.h | 71 - .../absl/base/internal/low_level_alloc.h | 133 - .../absl/base/internal/low_level_scheduling.h | 134 - .../absl/base/internal/per_thread_tls.h | 52 - .../abseil-cpp/absl/base/internal/poison.h | 59 - .../absl/base/internal/pretty_function.h | 33 - .../absl/base/internal/raw_logging.h | 217 - .../absl/base/internal/scheduling_mode.h | 58 - .../absl/base/internal/scoped_set_env.h | 45 - .../abseil-cpp/absl/base/internal/spinlock.h | 305 - .../absl/base/internal/spinlock_akaros.inc | 35 - .../absl/base/internal/spinlock_linux.inc | 71 - .../absl/base/internal/spinlock_posix.inc | 46 - .../absl/base/internal/spinlock_wait.h | 95 - .../absl/base/internal/spinlock_win32.inc | 40 - .../abseil-cpp/absl/base/internal/strerror.h | 39 - .../abseil-cpp/absl/base/internal/sysinfo.h | 74 - .../absl/base/internal/thread_identity.h | 273 - .../absl/base/internal/throw_delegate.h | 75 - .../abseil-cpp/absl/base/internal/tracing.h | 81 - .../absl/base/internal/tsan_mutex_interface.h | 68 - .../absl/base/internal/unaligned_access.h | 89 - .../absl/base/internal/unscaledcycleclock.h | 113 - .../base/internal/unscaledcycleclock_config.h | 62 - .../abseil-cpp/absl/base/log_severity.h | 185 - .../third_party/abseil-cpp/absl/base/macros.h | 220 - .../abseil-cpp/absl/base/no_destructor.h | 191 - .../abseil-cpp/absl/base/nullability.h | 317 - .../abseil-cpp/absl/base/optimization.h | 310 - .../abseil-cpp/absl/base/options.h | 184 - .../abseil-cpp/absl/base/policy_checks.h | 115 - .../third_party/abseil-cpp/absl/base/port.h | 25 - .../abseil-cpp/absl/base/prefetch.h | 209 - .../abseil-cpp/absl/base/thread_annotations.h | 333 - .../abseil-cpp/absl/container/btree_map.h | 891 - .../abseil-cpp/absl/container/btree_set.h | 826 - .../abseil-cpp/absl/container/fixed_array.h | 549 - .../abseil-cpp/absl/container/flat_hash_map.h | 692 - .../abseil-cpp/absl/container/flat_hash_set.h | 580 - .../absl/container/hash_container_defaults.h | 45 - .../absl/container/inlined_vector.h | 1025 - .../absl/container/internal/btree.h | 3149 -- .../absl/container/internal/btree_container.h | 867 - .../absl/container/internal/common.h | 250 - .../container/internal/common_policy_traits.h | 151 - .../container/internal/compressed_tuple.h | 275 - .../container/internal/container_memory.h | 555 - .../internal/hash_function_defaults.h | 281 - .../container/internal/hash_policy_traits.h | 195 - .../internal/hashtable_control_bytes.h | 516 - .../absl/container/internal/hashtable_debug.h | 102 - .../internal/hashtable_debug_hooks.h | 85 - .../container/internal/hashtablez_sampler.h | 294 - .../absl/container/internal/inlined_vector.h | 1102 - .../absl/container/internal/layout.h | 828 - .../container/internal/node_slot_policy.h | 95 - .../absl/container/internal/raw_hash_map.h | 357 - .../absl/container/internal/raw_hash_set.h | 3703 --- .../internal/raw_hash_set_resize_impl.h | 79 - .../absl/container/internal/test_allocator.h | 387 - .../internal/test_instance_tracker.h | 274 - .../absl/container/internal/tracked.h | 83 - .../abseil-cpp/absl/container/node_hash_map.h | 687 - .../abseil-cpp/absl/container/node_hash_set.h | 578 - .../third_party/abseil-cpp/absl/crc/crc32c.h | 192 - .../abseil-cpp/absl/crc/internal/cpu_detect.h | 69 - .../abseil-cpp/absl/crc/internal/crc.h | 83 - .../internal/crc32_x86_arm_combined_simd.h | 278 - .../abseil-cpp/absl/crc/internal/crc32c.h | 39 - .../absl/crc/internal/crc32c_inline.h | 72 - .../absl/crc/internal/crc_cord_state.h | 159 - .../absl/crc/internal/crc_internal.h | 177 - .../abseil-cpp/absl/crc/internal/crc_memcpy.h | 122 - .../internal/non_temporal_arm_intrinsics.h | 79 - .../absl/crc/internal/non_temporal_memcpy.h | 195 - .../absl/debugging/failure_signal_handler.h | 121 - .../debugging/internal/address_is_readable.h | 32 - .../absl/debugging/internal/addresses.h | 57 - .../internal/bounded_utf8_length_sequence.h | 126 - .../debugging/internal/decode_rust_punycode.h | 55 - .../absl/debugging/internal/demangle.h | 76 - .../absl/debugging/internal/demangle_rust.h | 42 - .../absl/debugging/internal/elf_mem_image.h | 141 - .../absl/debugging/internal/examine_stack.h | 64 - .../debugging/internal/stack_consumption.h | 50 - .../internal/stacktrace_aarch64-inl.inc | 288 - .../debugging/internal/stacktrace_arm-inl.inc | 148 - .../debugging/internal/stacktrace_config.h | 96 - .../internal/stacktrace_emscripten-inl.inc | 119 - .../internal/stacktrace_generic-inl.inc | 103 - .../internal/stacktrace_powerpc-inl.inc | 269 - .../internal/stacktrace_riscv-inl.inc | 204 - .../internal/stacktrace_unimplemented-inl.inc | 25 - .../internal/stacktrace_win32-inl.inc | 81 - .../debugging/internal/stacktrace_x86-inl.inc | 405 - .../absl/debugging/internal/symbolize.h | 153 - .../debugging/internal/utf8_for_code_point.h | 47 - .../absl/debugging/internal/vdso_support.h | 158 - .../abseil-cpp/absl/debugging/leak_check.h | 150 - .../abseil-cpp/absl/debugging/stacktrace.h | 299 - .../abseil-cpp/absl/debugging/symbolize.h | 99 - .../absl/debugging/symbolize_darwin.inc | 102 - .../absl/debugging/symbolize_elf.inc | 1756 -- .../absl/debugging/symbolize_emscripten.inc | 76 - .../debugging/symbolize_unimplemented.inc | 40 - .../absl/debugging/symbolize_win32.inc | 101 - .../absl/functional/any_invocable.h | 334 - .../abseil-cpp/absl/functional/bind_front.h | 194 - .../abseil-cpp/absl/functional/function_ref.h | 144 - .../absl/functional/internal/any_invocable.h | 776 - .../absl/functional/internal/front_binder.h | 93 - .../absl/functional/internal/function_ref.h | 113 - .../abseil-cpp/absl/functional/overload.h | 72 - .../third_party/abseil-cpp/absl/hash/hash.h | 466 - .../abseil-cpp/absl/hash/internal/city.h | 78 - .../abseil-cpp/absl/hash/internal/hash.h | 1454 - .../absl/hash/internal/weakly_mixed_integer.h | 38 - .../abseil-cpp/absl/log/absl_check.h | 117 - .../abseil-cpp/absl/log/absl_log.h | 115 - .../abseil-cpp/absl/log/absl_vlog_is_on.h | 95 - .../third_party/abseil-cpp/absl/log/check.h | 210 - .../abseil-cpp/absl/log/check_test_impl.inc | 979 - .../abseil-cpp/absl/log/die_if_null.h | 76 - .../third_party/abseil-cpp/absl/log/flags.h | 43 - .../third_party/abseil-cpp/absl/log/globals.h | 230 - .../abseil-cpp/absl/log/initialize.h | 45 - .../absl/log/internal/append_truncated.h | 75 - .../abseil-cpp/absl/log/internal/check_impl.h | 151 - .../abseil-cpp/absl/log/internal/check_op.h | 529 - .../abseil-cpp/absl/log/internal/conditions.h | 247 - .../abseil-cpp/absl/log/internal/config.h | 45 - .../abseil-cpp/absl/log/internal/flags.h | 59 - .../abseil-cpp/absl/log/internal/fnmatch.h | 35 - .../abseil-cpp/absl/log/internal/globals.h | 101 - .../abseil-cpp/absl/log/internal/log_format.h | 78 - .../abseil-cpp/absl/log/internal/log_impl.h | 282 - .../absl/log/internal/log_message.h | 451 - .../absl/log/internal/log_sink_set.h | 54 - .../abseil-cpp/absl/log/internal/nullguard.h | 88 - .../abseil-cpp/absl/log/internal/nullstream.h | 128 - .../abseil-cpp/absl/log/internal/proto.h | 298 - .../abseil-cpp/absl/log/internal/strip.h | 100 - .../abseil-cpp/absl/log/internal/structured.h | 160 - .../absl/log/internal/structured_proto.h | 107 - .../absl/log/internal/test_actions.h | 90 - .../absl/log/internal/test_helpers.h | 71 - .../absl/log/internal/test_matchers.h | 94 - .../absl/log/internal/vlog_config.h | 165 - .../abseil-cpp/absl/log/internal/voidify.h | 50 - .../third_party/abseil-cpp/absl/log/log.h | 378 - .../absl/log/log_basic_test_impl.inc | 654 - .../abseil-cpp/absl/log/log_entry.h | 223 - .../abseil-cpp/absl/log/log_sink.h | 71 - .../abseil-cpp/absl/log/log_sink_registry.h | 64 - .../abseil-cpp/absl/log/log_streamer.h | 181 - .../abseil-cpp/absl/log/scoped_mock_log.h | 203 - .../abseil-cpp/absl/log/structured.h | 75 - .../abseil-cpp/absl/log/vlog_is_on.h | 74 - .../abseil-cpp/absl/memory/memory.h | 278 - .../abseil-cpp/absl/meta/type_traits.h | 560 - .../abseil-cpp/absl/numeric/bits.h | 262 - .../abseil-cpp/absl/numeric/int128.h | 1220 - .../absl/numeric/int128_have_intrinsic.inc | 311 - .../absl/numeric/int128_no_intrinsic.inc | 349 - .../abseil-cpp/absl/numeric/internal/bits.h | 394 - .../absl/numeric/internal/representation.h | 55 - .../abseil-cpp/absl/profiling/hashtable.h | 40 - .../profiling/internal/exponential_biased.h | 130 - .../profiling/internal/periodic_sampler.h | 211 - .../absl/profiling/internal/profile_builder.h | 138 - .../absl/profiling/internal/sample_recorder.h | 253 - .../abseil-cpp/absl/strings/charconv.h | 123 - .../abseil-cpp/absl/strings/charset.h | 163 - .../abseil-cpp/absl/strings/cord.h | 1763 -- .../abseil-cpp/absl/strings/cord_analysis.h | 63 - .../abseil-cpp/absl/strings/cord_buffer.h | 572 - .../abseil-cpp/absl/strings/escaping.h | 185 - .../absl/strings/has_absl_stringify.h | 64 - .../absl/strings/has_ostream_operator.h | 42 - .../absl/strings/internal/charconv_bigint.h | 433 - .../absl/strings/internal/charconv_parse.h | 99 - .../absl/strings/internal/cord_data_edge.h | 63 - .../absl/strings/internal/cord_internal.h | 940 - .../absl/strings/internal/cord_rep_btree.h | 944 - .../internal/cord_rep_btree_navigator.h | 267 - .../strings/internal/cord_rep_btree_reader.h | 212 - .../absl/strings/internal/cord_rep_consume.h | 47 - .../absl/strings/internal/cord_rep_crc.h | 103 - .../absl/strings/internal/cord_rep_flat.h | 195 - .../strings/internal/cord_rep_test_util.h | 205 - .../absl/strings/internal/cordz_functions.h | 87 - .../absl/strings/internal/cordz_handle.h | 98 - .../absl/strings/internal/cordz_info.h | 301 - .../strings/internal/cordz_sample_token.h | 97 - .../absl/strings/internal/cordz_statistics.h | 88 - .../strings/internal/cordz_update_scope.h | 71 - .../strings/internal/cordz_update_tracker.h | 123 - .../internal/damerau_levenshtein_distance.h | 34 - .../absl/strings/internal/escaping.h | 57 - .../strings/internal/escaping_test_common.h | 133 - .../absl/strings/internal/memutil.h | 40 - .../strings/internal/numbers_test_common.h | 184 - .../absl/strings/internal/ostringstream.h | 114 - .../absl/strings/internal/pow10_helper.h | 40 - .../strings/internal/resize_uninitialized.h | 119 - .../absl/strings/internal/stl_type_traits.h | 248 - .../absl/strings/internal/str_format/arg.h | 661 - .../absl/strings/internal/str_format/bind.h | 237 - .../strings/internal/str_format/checker.h | 98 - .../internal/str_format/constexpr_parser.h | 357 - .../strings/internal/str_format/extension.h | 456 - .../internal/str_format/float_conversion.h | 37 - .../absl/strings/internal/str_format/output.h | 97 - .../absl/strings/internal/str_format/parser.h | 271 - .../absl/strings/internal/str_join_internal.h | 338 - .../strings/internal/str_split_internal.h | 525 - .../absl/strings/internal/string_constant.h | 67 - .../absl/strings/internal/stringify_sink.h | 57 - .../abseil-cpp/absl/strings/internal/utf8.h | 64 - .../abseil-cpp/absl/strings/match.h | 129 - .../abseil-cpp/absl/strings/numbers.h | 346 - .../abseil-cpp/absl/strings/str_cat.h | 628 - .../abseil-cpp/absl/strings/str_format.h | 887 - .../abseil-cpp/absl/strings/str_join.h | 301 - .../abseil-cpp/absl/strings/str_replace.h | 222 - .../abseil-cpp/absl/strings/str_split.h | 582 - .../abseil-cpp/absl/strings/string_view.h | 782 - .../abseil-cpp/absl/synchronization/barrier.h | 79 - .../absl/synchronization/blocking_counter.h | 107 - .../internal/create_thread_identity.h | 56 - .../absl/synchronization/internal/futex.h | 177 - .../synchronization/internal/futex_waiter.h | 63 - .../synchronization/internal/graphcycles.h | 146 - .../synchronization/internal/kernel_timeout.h | 178 - .../synchronization/internal/per_thread_sem.h | 119 - .../synchronization/internal/pthread_waiter.h | 60 - .../synchronization/internal/sem_waiter.h | 65 - .../synchronization/internal/stdcpp_waiter.h | 56 - .../synchronization/internal/thread_pool.h | 96 - .../absl/synchronization/internal/waiter.h | 69 - .../synchronization/internal/waiter_base.h | 90 - .../synchronization/internal/win32_waiter.h | 72 - .../abseil-cpp/absl/synchronization/mutex.h | 1298 - .../absl/synchronization/notification.h | 133 - .../abseil-cpp/absl/time/civil_time.h | 589 - .../third_party/abseil-cpp/absl/time/clock.h | 78 - .../internal/cctz/include/cctz/civil_time.h | 332 - .../cctz/include/cctz/civil_time_detail.h | 644 - .../internal/cctz/include/cctz/time_zone.h | 460 - .../cctz/include/cctz/zone_info_source.h | 102 - .../internal/cctz/src/test_time_zone_names.h | 33 - .../time/internal/cctz/src/time_zone_fixed.h | 52 - .../time/internal/cctz/src/time_zone_if.h | 80 - .../time/internal/cctz/src/time_zone_impl.h | 97 - .../time/internal/cctz/src/time_zone_info.h | 128 - .../time/internal/cctz/src/time_zone_libc.h | 60 - .../time/internal/cctz/src/time_zone_posix.h | 132 - .../absl/time/internal/cctz/src/tzfile.h | 120 - .../time/internal/get_current_time_chrono.inc | 31 - .../time/internal/get_current_time_posix.inc | 24 - .../abseil-cpp/absl/time/internal/test_util.h | 33 - .../third_party/abseil-cpp/absl/time/time.h | 1926 -- .../abseil-cpp/absl/types/compare.h | 505 - .../abseil-cpp/absl/types/internal/span.h | 140 - .../abseil-cpp/absl/types/optional.h | 41 - .../third_party/abseil-cpp/absl/types/span.h | 823 - .../abseil-cpp/absl/types/variant.h | 82 - .../abseil-cpp/absl/utility/utility.h | 55 - 3rdparty/dawn/third_party/protobuf/LICENSE | 32 - .../protobuf/src/google/protobuf/any.h | 146 - .../protobuf/src/google/protobuf/arena.h | 689 - .../src/google/protobuf/arena_align.h | 199 - .../google/protobuf/arena_allocation_policy.h | 102 - .../src/google/protobuf/arena_cleanup.h | 108 - .../src/google/protobuf/arenastring.h | 540 - .../src/google/protobuf/arenaz_sampler.h | 238 - .../protobuf/src/google/protobuf/descriptor.h | 3273 --- .../src/google/protobuf/descriptor_lite.h | 98 - .../protobuf/src/google/protobuf/endian.h | 177 - .../google/protobuf/explicitly_constructed.h | 67 - .../src/google/protobuf/extension_set.h | 1811 -- .../protobuf/generated_enum_reflection.h | 77 - .../src/google/protobuf/generated_enum_util.h | 114 - .../google/protobuf/generated_message_bases.h | 68 - .../protobuf/generated_message_reflection.h | 387 - .../protobuf/generated_message_tctable_decl.h | 613 - .../protobuf/generated_message_tctable_impl.h | 1181 - .../google/protobuf/generated_message_util.h | 401 - .../protobuf/src/google/protobuf/has_bits.h | 131 - .../google/protobuf/implicit_weak_message.h | 231 - .../google/protobuf/inlined_string_field.h | 545 - .../src/google/protobuf/internal_visibility.h | 44 - .../src/google/protobuf/io/coded_stream.h | 1853 -- .../src/google/protobuf/io/zero_copy_stream.h | 260 - .../protobuf/io/zero_copy_stream_impl_lite.h | 515 - .../protobuf/src/google/protobuf/map.h | 1577 - .../protobuf/src/google/protobuf/message.h | 1827 -- .../src/google/protobuf/message_lite.h | 1571 - .../src/google/protobuf/metadata_lite.h | 258 - .../src/google/protobuf/micro_string.h | 653 - .../src/google/protobuf/parse_context.h | 1511 - .../protobuf/src/google/protobuf/port.h | 814 - .../protobuf/src/google/protobuf/port_def.inc | 975 - .../src/google/protobuf/port_undef.inc | 181 - .../protobuf/src/google/protobuf/raw_ptr.h | 64 - .../protobuf/src/google/protobuf/reflection.h | 572 - .../src/google/protobuf/reflection_ops.h | 67 - .../src/google/protobuf/repeated_field.h | 1501 - .../src/google/protobuf/repeated_ptr_field.h | 2183 -- .../src/google/protobuf/runtime_version.h | 27 - .../src/google/protobuf/serial_arena.h | 441 - .../src/google/protobuf/string_block.h | 181 - .../src/google/protobuf/stubs/common.h | 94 - .../google/protobuf/stubs/platform_macros.h | 115 - .../protobuf/src/google/protobuf/stubs/port.h | 251 - .../src/google/protobuf/text_format.h | 850 - .../src/google/protobuf/thread_safe_arena.h | 282 - .../src/google/protobuf/unknown_field_set.h | 456 - .../src/google/protobuf/wire_format.h | 378 - .../src/google/protobuf/wire_format_lite.h | 1690 -- .../runtime/shaders/wgsl/cs_assao_apply.bin | Bin 2983 -> 2948 bytes .../wgsl/cs_assao_generate_importance_map.bin | Bin 2923 -> 2888 bytes .../shaders/wgsl/cs_assao_non_smart_apply.bin | Bin 1672 -> 1637 bytes .../wgsl/cs_assao_non_smart_half_apply.bin | Bin 1338 -> 1303 bytes .../cs_assao_postprocess_importance_map_a.bin | Bin 1518 -> 1483 bytes .../cs_assao_postprocess_importance_map_b.bin | Bin 1880 -> 1845 bytes tools/shaderc/shaderc_wgsl.cpp | 1 - 390 files changed, 120 insertions(+), 168171 deletions(-) delete mode 100644 3rdparty/dawn/src/tint/lang/core/ir/binary/decode.cc delete mode 100644 3rdparty/dawn/src/tint/lang/core/ir/binary/decode.h delete mode 100644 3rdparty/dawn/src/tint/lang/core/ir/binary/encode.cc delete mode 100644 3rdparty/dawn/src/tint/lang/core/ir/binary/encode.h delete mode 100644 3rdparty/dawn/src/tint/lang/null/writer/common/options.cc delete mode 100644 3rdparty/dawn/src/tint/lang/null/writer/common/options.h delete mode 100644 3rdparty/dawn/src/tint/lang/null/writer/common/output.cc delete mode 100644 3rdparty/dawn/src/tint/lang/null/writer/common/output.h delete mode 100644 3rdparty/dawn/src/tint/lang/null/writer/raise/raise.cc delete mode 100644 3rdparty/dawn/src/tint/lang/null/writer/raise/raise.h delete mode 100644 3rdparty/dawn/src/tint/lang/null/writer/writer.cc delete mode 100644 3rdparty/dawn/src/tint/lang/null/writer/writer.h delete mode 100644 3rdparty/dawn/src/tint/lang/wgsl/reader/lower/lower.cc delete mode 100644 3rdparty/dawn/src/tint/lang/wgsl/reader/lower/lower.h delete mode 100644 3rdparty/dawn/src/tint/lang/wgsl/reader/options.h delete mode 100644 3rdparty/dawn/src/tint/lang/wgsl/reader/parser/classify_template_args.cc delete mode 100644 3rdparty/dawn/src/tint/lang/wgsl/reader/parser/classify_template_args.h delete mode 100644 3rdparty/dawn/src/tint/lang/wgsl/reader/parser/detail.h delete mode 100644 3rdparty/dawn/src/tint/lang/wgsl/reader/parser/lexer.cc delete mode 100644 3rdparty/dawn/src/tint/lang/wgsl/reader/parser/lexer.h delete mode 100644 3rdparty/dawn/src/tint/lang/wgsl/reader/parser/parser.cc delete mode 100644 3rdparty/dawn/src/tint/lang/wgsl/reader/parser/parser.h delete mode 100644 3rdparty/dawn/src/tint/lang/wgsl/reader/parser/token.cc delete mode 100644 3rdparty/dawn/src/tint/lang/wgsl/reader/parser/token.h delete mode 100644 3rdparty/dawn/src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.cc delete mode 100644 3rdparty/dawn/src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.h delete mode 100644 3rdparty/dawn/src/tint/lang/wgsl/reader/reader.cc delete mode 100644 3rdparty/dawn/src/tint/lang/wgsl/reader/reader.h delete mode 100644 3rdparty/dawn/src/tint/utils/protos/ir/ir.pb.cc delete mode 100644 3rdparty/dawn/src/tint/utils/protos/ir/ir.pb.h delete mode 100644 3rdparty/dawn/src/tint/utils/strconv/parse_num.cc delete mode 100644 3rdparty/dawn/src/tint/utils/strconv/parse_num.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/LICENSE delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/algorithm/algorithm.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/algorithm/container.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/attributes.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/c_header_test.c delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/call_once.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/casts.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/config.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/const_init.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/dynamic_annotations.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/fast_type_id.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/internal/atomic_hook.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/internal/cycleclock.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/internal/cycleclock_config.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/internal/direct_mmap.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/internal/endian.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/internal/errno_saver.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/internal/hide_ptr.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/internal/identity.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/internal/iterator_traits.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/internal/low_level_alloc.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/internal/low_level_scheduling.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/internal/per_thread_tls.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/internal/poison.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/internal/pretty_function.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/internal/raw_logging.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/internal/scheduling_mode.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/internal/scoped_set_env.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/internal/spinlock.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/internal/spinlock_akaros.inc delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/internal/spinlock_linux.inc delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/internal/spinlock_posix.inc delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/internal/spinlock_wait.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/internal/spinlock_win32.inc delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/internal/strerror.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/internal/sysinfo.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/internal/thread_identity.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/internal/throw_delegate.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/internal/tracing.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/internal/tsan_mutex_interface.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/internal/unaligned_access.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock_config.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/log_severity.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/macros.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/no_destructor.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/nullability.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/optimization.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/options.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/policy_checks.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/port.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/prefetch.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/base/thread_annotations.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/container/btree_map.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/container/btree_set.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/container/fixed_array.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/container/flat_hash_map.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/container/flat_hash_set.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/container/hash_container_defaults.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/container/inlined_vector.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/container/internal/btree.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/container/internal/btree_container.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/container/internal/common.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/container/internal/common_policy_traits.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/container/internal/compressed_tuple.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/container/internal/container_memory.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/container/internal/hash_function_defaults.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/container/internal/hash_policy_traits.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/container/internal/hashtable_control_bytes.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/container/internal/hashtable_debug.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/container/internal/hashtable_debug_hooks.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/container/internal/inlined_vector.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/container/internal/layout.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/container/internal/node_slot_policy.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/container/internal/raw_hash_map.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/container/internal/raw_hash_set.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/container/internal/raw_hash_set_resize_impl.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/container/internal/test_allocator.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/container/internal/test_instance_tracker.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/container/internal/tracked.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/container/node_hash_map.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/container/node_hash_set.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/crc/crc32c.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/crc/internal/cpu_detect.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/crc/internal/crc.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/crc/internal/crc32_x86_arm_combined_simd.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/crc/internal/crc32c.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/crc/internal/crc32c_inline.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/crc/internal/crc_cord_state.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/crc/internal/crc_internal.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/crc/internal/crc_memcpy.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/crc/internal/non_temporal_arm_intrinsics.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/crc/internal/non_temporal_memcpy.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/debugging/failure_signal_handler.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/debugging/internal/address_is_readable.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/debugging/internal/addresses.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/debugging/internal/bounded_utf8_length_sequence.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/debugging/internal/decode_rust_punycode.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/debugging/internal/demangle.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/debugging/internal/demangle_rust.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/debugging/internal/examine_stack.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/debugging/internal/stack_consumption.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/debugging/internal/stacktrace_aarch64-inl.inc delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/debugging/internal/stacktrace_arm-inl.inc delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/debugging/internal/stacktrace_config.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/debugging/internal/stacktrace_emscripten-inl.inc delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/debugging/internal/stacktrace_generic-inl.inc delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/debugging/internal/stacktrace_powerpc-inl.inc delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/debugging/internal/stacktrace_riscv-inl.inc delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/debugging/internal/stacktrace_unimplemented-inl.inc delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/debugging/internal/stacktrace_win32-inl.inc delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/debugging/internal/stacktrace_x86-inl.inc delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/debugging/internal/symbolize.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/debugging/internal/utf8_for_code_point.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/debugging/internal/vdso_support.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/debugging/leak_check.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/debugging/stacktrace.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/debugging/symbolize.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/debugging/symbolize_darwin.inc delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/debugging/symbolize_elf.inc delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/debugging/symbolize_emscripten.inc delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/debugging/symbolize_unimplemented.inc delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/debugging/symbolize_win32.inc delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/functional/any_invocable.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/functional/bind_front.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/functional/function_ref.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/functional/internal/any_invocable.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/functional/internal/front_binder.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/functional/internal/function_ref.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/functional/overload.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/hash/hash.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/hash/internal/city.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/hash/internal/hash.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/hash/internal/weakly_mixed_integer.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/absl_check.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/absl_log.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/absl_vlog_is_on.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/check.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/check_test_impl.inc delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/die_if_null.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/flags.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/globals.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/initialize.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/internal/append_truncated.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/internal/check_impl.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/internal/check_op.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/internal/conditions.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/internal/config.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/internal/flags.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/internal/fnmatch.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/internal/globals.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/internal/log_format.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/internal/log_impl.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/internal/log_message.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/internal/log_sink_set.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/internal/nullguard.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/internal/nullstream.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/internal/proto.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/internal/strip.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/internal/structured.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/internal/structured_proto.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/internal/test_actions.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/internal/test_helpers.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/internal/test_matchers.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/internal/vlog_config.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/internal/voidify.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/log.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/log_basic_test_impl.inc delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/log_entry.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/log_sink.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/log_sink_registry.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/log_streamer.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/scoped_mock_log.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/structured.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/log/vlog_is_on.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/memory/memory.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/meta/type_traits.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/numeric/bits.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/numeric/int128.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/numeric/int128_have_intrinsic.inc delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/numeric/int128_no_intrinsic.inc delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/numeric/internal/bits.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/numeric/internal/representation.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/profiling/hashtable.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/profiling/internal/exponential_biased.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/profiling/internal/periodic_sampler.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/profiling/internal/profile_builder.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/profiling/internal/sample_recorder.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/charconv.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/charset.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/cord.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/cord_analysis.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/cord_buffer.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/escaping.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/has_absl_stringify.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/has_ostream_operator.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/charconv_bigint.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/charconv_parse.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/cord_data_edge.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/cord_internal.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree_navigator.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree_reader.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/cord_rep_consume.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/cord_rep_crc.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/cord_rep_flat.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/cord_rep_test_util.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/cordz_functions.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/cordz_handle.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/cordz_info.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/cordz_sample_token.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/cordz_statistics.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/cordz_update_scope.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/cordz_update_tracker.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/damerau_levenshtein_distance.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/escaping.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/escaping_test_common.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/memutil.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/numbers_test_common.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/ostringstream.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/pow10_helper.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/resize_uninitialized.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/stl_type_traits.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/str_format/arg.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/str_format/bind.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/str_format/checker.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/str_format/constexpr_parser.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/str_format/output.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/str_format/parser.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/str_join_internal.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/str_split_internal.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/string_constant.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/stringify_sink.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/internal/utf8.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/match.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/numbers.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/str_cat.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/str_format.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/str_join.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/str_replace.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/str_split.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/strings/string_view.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/synchronization/barrier.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/synchronization/blocking_counter.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/synchronization/internal/create_thread_identity.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/synchronization/internal/futex.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/synchronization/internal/futex_waiter.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/synchronization/internal/kernel_timeout.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/synchronization/internal/pthread_waiter.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/synchronization/internal/sem_waiter.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/synchronization/internal/stdcpp_waiter.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/synchronization/internal/thread_pool.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/synchronization/internal/waiter.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/synchronization/internal/waiter_base.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/synchronization/internal/win32_waiter.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/synchronization/mutex.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/synchronization/notification.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/time/civil_time.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/time/clock.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/civil_time.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/civil_time_detail.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/time_zone.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/zone_info_source.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/time/internal/cctz/src/test_time_zone_names.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_fixed.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_if.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_info.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_libc.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_posix.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/time/internal/cctz/src/tzfile.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/time/internal/get_current_time_chrono.inc delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/time/internal/get_current_time_posix.inc delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/time/internal/test_util.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/time/time.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/types/compare.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/types/internal/span.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/types/optional.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/types/span.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/types/variant.h delete mode 100644 3rdparty/dawn/third_party/abseil-cpp/absl/utility/utility.h delete mode 100644 3rdparty/dawn/third_party/protobuf/LICENSE delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/any.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/arena.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/arena_align.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/arena_allocation_policy.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/arena_cleanup.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/arenastring.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/arenaz_sampler.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/descriptor.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/descriptor_lite.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/endian.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/explicitly_constructed.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/extension_set.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/generated_enum_reflection.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/generated_enum_util.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/generated_message_bases.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/generated_message_reflection.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/generated_message_tctable_decl.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/generated_message_tctable_impl.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/generated_message_util.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/has_bits.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/implicit_weak_message.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/inlined_string_field.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/internal_visibility.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/io/coded_stream.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/io/zero_copy_stream.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/map.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/message.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/message_lite.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/metadata_lite.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/micro_string.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/parse_context.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/port.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/port_def.inc delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/port_undef.inc delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/raw_ptr.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/reflection.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/reflection_ops.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/repeated_field.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/repeated_ptr_field.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/runtime_version.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/serial_arena.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/string_block.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/stubs/common.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/stubs/platform_macros.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/stubs/port.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/text_format.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/thread_safe_arena.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/unknown_field_set.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/wire_format.h delete mode 100644 3rdparty/dawn/third_party/protobuf/src/google/protobuf/wire_format_lite.h diff --git a/3rdparty/dawn/include/webgpu/webgpu.h b/3rdparty/dawn/include/webgpu/webgpu.h index 6c57aafda..088297f4a 100644 --- a/3rdparty/dawn/include/webgpu/webgpu.h +++ b/3rdparty/dawn/include/webgpu/webgpu.h @@ -611,6 +611,7 @@ typedef enum WGPUFeatureName { WGPUFeatureName_SharedBufferMemoryD3D12SharedMemoryFileMappingHandle = 0x00050038, WGPUFeatureName_SharedTextureMemoryD3D12Resource = 0x00050039, WGPUFeatureName_ChromiumExperimentalSamplingResourceTable = 0x0005003A, + WGPUFeatureName_ChromiumExperimentalSubgroupSizeControl = 0x0005003B, WGPUFeatureName_Force32 = 0x7FFFFFFF } WGPUFeatureName WGPU_ENUM_ATTRIBUTE; diff --git a/3rdparty/dawn/src/tint/lang/core/ir/binary/decode.cc b/3rdparty/dawn/src/tint/lang/core/ir/binary/decode.cc deleted file mode 100644 index c9c961015..000000000 --- a/3rdparty/dawn/src/tint/lang/core/ir/binary/decode.cc +++ /dev/null @@ -1,2097 +0,0 @@ -// Copyright 2023 The Dawn & Tint Authors -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// 3. Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "src/tint/lang/core/ir/binary/decode.h" - -#include -#include -#include -#include - -#include "src/tint/lang/core/ir/builder.h" -#include "src/tint/lang/core/ir/control_instruction.h" -#include "src/tint/lang/core/ir/module.h" -#include "src/tint/lang/core/type/binding_array.h" -#include "src/tint/lang/core/type/builtin_structs.h" -#include "src/tint/lang/core/type/depth_multisampled_texture.h" -#include "src/tint/lang/core/type/depth_texture.h" -#include "src/tint/lang/core/type/external_texture.h" -#include "src/tint/lang/core/type/function.h" -#include "src/tint/lang/core/type/input_attachment.h" -#include "src/tint/lang/core/type/invalid.h" -#include "src/tint/lang/core/type/multisampled_texture.h" -#include "src/tint/lang/core/type/sampled_texture.h" -#include "src/tint/lang/core/type/storage_texture.h" -#include "src/tint/lang/core/type/vector.h" -#include "src/tint/utils/containers/hashset.h" -#include "src/tint/utils/containers/transform.h" -#include "src/tint/utils/diagnostic/diagnostic.h" -#include "src/tint/utils/internal_limits.h" -#include "src/tint/utils/macros/compiler.h" -#include "src/tint/utils/result.h" -#include "src/tint/utils/text/string.h" -#include "src/tint/utils/text/text_style.h" - -TINT_BEGIN_DISABLE_PROTOBUF_WARNINGS(); -#include "src/tint/utils/protos/ir/ir.pb.h" -TINT_END_DISABLE_PROTOBUF_WARNINGS(); - -using namespace tint::core::fluent_types; // NOLINT - -namespace tint::core::ir::binary { -namespace { - -struct Decoder { - const pb::Module& mod_in_; - - Module mod_out_{}; - Vector blocks_{}; - Vector types_{}; - Vector constant_values_{}; - Vector values_{}; - Builder b{mod_out_}; - - Vector exit_ifs_{}; - Vector exit_switches_{}; - Vector exit_loops_{}; - Vector next_iterations_{}; - Vector break_ifs_{}; - Vector continues_{}; - - std::stringstream err_{}; - Hashset struct_names_{}; - - Result Decode() { - { - const size_t n = static_cast(mod_in_.types().size()); - types_.Reserve(n); - for (auto& type_in : mod_in_.types()) { - types_.Push(CreateType(type_in)); - } - } - { - const size_t n = static_cast(mod_in_.functions().size()); - mod_out_.functions.Reserve(n); - for (auto& fn_in : mod_in_.functions()) { - mod_out_.functions.Push(CreateFunction(fn_in)); - } - } - { - const size_t n = static_cast(mod_in_.blocks().size()); - blocks_.Reserve(n); - for (size_t i = 0; i < n; i++) { - auto id = static_cast(i); - if (id == mod_in_.root_block()) { - blocks_.Push(mod_out_.root_block); - } else { - auto& block_in = mod_in_.blocks()[static_cast(i)]; - blocks_.Push(CreateBlock(block_in)); - } - } - } - { - const size_t n = static_cast(mod_in_.constant_values().size()); - constant_values_.Reserve(n); - for (auto& value_in : mod_in_.constant_values()) { - constant_values_.Push(CreateConstantValue(value_in)); - } - } - { - const size_t n = static_cast(mod_in_.values().size()); - values_.Reserve(n); - for (auto& value_in : mod_in_.values()) { - values_.Push(CreateValue(value_in)); - } - } - for (size_t i = 0, n = static_cast(mod_in_.functions().size()); i < n; i++) { - PopulateFunction(mod_out_.functions[i], mod_in_.functions()[static_cast(i)]); - } - for (size_t i = 0, n = static_cast(mod_in_.blocks().size()); i < n; i++) { - PopulateBlock(blocks_[i], mod_in_.blocks()[static_cast(i)]); - } - - auto err = err_.str(); - if (!err.empty()) { - // Note: Its not safe to call InferControlInstruction() with a broken IR. - return Failure{err}; - } - - if (CheckBlocks()) { - for (auto* exit : exit_ifs_) { - InferControlInstruction(exit, &ExitIf::SetIf); - } - for (auto* exit : exit_switches_) { - InferControlInstruction(exit, &ExitSwitch::SetSwitch); - } - for (auto* exit : exit_loops_) { - InferControlInstruction(exit, &ExitLoop::SetLoop); - } - for (auto* break_ifs : break_ifs_) { - InferControlInstruction(break_ifs, &BreakIf::SetLoop); - } - for (auto* next_iters : next_iterations_) { - InferControlInstruction(next_iters, &NextIteration::SetLoop); - } - for (auto* cont : continues_) { - InferControlInstruction(cont, &Continue::SetLoop); - } - } - - err = err_.str(); - if (!err.empty()) { - return Failure{err}; - } - return std::move(mod_out_); - } - - /// Errors if @p number is not finite. - /// @returns @p number if finite, otherwise 0. - template - Number CheckFinite(Number number) { - if (DAWN_UNLIKELY(!std::isfinite(number.value))) { - err_ << "value must be finite\n"; - return Number{}; - } - return number; - } - - /// Checks that the given @p name is valid. - /// @returns true if the name is valid. - bool CheckName(const std::string& name, const char* kind) { - if (DAWN_UNLIKELY(name.find('\0') != std::string::npos)) { - err_ << kind << " '" << name << "' contains '\\0' before end of the string\n"; - return false; - } - - // Reject excessively long names as they cause problems in some backends. - if (DAWN_UNLIKELY(name.length() > 16384)) { - err_ << kind << " '" << name << "' is longer than 16384 characters\n"; - return false; - } - return true; - } - - /// @returns true if all blocks are reachable, acyclic nesting depth is less than or equal to - /// kMaxBlockDepth. - bool CheckBlocks() { - const size_t kMaxBlockDepth = 128; - Vector, 32> pending; - pending.Push(std::make_pair(mod_out_.root_block, 0)); - for (auto& fn : mod_out_.functions) { - pending.Push(std::make_pair(fn->Block(), 0)); - } - Hashset seen; - while (!pending.IsEmpty()) { - const auto block_depth = pending.Pop(); - const auto* block = block_depth.first; - const size_t depth = block_depth.second; - if (!seen.Add(block)) { - err_ << "cyclic nesting of blocks\n"; - return false; - } - if (depth > kMaxBlockDepth) { - err_ << "block nesting exceeds " << kMaxBlockDepth << "\n"; - return false; - } - for (auto* inst = block->Instructions(); inst; inst = inst->next) { - if (auto* ctrl = inst->As()) { - ctrl->ForeachBlock([&](const ir::Block* child) { - pending.Push(std::make_pair(child, depth + 1)); - }); - } - } - } - - for (auto* block : blocks_) { - if (!seen.Contains(block)) { - err_ << "unreachable block\n"; - return false; - } - } - - return true; - } - - template - void InferControlInstruction(EXIT* exit, void (EXIT::*set)(CTRL_INST*)) { - for (auto* block = exit->Block(); block;) { - auto* parent = block->Parent(); - if (!parent) { - break; - } - if (auto* ctrl_inst = parent->template As()) { - (exit->*set)(ctrl_inst); - break; - } - block = parent->Block(); - } - } - - //////////////////////////////////////////////////////////////////////////// - // Functions - //////////////////////////////////////////////////////////////////////////// - ir::Function* CreateFunction(const pb::Function&) { - auto* result = mod_out_.CreateValue(); - result->SetType(mod_out_.Types().function()); - return result; - } - - void PopulateFunction(ir::Function* fn_out, const pb::Function& fn_in) { - if (!fn_in.name().empty()) { - if (CheckName(fn_in.name(), "function name")) { - mod_out_.SetName(fn_out, fn_in.name()); - } - } - fn_out->SetReturnType(Type(fn_in.return_type())); - if (fn_in.has_pipeline_stage()) { - if (PipelineStage_IsValid(fn_in.pipeline_stage())) { - fn_out->SetStage(PipelineStage(fn_in.pipeline_stage())); - } else { - err_ << "invalid pipe line state, " << std::to_string(fn_in.pipeline_stage()) - << "\n"; - } - } - if (fn_in.has_workgroup_size()) { - auto& wg_size_in = fn_in.workgroup_size(); - // TODO(dsinclair): When overrides are supported we should add support for generating - // override expressions here. - fn_out->SetWorkgroupSize(Value(wg_size_in.x()), Value(wg_size_in.y()), - Value(wg_size_in.z())); - } - - if (fn_in.has_subgroup_size()) { - uint32_t subgroup_size_in = fn_in.subgroup_size(); - fn_out->SetSubgroupSize(Value(subgroup_size_in)); - } - - Vector params_out; - for (auto param_in : fn_in.parameters()) { - auto* param_out = ValueAs(param_in); - if (DAWN_LIKELY(param_out)) { - params_out.Push(param_out); - } - } - if (fn_in.has_return_location()) { - fn_out->SetReturnLocation(fn_in.return_location()); - } - if (fn_in.has_return_interpolation()) { - fn_out->SetReturnInterpolation(Interpolation(fn_in.return_interpolation())); - } - if (fn_in.has_return_builtin()) { - fn_out->SetReturnBuiltin(BuiltinValue(fn_in.return_builtin())); - } - if (fn_in.return_invariant()) { - fn_out->SetReturnInvariant(true); - } - fn_out->SetParams(std::move(params_out)); - fn_out->SetBlock(Block(fn_in.block())); - } - - ir::Function* Function(uint32_t id) { - if (DAWN_UNLIKELY(id >= mod_out_.functions.Length())) { - err_ << "function id " << id << " out of range\n"; - return nullptr; - } - return mod_out_.functions[id]; - } - - Function::PipelineStage PipelineStage(pb::PipelineStage stage) { - switch (stage) { - case pb::PipelineStage::Compute: - return Function::PipelineStage::kCompute; - case pb::PipelineStage::Fragment: - return Function::PipelineStage::kFragment; - case pb::PipelineStage::Vertex: - return Function::PipelineStage::kVertex; - - case pb::PipelineStage::PipelineStage_INT_MIN_SENTINEL_DO_NOT_USE_: - case pb::PipelineStage::PipelineStage_INT_MAX_SENTINEL_DO_NOT_USE_: - break; - } - TINT_ICE() << "unhandled PipelineStage: " << stage; - } - - //////////////////////////////////////////////////////////////////////////// - // Blocks - //////////////////////////////////////////////////////////////////////////// - ir::Block* CreateBlock(const pb::Block& block_in) { - return block_in.is_multi_in() ? b.MultiInBlock() : b.Block(); - } - - void PopulateBlock(ir::Block* block_out, const pb::Block& block_in) { - if (auto* mib = block_out->As()) { - Vector params; - for (auto param_in : block_in.parameters()) { - auto* param_out = ValueAs(param_in); - if (DAWN_LIKELY(param_out)) { - params.Push(param_out); - } - } - mib->SetParams(std::move(params)); - } - for (auto& inst : block_in.instructions()) { - block_out->Append(Instruction(inst)); - } - } - - ir::Block* Block(uint32_t id) { - if (DAWN_UNLIKELY(id >= blocks_.Length())) { - err_ << "block id " << id << " out of range\n"; - return b.Block(); - } - return blocks_[id]; - } - - template - T* BlockAs(uint32_t id) { - auto* block = Block(id); - if (auto cast = As(block); DAWN_LIKELY(cast)) { - return cast; - } - err_ << "block " << id << " is " << (block ? block->TypeInfo().name : "") - << " expected " << TypeInfo::Of().name << "\n"; - return nullptr; - } - - //////////////////////////////////////////////////////////////////////////// - // Instructions - //////////////////////////////////////////////////////////////////////////// - ir::Instruction* Instruction(const pb::Instruction& inst_in) { - ir::Instruction* inst_out = nullptr; - switch (inst_in.kind_case()) { - case pb::Instruction::KindCase::kAccess: - inst_out = CreateInstructionAccess(inst_in.access()); - break; - case pb::Instruction::KindCase::kBinary: - inst_out = CreateInstructionBinary(inst_in.binary()); - break; - case pb::Instruction::KindCase::kBitcast: - inst_out = CreateInstructionBitcast(inst_in.bitcast()); - break; - case pb::Instruction::KindCase::kBreakIf: - inst_out = CreateInstructionBreakIf(inst_in.break_if()); - break; - case pb::Instruction::KindCase::kBuiltinCall: - inst_out = CreateInstructionBuiltinCall(inst_in.builtin_call()); - break; - case pb::Instruction::KindCase::kConstruct: - inst_out = CreateInstructionConstruct(inst_in.construct()); - break; - case pb::Instruction::KindCase::kContinue: - inst_out = CreateInstructionContinue(inst_in.continue_()); - break; - case pb::Instruction::KindCase::kConvert: - inst_out = CreateInstructionConvert(inst_in.convert()); - break; - case pb::Instruction::KindCase::kExitIf: - inst_out = CreateInstructionExitIf(inst_in.exit_if()); - break; - case pb::Instruction::KindCase::kExitLoop: - inst_out = CreateInstructionExitLoop(inst_in.exit_loop()); - break; - case pb::Instruction::KindCase::kExitSwitch: - inst_out = CreateInstructionExitSwitch(inst_in.exit_switch()); - break; - case pb::Instruction::KindCase::kDiscard: - inst_out = CreateInstructionDiscard(inst_in.discard()); - break; - case pb::Instruction::KindCase::kIf: - inst_out = CreateInstructionIf(inst_in.if_()); - break; - case pb::Instruction::KindCase::kLet: - inst_out = CreateInstructionLet(inst_in.let()); - break; - case pb::Instruction::KindCase::kLoad: - inst_out = CreateInstructionLoad(inst_in.load()); - break; - case pb::Instruction::KindCase::kLoadVectorElement: - inst_out = CreateInstructionLoadVectorElement(inst_in.load_vector_element()); - break; - case pb::Instruction::KindCase::kLoop: - inst_out = CreateInstructionLoop(inst_in.loop()); - break; - case pb::Instruction::KindCase::kNextIteration: - inst_out = CreateInstructionNextIteration(inst_in.next_iteration()); - break; - case pb::Instruction::KindCase::kReturn: - inst_out = CreateInstructionReturn(inst_in.return_()); - break; - case pb::Instruction::KindCase::kStore: - inst_out = CreateInstructionStore(inst_in.store()); - break; - case pb::Instruction::KindCase::kStoreVectorElement: - inst_out = CreateInstructionStoreVectorElement(inst_in.store_vector_element()); - break; - case pb::Instruction::KindCase::kSwizzle: - inst_out = CreateInstructionSwizzle(inst_in.swizzle()); - break; - case pb::Instruction::KindCase::kSwitch: - inst_out = CreateInstructionSwitch(inst_in.switch_()); - break; - case pb::Instruction::KindCase::kUnary: - inst_out = CreateInstructionUnary(inst_in.unary()); - break; - case pb::Instruction::KindCase::kUserCall: - inst_out = CreateInstructionUserCall(inst_in.user_call()); - break; - case pb::Instruction::KindCase::kVar: - inst_out = CreateInstructionVar(inst_in.var()); - break; - case pb::Instruction::KindCase::kUnreachable: - inst_out = CreateInstructionUnreachable(inst_in.unreachable()); - break; - case pb::Instruction::KindCase::KIND_NOT_SET: - break; - } - if (!inst_out) { - err_ << "invalid Instruction.kind: " << std::to_string(inst_in.kind_case()) << "\n"; - return b.Let(mod_out_.Types().invalid()); - } - - TINT_ASSERT(inst_out); - - Vector operands; - for (auto id : inst_in.operands()) { - operands.Push(Value(id)); - } - inst_out->SetOperands(std::move(operands)); - - Vector results; - for (auto id : inst_in.results()) { - results.Push(ValueAs(id)); - } - inst_out->SetResults(std::move(results)); - - if (inst_in.has_break_if()) { - auto num_next_iter_values = inst_in.break_if().num_next_iter_values(); - bool is_valid = - inst_out->Operands().Length() >= num_next_iter_values + BreakIf::kArgsOperandOffset; - if (DAWN_LIKELY(is_valid)) { - static_cast(inst_out)->SetNumNextIterValues( - inst_in.break_if().num_next_iter_values()); - } else { - err_ << "invalid value for num_next_iter_values()\n"; - } - } - - return inst_out; - } - - ir::Access* CreateInstructionAccess(const pb::InstructionAccess&) { - return mod_out_.CreateInstruction(); - } - - ir::CoreBinary* CreateInstructionBinary(const pb::InstructionBinary& binary_in) { - if (!BinaryOp_IsValid(binary_in.op())) { - err_ << "invalid binary op, " << std::to_string(binary_in.op()) << "\n"; - return nullptr; - } - - auto* binary_out = mod_out_.CreateInstruction(); - binary_out->SetOp(BinaryOp(binary_in.op())); - return binary_out; - } - - ir::Bitcast* CreateInstructionBitcast(const pb::InstructionBitcast&) { - return mod_out_.CreateInstruction(); - } - - ir::BreakIf* CreateInstructionBreakIf(const pb::InstructionBreakIf&) { - auto* break_if_out = mod_out_.CreateInstruction(); - break_ifs_.Push(break_if_out); - return break_if_out; - } - - ir::CoreBuiltinCall* CreateInstructionBuiltinCall(const pb::InstructionBuiltinCall& call_in) { - auto* call_out = mod_out_.CreateInstruction(); - call_out->SetFunc(BuiltinFn(call_in.builtin())); - Vector params; - for (auto param : call_in.explicit_template_params()) { - params.Push(Type(param)); - } - call_out->SetExplicitTemplateParams(params); - return call_out; - } - - ir::Construct* CreateInstructionConstruct(const pb::InstructionConstruct&) { - return mod_out_.CreateInstruction(); - } - - ir::Continue* CreateInstructionContinue(const pb::InstructionContinue&) { - auto* continue_ = mod_out_.CreateInstruction(); - continues_.Push(continue_); - return continue_; - } - - ir::Convert* CreateInstructionConvert(const pb::InstructionConvert&) { - return mod_out_.CreateInstruction(); - } - - ir::ExitIf* CreateInstructionExitIf(const pb::InstructionExitIf&) { - auto* exit_out = mod_out_.CreateInstruction(); - exit_ifs_.Push(exit_out); - return exit_out; - } - - ir::ExitLoop* CreateInstructionExitLoop(const pb::InstructionExitLoop&) { - auto* exit_out = mod_out_.CreateInstruction(); - exit_loops_.Push(exit_out); - return exit_out; - } - - ir::ExitSwitch* CreateInstructionExitSwitch(const pb::InstructionExitSwitch&) { - auto* exit_out = mod_out_.CreateInstruction(); - exit_switches_.Push(exit_out); - return exit_out; - } - - ir::Discard* CreateInstructionDiscard(const pb::InstructionDiscard&) { - return mod_out_.CreateInstruction(); - } - - ir::If* CreateInstructionIf(const pb::InstructionIf& if_in) { - auto* if_out = mod_out_.CreateInstruction(); - if_out->SetTrue(if_in.has_true_() ? Block(if_in.true_()) : b.Block()); - if_out->SetFalse(if_in.has_false_() ? Block(if_in.false_()) : b.Block()); - return if_out; - } - - ir::Let* CreateInstructionLet(const pb::InstructionLet&) { - return mod_out_.CreateInstruction(); - } - - ir::Load* CreateInstructionLoad(const pb::InstructionLoad&) { - return mod_out_.CreateInstruction(); - } - - ir::LoadVectorElement* CreateInstructionLoadVectorElement( - const pb::InstructionLoadVectorElement&) { - return mod_out_.CreateInstruction(); - } - - ir::Loop* CreateInstructionLoop(const pb::InstructionLoop& loop_in) { - auto* loop_out = mod_out_.CreateInstruction(); - if (loop_in.has_initializer()) { - loop_out->SetInitializer(Block(loop_in.initializer())); - } else { - loop_out->SetInitializer(b.Block()); - } - loop_out->SetBody(BlockAs(loop_in.body())); - if (loop_in.has_continuing()) { - loop_out->SetContinuing(BlockAs(loop_in.continuing())); - } else { - loop_out->SetContinuing(b.MultiInBlock()); - } - return loop_out; - } - - ir::NextIteration* CreateInstructionNextIteration(const pb::InstructionNextIteration&) { - auto* next_it_out = mod_out_.CreateInstruction(); - next_iterations_.Push(next_it_out); - return next_it_out; - } - - ir::Return* CreateInstructionReturn(const pb::InstructionReturn&) { - return mod_out_.CreateInstruction(); - } - - ir::Store* CreateInstructionStore(const pb::InstructionStore&) { - return mod_out_.CreateInstruction(); - } - - ir::StoreVectorElement* CreateInstructionStoreVectorElement( - const pb::InstructionStoreVectorElement&) { - return mod_out_.CreateInstruction(); - } - - ir::Swizzle* CreateInstructionSwizzle(const pb::InstructionSwizzle& swizzle_in) { - auto* swizzle_out = mod_out_.CreateInstruction(); - Vector indices; - for (auto idx : swizzle_in.indices()) { - indices.Push(idx); - } - swizzle_out->SetIndices(indices); - return swizzle_out; - } - - ir::Switch* CreateInstructionSwitch(const pb::InstructionSwitch& switch_in) { - auto* switch_out = mod_out_.CreateInstruction(); - for (auto& case_in : switch_in.cases()) { - ir::Switch::Case case_out{}; - case_out.block = Block(case_in.block()); - case_out.block->SetParent(switch_out); - for (auto selector_in : case_in.selectors()) { - ir::Switch::CaseSelector selector_out{}; - selector_out.val = Constant(selector_in); - case_out.selectors.Push(std::move(selector_out)); - } - if (case_in.is_default()) { - ir::Switch::CaseSelector selector_out{}; - case_out.selectors.Push(std::move(selector_out)); - } - switch_out->Cases().Push(std::move(case_out)); - } - return switch_out; - } - - ir::CoreUnary* CreateInstructionUnary(const pb::InstructionUnary& unary_in) { - if (!UnaryOp_IsValid(unary_in.op())) { - err_ << "invalid unary op, " << std::to_string(unary_in.op()) << "\n"; - return nullptr; - } - auto* unary_out = mod_out_.CreateInstruction(); - unary_out->SetOp(UnaryOp(unary_in.op())); - return unary_out; - } - - ir::UserCall* CreateInstructionUserCall(const pb::InstructionUserCall&) { - return mod_out_.CreateInstruction(); - } - - ir::Var* CreateInstructionVar(const pb::InstructionVar& var_in) { - auto* var_out = mod_out_.CreateInstruction(); - if (var_in.has_binding_point()) { - auto& bp_in = var_in.binding_point(); - var_out->SetBindingPoint(bp_in.group(), bp_in.binding()); - } - if (var_in.has_input_attachment_index()) { - var_out->SetInputAttachmentIndex(var_in.input_attachment_index()); - } - return var_out; - } - - ir::Unreachable* CreateInstructionUnreachable(const pb::InstructionUnreachable&) { - return b.Unreachable(); - } - - //////////////////////////////////////////////////////////////////////////// - // Types - //////////////////////////////////////////////////////////////////////////// - const type::Type* CreateType(const pb::Type type_in) { - switch (type_in.kind_case()) { - case pb::Type::KindCase::kBasic: - return CreateTypeBasic(type_in.basic()); - case pb::Type::KindCase::kVector: - return CreateTypeVector(type_in.vector()); - case pb::Type::KindCase::kMatrix: - return CreateTypeMatrix(type_in.matrix()); - case pb::Type::KindCase::kPointer: - return CreateTypePointer(type_in.pointer()); - case pb::Type::KindCase::kStruct: - return CreateTypeStruct(type_in.struct_()); - case pb::Type::KindCase::kAtomic: - return CreateTypeAtomic(type_in.atomic()); - case pb::Type::KindCase::kArray: - return CreateTypeArray(type_in.array()); - case pb::Type::KindCase::kBindingArray: - return CreateTypeBindingArray(type_in.binding_array()); - case pb::Type::KindCase::kTexelBuffer: - return CreateTypeTexelBuffer(type_in.texel_buffer()); - case pb::Type::KindCase::kDepthTexture: - return CreateTypeDepthTexture(type_in.depth_texture()); - case pb::Type::KindCase::kSampledTexture: - return CreateTypeSampledTexture(type_in.sampled_texture()); - case pb::Type::KindCase::kMultisampledTexture: - return CreateTypeMultisampledTexture(type_in.multisampled_texture()); - case pb::Type::KindCase::kDepthMultisampledTexture: - return CreateTypeDepthMultisampledTexture(type_in.depth_multisampled_texture()); - case pb::Type::KindCase::kStorageTexture: - return CreateTypeStorageTexture(type_in.storage_texture()); - case pb::Type::KindCase::kExternalTexture: - return CreateTypeExternalTexture(type_in.external_texture()); - case pb::Type::KindCase::kSampler: - return CreateTypeSampler(type_in.sampler()); - case pb::Type::KindCase::kInputAttachment: - return CreateTypeInputAttachment(type_in.input_attachment()); - case pb::Type::KindCase::kSubgroupMatrixLeft: - return CreateTypeSubgroupMatrix(SubgroupMatrixKind::kLeft, - type_in.subgroup_matrix_left()); - case pb::Type::KindCase::kSubgroupMatrixRight: - return CreateTypeSubgroupMatrix(SubgroupMatrixKind::kRight, - type_in.subgroup_matrix_right()); - case pb::Type::KindCase::kSubgroupMatrixResult: - return CreateTypeSubgroupMatrix(SubgroupMatrixKind::kResult, - type_in.subgroup_matrix_result()); - case pb::Type::KindCase::kBuiltinStruct: - return CreateTypeBuiltinStruct(type_in.builtin_struct()); - case pb::Type::KindCase::kBuffer: - return CreateTypeBuffer(type_in.buffer()); - case pb::Type::KindCase::KIND_NOT_SET: - break; - } - - err_ << "invalid Type.kind: " << std::to_string(type_in.kind_case()) << "\n"; - return mod_out_.Types().invalid(); - } - - const type::Type* CreateTypeBasic(pb::TypeBasic basic_in) { - if (!TypeBasic_IsValid(basic_in)) { - err_ << "invalid basic type, " << std::to_string(basic_in) << "\n"; - return mod_out_.Types().invalid(); - } - - switch (basic_in) { - case pb::TypeBasic::void_: - return mod_out_.Types().void_(); - case pb::TypeBasic::bool_: - return mod_out_.Types().bool_(); - case pb::TypeBasic::i32: - return mod_out_.Types().i32(); - case pb::TypeBasic::u32: - return mod_out_.Types().u32(); - case pb::TypeBasic::f32: - return mod_out_.Types().f32(); - case pb::TypeBasic::f16: - return mod_out_.Types().f16(); - case pb::TypeBasic::i8: - return mod_out_.Types().i8(); - case pb::TypeBasic::u8: - return mod_out_.Types().u8(); - - case pb::TypeBasic::TypeBasic_INT_MIN_SENTINEL_DO_NOT_USE_: - case pb::TypeBasic::TypeBasic_INT_MAX_SENTINEL_DO_NOT_USE_: - break; - } - - err_ << "invalid TypeBasic: " << std::to_string(basic_in) << "\n"; - return mod_out_.Types().invalid(); - } - - const type::Type* CreateTypeVector(const pb::TypeVector& vector_in) { - const auto width = vector_in.width(); - if (DAWN_UNLIKELY(width < 2 || width > 4)) { - err_ << "invalid vector width\n"; - return mod_out_.Types().invalid(); - } - auto* el_ty = Type(vector_in.element_type()); - if (el_ty == nullptr) { - err_ << "vector element type is invalid\n"; - return mod_out_.Types().invalid(); - } - return mod_out_.Types().vec(el_ty, vector_in.width()); - } - - const type::Type* CreateTypeMatrix(const pb::TypeMatrix& matrix_in) { - const auto rows = matrix_in.num_rows(); - const auto cols = matrix_in.num_columns(); - if (DAWN_UNLIKELY(rows < 2 || rows > 4 || cols < 2 || cols > 4)) { - err_ << "invalid matrix dimensions\n"; - return mod_out_.Types().invalid(); - } - auto* el_ty = Type(matrix_in.element_type()); - if (el_ty == nullptr) { - err_ << "matrix element type is invalid\n"; - return mod_out_.Types().invalid(); - } - auto* column_ty = mod_out_.Types().vec(el_ty, matrix_in.num_rows()); - return mod_out_.Types().mat(column_ty, matrix_in.num_columns()); - } - - const type::Type* CreateTypePointer(const pb::TypePointer& pointer_in) { - auto address_space = AddressSpace(pointer_in.address_space()); - auto* store_ty = Type(pointer_in.store_type()); - if (!store_ty) { - err_ << "pointer must have a store type\n"; - return mod_out_.Types().invalid(); - } - - auto access = AccessControl(pointer_in.access()); - return mod_out_.Types().ptr(address_space, store_ty, access); - } - - const type::Type* CreateTypeStruct(const pb::TypeStruct& struct_in) { - auto struct_name = struct_in.name(); - if (DAWN_UNLIKELY(struct_name.empty())) { - err_ << "struct must have a name\n"; - return mod_out_.Types().invalid(); - } - - if (!CheckName(struct_name, "struct name")) { - return mod_out_.Types().invalid(); - } - - if (!struct_names_.Add(struct_name)) { - err_ << "duplicate struct name: " << struct_name << "\n"; - return mod_out_.Types().invalid(); - } - - Vector members_out; - uint32_t offset = 0; - for (auto& member_in : struct_in.member()) { - auto member_name = member_in.name(); - if (DAWN_UNLIKELY(member_name.empty())) { - err_ << "struct member must have a name\n"; - return mod_out_.Types().invalid(); - } - - if (!CheckName(member_name, "member name")) { - return mod_out_.Types().invalid(); - } - - auto symbol = mod_out_.symbols.Register(member_name); - auto* type = Type(member_in.type()); - if (type == nullptr) { - err_ << "struct member '" << member_name << "' type is invalid\n"; - return mod_out_.Types().invalid(); - } - - auto index = static_cast(members_out.Length()); - auto align = member_in.align(); - auto size = member_in.size(); - core::IOAttributes attributes_out{}; - if (member_in.has_attributes()) { - auto& attributes_in = member_in.attributes(); - if (attributes_in.has_location()) { - attributes_out.location = attributes_in.location(); - } - if (attributes_in.has_blend_src()) { - attributes_out.blend_src = attributes_in.blend_src(); - } - if (attributes_in.has_color()) { - attributes_out.color = attributes_in.color(); - } - if (attributes_in.has_builtin()) { - attributes_out.builtin = BuiltinValue(attributes_in.builtin()); - } - if (attributes_in.has_interpolation()) { - auto& interpolation_in = attributes_in.interpolation(); - attributes_out.interpolation = Interpolation(interpolation_in); - } - attributes_out.invariant = attributes_in.invariant(); - } - offset = RoundUp(align, offset); - auto* member_out = mod_out_.Types().Get( - symbol, type, index, offset, align, size, std::move(attributes_out)); - offset += size; - members_out.Push(member_out); - } - if (DAWN_UNLIKELY(members_out.IsEmpty())) { - err_ << "struct requires at least one member\n"; - return mod_out_.Types().invalid(); - } - auto name = mod_out_.symbols.Register(struct_name); - return mod_out_.Types().Struct(name, std::move(members_out)); - } - - const type::Type* CreateTypeAtomic(const pb::TypeAtomic& atomic_in) { - const auto* el_ty = Type(atomic_in.type()); - if (el_ty == nullptr) { - err_ << "invalid atomic element type\n"; - return mod_out_.Types().invalid(); - } - return mod_out_.Types().atomic(el_ty); - } - - const type::Type* CreateTypeArray(const pb::TypeArray& array_in) { - auto* element = Type(array_in.element()); - uint32_t count = array_in.count(); - if (count >= internal_limits::kMaxArrayElementCount) { - err_ << "array count (" << count << ") must be less than " - << internal_limits::kMaxArrayElementCount << "\n"; - return mod_out_.Types().invalid(); - } - if (element == nullptr) { - err_ << "array element type is invalid\n"; - return mod_out_.Types().invalid(); - } - - return count > 0 ? mod_out_.Types().array(element, count) - : mod_out_.Types().runtime_array(element); - } - - const type::Type* CreateTypeBindingArray(const pb::TypeBindingArray& array_in) { - auto* element = Type(array_in.element()); - uint32_t count = array_in.count(); - - if (count >= internal_limits::kMaxArrayElementCount) { - err_ << "binding_array count (" << count << ") must be less than " - << internal_limits::kMaxArrayElementCount << "\n"; - return mod_out_.Types().invalid(); - } - if (element == nullptr) { - err_ << "binding array element type is invalid\n"; - return mod_out_.Types().invalid(); - } - - return mod_out_.Types().binding_array(element, count); - } - - const type::Type* CreateTypeDepthTexture(const pb::TypeDepthTexture& texture_in) { - auto dimension = TextureDimension(texture_in.dimension()); - if (!type::DepthTexture::IsValidDimension(dimension)) { - err_ << "invalid DepthTexture dimension\n"; - return mod_out_.Types().invalid(); - } - return mod_out_.Types().depth_texture(dimension); - } - - const type::Type* CreateTypeSampledTexture(const pb::TypeSampledTexture& texture_in) { - auto dimension = TextureDimension(texture_in.dimension()); - auto sub_type = Type(texture_in.sub_type()); - if (!sub_type) { - err_ << "invalid Sampled texture subtype\n"; - return mod_out_.Types().invalid(); - } - return mod_out_.Types().sampled_texture(dimension, sub_type); - } - - const type::Type* CreateTypeMultisampledTexture(const pb::TypeMultisampledTexture& texture_in) { - auto dimension = TextureDimension(texture_in.dimension()); - auto sub_type = Type(texture_in.sub_type()); - if (!sub_type) { - err_ << "invalid Multisampled texture subtype\n"; - return mod_out_.Types().invalid(); - } - return mod_out_.Types().multisampled_texture(dimension, sub_type); - } - - const type::Type* CreateTypeDepthMultisampledTexture( - const pb::TypeDepthMultisampledTexture& texture_in) { - auto dimension = TextureDimension(texture_in.dimension()); - if (!type::DepthMultisampledTexture::IsValidDimension(dimension)) { - err_ << "invalid DepthMultisampledTexture dimension\n"; - return mod_out_.Types().invalid(); - } - return mod_out_.Types().depth_multisampled_texture(dimension); - } - - const type::Type* CreateTypeStorageTexture(const pb::TypeStorageTexture& texture_in) { - auto dimension = TextureDimension(texture_in.dimension()); - auto texel_format = TexelFormat(texture_in.texel_format()); - auto sub_ty = mod_out_.Types().SubtypeFor(texel_format); - if (!sub_ty) { - err_ << "unable to create a sub-type for " << texel_format << "\n"; - return mod_out_.Types().invalid(); - } - - auto access = AccessControl(texture_in.access()); - return mod_out_.Types().storage_texture(dimension, texel_format, access); - } - - const type::Type* CreateTypeTexelBuffer(const pb::TypeTexelBuffer& buffer_in) { - auto texel_format = TexelFormat(buffer_in.texel_format()); - auto sub_ty = mod_out_.Types().SubtypeFor(texel_format); - if (!sub_ty) { - err_ << "unable to create a sub-type for " << texel_format << "\n"; - return mod_out_.Types().invalid(); - } - - auto access = AccessControl(buffer_in.access()); - return mod_out_.Types().texel_buffer(texel_format, access); - } - - const type::ExternalTexture* CreateTypeExternalTexture(const pb::TypeExternalTexture&) { - return mod_out_.Types().external_texture(); - } - - const type::Sampler* CreateTypeSampler(const pb::TypeSampler& sampler_in) { - if (!SamplerKind_IsValid(sampler_in.kind())) { - err_ << "invalid sampler kind, " << std::to_string(sampler_in.kind()) << "\n"; - return nullptr; - } - auto kind = SamplerKind(sampler_in.kind()); - return mod_out_.Types().Get(kind); - } - - const type::Type* CreateTypeInputAttachment(const pb::TypeInputAttachment& input_in) { - auto sub_type = Type(input_in.sub_type()); - if (!sub_type) { - err_ << "invalid Input attachment subtype\n"; - return mod_out_.Types().invalid(); - } - return mod_out_.Types().input_attachment(sub_type); - } - - const type::Type* CreateTypeSubgroupMatrix(SubgroupMatrixKind kind, - const pb::TypeSubgroupMatrix& subgroup_matrix) { - const auto el_ty = Type(subgroup_matrix.sub_type()); - if (el_ty == nullptr) { - err_ << "invalid subtype for subgroup matrix\n"; - return mod_out_.Types().invalid(); - } - return mod_out_.Types().subgroup_matrix(kind, el_ty, subgroup_matrix.columns(), - subgroup_matrix.rows()); - } - - const type::Type* CreateTypeBuffer(const pb::TypeBuffer&) { - err_ << "buffer types are not supported\n"; - return mod_out_.Types().invalid(); - } - - const type::Type* CreateTypeBuiltinStruct(pb::TypeBuiltinStruct builtin_struct_in) { - if (!TypeBuiltinStruct_IsValid(builtin_struct_in)) { - err_ << "invalid builtin struct type, " << std::to_string(builtin_struct_in) << "\n"; - return mod_out_.Types().invalid(); - } - - auto& ty = mod_out_.Types(); - const core::type::Struct* res = nullptr; - switch (builtin_struct_in) { - case pb::TypeBuiltinStruct::AtomicCompareExchangeResultI32: - res = type::CreateAtomicCompareExchangeResult(ty, mod_out_.symbols, ty.i32()); - break; - case pb::TypeBuiltinStruct::AtomicCompareExchangeResultU32: - res = type::CreateAtomicCompareExchangeResult(ty, mod_out_.symbols, ty.u32()); - break; - case pb::TypeBuiltinStruct::FrexpResultF16: - res = type::CreateFrexpResult(ty, mod_out_.symbols, ty.f16()); - break; - case pb::TypeBuiltinStruct::FrexpResultF32: - res = type::CreateFrexpResult(ty, mod_out_.symbols, ty.f32()); - break; - case pb::TypeBuiltinStruct::FrexpResultVec2F16: - res = type::CreateFrexpResult(ty, mod_out_.symbols, ty.vec2h()); - break; - case pb::TypeBuiltinStruct::FrexpResultVec2F32: - res = type::CreateFrexpResult(ty, mod_out_.symbols, ty.vec2f()); - break; - case pb::TypeBuiltinStruct::FrexpResultVec3F16: - res = type::CreateFrexpResult(ty, mod_out_.symbols, ty.vec3h()); - break; - case pb::TypeBuiltinStruct::FrexpResultVec3F32: - res = type::CreateFrexpResult(ty, mod_out_.symbols, ty.vec3f()); - break; - case pb::TypeBuiltinStruct::FrexpResultVec4F16: - res = type::CreateFrexpResult(ty, mod_out_.symbols, ty.vec4h()); - break; - case pb::TypeBuiltinStruct::FrexpResultVec4F32: - res = type::CreateFrexpResult(ty, mod_out_.symbols, ty.vec4f()); - break; - case pb::TypeBuiltinStruct::ModfResultF16: - res = type::CreateModfResult(ty, mod_out_.symbols, ty.f16()); - break; - case pb::TypeBuiltinStruct::ModfResultF32: - res = type::CreateModfResult(ty, mod_out_.symbols, ty.f32()); - break; - case pb::TypeBuiltinStruct::ModfResultVec2F16: - res = type::CreateModfResult(ty, mod_out_.symbols, ty.vec2h()); - break; - case pb::TypeBuiltinStruct::ModfResultVec2F32: - res = type::CreateModfResult(ty, mod_out_.symbols, ty.vec2f()); - break; - case pb::TypeBuiltinStruct::ModfResultVec3F16: - res = type::CreateModfResult(ty, mod_out_.symbols, ty.vec2h()); - break; - case pb::TypeBuiltinStruct::ModfResultVec3F32: - res = type::CreateModfResult(ty, mod_out_.symbols, ty.vec3f()); - break; - case pb::TypeBuiltinStruct::ModfResultVec4F16: - res = type::CreateModfResult(ty, mod_out_.symbols, ty.vec2h()); - break; - case pb::TypeBuiltinStruct::ModfResultVec4F32: - res = type::CreateModfResult(ty, mod_out_.symbols, ty.vec4f()); - break; - - case pb::TypeBuiltinStruct::TypeBuiltinStruct_INT_MIN_SENTINEL_DO_NOT_USE_: - case pb::TypeBuiltinStruct::TypeBuiltinStruct_INT_MAX_SENTINEL_DO_NOT_USE_: - break; - } - - if (!res) { - err_ << "invalid TypeBuiltinStruct: " << std::to_string(builtin_struct_in) << "\n"; - return mod_out_.Types().invalid(); - } - - // Make sure this struct name wasn't already used by another struct in the module. - auto struct_name = res->Name().Name(); - if (!struct_names_.Add(struct_name)) { - err_ << "duplicate struct name: " << struct_name << "\n"; - return mod_out_.Types().invalid(); - } - return res; - } - - const type::Type* Type(size_t id) { - if (DAWN_UNLIKELY(id >= types_.Length())) { - err_ << "type id " << id << " out of range\n"; - return mod_out_.Types().invalid(); - } - return types_[id]; - } - - //////////////////////////////////////////////////////////////////////////// - // Values - //////////////////////////////////////////////////////////////////////////// - ir::Value* CreateValue(const pb::Value& value_in) { - ir::Value* value_out = nullptr; - switch (value_in.kind_case()) { - case pb::Value::KindCase::kFunction: - value_out = Function(value_in.function()); - break; - case pb::Value::KindCase::kInstructionResult: - value_out = InstructionResult(value_in.instruction_result()); - break; - case pb::Value::KindCase::kFunctionParameter: - value_out = FunctionParameter(value_in.function_parameter()); - break; - case pb::Value::KindCase::kBlockParameter: - value_out = BlockParameter(value_in.block_parameter()); - break; - case pb::Value::KindCase::kConstant: - value_out = Constant(value_in.constant()); - break; - case pb::Value::KindCase::KIND_NOT_SET: - break; - } - - if (!value_out) { - err_ << "invalid value kind: " << std::to_string(value_in.kind_case()) << "\n"; - return b.InvalidConstant(); - } - - return value_out; - } - - ir::InstructionResult* InstructionResult(const pb::InstructionResult& res_in) { - auto* type = Type(res_in.type()); - if (type == nullptr || type->Is()) { - err_ << "result '" << res_in.name() << "' has invalid type\n"; - return nullptr; - } - auto* res_out = b.InstructionResult(type); - if (!res_in.name().empty()) { - if (!CheckName(res_in.name(), "result name")) { - return nullptr; - } - mod_out_.SetName(res_out, res_in.name()); - } - return res_out; - } - - ir::FunctionParam* FunctionParameter(const pb::FunctionParameter& param_in) { - auto* type = Type(param_in.type()); - if (type == nullptr || type->Is()) { - err_ << "param '" << param_in.name() << "' has invalid type\n"; - return nullptr; - } - auto* param_out = b.FunctionParam(type); - if (!param_in.name().empty()) { - if (!CheckName(param_in.name(), "param name")) { - return nullptr; - } - mod_out_.SetName(param_out, param_in.name()); - } - - if (param_in.has_attributes()) { - auto& attrs_in = param_in.attributes(); - if (attrs_in.has_binding_point()) { - auto& bp_in = attrs_in.binding_point(); - param_out->SetBindingPoint(bp_in.group(), bp_in.binding()); - } - if (attrs_in.has_location()) { - param_out->SetLocation(attrs_in.location()); - } - if (attrs_in.has_color()) { - param_out->SetColor(attrs_in.color()); - } - if (attrs_in.has_interpolation()) { - param_out->SetInterpolation(Interpolation(attrs_in.interpolation())); - } - if (attrs_in.has_builtin()) { - param_out->SetBuiltin(BuiltinValue(attrs_in.builtin())); - } - if (attrs_in.invariant()) { - param_out->SetInvariant(true); - } - } - - return param_out; - } - - ir::BlockParam* BlockParameter(const pb::BlockParameter& param_in) { - auto* type = Type(param_in.type()); - if (type == nullptr || type->Is()) { - err_ << "block parameter '" << param_in.name() << "' has invalid type\n"; - return nullptr; - } - auto* param_out = b.BlockParam(type); - if (!param_in.name().empty()) { - if (!CheckName(param_in.name(), "param name")) { - return nullptr; - } - mod_out_.SetName(param_out, param_in.name()); - } - return param_out; - } - - ir::Constant* Constant(uint32_t value_id) { return b.Constant(ConstantValue(value_id)); } - - ir::Value* Value(uint32_t id) { - if (DAWN_UNLIKELY(id > values_.Length())) { - err_ << "value id " << id << " out of range\n"; - return nullptr; - } - return id > 0 ? values_[id - 1] : nullptr; - } - - template - T* ValueAs(uint32_t id) { - auto* value = Value(id); - if (auto cast = As(value); DAWN_LIKELY(cast)) { - return cast; - } - err_ << "value " << id << " is " << (value ? value->TypeInfo().name : "") - << " expected " << TypeInfo::Of().name << "\n"; - return nullptr; - } - - //////////////////////////////////////////////////////////////////////////// - // ConstantValues - //////////////////////////////////////////////////////////////////////////// - const core::constant::Value* CreateConstantValue(const pb::ConstantValue& value_in) { - switch (value_in.kind_case()) { - case pb::ConstantValue::KindCase::kScalar: - return CreateConstantScalar(value_in.scalar()); - case pb::ConstantValue::KindCase::kComposite: - return CreateConstantComposite(value_in.composite()); - case pb::ConstantValue::KindCase::kSplat: - return CreateConstantSplat(value_in.splat()); - case pb::ConstantValue::KindCase::KIND_NOT_SET: - break; - } - err_ << "invalid ConstantValue.kind: " << std::to_string(value_in.kind_case()) << "\n"; - return b.InvalidConstant()->Value(); - } - - const core::constant::Value* CreateConstantScalar(const pb::ConstantValueScalar& value_in) { - switch (value_in.kind_case()) { - case pb::ConstantValueScalar::KindCase::kBool: - return b.ConstantValue(value_in.bool_()); - case pb::ConstantValueScalar::KindCase::kI32: - return b.ConstantValue(i32(value_in.i32())); - case pb::ConstantValueScalar::KindCase::kU32: - return b.ConstantValue(u32(value_in.u32())); - case pb::ConstantValueScalar::KindCase::kF32: - return b.ConstantValue(CheckFinite(f32(value_in.f32()))); - case pb::ConstantValueScalar::KindCase::kF16: - return b.ConstantValue(CheckFinite(f16(value_in.f16()))); - case pb::ConstantValueScalar::KindCase::KIND_NOT_SET: - break; - } - err_ << "invalid ConstantValueScalar.kind: " << std::to_string(value_in.kind_case()) - << "\n"; - return b.InvalidConstant()->Value(); - } - - const core::constant::Value* CreateConstantComposite( - const pb::ConstantValueComposite& composite_in) { - auto* type = Type(composite_in.type()); - if (!type) { - err_ << "invalid type for constant composite\n"; - return b.InvalidConstant()->Value(); - } - - auto type_elements = type->Elements(); - size_t num_values = static_cast(composite_in.elements().size()); - if (DAWN_UNLIKELY(type_elements.count == 0)) { - err_ << "cannot create a composite of type " << type->FriendlyName() << "\n"; - return b.InvalidConstant()->Value(); - } - if (DAWN_UNLIKELY(type_elements.count != num_values)) { - err_ << "constant composite type " << type->FriendlyName() << " expects " - << type_elements.count << " elements, but " << num_values << " values encoded\n"; - return b.InvalidConstant()->Value(); - } - Vector elements_out; - for (auto element_id : composite_in.elements()) { - uint32_t i = static_cast(elements_out.Length()); - auto* value = ConstantValue(element_id); - if (auto* el_type = type->Element(i); DAWN_UNLIKELY(value->Type() != el_type)) { - if (!el_type) { - err_ << "constant composite has a null element type\n"; - } else { - err_ << "constant composite element value type " - << value->Type()->FriendlyName() << " does not match element type " - << el_type->FriendlyName() << "\n"; - } - return b.InvalidConstant()->Value(); - } - elements_out.Push(value); - } - return mod_out_.constant_values.Composite(type, std::move(elements_out)); - } - - const core::constant::Value* CreateConstantSplat(const pb::ConstantValueSplat& splat_in) { - auto* type = Type(splat_in.type()); - if (!type) { - err_ << "invalid type for constant splat\n"; - return b.InvalidConstant()->Value(); - } - - uint32_t num_elements = type->Elements().count; - if (DAWN_UNLIKELY(num_elements == 0)) { - err_ << "cannot create a splat of type " << type->FriendlyName() << "\n"; - return b.InvalidConstant()->Value(); - } - if (DAWN_UNLIKELY(num_elements > internal_limits::kMaxArrayConstructorElements)) { - err_ << "array constructor has excessive number of elements (>" - << internal_limits::kMaxArrayConstructorElements << ")\n"; - return b.InvalidConstant()->Value(); - } - auto* value = ConstantValue(splat_in.elements()); - for (uint32_t i = 0; i < num_elements; i++) { - auto* el_type = type->Element(i); - if (DAWN_UNLIKELY(el_type != value->Type())) { - err_ << "constant splat element value type " << value->Type()->FriendlyName() - << " does not match element " << i << " type " << el_type->FriendlyName() - << "\n"; - return b.InvalidConstant()->Value(); - } - } - return mod_out_.constant_values.Splat(type, value); - } - - const core::constant::Value* ConstantValue(uint32_t id) { - if (DAWN_UNLIKELY(id >= constant_values_.Length())) { - err_ << "constant value id " << id << " out of range\n"; - return b.InvalidConstant()->Value(); - } - return constant_values_[id]; - } - - //////////////////////////////////////////////////////////////////////////// - // Attributes - //////////////////////////////////////////////////////////////////////////// - core::Interpolation Interpolation(const pb::Interpolation& interpolation_in) { - core::Interpolation interpolation_out{}; - interpolation_out.type = InterpolationType(interpolation_in.type()); - if (interpolation_in.has_sampling()) { - interpolation_out.sampling = InterpolationSampling(interpolation_in.sampling()); - } - return interpolation_out; - } - - //////////////////////////////////////////////////////////////////////////// - // Enums - //////////////////////////////////////////////////////////////////////////// - core::AddressSpace AddressSpace(pb::AddressSpace in) { - if (!AddressSpace_IsValid(in)) { - err_ << "invalid address space, " << std::to_string(in) << "\n"; - return core::AddressSpace::kUndefined; - } - - switch (in) { - case pb::AddressSpace::function: - return core::AddressSpace::kFunction; - case pb::AddressSpace::handle: - return core::AddressSpace::kHandle; - case pb::AddressSpace::pixel_local: - return core::AddressSpace::kPixelLocal; - case pb::AddressSpace::private_: - return core::AddressSpace::kPrivate; - case pb::AddressSpace::immediate: - return core::AddressSpace::kImmediate; - case pb::AddressSpace::storage: - return core::AddressSpace::kStorage; - case pb::AddressSpace::uniform: - return core::AddressSpace::kUniform; - case pb::AddressSpace::workgroup: - return core::AddressSpace::kWorkgroup; - - case pb::AddressSpace::AddressSpace_INT_MIN_SENTINEL_DO_NOT_USE_: - case pb::AddressSpace::AddressSpace_INT_MAX_SENTINEL_DO_NOT_USE_: - break; - } - TINT_ICE() << "invalid AddressSpace: " << in; - } - - core::Access AccessControl(pb::AccessControl in) { - if (!AccessControl_IsValid(in)) { - err_ << "invalid access control, " << std::to_string(in) << "\n"; - return core::Access::kUndefined; - } - - switch (in) { - case pb::AccessControl::read: - return core::Access::kRead; - case pb::AccessControl::write: - return core::Access::kWrite; - case pb::AccessControl::read_write: - return core::Access::kReadWrite; - - case pb::AccessControl::AccessControl_INT_MIN_SENTINEL_DO_NOT_USE_: - case pb::AccessControl::AccessControl_INT_MAX_SENTINEL_DO_NOT_USE_: - break; - } - TINT_ICE() << "invalid Access: " << in; - } - - core::UnaryOp UnaryOp(pb::UnaryOp in) { - switch (in) { - case pb::UnaryOp::complement: - return core::UnaryOp::kComplement; - case pb::UnaryOp::negation: - return core::UnaryOp::kNegation; - case pb::UnaryOp::address_of: - return core::UnaryOp::kAddressOf; - case pb::UnaryOp::indirection: - return core::UnaryOp::kIndirection; - case pb::UnaryOp::not_: - return core::UnaryOp::kNot; - - case pb::UnaryOp::UnaryOp_INT_MIN_SENTINEL_DO_NOT_USE_: - case pb::UnaryOp::UnaryOp_INT_MAX_SENTINEL_DO_NOT_USE_: - break; - } - TINT_ICE() << "invalid UnaryOp: " << in; - } - - core::BinaryOp BinaryOp(pb::BinaryOp in) { - switch (in) { - case pb::BinaryOp::add_: - return core::BinaryOp::kAdd; - case pb::BinaryOp::subtract: - return core::BinaryOp::kSubtract; - case pb::BinaryOp::multiply: - return core::BinaryOp::kMultiply; - case pb::BinaryOp::divide: - return core::BinaryOp::kDivide; - case pb::BinaryOp::modulo: - return core::BinaryOp::kModulo; - case pb::BinaryOp::and_: - return core::BinaryOp::kAnd; - case pb::BinaryOp::or_: - return core::BinaryOp::kOr; - case pb::BinaryOp::xor_: - return core::BinaryOp::kXor; - case pb::BinaryOp::equal: - return core::BinaryOp::kEqual; - case pb::BinaryOp::not_equal: - return core::BinaryOp::kNotEqual; - case pb::BinaryOp::less_than: - return core::BinaryOp::kLessThan; - case pb::BinaryOp::greater_than: - return core::BinaryOp::kGreaterThan; - case pb::BinaryOp::less_than_equal: - return core::BinaryOp::kLessThanEqual; - case pb::BinaryOp::greater_than_equal: - return core::BinaryOp::kGreaterThanEqual; - case pb::BinaryOp::shift_left: - return core::BinaryOp::kShiftLeft; - case pb::BinaryOp::shift_right: - return core::BinaryOp::kShiftRight; - case pb::BinaryOp::logical_and: - return core::BinaryOp::kLogicalAnd; - case pb::BinaryOp::logical_or: - return core::BinaryOp::kLogicalOr; - - case pb::BinaryOp::BinaryOp_INT_MIN_SENTINEL_DO_NOT_USE_: - case pb::BinaryOp::BinaryOp_INT_MAX_SENTINEL_DO_NOT_USE_: - break; - } - TINT_ICE() << "invalid BinaryOp: " << in; - } - - core::type::TextureDimension TextureDimension(pb::TextureDimension in) { - if (!TextureDimension_IsValid(in)) { - err_ << "invalid texture dimension, " << std::to_string(in) << "\n"; - return core::type::TextureDimension::kNone; - } - - switch (in) { - case pb::TextureDimension::_1d: - return core::type::TextureDimension::k1d; - case pb::TextureDimension::_2d: - return core::type::TextureDimension::k2d; - case pb::TextureDimension::_2d_array: - return core::type::TextureDimension::k2dArray; - case pb::TextureDimension::_3d: - return core::type::TextureDimension::k3d; - case pb::TextureDimension::cube: - return core::type::TextureDimension::kCube; - case pb::TextureDimension::cube_array: - return core::type::TextureDimension::kCubeArray; - - case pb::TextureDimension::TextureDimension_INT_MIN_SENTINEL_DO_NOT_USE_: - case pb::TextureDimension::TextureDimension_INT_MAX_SENTINEL_DO_NOT_USE_: - break; - } - - TINT_ICE() << "invalid TextureDimension: " << in; - } - - core::TexelFormat TexelFormat(pb::TexelFormat in) { - if (!TexelFormat_IsValid(in)) { - err_ << "invalid texel format, " << std::to_string(in) << "\n"; - return core::TexelFormat::kUndefined; - } - - switch (in) { - case pb::TexelFormat::bgra8_unorm: - return core::TexelFormat::kBgra8Unorm; - case pb::TexelFormat::r8_unorm: - return core::TexelFormat::kR8Unorm; - case pb::TexelFormat::r32_float: - return core::TexelFormat::kR32Float; - case pb::TexelFormat::r32_sint: - return core::TexelFormat::kR32Sint; - case pb::TexelFormat::r32_uint: - return core::TexelFormat::kR32Uint; - case pb::TexelFormat::rg32_float: - return core::TexelFormat::kRg32Float; - case pb::TexelFormat::rg32_sint: - return core::TexelFormat::kRg32Sint; - case pb::TexelFormat::rg32_uint: - return core::TexelFormat::kRg32Uint; - case pb::TexelFormat::rgba16_float: - return core::TexelFormat::kRgba16Float; - case pb::TexelFormat::rgba16_sint: - return core::TexelFormat::kRgba16Sint; - case pb::TexelFormat::rgba16_uint: - return core::TexelFormat::kRgba16Uint; - case pb::TexelFormat::rgba32_float: - return core::TexelFormat::kRgba32Float; - case pb::TexelFormat::rgba32_sint: - return core::TexelFormat::kRgba32Sint; - case pb::TexelFormat::rgba32_uint: - return core::TexelFormat::kRgba32Uint; - case pb::TexelFormat::rgba8_sint: - return core::TexelFormat::kRgba8Sint; - case pb::TexelFormat::rgba8_snorm: - return core::TexelFormat::kRgba8Snorm; - case pb::TexelFormat::rgba8_uint: - return core::TexelFormat::kRgba8Uint; - case pb::TexelFormat::rgba8_unorm: - return core::TexelFormat::kRgba8Unorm; - case pb::TexelFormat::r8_snorm: - return core::TexelFormat::kR8Snorm; - case pb::TexelFormat::r8_uint: - return core::TexelFormat::kR8Uint; - case pb::TexelFormat::r8_sint: - return core::TexelFormat::kR8Sint; - case pb::TexelFormat::rg8_unorm: - return core::TexelFormat::kRg8Unorm; - case pb::TexelFormat::rg8_snorm: - return core::TexelFormat::kRg8Snorm; - case pb::TexelFormat::rg8_uint: - return core::TexelFormat::kRg8Uint; - case pb::TexelFormat::rg8_sint: - return core::TexelFormat::kRg8Sint; - case pb::TexelFormat::r16_uint: - return core::TexelFormat::kR16Uint; - case pb::TexelFormat::r16_sint: - return core::TexelFormat::kR16Sint; - case pb::TexelFormat::r16_float: - return core::TexelFormat::kR16Float; - case pb::TexelFormat::rg16_uint: - return core::TexelFormat::kRg16Uint; - case pb::TexelFormat::rg16_sint: - return core::TexelFormat::kRg16Sint; - case pb::TexelFormat::rg16_float: - return core::TexelFormat::kRg16Float; - case pb::TexelFormat::rgb10a2_uint: - return core::TexelFormat::kRgb10A2Uint; - case pb::TexelFormat::rgb10a2_unorm: - return core::TexelFormat::kRgb10A2Unorm; - case pb::TexelFormat::rg11b10_ufloat: - return core::TexelFormat::kRg11B10Ufloat; - case pb::TexelFormat::r16_unorm: - return core::TexelFormat::kR16Unorm; - case pb::TexelFormat::r16_snorm: - return core::TexelFormat::kR16Snorm; - case pb::TexelFormat::rg16_unorm: - return core::TexelFormat::kRg16Unorm; - case pb::TexelFormat::rg16_snorm: - return core::TexelFormat::kRg16Snorm; - case pb::TexelFormat::rgba16_unorm: - return core::TexelFormat::kRgba16Unorm; - case pb::TexelFormat::rgba16_snorm: - return core::TexelFormat::kRgba16Snorm; - - case pb::TexelFormat::TexelFormat_INT_MIN_SENTINEL_DO_NOT_USE_: - case pb::TexelFormat::TexelFormat_INT_MAX_SENTINEL_DO_NOT_USE_: - break; - } - - TINT_ICE() << "invalid TexelFormat: " << in; - } - - core::type::SamplerKind SamplerKind(pb::SamplerKind in) { - switch (in) { - case pb::SamplerKind::sampler: - return core::type::SamplerKind::kSampler; - case pb::SamplerKind::comparison: - return core::type::SamplerKind::kComparisonSampler; - - case pb::SamplerKind::SamplerKind_INT_MIN_SENTINEL_DO_NOT_USE_: - case pb::SamplerKind::SamplerKind_INT_MAX_SENTINEL_DO_NOT_USE_: - break; - } - - TINT_ICE() << "invalid SamplerKind: " << in; - } - - core::InterpolationType InterpolationType(pb::InterpolationType in) { - if (!InterpolationType_IsValid(in)) { - err_ << "invalid interpolation type, " << std::to_string(in) << "\n"; - return core::InterpolationType::kUndefined; - } - - switch (in) { - case pb::InterpolationType::flat: - return core::InterpolationType::kFlat; - case pb::InterpolationType::linear: - return core::InterpolationType::kLinear; - case pb::InterpolationType::perspective: - return core::InterpolationType::kPerspective; - - case pb::InterpolationType::InterpolationType_INT_MIN_SENTINEL_DO_NOT_USE_: - case pb::InterpolationType::InterpolationType_INT_MAX_SENTINEL_DO_NOT_USE_: - break; - } - TINT_ICE() << "invalid InterpolationType: " << in; - } - - core::InterpolationSampling InterpolationSampling(pb::InterpolationSampling in) { - if (!InterpolationSampling_IsValid(in)) { - err_ << "invalid interpolation sampling, " << std::to_string(in) << "\n"; - return core::InterpolationSampling::kUndefined; - } - - switch (in) { - case pb::InterpolationSampling::center: - return core::InterpolationSampling::kCenter; - case pb::InterpolationSampling::centroid: - return core::InterpolationSampling::kCentroid; - case pb::InterpolationSampling::sample: - return core::InterpolationSampling::kSample; - case pb::InterpolationSampling::first: - return core::InterpolationSampling::kFirst; - case pb::InterpolationSampling::either: - return core::InterpolationSampling::kEither; - - case pb::InterpolationSampling::InterpolationSampling_INT_MIN_SENTINEL_DO_NOT_USE_: - case pb::InterpolationSampling::InterpolationSampling_INT_MAX_SENTINEL_DO_NOT_USE_: - break; - } - TINT_ICE() << "invalid InterpolationSampling: " << in; - } - - core::BuiltinValue BuiltinValue(pb::BuiltinValue in) { - if (!BuiltinValue_IsValid(in)) { - err_ << "invalid builtin value, " << std::to_string(in) << "\n"; - return core::BuiltinValue::kUndefined; - } - - switch (in) { - case pb::BuiltinValue::point_size: - return core::BuiltinValue::kPointSize; - case pb::BuiltinValue::cull_distance: - return core::BuiltinValue::kCullDistance; - case pb::BuiltinValue::frag_depth: - return core::BuiltinValue::kFragDepth; - case pb::BuiltinValue::front_facing: - return core::BuiltinValue::kFrontFacing; - case pb::BuiltinValue::global_invocation_id: - return core::BuiltinValue::kGlobalInvocationId; - case pb::BuiltinValue::instance_index: - return core::BuiltinValue::kInstanceIndex; - case pb::BuiltinValue::local_invocation_id: - return core::BuiltinValue::kLocalInvocationId; - case pb::BuiltinValue::local_invocation_index: - return core::BuiltinValue::kLocalInvocationIndex; - case pb::BuiltinValue::num_workgroups: - return core::BuiltinValue::kNumWorkgroups; - case pb::BuiltinValue::position: - return core::BuiltinValue::kPosition; - case pb::BuiltinValue::sample_index: - return core::BuiltinValue::kSampleIndex; - case pb::BuiltinValue::sample_mask: - return core::BuiltinValue::kSampleMask; - case pb::BuiltinValue::subgroup_id: - return core::BuiltinValue::kSubgroupId; - case pb::BuiltinValue::subgroup_invocation_id: - return core::BuiltinValue::kSubgroupInvocationId; - case pb::BuiltinValue::subgroup_size: - return core::BuiltinValue::kSubgroupSize; - case pb::BuiltinValue::num_subgroups: - return core::BuiltinValue::kNumSubgroups; - case pb::BuiltinValue::vertex_index: - return core::BuiltinValue::kVertexIndex; - case pb::BuiltinValue::workgroup_id: - return core::BuiltinValue::kWorkgroupId; - case pb::BuiltinValue::clip_distances: - return core::BuiltinValue::kClipDistances; - case pb::BuiltinValue::primitive_index: - return core::BuiltinValue::kPrimitiveIndex; - case pb::BuiltinValue::barycentric_coord: - return core::BuiltinValue::kBarycentricCoord; - case pb::BuiltinValue::BuiltinValue_INT_MIN_SENTINEL_DO_NOT_USE_: - case pb::BuiltinValue::BuiltinValue_INT_MAX_SENTINEL_DO_NOT_USE_: - break; - } - TINT_ICE() << "invalid BuiltinValue: " << in; - } - - core::BuiltinFn BuiltinFn(pb::BuiltinFn in) { - if (!BuiltinFn_IsValid(in)) { - err_ << "invalid builtin function, " << std::to_string(in) << "\n"; - return core::BuiltinFn::kNone; - } - - switch (in) { - case pb::BuiltinFn::abs: - return core::BuiltinFn::kAbs; - case pb::BuiltinFn::acos: - return core::BuiltinFn::kAcos; - case pb::BuiltinFn::acosh: - return core::BuiltinFn::kAcosh; - case pb::BuiltinFn::all: - return core::BuiltinFn::kAll; - case pb::BuiltinFn::any: - return core::BuiltinFn::kAny; - case pb::BuiltinFn::array_length: - return core::BuiltinFn::kArrayLength; - case pb::BuiltinFn::asin: - return core::BuiltinFn::kAsin; - case pb::BuiltinFn::asinh: - return core::BuiltinFn::kAsinh; - case pb::BuiltinFn::atan: - return core::BuiltinFn::kAtan; - case pb::BuiltinFn::atan2: - return core::BuiltinFn::kAtan2; - case pb::BuiltinFn::atanh: - return core::BuiltinFn::kAtanh; - case pb::BuiltinFn::ceil: - return core::BuiltinFn::kCeil; - case pb::BuiltinFn::clamp: - return core::BuiltinFn::kClamp; - case pb::BuiltinFn::cos: - return core::BuiltinFn::kCos; - case pb::BuiltinFn::cosh: - return core::BuiltinFn::kCosh; - case pb::BuiltinFn::count_leading_zeros: - return core::BuiltinFn::kCountLeadingZeros; - case pb::BuiltinFn::count_one_bits: - return core::BuiltinFn::kCountOneBits; - case pb::BuiltinFn::count_trailing_zeros: - return core::BuiltinFn::kCountTrailingZeros; - case pb::BuiltinFn::cross: - return core::BuiltinFn::kCross; - case pb::BuiltinFn::degrees: - return core::BuiltinFn::kDegrees; - case pb::BuiltinFn::determinant: - return core::BuiltinFn::kDeterminant; - case pb::BuiltinFn::distance: - return core::BuiltinFn::kDistance; - case pb::BuiltinFn::dot: - return core::BuiltinFn::kDot; - case pb::BuiltinFn::dot4i8_packed: - return core::BuiltinFn::kDot4I8Packed; - case pb::BuiltinFn::dot4u8_packed: - return core::BuiltinFn::kDot4U8Packed; - case pb::BuiltinFn::dpdx: - return core::BuiltinFn::kDpdx; - case pb::BuiltinFn::dpdx_coarse: - return core::BuiltinFn::kDpdxCoarse; - case pb::BuiltinFn::dpdx_fine: - return core::BuiltinFn::kDpdxFine; - case pb::BuiltinFn::dpdy: - return core::BuiltinFn::kDpdy; - case pb::BuiltinFn::dpdy_coarse: - return core::BuiltinFn::kDpdyCoarse; - case pb::BuiltinFn::dpdy_fine: - return core::BuiltinFn::kDpdyFine; - case pb::BuiltinFn::exp: - return core::BuiltinFn::kExp; - case pb::BuiltinFn::exp2: - return core::BuiltinFn::kExp2; - case pb::BuiltinFn::extract_bits: - return core::BuiltinFn::kExtractBits; - case pb::BuiltinFn::face_forward: - return core::BuiltinFn::kFaceForward; - case pb::BuiltinFn::first_leading_bit: - return core::BuiltinFn::kFirstLeadingBit; - case pb::BuiltinFn::first_trailing_bit: - return core::BuiltinFn::kFirstTrailingBit; - case pb::BuiltinFn::floor: - return core::BuiltinFn::kFloor; - case pb::BuiltinFn::fma: - return core::BuiltinFn::kFma; - case pb::BuiltinFn::fract: - return core::BuiltinFn::kFract; - case pb::BuiltinFn::frexp: - return core::BuiltinFn::kFrexp; - case pb::BuiltinFn::fwidth: - return core::BuiltinFn::kFwidth; - case pb::BuiltinFn::fwidth_coarse: - return core::BuiltinFn::kFwidthCoarse; - case pb::BuiltinFn::fwidth_fine: - return core::BuiltinFn::kFwidthFine; - case pb::BuiltinFn::insert_bits: - return core::BuiltinFn::kInsertBits; - case pb::BuiltinFn::inverse_sqrt: - return core::BuiltinFn::kInverseSqrt; - case pb::BuiltinFn::ldexp: - return core::BuiltinFn::kLdexp; - case pb::BuiltinFn::length: - return core::BuiltinFn::kLength; - case pb::BuiltinFn::log: - return core::BuiltinFn::kLog; - case pb::BuiltinFn::log2: - return core::BuiltinFn::kLog2; - case pb::BuiltinFn::max: - return core::BuiltinFn::kMax; - case pb::BuiltinFn::min: - return core::BuiltinFn::kMin; - case pb::BuiltinFn::mix: - return core::BuiltinFn::kMix; - case pb::BuiltinFn::modf: - return core::BuiltinFn::kModf; - case pb::BuiltinFn::normalize: - return core::BuiltinFn::kNormalize; - case pb::BuiltinFn::pack2x16_float: - return core::BuiltinFn::kPack2X16Float; - case pb::BuiltinFn::pack2x16_snorm: - return core::BuiltinFn::kPack2X16Snorm; - case pb::BuiltinFn::pack2x16_unorm: - return core::BuiltinFn::kPack2X16Unorm; - case pb::BuiltinFn::pack4x8_snorm: - return core::BuiltinFn::kPack4X8Snorm; - case pb::BuiltinFn::pack4x8_unorm: - return core::BuiltinFn::kPack4X8Unorm; - case pb::BuiltinFn::pack4xi8: - return core::BuiltinFn::kPack4XI8; - case pb::BuiltinFn::pack4xu8: - return core::BuiltinFn::kPack4XU8; - case pb::BuiltinFn::pack4xi8_clamp: - return core::BuiltinFn::kPack4XI8Clamp; - case pb::BuiltinFn::pack4xu8_clamp: - return core::BuiltinFn::kPack4XU8Clamp; - case pb::BuiltinFn::pow: - return core::BuiltinFn::kPow; - case pb::BuiltinFn::quantize_to_f16: - return core::BuiltinFn::kQuantizeToF16; - case pb::BuiltinFn::radians: - return core::BuiltinFn::kRadians; - case pb::BuiltinFn::reflect: - return core::BuiltinFn::kReflect; - case pb::BuiltinFn::refract: - return core::BuiltinFn::kRefract; - case pb::BuiltinFn::reverse_bits: - return core::BuiltinFn::kReverseBits; - case pb::BuiltinFn::round: - return core::BuiltinFn::kRound; - case pb::BuiltinFn::saturate: - return core::BuiltinFn::kSaturate; - case pb::BuiltinFn::select: - return core::BuiltinFn::kSelect; - case pb::BuiltinFn::sign: - return core::BuiltinFn::kSign; - case pb::BuiltinFn::sin: - return core::BuiltinFn::kSin; - case pb::BuiltinFn::sinh: - return core::BuiltinFn::kSinh; - case pb::BuiltinFn::smoothstep: - return core::BuiltinFn::kSmoothstep; - case pb::BuiltinFn::sqrt: - return core::BuiltinFn::kSqrt; - case pb::BuiltinFn::step: - return core::BuiltinFn::kStep; - case pb::BuiltinFn::storage_barrier: - return core::BuiltinFn::kStorageBarrier; - case pb::BuiltinFn::tan: - return core::BuiltinFn::kTan; - case pb::BuiltinFn::tanh: - return core::BuiltinFn::kTanh; - case pb::BuiltinFn::transpose: - return core::BuiltinFn::kTranspose; - case pb::BuiltinFn::trunc: - return core::BuiltinFn::kTrunc; - case pb::BuiltinFn::unpack2x16_float: - return core::BuiltinFn::kUnpack2X16Float; - case pb::BuiltinFn::unpack2x16_snorm: - return core::BuiltinFn::kUnpack2X16Snorm; - case pb::BuiltinFn::unpack2x16_unorm: - return core::BuiltinFn::kUnpack2X16Unorm; - case pb::BuiltinFn::unpack4x8_snorm: - return core::BuiltinFn::kUnpack4X8Snorm; - case pb::BuiltinFn::unpack4x8_unorm: - return core::BuiltinFn::kUnpack4X8Unorm; - case pb::BuiltinFn::unpack4xi8: - return core::BuiltinFn::kUnpack4XI8; - case pb::BuiltinFn::unpack4xu8: - return core::BuiltinFn::kUnpack4XU8; - case pb::BuiltinFn::workgroup_barrier: - return core::BuiltinFn::kWorkgroupBarrier; - case pb::BuiltinFn::texture_barrier: - return core::BuiltinFn::kTextureBarrier; - case pb::BuiltinFn::texture_dimensions: - return core::BuiltinFn::kTextureDimensions; - case pb::BuiltinFn::texture_gather: - return core::BuiltinFn::kTextureGather; - case pb::BuiltinFn::texture_gather_compare: - return core::BuiltinFn::kTextureGatherCompare; - case pb::BuiltinFn::texture_num_layers: - return core::BuiltinFn::kTextureNumLayers; - case pb::BuiltinFn::texture_num_levels: - return core::BuiltinFn::kTextureNumLevels; - case pb::BuiltinFn::texture_num_samples: - return core::BuiltinFn::kTextureNumSamples; - case pb::BuiltinFn::texture_sample: - return core::BuiltinFn::kTextureSample; - case pb::BuiltinFn::texture_sample_bias: - return core::BuiltinFn::kTextureSampleBias; - case pb::BuiltinFn::texture_sample_compare: - return core::BuiltinFn::kTextureSampleCompare; - case pb::BuiltinFn::texture_sample_compare_level: - return core::BuiltinFn::kTextureSampleCompareLevel; - case pb::BuiltinFn::texture_sample_grad: - return core::BuiltinFn::kTextureSampleGrad; - case pb::BuiltinFn::texture_sample_level: - return core::BuiltinFn::kTextureSampleLevel; - case pb::BuiltinFn::texture_sample_base_clamp_to_edge: - return core::BuiltinFn::kTextureSampleBaseClampToEdge; - case pb::BuiltinFn::texture_store: - return core::BuiltinFn::kTextureStore; - case pb::BuiltinFn::texture_load: - return core::BuiltinFn::kTextureLoad; - case pb::BuiltinFn::atomic_load: - return core::BuiltinFn::kAtomicLoad; - case pb::BuiltinFn::atomic_store: - return core::BuiltinFn::kAtomicStore; - case pb::BuiltinFn::atomic_add: - return core::BuiltinFn::kAtomicAdd; - case pb::BuiltinFn::atomic_sub: - return core::BuiltinFn::kAtomicSub; - case pb::BuiltinFn::atomic_max: - return core::BuiltinFn::kAtomicMax; - case pb::BuiltinFn::atomic_min: - return core::BuiltinFn::kAtomicMin; - case pb::BuiltinFn::atomic_and: - return core::BuiltinFn::kAtomicAnd; - case pb::BuiltinFn::atomic_or: - return core::BuiltinFn::kAtomicOr; - case pb::BuiltinFn::atomic_xor: - return core::BuiltinFn::kAtomicXor; - case pb::BuiltinFn::atomic_exchange: - return core::BuiltinFn::kAtomicExchange; - case pb::BuiltinFn::atomic_compare_exchange_weak: - return core::BuiltinFn::kAtomicCompareExchangeWeak; - case pb::BuiltinFn::subgroup_ballot: - return core::BuiltinFn::kSubgroupBallot; - case pb::BuiltinFn::subgroup_elect: - return core::BuiltinFn::kSubgroupElect; - case pb::BuiltinFn::subgroup_broadcast: - return core::BuiltinFn::kSubgroupBroadcast; - case pb::BuiltinFn::subgroup_broadcast_first: - return core::BuiltinFn::kSubgroupBroadcastFirst; - case pb::BuiltinFn::subgroup_shuffle: - return core::BuiltinFn::kSubgroupShuffle; - case pb::BuiltinFn::subgroup_shuffle_xor: - return core::BuiltinFn::kSubgroupShuffleXor; - case pb::BuiltinFn::subgroup_shuffle_up: - return core::BuiltinFn::kSubgroupShuffleUp; - case pb::BuiltinFn::subgroup_shuffle_down: - return core::BuiltinFn::kSubgroupShuffleDown; - case pb::BuiltinFn::input_attachment_load: - return core::BuiltinFn::kInputAttachmentLoad; - case pb::BuiltinFn::subgroup_add: - return core::BuiltinFn::kSubgroupAdd; - case pb::BuiltinFn::subgroup_inclusive_add: - return core::BuiltinFn::kSubgroupInclusiveAdd; - case pb::BuiltinFn::subgroup_exclusive_add: - return core::BuiltinFn::kSubgroupExclusiveAdd; - case pb::BuiltinFn::subgroup_mul: - return core::BuiltinFn::kSubgroupMul; - case pb::BuiltinFn::subgroup_inclusive_mul: - return core::BuiltinFn::kSubgroupInclusiveMul; - case pb::BuiltinFn::subgroup_exclusive_mul: - return core::BuiltinFn::kSubgroupExclusiveMul; - case pb::BuiltinFn::subgroup_and: - return core::BuiltinFn::kSubgroupAnd; - case pb::BuiltinFn::subgroup_or: - return core::BuiltinFn::kSubgroupOr; - case pb::BuiltinFn::subgroup_xor: - return core::BuiltinFn::kSubgroupXor; - case pb::BuiltinFn::subgroup_min: - return core::BuiltinFn::kSubgroupMin; - case pb::BuiltinFn::subgroup_max: - return core::BuiltinFn::kSubgroupMax; - case pb::BuiltinFn::subgroup_all: - return core::BuiltinFn::kSubgroupAll; - case pb::BuiltinFn::subgroup_any: - return core::BuiltinFn::kSubgroupAny; - case pb::BuiltinFn::quad_broadcast: - return core::BuiltinFn::kQuadBroadcast; - case pb::BuiltinFn::quad_swap_x: - return core::BuiltinFn::kQuadSwapX; - case pb::BuiltinFn::quad_swap_y: - return core::BuiltinFn::kQuadSwapY; - case pb::BuiltinFn::quad_swap_diagonal: - return core::BuiltinFn::kQuadSwapDiagonal; - case pb::BuiltinFn::subgroup_matrix_load: - return core::BuiltinFn::kSubgroupMatrixLoad; - case pb::BuiltinFn::subgroup_matrix_store: - return core::BuiltinFn::kSubgroupMatrixStore; - case pb::BuiltinFn::subgroup_matrix_multiply: - return core::BuiltinFn::kSubgroupMatrixMultiply; - case pb::BuiltinFn::subgroup_matrix_multiply_accumulate: - return core::BuiltinFn::kSubgroupMatrixMultiplyAccumulate; - case pb::BuiltinFn::subgroup_matrix_scalar_add: - return core::BuiltinFn::kSubgroupMatrixScalarAdd; - case pb::BuiltinFn::subgroup_matrix_scalar_multiply: - return core::BuiltinFn::kSubgroupMatrixScalarMultiply; - case pb::BuiltinFn::subgroup_matrix_scalar_subtract: - return core::BuiltinFn::kSubgroupMatrixScalarSubtract; - case pb::BuiltinFn::print: - return core::BuiltinFn::kPrint; - case pb::BuiltinFn::has_resource: - return core::BuiltinFn::kHasResource; - case pb::BuiltinFn::get_resource: - return core::BuiltinFn::kGetResource; - case pb::BuiltinFn::buffer_view: - return core::BuiltinFn::kBufferView; - case pb::BuiltinFn::buffer_length: - return core::BuiltinFn::kBufferLength; - - case pb::BuiltinFn::BuiltinFn_INT_MIN_SENTINEL_DO_NOT_USE_: - case pb::BuiltinFn::BuiltinFn_INT_MAX_SENTINEL_DO_NOT_USE_: - break; - } - TINT_ICE() << "invalid BuiltinFn: " << in; - } -}; - -} // namespace - -Result Decode(std::span encoded) { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - pb::Module mod_in; - if (!mod_in.ParseFromArray(encoded.data(), static_cast(encoded.size()))) { - return Failure{"failed to deserialize protobuf"}; - } - - return Decode(mod_in); -} - -Result Decode(const pb::Module& mod_in) { - return Decoder{mod_in}.Decode(); -} - -} // namespace tint::core::ir::binary diff --git a/3rdparty/dawn/src/tint/lang/core/ir/binary/decode.h b/3rdparty/dawn/src/tint/lang/core/ir/binary/decode.h deleted file mode 100644 index 38cac7f5d..000000000 --- a/3rdparty/dawn/src/tint/lang/core/ir/binary/decode.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2023 The Dawn & Tint Authors -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// 3. Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef SRC_TINT_LANG_CORE_IR_BINARY_DECODE_H_ -#define SRC_TINT_LANG_CORE_IR_BINARY_DECODE_H_ - -#include - -#include "src/tint/utils/result.h" - -// Forward declarations -namespace tint::core::ir { -class Module; -} // namespace tint::core::ir -namespace tint::core::ir::binary::pb { -class Module; -} // namespace tint::core::ir::binary::pb - -namespace tint::core::ir::binary { - -/// @returns the decoded Module from the serialized protobuf. -Result Decode(std::span encoded); - -/// @returns the decoded Module from the protobuf. -Result Decode(const pb::Module& module); - -} // namespace tint::core::ir::binary - -#endif // SRC_TINT_LANG_CORE_IR_BINARY_DECODE_H_ diff --git a/3rdparty/dawn/src/tint/lang/core/ir/binary/encode.cc b/3rdparty/dawn/src/tint/lang/core/ir/binary/encode.cc deleted file mode 100644 index 41cd678cf..000000000 --- a/3rdparty/dawn/src/tint/lang/core/ir/binary/encode.cc +++ /dev/null @@ -1,1462 +0,0 @@ -// Copyright 2023 The Dawn & Tint Authors -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// 3. Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "src/tint/lang/core/ir/binary/encode.h" - -#include -#include -#include - -#include "src/tint/lang/core/constant/composite.h" -#include "src/tint/lang/core/constant/scalar.h" -#include "src/tint/lang/core/constant/splat.h" -#include "src/tint/lang/core/enums.h" -#include "src/tint/lang/core/ir/access.h" -#include "src/tint/lang/core/ir/bitcast.h" -#include "src/tint/lang/core/ir/break_if.h" -#include "src/tint/lang/core/ir/construct.h" -#include "src/tint/lang/core/ir/continue.h" -#include "src/tint/lang/core/ir/convert.h" -#include "src/tint/lang/core/ir/core_binary.h" -#include "src/tint/lang/core/ir/core_builtin_call.h" -#include "src/tint/lang/core/ir/core_unary.h" -#include "src/tint/lang/core/ir/discard.h" -#include "src/tint/lang/core/ir/exit_if.h" -#include "src/tint/lang/core/ir/exit_loop.h" -#include "src/tint/lang/core/ir/exit_switch.h" -#include "src/tint/lang/core/ir/function_param.h" -#include "src/tint/lang/core/ir/if.h" -#include "src/tint/lang/core/ir/let.h" -#include "src/tint/lang/core/ir/load.h" -#include "src/tint/lang/core/ir/load_vector_element.h" -#include "src/tint/lang/core/ir/loop.h" -#include "src/tint/lang/core/ir/module.h" -#include "src/tint/lang/core/ir/multi_in_block.h" -#include "src/tint/lang/core/ir/next_iteration.h" -#include "src/tint/lang/core/ir/return.h" -#include "src/tint/lang/core/ir/store.h" -#include "src/tint/lang/core/ir/store_vector_element.h" -#include "src/tint/lang/core/ir/switch.h" -#include "src/tint/lang/core/ir/swizzle.h" -#include "src/tint/lang/core/ir/unreachable.h" -#include "src/tint/lang/core/ir/user_call.h" -#include "src/tint/lang/core/ir/var.h" -#include "src/tint/lang/core/type/array.h" -#include "src/tint/lang/core/type/binding_array.h" -#include "src/tint/lang/core/type/bool.h" -#include "src/tint/lang/core/type/depth_multisampled_texture.h" -#include "src/tint/lang/core/type/depth_texture.h" -#include "src/tint/lang/core/type/external_texture.h" -#include "src/tint/lang/core/type/f16.h" -#include "src/tint/lang/core/type/f32.h" -#include "src/tint/lang/core/type/i32.h" -#include "src/tint/lang/core/type/i8.h" -#include "src/tint/lang/core/type/input_attachment.h" -#include "src/tint/lang/core/type/matrix.h" -#include "src/tint/lang/core/type/multisampled_texture.h" -#include "src/tint/lang/core/type/pointer.h" -#include "src/tint/lang/core/type/sampled_texture.h" -#include "src/tint/lang/core/type/sampler.h" -#include "src/tint/lang/core/type/storage_texture.h" -#include "src/tint/lang/core/type/u32.h" -#include "src/tint/lang/core/type/u8.h" -#include "src/tint/lang/core/type/void.h" -#include "src/tint/utils/internal_limits.h" -#include "src/tint/utils/macros/compiler.h" -#include "src/tint/utils/rtti/switch.h" - -TINT_BEGIN_DISABLE_PROTOBUF_WARNINGS(); -#include "src/tint/utils/protos/ir/ir.pb.h" -TINT_END_DISABLE_PROTOBUF_WARNINGS(); - -namespace tint::core::ir::binary { -namespace { -struct Encoder { - const Module& mod_in_; - pb::Module& mod_out_; - - Hashmap functions_{}; - Hashmap blocks_{}; - Hashmap types_{}; - Hashmap values_{}; - Hashmap constant_values_{}; - - std::stringstream err_{}; - - Result Encode() { - // Encode all user-declared structures first. This is to ensure that the IR disassembly - // (which prints structure types first) does not reorder after encoding and decoding. - for (auto* ty : mod_in_.Types()) { - if (auto* str = ty->As()) { - Type(str); - } - } - Vector fns_out; - for (auto& fn_in : mod_in_.functions) { - uint32_t id = static_cast(mod_out_.functions().size()); - fns_out.Push(mod_out_.add_functions()); - functions_.Add(fn_in, id); - } - for (size_t i = 0, n = mod_in_.functions.Length(); i < n; i++) { - PopulateFunction(fns_out[i], mod_in_.functions[i]); - } - mod_out_.set_root_block(Block(mod_in_.root_block)); - - auto err = err_.str(); - if (!err.empty()) { - return Failure{err}; - } - return Success; - } - - //////////////////////////////////////////////////////////////////////////// - // Functions - //////////////////////////////////////////////////////////////////////////// - void PopulateFunction(pb::Function* fn_out, const ir::Function* fn_in) { - if (auto name = mod_in_.NameOf(fn_in)) { - fn_out->set_name(name.Name()); - } - fn_out->set_return_type(Type(fn_in->ReturnType())); - if (fn_in->Stage() != Function::PipelineStage::kUndefined) { - fn_out->set_pipeline_stage(PipelineStage(fn_in->Stage())); - } - if (auto wg_size_in = fn_in->WorkgroupSize()) { - auto& wg_size_out = *fn_out->mutable_workgroup_size(); - wg_size_out.set_x(Value((*wg_size_in)[0])); - wg_size_out.set_y(Value((*wg_size_in)[1])); - wg_size_out.set_z(Value((*wg_size_in)[2])); - } - if (auto subgroup_size_in = fn_in->SubgroupSize()) { - fn_out->set_subgroup_size(Value(*subgroup_size_in)); - } - for (auto* param_in : fn_in->Params()) { - fn_out->add_parameters(Value(param_in)); - } - if (auto ret_loc_in = fn_in->ReturnLocation()) { - fn_out->set_return_location(*ret_loc_in); - } - if (auto ret_interp_in = fn_in->ReturnInterpolation()) { - auto& ret_interp_out = *fn_out->mutable_return_interpolation(); - Interpolation(ret_interp_out, *ret_interp_in); - } - if (auto builtin_in = fn_in->ReturnBuiltin()) { - fn_out->set_return_builtin(BuiltinValue(*builtin_in)); - } - if (fn_in->ReturnInvariant()) { - fn_out->set_return_invariant(true); - } - fn_out->set_block(Block(fn_in->Block())); - } - - uint32_t Function(const ir::Function* fn_in) { return *functions_.Get(fn_in); } - - pb::PipelineStage PipelineStage(Function::PipelineStage stage) { - switch (stage) { - case Function::PipelineStage::kCompute: - return pb::PipelineStage::Compute; - case Function::PipelineStage::kFragment: - return pb::PipelineStage::Fragment; - case Function::PipelineStage::kVertex: - return pb::PipelineStage::Vertex; - case Function::PipelineStage::kUndefined: - break; - } - TINT_ICE() << "unhandled PipelineStage: " << stage; - } - - //////////////////////////////////////////////////////////////////////////// - // Blocks - //////////////////////////////////////////////////////////////////////////// - uint32_t Block(const ir::Block* block_in) { - TINT_ASSERT(block_in != nullptr); - - return blocks_.GetOrAdd(block_in, [&]() -> uint32_t { - auto id = static_cast(mod_out_.blocks().size()); - auto& block_out = *mod_out_.add_blocks(); - for (auto* inst : *block_in) { - Instruction(*block_out.add_instructions(), inst); - } - if (auto* mib = block_in->As()) { - block_out.set_is_multi_in(true); - for (auto* param : mib->Params()) { - block_out.add_parameters(Value(param)); - } - } - return id; - }); - } - - //////////////////////////////////////////////////////////////////////////// - // Instructions - //////////////////////////////////////////////////////////////////////////// - void Instruction(pb::Instruction& inst_out, const ir::Instruction* inst_in) { - tint::Switch( - inst_in, // - [&](const ir::Access* i) { InstructionAccess(*inst_out.mutable_access(), i); }, - [&](const ir::Bitcast* i) { InstructionBitcast(*inst_out.mutable_bitcast(), i); }, - [&](const ir::BreakIf* i) { InstructionBreakIf(*inst_out.mutable_break_if(), i); }, - [&](const ir::CoreBinary* i) { InstructionBinary(*inst_out.mutable_binary(), i); }, - [&](const ir::CoreBuiltinCall* i) { - InstructionBuiltinCall(*inst_out.mutable_builtin_call(), i); - }, - [&](const ir::CoreUnary* i) { InstructionUnary(*inst_out.mutable_unary(), i); }, - [&](const ir::Construct* i) { InstructionConstruct(*inst_out.mutable_construct(), i); }, - [&](const ir::Continue* i) { InstructionContinue(*inst_out.mutable_continue_(), i); }, - [&](const ir::Convert* i) { InstructionConvert(*inst_out.mutable_convert(), i); }, - [&](const ir::Discard* i) { InstructionDiscard(*inst_out.mutable_discard(), i); }, - [&](const ir::ExitIf* i) { InstructionExitIf(*inst_out.mutable_exit_if(), i); }, - [&](const ir::ExitLoop* i) { InstructionExitLoop(*inst_out.mutable_exit_loop(), i); }, - [&](const ir::ExitSwitch* i) { - InstructionExitSwitch(*inst_out.mutable_exit_switch(), i); - }, - [&](const ir::If* i) { InstructionIf(*inst_out.mutable_if_(), i); }, - [&](const ir::Let* i) { InstructionLet(*inst_out.mutable_let(), i); }, - [&](const ir::Load* i) { InstructionLoad(*inst_out.mutable_load(), i); }, - [&](const ir::LoadVectorElement* i) { - InstructionLoadVectorElement(*inst_out.mutable_load_vector_element(), i); - }, - [&](const ir::Loop* i) { InstructionLoop(*inst_out.mutable_loop(), i); }, - [&](const ir::NextIteration* i) { - InstructionNextIteration(*inst_out.mutable_next_iteration(), i); - }, - [&](const ir::Return* i) { InstructionReturn(*inst_out.mutable_return_(), i); }, - [&](const ir::Store* i) { InstructionStore(*inst_out.mutable_store(), i); }, - [&](const ir::StoreVectorElement* i) { - InstructionStoreVectorElement(*inst_out.mutable_store_vector_element(), i); - }, - [&](const ir::Switch* i) { InstructionSwitch(*inst_out.mutable_switch_(), i); }, - [&](const ir::Swizzle* i) { InstructionSwizzle(*inst_out.mutable_swizzle(), i); }, - [&](const ir::UserCall* i) { InstructionUserCall(*inst_out.mutable_user_call(), i); }, - [&](const ir::Var* i) { InstructionVar(*inst_out.mutable_var(), i); }, - [&](const ir::Unreachable* i) { - InstructionUnreachable(*inst_out.mutable_unreachable(), i); - }, - TINT_ICE_ON_NO_MATCH); - for (auto* operand : inst_in->Operands()) { - inst_out.add_operands(Value(operand)); - } - for (auto* result : inst_in->Results()) { - inst_out.add_results(Value(result)); - } - } - - void InstructionAccess(pb::InstructionAccess&, const ir::Access*) {} - - void InstructionBinary(pb::InstructionBinary& binary_out, const ir::CoreBinary* binary_in) { - binary_out.set_op(BinaryOp(binary_in->Op())); - } - - void InstructionBitcast(pb::InstructionBitcast&, const ir::Bitcast*) {} - - void InstructionBreakIf(pb::InstructionBreakIf& breakif_out, const ir::BreakIf* breakif_in) { - auto num_next_iter_values = static_cast(breakif_in->NextIterValues().size()); - breakif_out.set_num_next_iter_values(num_next_iter_values); - } - - void InstructionBuiltinCall(pb::InstructionBuiltinCall& call_out, - const ir::CoreBuiltinCall* call_in) { - call_out.set_builtin(BuiltinFn(call_in->Func())); - for (auto* param : call_in->ExplicitTemplateParams()) { - call_out.add_explicit_template_params(Type(param)); - } - } - - void InstructionConstruct(pb::InstructionConstruct&, const ir::Construct*) {} - - void InstructionContinue(pb::InstructionContinue&, const ir::Continue*) {} - - void InstructionConvert(pb::InstructionConvert&, const ir::Convert*) {} - - void InstructionIf(pb::InstructionIf& if_out, const ir::If* if_in) { - if (auto* block = if_in->True()) { - if_out.set_true_(Block(block)); - } - if (auto* block = if_in->False()) { - if_out.set_false_(Block(block)); - } - } - - void InstructionDiscard(pb::InstructionDiscard&, const ir::Discard*) {} - - void InstructionExitIf(pb::InstructionExitIf&, const ir::ExitIf*) {} - - void InstructionExitLoop(pb::InstructionExitLoop&, const ir::ExitLoop*) {} - - void InstructionExitSwitch(pb::InstructionExitSwitch&, const ir::ExitSwitch*) {} - - void InstructionLet(pb::InstructionLet&, const ir::Let*) {} - - void InstructionLoad(pb::InstructionLoad&, const ir::Load*) {} - - void InstructionLoadVectorElement(pb::InstructionLoadVectorElement&, - const ir::LoadVectorElement*) {} - - void InstructionLoop(pb::InstructionLoop& loop_out, const ir::Loop* loop_in) { - if (loop_in->HasInitializer()) { - loop_out.set_initializer(Block(loop_in->Initializer())); - } - loop_out.set_body(Block(loop_in->Body())); - if (loop_in->HasContinuing()) { - loop_out.set_continuing(Block(loop_in->Continuing())); - } - } - - void InstructionNextIteration(pb::InstructionNextIteration&, const ir::NextIteration*) {} - - void InstructionReturn(pb::InstructionReturn&, const ir::Return*) {} - - void InstructionStore(pb::InstructionStore&, const ir::Store*) {} - - void InstructionStoreVectorElement(pb::InstructionStoreVectorElement&, - const ir::StoreVectorElement*) {} - - void InstructionSwizzle(pb::InstructionSwizzle& swizzle_out, const ir::Swizzle* swizzle_in) { - for (auto idx : swizzle_in->Indices()) { - swizzle_out.add_indices(idx); - } - } - - void InstructionSwitch(pb::InstructionSwitch& switch_out, const ir::Switch* switch_in) { - for (auto& case_in : switch_in->Cases()) { - auto& case_out = *switch_out.add_cases(); - case_out.set_block(Block(case_in.block)); - for (auto& selector_in : case_in.selectors) { - if (selector_in.IsDefault()) { - case_out.set_is_default(true); - } else { - case_out.add_selectors(ConstantValue(selector_in.val->Value())); - } - } - } - } - - void InstructionUnary(pb::InstructionUnary& unary_out, const ir::CoreUnary* unary_in) { - unary_out.set_op(UnaryOp(unary_in->Op())); - } - - void InstructionUserCall(pb::InstructionUserCall&, const ir::UserCall*) {} - - void InstructionVar(pb::InstructionVar& var_out, const ir::Var* var_in) { - if (auto bp_in = var_in->BindingPoint()) { - auto& bp_out = *var_out.mutable_binding_point(); - BindingPoint(bp_out, *bp_in); - } - if (auto iidx_in = var_in->InputAttachmentIndex()) { - var_out.set_input_attachment_index(iidx_in.value()); - } - } - - void InstructionUnreachable(pb::InstructionUnreachable&, const ir::Unreachable*) {} - - //////////////////////////////////////////////////////////////////////////// - // Types - //////////////////////////////////////////////////////////////////////////// - uint32_t Type(const core::type::Type* type_in) { - TINT_ASSERT(type_in != nullptr); - return types_.GetOrAdd(type_in, [&]() -> uint32_t { - pb::Type type_out; - tint::Switch( - type_in, // - [&](const core::type::Void*) { type_out.set_basic(pb::TypeBasic::void_); }, - [&](const core::type::Bool*) { type_out.set_basic(pb::TypeBasic::bool_); }, - [&](const core::type::I32*) { type_out.set_basic(pb::TypeBasic::i32); }, - [&](const core::type::U32*) { type_out.set_basic(pb::TypeBasic::u32); }, - [&](const core::type::F32*) { type_out.set_basic(pb::TypeBasic::f32); }, - [&](const core::type::F16*) { type_out.set_basic(pb::TypeBasic::f16); }, - [&](const core::type::I8*) { type_out.set_basic((pb::TypeBasic::i8)); }, - [&](const core::type::U8*) { type_out.set_basic((pb::TypeBasic::u8)); }, - [&](const core::type::Vector* v) { TypeVector(*type_out.mutable_vector(), v); }, - [&](const core::type::Matrix* m) { TypeMatrix(*type_out.mutable_matrix(), m); }, - [&](const core::type::Pointer* m) { TypePointer(*type_out.mutable_pointer(), m); }, - [&](const core::type::Struct* s) { TypeStruct(*type_out.mutable_struct_(), s); }, - [&](const core::type::Atomic* a) { TypeAtomic(*type_out.mutable_atomic(), a); }, - [&](const core::type::Array* m) { TypeArray(*type_out.mutable_array(), m); }, - [&](const core::type::BindingArray* a) { - TypeBindingArray(*type_out.mutable_binding_array(), a); - }, - [&](const core::type::DepthTexture* t) { - TypeDepthTexture(*type_out.mutable_depth_texture(), t); - }, - [&](const core::type::SampledTexture* t) { - TypeSampledTexture(*type_out.mutable_sampled_texture(), t); - }, - [&](const core::type::MultisampledTexture* t) { - TypeMultisampledTexture(*type_out.mutable_multisampled_texture(), t); - }, - [&](const core::type::DepthMultisampledTexture* t) { - TypeDepthMultisampledTexture(*type_out.mutable_depth_multisampled_texture(), t); - }, - [&](const core::type::StorageTexture* t) { - TypeStorageTexture(*type_out.mutable_storage_texture(), t); - }, - [&](const core::type::TexelBuffer* t) { - TypeTexelBuffer(*type_out.mutable_texel_buffer(), t); - }, - [&](const core::type::ExternalTexture* t) { - TypeExternalTexture(*type_out.mutable_external_texture(), t); - }, - [&](const core::type::Sampler* s) { TypeSampler(*type_out.mutable_sampler(), s); }, - [&](const core::type::InputAttachment* i) { - TypeInputAttachment(*type_out.mutable_input_attachment(), i); - }, - [&]([[maybe_unused]] const core::type::SubgroupMatrix* s) { - switch (s->Kind()) { - case core::SubgroupMatrixKind::kLeft: - TypeSubgroupMatrix(*type_out.mutable_subgroup_matrix_left(), s); - break; - case core::SubgroupMatrixKind::kRight: - TypeSubgroupMatrix(*type_out.mutable_subgroup_matrix_right(), s); - break; - case core::SubgroupMatrixKind::kResult: - TypeSubgroupMatrix(*type_out.mutable_subgroup_matrix_result(), s); - break; - default: - TINT_ICE() << "invalid subgroup matrix kind: " << ToString(s->Kind()); - } - }, - [&](const core::type::Buffer* b) { TypeBuffer(*type_out.mutable_buffer(), b); }, - TINT_ICE_ON_NO_MATCH); - - mod_out_.mutable_types()->Add(std::move(type_out)); - return static_cast(mod_out_.types().size() - 1); - }); - } - - void TypeVector(pb::TypeVector& vector_out, const core::type::Vector* vector_in) { - vector_out.set_width(vector_in->Width()); - vector_out.set_element_type(Type(vector_in->Type())); - } - - void TypeMatrix(pb::TypeMatrix& matrix_out, const core::type::Matrix* matrix_in) { - matrix_out.set_num_columns(matrix_in->Columns()); - matrix_out.set_num_rows(matrix_in->Rows()); - matrix_out.set_element_type(Type(matrix_in->Type())); - } - - void TypePointer(pb::TypePointer& pointer_out, const core::type::Pointer* pointer_in) { - pointer_out.set_address_space(AddressSpace(pointer_in->AddressSpace())); - pointer_out.set_store_type(Type(pointer_in->StoreType())); - pointer_out.set_access(AccessControl(pointer_in->Access())); - } - - void TypeStruct(pb::TypeStruct& struct_out, const core::type::Struct* struct_in) { - struct_out.set_name(struct_in->Name().Name()); - for (auto* member_in : struct_in->Members()) { - auto& member_out = *struct_out.add_member(); - member_out.set_name(member_in->Name().Name()); - member_out.set_type(Type(member_in->Type())); - member_out.set_size(member_in->Size()); - member_out.set_align(member_in->Align()); - - auto& attrs_in = member_in->Attributes(); - if (attrs_in.location) { - member_out.mutable_attributes()->set_location(*attrs_in.location); - } - if (attrs_in.blend_src) { - member_out.mutable_attributes()->set_blend_src(*attrs_in.blend_src); - } - if (attrs_in.color) { - member_out.mutable_attributes()->set_color(*attrs_in.color); - } - if (attrs_in.builtin) { - member_out.mutable_attributes()->set_builtin(BuiltinValue(*attrs_in.builtin)); - } - if (auto& interpolation_in = attrs_in.interpolation) { - auto& interpolation_out = *member_out.mutable_attributes()->mutable_interpolation(); - Interpolation(interpolation_out, *interpolation_in); - } - if (attrs_in.invariant) { - member_out.mutable_attributes()->set_invariant(true); - } - } - } - - void TypeAtomic(pb::TypeAtomic& atomic_out, const core::type::Atomic* atomic_in) { - atomic_out.set_type(Type(atomic_in->Type())); - } - - void TypeArray(pb::TypeArray& array_out, const core::type::Array* array_in) { - array_out.set_element(Type(array_in->ElemType())); - tint::Switch( - array_in->Count(), // - [&](const core::type::ConstantArrayCount* c) { - array_out.set_count(c->value); - if (c->value >= internal_limits::kMaxArrayElementCount) { - err_ << "array count (" << c->value << ") must be less than " - << internal_limits::kMaxArrayElementCount << "\n"; - } - }, - [&](const core::type::RuntimeArrayCount*) { array_out.set_count(0); }, - TINT_ICE_ON_NO_MATCH); - } - - void TypeBindingArray(pb::TypeBindingArray& array_out, - const core::type::BindingArray* array_in) { - array_out.set_element(Type(array_in->ElemType())); - tint::Switch( - array_in->Count(), // - [&](const core::type::ConstantArrayCount* c) { - array_out.set_count(c->value); - if (c->value >= internal_limits::kMaxArrayElementCount) { - err_ << "binding_array count (" << c->value << ") must be less than " - << internal_limits::kMaxArrayElementCount << "\n"; - } - }, - TINT_ICE_ON_NO_MATCH); - } - - void TypeDepthTexture(pb::TypeDepthTexture& texture_out, - const core::type::DepthTexture* texture_in) { - texture_out.set_dimension(TextureDimension(texture_in->Dim())); - } - - void TypeSampledTexture(pb::TypeSampledTexture& texture_out, - const core::type::SampledTexture* texture_in) { - texture_out.set_dimension(TextureDimension(texture_in->Dim())); - texture_out.set_sub_type(Type(texture_in->Type())); - } - - void TypeMultisampledTexture(pb::TypeMultisampledTexture& texture_out, - const core::type::MultisampledTexture* texture_in) { - texture_out.set_dimension(TextureDimension(texture_in->Dim())); - texture_out.set_sub_type(Type(texture_in->Type())); - } - - void TypeDepthMultisampledTexture(pb::TypeDepthMultisampledTexture& texture_out, - const core::type::DepthMultisampledTexture* texture_in) { - texture_out.set_dimension(TextureDimension(texture_in->Dim())); - } - - void TypeStorageTexture(pb::TypeStorageTexture& texture_out, - const core::type::StorageTexture* texture_in) { - texture_out.set_dimension(TextureDimension(texture_in->Dim())); - texture_out.set_texel_format(TexelFormat(texture_in->TexelFormat())); - texture_out.set_access(AccessControl(texture_in->Access())); - } - - void TypeTexelBuffer(pb::TypeTexelBuffer& buffer_out, - const core::type::TexelBuffer* buffer_in) { - buffer_out.set_texel_format(TexelFormat(buffer_in->TexelFormat())); - buffer_out.set_access(AccessControl(buffer_in->Access())); - } - - void TypeExternalTexture(pb::TypeExternalTexture&, const core::type::ExternalTexture*) {} - - void TypeInputAttachment(pb::TypeInputAttachment& input_attachment_out, - const core::type::InputAttachment* input_attachment_in) { - input_attachment_out.set_sub_type(Type(input_attachment_in->Type())); - } - - void TypeSampler(pb::TypeSampler& sampler_out, const core::type::Sampler* sampler_in) { - sampler_out.set_kind(SamplerKind(sampler_in->Kind())); - } - - void TypeSubgroupMatrix(pb::TypeSubgroupMatrix& subgroup_matrix_out, - const core::type::SubgroupMatrix* subgroup_matrix_in) { - subgroup_matrix_out.set_sub_type(Type(subgroup_matrix_in->Type())); - subgroup_matrix_out.set_columns(subgroup_matrix_in->Columns()); - subgroup_matrix_out.set_rows(subgroup_matrix_in->Rows()); - } - - void TypeBuffer(pb::TypeBuffer& buffer_out, const core::type::Buffer* buffer_in) { - tint::Switch( - buffer_in->Count(), // - [&](const core::type::ConstantArrayCount* c) { - buffer_out.set_count(c->value); - if (c->value >= internal_limits::kMaxArrayElementCount) { - err_ << "array count (" << c->value << ") must be less than " - << internal_limits::kMaxArrayElementCount << "\n"; - } - }, - [&](const core::type::RuntimeArrayCount*) { buffer_out.set_count(0); }, - TINT_ICE_ON_NO_MATCH); - } - - [[maybe_unused]] void TypeBuitinStruct(pb::Type& builtin_struct_out, - const core::type::Struct* builtin_struct_in) { - auto name = builtin_struct_in->Name().NameView(); - auto builtin = ParseBuiltinType(name); - switch (builtin) { - case BuiltinType::kAtomicCompareExchangeResultI32: - builtin_struct_out.set_builtin_struct( - pb::TypeBuiltinStruct::AtomicCompareExchangeResultI32); - break; - case BuiltinType::kAtomicCompareExchangeResultU32: - builtin_struct_out.set_builtin_struct( - pb::TypeBuiltinStruct::AtomicCompareExchangeResultU32); - break; - case BuiltinType::kFrexpResultF16: - builtin_struct_out.set_builtin_struct(pb::TypeBuiltinStruct::FrexpResultF16); - break; - case BuiltinType::kFrexpResultF32: - builtin_struct_out.set_builtin_struct(pb::TypeBuiltinStruct::FrexpResultF32); - break; - case BuiltinType::kFrexpResultVec2F16: - builtin_struct_out.set_builtin_struct(pb::TypeBuiltinStruct::FrexpResultVec2F16); - break; - case BuiltinType::kFrexpResultVec2F32: - builtin_struct_out.set_builtin_struct(pb::TypeBuiltinStruct::FrexpResultVec2F32); - break; - case BuiltinType::kFrexpResultVec3F16: - builtin_struct_out.set_builtin_struct(pb::TypeBuiltinStruct::FrexpResultVec3F16); - break; - case BuiltinType::kFrexpResultVec3F32: - builtin_struct_out.set_builtin_struct(pb::TypeBuiltinStruct::FrexpResultVec3F32); - break; - case BuiltinType::kFrexpResultVec4F16: - builtin_struct_out.set_builtin_struct(pb::TypeBuiltinStruct::FrexpResultVec4F16); - break; - case BuiltinType::kFrexpResultVec4F32: - builtin_struct_out.set_builtin_struct(pb::TypeBuiltinStruct::FrexpResultVec4F32); - break; - case BuiltinType::kModfResultF16: - builtin_struct_out.set_builtin_struct(pb::TypeBuiltinStruct::ModfResultF16); - break; - case BuiltinType::kModfResultF32: - builtin_struct_out.set_builtin_struct(pb::TypeBuiltinStruct::ModfResultF32); - break; - case BuiltinType::kModfResultVec2F16: - builtin_struct_out.set_builtin_struct(pb::TypeBuiltinStruct::ModfResultVec2F16); - break; - case BuiltinType::kModfResultVec2F32: - builtin_struct_out.set_builtin_struct(pb::TypeBuiltinStruct::ModfResultVec2F32); - break; - case BuiltinType::kModfResultVec3F16: - builtin_struct_out.set_builtin_struct(pb::TypeBuiltinStruct::ModfResultVec3F16); - break; - case BuiltinType::kModfResultVec3F32: - builtin_struct_out.set_builtin_struct(pb::TypeBuiltinStruct::ModfResultVec3F32); - break; - case BuiltinType::kModfResultVec4F16: - builtin_struct_out.set_builtin_struct(pb::TypeBuiltinStruct::ModfResultVec4F16); - break; - case BuiltinType::kModfResultVec4F32: - builtin_struct_out.set_builtin_struct(pb::TypeBuiltinStruct::ModfResultVec4F32); - break; - default: - TINT_ICE() << "unhandled builtin struct " << name; - } - } - - //////////////////////////////////////////////////////////////////////////// - // Values - //////////////////////////////////////////////////////////////////////////// - uint32_t Value(const ir::Value* value_in) { - if (!value_in) { - return 0; - } - return values_.GetOrAdd(value_in, [&] { - auto& value_out = *mod_out_.add_values(); - auto id = static_cast(mod_out_.values().size()); - - tint::Switch( - value_in, - [&](const ir::InstructionResult* v) { - InstructionResult(*value_out.mutable_instruction_result(), v); - }, - [&](const ir::FunctionParam* v) { - FunctionParameter(*value_out.mutable_function_parameter(), v); - }, - [&](const ir::BlockParam* v) { - BlockParameter(*value_out.mutable_block_parameter(), v); - }, - [&](const ir::Function* v) { value_out.set_function(Function(v)); }, - [&](const ir::Constant* v) { value_out.set_constant(ConstantValue(v->Value())); }, - TINT_ICE_ON_NO_MATCH); - - return id; - }); - } - - void InstructionResult(pb::InstructionResult& res_out, const ir::InstructionResult* res_in) { - res_out.set_type(Type(res_in->Type())); - if (auto name = mod_in_.NameOf(res_in); name.IsValid()) { - res_out.set_name(name.Name()); - } - } - - void FunctionParameter(pb::FunctionParameter& param_out, const ir::FunctionParam* param_in) { - param_out.set_type(Type(param_in->Type())); - if (auto name = mod_in_.NameOf(param_in); name.IsValid()) { - param_out.set_name(name.Name()); - } - if (auto bp_in = param_in->BindingPoint()) { - auto& bp_out = *param_out.mutable_attributes()->mutable_binding_point(); - BindingPoint(bp_out, *bp_in); - } - if (auto location_in = param_in->Location()) { - param_out.mutable_attributes()->set_location(*location_in); - } - if (auto color_in = param_in->Color()) { - param_out.mutable_attributes()->set_color(*color_in); - } - if (auto interpolation_in = param_in->Interpolation()) { - auto& interpolation_out = *param_out.mutable_attributes()->mutable_interpolation(); - Interpolation(interpolation_out, *interpolation_in); - } - if (auto builtin_in = param_in->Builtin()) { - param_out.mutable_attributes()->set_builtin(BuiltinValue(*builtin_in)); - } - if (param_in->Invariant()) { - param_out.mutable_attributes()->set_invariant(true); - } - } - - void BlockParameter(pb::BlockParameter& param_out, const ir::BlockParam* param_in) { - param_out.set_type(Type(param_in->Type())); - if (auto name = mod_in_.NameOf(param_in); name.IsValid()) { - param_out.set_name(name.Name()); - } - } - - //////////////////////////////////////////////////////////////////////////// - // ConstantValues - //////////////////////////////////////////////////////////////////////////// - uint32_t ConstantValue(const core::constant::Value* constant_in) { - TINT_ASSERT(constant_in != nullptr); - return constant_values_.GetOrAdd(constant_in, [&] { - pb::ConstantValue constant_out; - tint::Switch( - constant_in, // - [&](const core::constant::Scalar* b) { - constant_out.mutable_scalar()->set_bool_(b->value); - }, - [&](const core::constant::Scalar* i32) { - constant_out.mutable_scalar()->set_i32(i32->value); - }, - [&](const core::constant::Scalar* u32) { - constant_out.mutable_scalar()->set_u32(u32->value); - }, - [&](const core::constant::Scalar* f32) { - constant_out.mutable_scalar()->set_f32(f32->value); - }, - [&](const core::constant::Scalar* f16) { - constant_out.mutable_scalar()->set_f16(f16->value); - }, - [&](const core::constant::Composite* composite) { - ConstantValueComposite(*constant_out.mutable_composite(), composite); - }, - [&](const core::constant::Splat* splat) { - ConstantValueSplat(*constant_out.mutable_splat(), splat); - }, - TINT_ICE_ON_NO_MATCH); - - mod_out_.mutable_constant_values()->Add(std::move(constant_out)); - return static_cast(mod_out_.constant_values().size() - 1); - }); - } - - void ConstantValueComposite(pb::ConstantValueComposite& composite_out, - const core::constant::Composite* composite_in) { - composite_out.set_type(Type(composite_in->type)); - for (auto* el : composite_in->elements) { - composite_out.add_elements(ConstantValue(el)); - } - } - - void ConstantValueSplat(pb::ConstantValueSplat& splat_out, - const core::constant::Splat* splat_in) { - splat_out.set_type(Type(splat_in->type)); - if (DAWN_UNLIKELY(splat_in->count > internal_limits::kMaxArrayConstructorElements)) { - err_ << "array constructor has excessive number of elements (>" - << internal_limits::kMaxArrayConstructorElements << ")\n"; - } - splat_out.set_elements(ConstantValue(splat_in->el)); - splat_out.set_count(static_cast(splat_in->count)); - } - - //////////////////////////////////////////////////////////////////////////// - // Attributes - //////////////////////////////////////////////////////////////////////////// - void Interpolation(pb::Interpolation& interpolation_out, - const core::Interpolation& interpolation_in) { - interpolation_out.set_type(InterpolationType(interpolation_in.type)); - if (interpolation_in.sampling != InterpolationSampling::kUndefined) { - interpolation_out.set_sampling(InterpolationSampling(interpolation_in.sampling)); - } - } - - void BindingPoint(pb::BindingPoint& binding_point_out, const BindingPoint& binding_point_in) { - binding_point_out.set_group(binding_point_in.group); - binding_point_out.set_binding(binding_point_in.binding); - } - - //////////////////////////////////////////////////////////////////////////// - // Enums - //////////////////////////////////////////////////////////////////////////// - pb::AddressSpace AddressSpace(core::AddressSpace in) { - switch (in) { - case core::AddressSpace::kFunction: - return pb::AddressSpace::function; - case core::AddressSpace::kHandle: - return pb::AddressSpace::handle; - case core::AddressSpace::kPixelLocal: - return pb::AddressSpace::pixel_local; - case core::AddressSpace::kPrivate: - return pb::AddressSpace::private_; - case core::AddressSpace::kImmediate: - return pb::AddressSpace::immediate; - case core::AddressSpace::kStorage: - return pb::AddressSpace::storage; - case core::AddressSpace::kUniform: - return pb::AddressSpace::uniform; - case core::AddressSpace::kWorkgroup: - return pb::AddressSpace::workgroup; - - case core::AddressSpace::kUndefined: - case core::AddressSpace::kIn: - case core::AddressSpace::kOut: - break; - } - TINT_ICE() << "invalid AddressSpace: " << in; - } - - pb::AccessControl AccessControl(core::Access in) { - switch (in) { - case core::Access::kRead: - return pb::AccessControl::read; - case core::Access::kWrite: - return pb::AccessControl::write; - case core::Access::kReadWrite: - return pb::AccessControl::read_write; - case core::Access::kUndefined: - break; - } - TINT_ICE() << "invalid Access: " << in; - } - - pb::UnaryOp UnaryOp(core::UnaryOp in) { - switch (in) { - case core::UnaryOp::kComplement: - return pb::UnaryOp::complement; - case core::UnaryOp::kNegation: - return pb::UnaryOp::negation; - case core::UnaryOp::kAddressOf: - return pb::UnaryOp::address_of; - case core::UnaryOp::kIndirection: - return pb::UnaryOp::indirection; - case core::UnaryOp::kNot: - return pb::UnaryOp::not_; - } - TINT_ICE() << "invalid UnaryOp: " << in; - } - - pb::BinaryOp BinaryOp(core::BinaryOp in) { - switch (in) { - case core::BinaryOp::kAdd: - return pb::BinaryOp::add_; - case core::BinaryOp::kSubtract: - return pb::BinaryOp::subtract; - case core::BinaryOp::kMultiply: - return pb::BinaryOp::multiply; - case core::BinaryOp::kDivide: - return pb::BinaryOp::divide; - case core::BinaryOp::kModulo: - return pb::BinaryOp::modulo; - case core::BinaryOp::kAnd: - return pb::BinaryOp::and_; - case core::BinaryOp::kOr: - return pb::BinaryOp::or_; - case core::BinaryOp::kXor: - return pb::BinaryOp::xor_; - case core::BinaryOp::kEqual: - return pb::BinaryOp::equal; - case core::BinaryOp::kNotEqual: - return pb::BinaryOp::not_equal; - case core::BinaryOp::kLessThan: - return pb::BinaryOp::less_than; - case core::BinaryOp::kGreaterThan: - return pb::BinaryOp::greater_than; - case core::BinaryOp::kLessThanEqual: - return pb::BinaryOp::less_than_equal; - case core::BinaryOp::kGreaterThanEqual: - return pb::BinaryOp::greater_than_equal; - case core::BinaryOp::kShiftLeft: - return pb::BinaryOp::shift_left; - case core::BinaryOp::kShiftRight: - return pb::BinaryOp::shift_right; - case core::BinaryOp::kLogicalAnd: - return pb::BinaryOp::logical_and; - case core::BinaryOp::kLogicalOr: - return pb::BinaryOp::logical_or; - } - - TINT_ICE() << "invalid BinaryOp: " << in; - } - - pb::TextureDimension TextureDimension(core::type::TextureDimension in) { - switch (in) { - case core::type::TextureDimension::k1d: - return pb::TextureDimension::_1d; - case core::type::TextureDimension::k2d: - return pb::TextureDimension::_2d; - case core::type::TextureDimension::k2dArray: - return pb::TextureDimension::_2d_array; - case core::type::TextureDimension::k3d: - return pb::TextureDimension::_3d; - case core::type::TextureDimension::kCube: - return pb::TextureDimension::cube; - case core::type::TextureDimension::kCubeArray: - return pb::TextureDimension::cube_array; - case core::type::TextureDimension::kNone: - break; - } - - TINT_ICE() << "invalid TextureDimension: " << in; - } - - pb::TexelFormat TexelFormat(core::TexelFormat in) { - switch (in) { - case core::TexelFormat::kBgra8Unorm: - return pb::TexelFormat::bgra8_unorm; - case core::TexelFormat::kR32Float: - return pb::TexelFormat::r32_float; - case core::TexelFormat::kR32Sint: - return pb::TexelFormat::r32_sint; - case core::TexelFormat::kR32Uint: - return pb::TexelFormat::r32_uint; - case core::TexelFormat::kR8Unorm: - return pb::TexelFormat::r8_unorm; - case core::TexelFormat::kRg32Float: - return pb::TexelFormat::rg32_float; - case core::TexelFormat::kRg32Sint: - return pb::TexelFormat::rg32_sint; - case core::TexelFormat::kRg32Uint: - return pb::TexelFormat::rg32_uint; - case core::TexelFormat::kRgba16Float: - return pb::TexelFormat::rgba16_float; - case core::TexelFormat::kRgba16Sint: - return pb::TexelFormat::rgba16_sint; - case core::TexelFormat::kRgba16Uint: - return pb::TexelFormat::rgba16_uint; - case core::TexelFormat::kRgba32Float: - return pb::TexelFormat::rgba32_float; - case core::TexelFormat::kRgba32Sint: - return pb::TexelFormat::rgba32_sint; - case core::TexelFormat::kRgba32Uint: - return pb::TexelFormat::rgba32_uint; - case core::TexelFormat::kRgba8Sint: - return pb::TexelFormat::rgba8_sint; - case core::TexelFormat::kRgba8Snorm: - return pb::TexelFormat::rgba8_snorm; - case core::TexelFormat::kRgba8Uint: - return pb::TexelFormat::rgba8_uint; - case core::TexelFormat::kRgba8Unorm: - return pb::TexelFormat::rgba8_unorm; - case core::TexelFormat::kR8Snorm: - return pb::TexelFormat::r8_snorm; - case core::TexelFormat::kR8Uint: - return pb::TexelFormat::r8_uint; - case core::TexelFormat::kR8Sint: - return pb::TexelFormat::r8_sint; - case core::TexelFormat::kRg8Unorm: - return pb::TexelFormat::rg8_unorm; - case core::TexelFormat::kRg8Snorm: - return pb::TexelFormat::rg8_snorm; - case core::TexelFormat::kRg8Uint: - return pb::TexelFormat::rg8_uint; - case core::TexelFormat::kRg8Sint: - return pb::TexelFormat::rg8_sint; - case core::TexelFormat::kR16Uint: - return pb::TexelFormat::r16_uint; - case core::TexelFormat::kR16Sint: - return pb::TexelFormat::r16_sint; - case core::TexelFormat::kR16Float: - return pb::TexelFormat::r16_float; - case core::TexelFormat::kRg16Uint: - return pb::TexelFormat::rg16_uint; - case core::TexelFormat::kRg16Sint: - return pb::TexelFormat::rg16_sint; - case core::TexelFormat::kRg16Float: - return pb::TexelFormat::rg16_float; - case core::TexelFormat::kRgb10A2Uint: - return pb::TexelFormat::rgb10a2_uint; - case core::TexelFormat::kRgb10A2Unorm: - return pb::TexelFormat::rgb10a2_unorm; - case core::TexelFormat::kRg11B10Ufloat: - return pb::TexelFormat::rg11b10_ufloat; - case core::TexelFormat::kR16Unorm: - return pb::TexelFormat::r16_unorm; - case core::TexelFormat::kR16Snorm: - return pb::TexelFormat::r16_snorm; - case core::TexelFormat::kRg16Unorm: - return pb::TexelFormat::rg16_unorm; - case core::TexelFormat::kRg16Snorm: - return pb::TexelFormat::rg16_snorm; - case core::TexelFormat::kRgba16Unorm: - return pb::TexelFormat::rgba16_unorm; - case core::TexelFormat::kRgba16Snorm: - return pb::TexelFormat::rgba16_snorm; - case core::TexelFormat::kUndefined: - break; - } - - TINT_ICE() << "invalid TexelFormat: " << in; - } - - pb::SamplerKind SamplerKind(core::type::SamplerKind in) { - switch (in) { - case core::type::SamplerKind::kSampler: - return pb::SamplerKind::sampler; - case core::type::SamplerKind::kComparisonSampler: - return pb::SamplerKind::comparison; - } - - TINT_ICE() << "invalid SamplerKind: " << in; - } - - pb::InterpolationType InterpolationType(core::InterpolationType in) { - switch (in) { - case core::InterpolationType::kFlat: - return pb::InterpolationType::flat; - case core::InterpolationType::kLinear: - return pb::InterpolationType::linear; - case core::InterpolationType::kPerspective: - return pb::InterpolationType::perspective; - case core::InterpolationType::kUndefined: - break; - } - TINT_ICE() << "invalid InterpolationType: " << in; - } - - pb::InterpolationSampling InterpolationSampling(core::InterpolationSampling in) { - switch (in) { - case core::InterpolationSampling::kCenter: - return pb::InterpolationSampling::center; - case core::InterpolationSampling::kCentroid: - return pb::InterpolationSampling::centroid; - case core::InterpolationSampling::kSample: - return pb::InterpolationSampling::sample; - case core::InterpolationSampling::kFirst: - return pb::InterpolationSampling::first; - case core::InterpolationSampling::kEither: - return pb::InterpolationSampling::either; - case core::InterpolationSampling::kUndefined: - break; - } - TINT_ICE() << "invalid InterpolationSampling: " << in; - } - - pb::BuiltinValue BuiltinValue(core::BuiltinValue in) { - switch (in) { - case core::BuiltinValue::kPointSize: - return pb::BuiltinValue::point_size; - case core::BuiltinValue::kCullDistance: - return pb::BuiltinValue::cull_distance; - case core::BuiltinValue::kFragDepth: - return pb::BuiltinValue::frag_depth; - case core::BuiltinValue::kFrontFacing: - return pb::BuiltinValue::front_facing; - case core::BuiltinValue::kGlobalInvocationId: - return pb::BuiltinValue::global_invocation_id; - case core::BuiltinValue::kInstanceIndex: - return pb::BuiltinValue::instance_index; - case core::BuiltinValue::kLocalInvocationId: - return pb::BuiltinValue::local_invocation_id; - case core::BuiltinValue::kLocalInvocationIndex: - return pb::BuiltinValue::local_invocation_index; - case core::BuiltinValue::kNumWorkgroups: - return pb::BuiltinValue::num_workgroups; - case core::BuiltinValue::kPosition: - return pb::BuiltinValue::position; - case core::BuiltinValue::kSampleIndex: - return pb::BuiltinValue::sample_index; - case core::BuiltinValue::kSampleMask: - return pb::BuiltinValue::sample_mask; - case core::BuiltinValue::kSubgroupId: - return pb::BuiltinValue::subgroup_id; - case core::BuiltinValue::kSubgroupInvocationId: - return pb::BuiltinValue::subgroup_invocation_id; - case core::BuiltinValue::kSubgroupSize: - return pb::BuiltinValue::subgroup_size; - case core::BuiltinValue::kNumSubgroups: - return pb::BuiltinValue::num_subgroups; - case core::BuiltinValue::kVertexIndex: - return pb::BuiltinValue::vertex_index; - case core::BuiltinValue::kWorkgroupId: - return pb::BuiltinValue::workgroup_id; - case core::BuiltinValue::kClipDistances: - return pb::BuiltinValue::clip_distances; - case core::BuiltinValue::kPrimitiveIndex: - return pb::BuiltinValue::primitive_index; - case core::BuiltinValue::kBarycentricCoord: - return pb::BuiltinValue::barycentric_coord; - case core::BuiltinValue::kUndefined: - break; - } - TINT_ICE() << "invalid BuiltinValue: " << in; - } - - pb::BuiltinFn BuiltinFn(core::BuiltinFn in) { - switch (in) { - case core::BuiltinFn::kAbs: - return pb::BuiltinFn::abs; - case core::BuiltinFn::kAcos: - return pb::BuiltinFn::acos; - case core::BuiltinFn::kAcosh: - return pb::BuiltinFn::acosh; - case core::BuiltinFn::kAll: - return pb::BuiltinFn::all; - case core::BuiltinFn::kAny: - return pb::BuiltinFn::any; - case core::BuiltinFn::kArrayLength: - return pb::BuiltinFn::array_length; - case core::BuiltinFn::kAsin: - return pb::BuiltinFn::asin; - case core::BuiltinFn::kAsinh: - return pb::BuiltinFn::asinh; - case core::BuiltinFn::kAtan: - return pb::BuiltinFn::atan; - case core::BuiltinFn::kAtan2: - return pb::BuiltinFn::atan2; - case core::BuiltinFn::kAtanh: - return pb::BuiltinFn::atanh; - case core::BuiltinFn::kCeil: - return pb::BuiltinFn::ceil; - case core::BuiltinFn::kClamp: - return pb::BuiltinFn::clamp; - case core::BuiltinFn::kCos: - return pb::BuiltinFn::cos; - case core::BuiltinFn::kCosh: - return pb::BuiltinFn::cosh; - case core::BuiltinFn::kCountLeadingZeros: - return pb::BuiltinFn::count_leading_zeros; - case core::BuiltinFn::kCountOneBits: - return pb::BuiltinFn::count_one_bits; - case core::BuiltinFn::kCountTrailingZeros: - return pb::BuiltinFn::count_trailing_zeros; - case core::BuiltinFn::kCross: - return pb::BuiltinFn::cross; - case core::BuiltinFn::kDegrees: - return pb::BuiltinFn::degrees; - case core::BuiltinFn::kDeterminant: - return pb::BuiltinFn::determinant; - case core::BuiltinFn::kDistance: - return pb::BuiltinFn::distance; - case core::BuiltinFn::kDot: - return pb::BuiltinFn::dot; - case core::BuiltinFn::kDot4I8Packed: - return pb::BuiltinFn::dot4i8_packed; - case core::BuiltinFn::kDot4U8Packed: - return pb::BuiltinFn::dot4u8_packed; - case core::BuiltinFn::kDpdx: - return pb::BuiltinFn::dpdx; - case core::BuiltinFn::kDpdxCoarse: - return pb::BuiltinFn::dpdx_coarse; - case core::BuiltinFn::kDpdxFine: - return pb::BuiltinFn::dpdx_fine; - case core::BuiltinFn::kDpdy: - return pb::BuiltinFn::dpdy; - case core::BuiltinFn::kDpdyCoarse: - return pb::BuiltinFn::dpdy_coarse; - case core::BuiltinFn::kDpdyFine: - return pb::BuiltinFn::dpdy_fine; - case core::BuiltinFn::kExp: - return pb::BuiltinFn::exp; - case core::BuiltinFn::kExp2: - return pb::BuiltinFn::exp2; - case core::BuiltinFn::kExtractBits: - return pb::BuiltinFn::extract_bits; - case core::BuiltinFn::kFaceForward: - return pb::BuiltinFn::face_forward; - case core::BuiltinFn::kFirstLeadingBit: - return pb::BuiltinFn::first_leading_bit; - case core::BuiltinFn::kFirstTrailingBit: - return pb::BuiltinFn::first_trailing_bit; - case core::BuiltinFn::kFloor: - return pb::BuiltinFn::floor; - case core::BuiltinFn::kFma: - return pb::BuiltinFn::fma; - case core::BuiltinFn::kFract: - return pb::BuiltinFn::fract; - case core::BuiltinFn::kFrexp: - return pb::BuiltinFn::frexp; - case core::BuiltinFn::kFwidth: - return pb::BuiltinFn::fwidth; - case core::BuiltinFn::kFwidthCoarse: - return pb::BuiltinFn::fwidth_coarse; - case core::BuiltinFn::kFwidthFine: - return pb::BuiltinFn::fwidth_fine; - case core::BuiltinFn::kInsertBits: - return pb::BuiltinFn::insert_bits; - case core::BuiltinFn::kInverseSqrt: - return pb::BuiltinFn::inverse_sqrt; - case core::BuiltinFn::kLdexp: - return pb::BuiltinFn::ldexp; - case core::BuiltinFn::kLength: - return pb::BuiltinFn::length; - case core::BuiltinFn::kLog: - return pb::BuiltinFn::log; - case core::BuiltinFn::kLog2: - return pb::BuiltinFn::log2; - case core::BuiltinFn::kMax: - return pb::BuiltinFn::max; - case core::BuiltinFn::kMin: - return pb::BuiltinFn::min; - case core::BuiltinFn::kMix: - return pb::BuiltinFn::mix; - case core::BuiltinFn::kModf: - return pb::BuiltinFn::modf; - case core::BuiltinFn::kNormalize: - return pb::BuiltinFn::normalize; - case core::BuiltinFn::kPack2X16Float: - return pb::BuiltinFn::pack2x16_float; - case core::BuiltinFn::kPack2X16Snorm: - return pb::BuiltinFn::pack2x16_snorm; - case core::BuiltinFn::kPack2X16Unorm: - return pb::BuiltinFn::pack2x16_unorm; - case core::BuiltinFn::kPack4X8Snorm: - return pb::BuiltinFn::pack4x8_snorm; - case core::BuiltinFn::kPack4X8Unorm: - return pb::BuiltinFn::pack4x8_unorm; - case core::BuiltinFn::kPack4XI8: - return pb::BuiltinFn::pack4xi8; - case core::BuiltinFn::kPack4XU8: - return pb::BuiltinFn::pack4xu8; - case core::BuiltinFn::kPack4XI8Clamp: - return pb::BuiltinFn::pack4xi8_clamp; - case core::BuiltinFn::kPack4XU8Clamp: - return pb::BuiltinFn::pack4xu8_clamp; - case core::BuiltinFn::kPow: - return pb::BuiltinFn::pow; - case core::BuiltinFn::kQuantizeToF16: - return pb::BuiltinFn::quantize_to_f16; - case core::BuiltinFn::kRadians: - return pb::BuiltinFn::radians; - case core::BuiltinFn::kReflect: - return pb::BuiltinFn::reflect; - case core::BuiltinFn::kRefract: - return pb::BuiltinFn::refract; - case core::BuiltinFn::kReverseBits: - return pb::BuiltinFn::reverse_bits; - case core::BuiltinFn::kRound: - return pb::BuiltinFn::round; - case core::BuiltinFn::kSaturate: - return pb::BuiltinFn::saturate; - case core::BuiltinFn::kSelect: - return pb::BuiltinFn::select; - case core::BuiltinFn::kSign: - return pb::BuiltinFn::sign; - case core::BuiltinFn::kSin: - return pb::BuiltinFn::sin; - case core::BuiltinFn::kSinh: - return pb::BuiltinFn::sinh; - case core::BuiltinFn::kSmoothstep: - return pb::BuiltinFn::smoothstep; - case core::BuiltinFn::kSqrt: - return pb::BuiltinFn::sqrt; - case core::BuiltinFn::kStep: - return pb::BuiltinFn::step; - case core::BuiltinFn::kStorageBarrier: - return pb::BuiltinFn::storage_barrier; - case core::BuiltinFn::kTan: - return pb::BuiltinFn::tan; - case core::BuiltinFn::kTanh: - return pb::BuiltinFn::tanh; - case core::BuiltinFn::kTranspose: - return pb::BuiltinFn::transpose; - case core::BuiltinFn::kTrunc: - return pb::BuiltinFn::trunc; - case core::BuiltinFn::kUnpack2X16Float: - return pb::BuiltinFn::unpack2x16_float; - case core::BuiltinFn::kUnpack2X16Snorm: - return pb::BuiltinFn::unpack2x16_snorm; - case core::BuiltinFn::kUnpack2X16Unorm: - return pb::BuiltinFn::unpack2x16_unorm; - case core::BuiltinFn::kUnpack4X8Snorm: - return pb::BuiltinFn::unpack4x8_snorm; - case core::BuiltinFn::kUnpack4X8Unorm: - return pb::BuiltinFn::unpack4x8_unorm; - case core::BuiltinFn::kUnpack4XI8: - return pb::BuiltinFn::unpack4xi8; - case core::BuiltinFn::kUnpack4XU8: - return pb::BuiltinFn::unpack4xu8; - case core::BuiltinFn::kWorkgroupBarrier: - return pb::BuiltinFn::workgroup_barrier; - case core::BuiltinFn::kTextureBarrier: - return pb::BuiltinFn::texture_barrier; - case core::BuiltinFn::kTextureDimensions: - return pb::BuiltinFn::texture_dimensions; - case core::BuiltinFn::kTextureGather: - return pb::BuiltinFn::texture_gather; - case core::BuiltinFn::kTextureGatherCompare: - return pb::BuiltinFn::texture_gather_compare; - case core::BuiltinFn::kTextureNumLayers: - return pb::BuiltinFn::texture_num_layers; - case core::BuiltinFn::kTextureNumLevels: - return pb::BuiltinFn::texture_num_levels; - case core::BuiltinFn::kTextureNumSamples: - return pb::BuiltinFn::texture_num_samples; - case core::BuiltinFn::kTextureSample: - return pb::BuiltinFn::texture_sample; - case core::BuiltinFn::kTextureSampleBias: - return pb::BuiltinFn::texture_sample_bias; - case core::BuiltinFn::kTextureSampleCompare: - return pb::BuiltinFn::texture_sample_compare; - case core::BuiltinFn::kTextureSampleCompareLevel: - return pb::BuiltinFn::texture_sample_compare_level; - case core::BuiltinFn::kTextureSampleGrad: - return pb::BuiltinFn::texture_sample_grad; - case core::BuiltinFn::kTextureSampleLevel: - return pb::BuiltinFn::texture_sample_level; - case core::BuiltinFn::kTextureSampleBaseClampToEdge: - return pb::BuiltinFn::texture_sample_base_clamp_to_edge; - case core::BuiltinFn::kTextureStore: - return pb::BuiltinFn::texture_store; - case core::BuiltinFn::kTextureLoad: - return pb::BuiltinFn::texture_load; - case core::BuiltinFn::kAtomicLoad: - return pb::BuiltinFn::atomic_load; - case core::BuiltinFn::kAtomicStore: - return pb::BuiltinFn::atomic_store; - case core::BuiltinFn::kAtomicAdd: - return pb::BuiltinFn::atomic_add; - case core::BuiltinFn::kAtomicSub: - return pb::BuiltinFn::atomic_sub; - case core::BuiltinFn::kAtomicMax: - return pb::BuiltinFn::atomic_max; - case core::BuiltinFn::kAtomicMin: - return pb::BuiltinFn::atomic_min; - case core::BuiltinFn::kAtomicAnd: - return pb::BuiltinFn::atomic_and; - case core::BuiltinFn::kAtomicOr: - return pb::BuiltinFn::atomic_or; - case core::BuiltinFn::kAtomicXor: - return pb::BuiltinFn::atomic_xor; - case core::BuiltinFn::kAtomicExchange: - return pb::BuiltinFn::atomic_exchange; - case core::BuiltinFn::kAtomicCompareExchangeWeak: - return pb::BuiltinFn::atomic_compare_exchange_weak; - case core::BuiltinFn::kSubgroupBallot: - return pb::BuiltinFn::subgroup_ballot; - case core::BuiltinFn::kSubgroupElect: - return pb::BuiltinFn::subgroup_elect; - case core::BuiltinFn::kSubgroupBroadcast: - return pb::BuiltinFn::subgroup_broadcast; - case core::BuiltinFn::kSubgroupBroadcastFirst: - return pb::BuiltinFn::subgroup_broadcast_first; - case core::BuiltinFn::kSubgroupShuffle: - return pb::BuiltinFn::subgroup_shuffle; - case core::BuiltinFn::kSubgroupShuffleXor: - return pb::BuiltinFn::subgroup_shuffle_xor; - case core::BuiltinFn::kSubgroupShuffleUp: - return pb::BuiltinFn::subgroup_shuffle_up; - case core::BuiltinFn::kSubgroupShuffleDown: - return pb::BuiltinFn::subgroup_shuffle_down; - case core::BuiltinFn::kInputAttachmentLoad: - return pb::BuiltinFn::input_attachment_load; - case core::BuiltinFn::kSubgroupAdd: - return pb::BuiltinFn::subgroup_add; - case core::BuiltinFn::kSubgroupInclusiveAdd: - return pb::BuiltinFn::subgroup_inclusive_add; - case core::BuiltinFn::kSubgroupExclusiveAdd: - return pb::BuiltinFn::subgroup_exclusive_add; - case core::BuiltinFn::kSubgroupMul: - return pb::BuiltinFn::subgroup_mul; - case core::BuiltinFn::kSubgroupInclusiveMul: - return pb::BuiltinFn::subgroup_inclusive_mul; - case core::BuiltinFn::kSubgroupExclusiveMul: - return pb::BuiltinFn::subgroup_exclusive_mul; - case core::BuiltinFn::kSubgroupAnd: - return pb::BuiltinFn::subgroup_and; - case core::BuiltinFn::kSubgroupOr: - return pb::BuiltinFn::subgroup_or; - case core::BuiltinFn::kSubgroupXor: - return pb::BuiltinFn::subgroup_xor; - case core::BuiltinFn::kSubgroupMin: - return pb::BuiltinFn::subgroup_min; - case core::BuiltinFn::kSubgroupMax: - return pb::BuiltinFn::subgroup_max; - case core::BuiltinFn::kSubgroupAll: - return pb::BuiltinFn::subgroup_all; - case core::BuiltinFn::kSubgroupAny: - return pb::BuiltinFn::subgroup_any; - case core::BuiltinFn::kQuadBroadcast: - return pb::BuiltinFn::quad_broadcast; - case core::BuiltinFn::kQuadSwapX: - return pb::BuiltinFn::quad_swap_x; - case core::BuiltinFn::kQuadSwapY: - return pb::BuiltinFn::quad_swap_y; - case core::BuiltinFn::kQuadSwapDiagonal: - return pb::BuiltinFn::quad_swap_diagonal; - case core::BuiltinFn::kSubgroupMatrixLoad: - return pb::BuiltinFn::subgroup_matrix_load; - case core::BuiltinFn::kSubgroupMatrixStore: - return pb::BuiltinFn::subgroup_matrix_store; - case core::BuiltinFn::kSubgroupMatrixMultiply: - return pb::BuiltinFn::subgroup_matrix_multiply; - case core::BuiltinFn::kSubgroupMatrixMultiplyAccumulate: - return pb::BuiltinFn::subgroup_matrix_multiply_accumulate; - case core::BuiltinFn::kSubgroupMatrixScalarAdd: - return pb::BuiltinFn::subgroup_matrix_scalar_add; - case core::BuiltinFn::kSubgroupMatrixScalarSubtract: - return pb::BuiltinFn::subgroup_matrix_scalar_subtract; - case core::BuiltinFn::kSubgroupMatrixScalarMultiply: - return pb::BuiltinFn::subgroup_matrix_scalar_multiply; - case core::BuiltinFn::kPrint: - return pb::BuiltinFn::print; - case core::BuiltinFn::kHasResource: - return pb::BuiltinFn::has_resource; - case core::BuiltinFn::kGetResource: - return pb::BuiltinFn::get_resource; - case core::BuiltinFn::kBufferView: - return pb::BuiltinFn::buffer_view; - case core::BuiltinFn::kBufferLength: - return pb::BuiltinFn::buffer_length; - case core::BuiltinFn::kNone: - break; - } - TINT_ICE() << "invalid BuiltinFn: " << in; - } -}; - -} // namespace - -Result> EncodeToProto(const Module& mod_in) { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - pb::Module mod_out; - TINT_CHECK_RESULT((Encoder{mod_in, mod_out}.Encode())); - - return std::make_unique(mod_out); -} - -Result> EncodeToBinary(const Module& mod_in) { - TINT_CHECK_RESULT_UNWRAP(mod_out, EncodeToProto(mod_in)); - - Vector buffer; - size_t len = mod_out->ByteSizeLong(); - buffer.Resize(len); - if (len > 0) { - if (!mod_out->SerializeToArray(&buffer[0], static_cast(len))) { - return Failure{"failed to serialize protobuf"}; - } - } - return buffer; -} - -} // namespace tint::core::ir::binary diff --git a/3rdparty/dawn/src/tint/lang/core/ir/binary/encode.h b/3rdparty/dawn/src/tint/lang/core/ir/binary/encode.h deleted file mode 100644 index fa2028594..000000000 --- a/3rdparty/dawn/src/tint/lang/core/ir/binary/encode.h +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2023 The Dawn & Tint Authors -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// 3. Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef SRC_TINT_LANG_CORE_IR_BINARY_ENCODE_H_ -#define SRC_TINT_LANG_CORE_IR_BINARY_ENCODE_H_ - -#include - -#include "src/tint/utils/containers/vector.h" -#include "src/tint/utils/result.h" - -// Forward declarations -namespace tint::core::ir { -class Module; -} // namespace tint::core::ir - -namespace tint::core::ir::binary::pb { -class Module; -} - -namespace tint::core::ir::binary { - -// Encode the module into a proto representation. -Result> EncodeToProto(const Module& module); - -// Encode the module into a binary representation. -Result> EncodeToBinary(const Module& module); - -} // namespace tint::core::ir::binary - -#endif // SRC_TINT_LANG_CORE_IR_BINARY_ENCODE_H_ diff --git a/3rdparty/dawn/src/tint/lang/core/ir/reflection.cc b/3rdparty/dawn/src/tint/lang/core/ir/reflection.cc index 25d4d749d..35d71073d 100644 --- a/3rdparty/dawn/src/tint/lang/core/ir/reflection.cc +++ b/3rdparty/dawn/src/tint/lang/core/ir/reflection.cc @@ -37,11 +37,13 @@ namespace tint::core::ir { Result GetWorkgroupInfo(core::ir::Module& ir) { std::optional> const_wg_size; + std::optional const_sg_size; for (auto func : ir.functions) { if (!func->IsEntryPoint()) { continue; } const_wg_size = func->WorkgroupSizeAsConst(); + const_sg_size = func->SubgroupSizeAsConst(); } if (!const_wg_size) { @@ -65,7 +67,7 @@ Result GetWorkgroupInfo(core::ir::Module& ir) { } } return WorkgroupInfo{(*const_wg_size)[0], (*const_wg_size)[1], (*const_wg_size)[2], - wg_storage_size}; + wg_storage_size, const_sg_size}; } } // namespace tint::core::ir diff --git a/3rdparty/dawn/src/tint/lang/core/ir/reflection.h b/3rdparty/dawn/src/tint/lang/core/ir/reflection.h index a44040f3d..ad19cdabd 100644 --- a/3rdparty/dawn/src/tint/lang/core/ir/reflection.h +++ b/3rdparty/dawn/src/tint/lang/core/ir/reflection.h @@ -28,6 +28,8 @@ #ifndef SRC_TINT_LANG_CORE_IR_REFLECTION_H_ #define SRC_TINT_LANG_CORE_IR_REFLECTION_H_ +#include + #include "src/tint/lang/core/ir/module.h" #include "src/tint/utils/result.h" @@ -43,6 +45,9 @@ struct WorkgroupInfo { /// The needed workgroup storage size size_t storage_size = 0; + + /// The `@subgroup_size` attribute + std::optional subgroup_size; }; /// Generate WorkgroupInfo for an IR module input. diff --git a/3rdparty/dawn/src/tint/lang/core/ir/transform/builtin_polyfill.cc b/3rdparty/dawn/src/tint/lang/core/ir/transform/builtin_polyfill.cc index e8bebbd8f..5cd73b23e 100644 --- a/3rdparty/dawn/src/tint/lang/core/ir/transform/builtin_polyfill.cc +++ b/3rdparty/dawn/src/tint/lang/core/ir/transform/builtin_polyfill.cc @@ -142,11 +142,14 @@ struct State { } } break; - case core::BuiltinFn::kSaturate: - if (config.saturate) { + case core::BuiltinFn::kSaturate: { + const bool is_vec_f16 = + builtin->Args()[0]->Type()->DeepestElement()->Is() && + builtin->Args()[0]->Type()->IsFloatVector(); + if ((is_vec_f16 && config.saturate_as_min_max) || config.saturate) { worklist.Push(builtin); } - break; + } break; case core::BuiltinFn::kTextureSampleBias: worklist.Push(builtin); break; @@ -907,6 +910,8 @@ struct State { void Saturate(ir::CoreBuiltinCall* call) { // Replace `saturate(x)` with `clamp(x, 0., 1.)`. auto* type = call->Result()->Type(); + const bool is_vec_f16 = + type->DeepestElement()->Is() && type->IsFloatVector(); ir::Constant* zero = nullptr; ir::Constant* one = nullptr; if (type->DeepestElement()->Is()) { @@ -916,9 +921,22 @@ struct State { zero = b.MatchWidth(0_h, type); one = b.MatchWidth(1_h, type); } - auto* clamp = b.Clamp(call->Args()[0], zero, one); - clamp->SetResult(call->DetachResult()); - clamp->InsertBefore(call); + + // Intel mesa incorrectly performs saturate on vec f16 loads from uniforms. + // Note: to avoid compiler pattern matching, we do the min then the max which is + // functionally different than doing the max then the min for high/low swapped (this doesnt + // matter in the case with saturate). See crbug.com/448873316 + if (config.saturate_as_min_max && is_vec_f16) { + b.InsertBefore(call, [&] { + auto* clamped_via_min_max = b.Max(b.Min(call->Args()[0], one), zero); + clamped_via_min_max->SetResult(call->DetachResult()); + }); + } else { + auto* clamp = b.Clamp(call->Args()[0], zero, one); + clamp->SetResult(call->DetachResult()); + clamp->InsertBefore(call); + } + call->Destroy(); } diff --git a/3rdparty/dawn/src/tint/lang/core/ir/transform/builtin_polyfill.h b/3rdparty/dawn/src/tint/lang/core/ir/transform/builtin_polyfill.h index c4691fe52..8eff88e70 100644 --- a/3rdparty/dawn/src/tint/lang/core/ir/transform/builtin_polyfill.h +++ b/3rdparty/dawn/src/tint/lang/core/ir/transform/builtin_polyfill.h @@ -100,6 +100,8 @@ struct BuiltinPolyfillConfig { bool pack_unpack_4x8_norm = false; /// Should `subgroupBroadcast(f16)` be polyfilled? bool subgroup_broadcast_f16 = false; + // Should 'saturate(f16)' be polyfilled with min and max. + bool saturate_as_min_max = false; /// Reflection for this class TINT_REFLECT(BuiltinPolyfillConfig, @@ -120,7 +122,8 @@ struct BuiltinPolyfillConfig { pack_unpack_4x8, pack_4xu8_clamp, pack_unpack_4x8_norm, - subgroup_broadcast_f16); + subgroup_broadcast_f16, + saturate_as_min_max); }; /// BuiltinPolyfill is a transform that replaces calls to builtin functions and uses of other core diff --git a/3rdparty/dawn/src/tint/lang/core/ir/validator.cc b/3rdparty/dawn/src/tint/lang/core/ir/validator.cc index 66b17d9fd..9b89fc0d3 100644 --- a/3rdparty/dawn/src/tint/lang/core/ir/validator.cc +++ b/3rdparty/dawn/src/tint/lang/core/ir/validator.cc @@ -1315,9 +1315,13 @@ class Validator { /// @param anchor where to attach error messages to. /// @param ty the type of the IO object /// @param attr the IO attributes of the object. + /// @param stage the shader stage + /// @param dir the direction of the IO usage void CheckInterpolation(const CastableBase* anchor, const core::type::Type* ty, - const IOAttributes& attr); + const IOAttributes& attr, + const Function::PipelineStage stage, + const IODirection dir); /// Validates binding_point attributes on entry point IO. /// @param anchor where to attach error messages to. @@ -2482,17 +2486,45 @@ void Validator::CheckRootBlock(const Block* blk) { block_stack_.Push(blk); TINT_DEFER(block_stack_.Pop()); + Hashset pipeline_evaluatable{}; + + auto add_evaluatable = [&](const Instruction* inst, const bool is_creatable) { + if (auto* res = inst->Result(0); res != nullptr && is_creatable) { + pipeline_evaluatable.Add(res); + } + }; + for (auto* inst : *blk) { if (inst->Block() != blk) { AddError(inst) << "instruction in root block does not have root block as parent"; continue; } + auto is_pipeline_creatable = true; + for (auto* op : inst->Operands()) { + if (!op) { + continue; + } + if (op->Is()) { + continue; + } + if (pipeline_evaluatable.Contains(op)) { + continue; + } + is_pipeline_creatable = false; + break; + } + + if (!is_pipeline_creatable) { + AddError(inst) << "instruction is not evaluatable at pipeline creation time"; + } + tint::Switch( inst, // [&](const core::ir::Override* o) { if (capabilities_.Contains(Capability::kAllowOverrides)) { CheckInstruction(o); + add_evaluatable(o, is_pipeline_creatable); } else { AddError(inst) << "root block: invalid instruction: " << inst->TypeInfo().name; } @@ -2501,6 +2533,7 @@ void Validator::CheckRootBlock(const Block* blk) { [&](const core::ir::Let* let) { if (capabilities_.Contains(Capability::kAllowModuleScopeLets)) { CheckInstruction(let); + add_evaluatable(let, is_pipeline_creatable); } else { AddError(inst) << "root block: invalid instruction: " << inst->TypeInfo().name; } @@ -2510,16 +2543,15 @@ void Validator::CheckRootBlock(const Block* blk) { capabilities_.Contains(Capability::kAllowOverrides)) { CheckInstruction(c); CheckOnlyUsedInRootBlock(inst); + add_evaluatable(c, is_pipeline_creatable); } else { AddError(inst) << "root block: invalid instruction: " << inst->TypeInfo().name; } }, [&](Default) { // Note, this validation around kAllowOverrides is looser than it could be. There - // are only certain expressions and builtins which can be used in an override, but - // the current checks are only doing type level checking. To tighten this up will - // require walking up the tree to make sure that operands are const/override and - // builtins are allowed. + // are only certain expressions and builtins which can be used in an override, which + // currently isn't checked. if (capabilities_.Contains(Capability::kAllowOverrides) && inst->IsAnyOfTypeInfo().name; } @@ -2885,7 +2918,7 @@ void Validator::ValidateIOAttributes(const Function* func) { // Validate all the interpolation usages. for (const auto& task : tasks) { - CheckInterpolation(task.anchor, task.type, task.attr); + CheckInterpolation(task.anchor, task.type, task.attr, stage, task.dir); } if (stage != Function::PipelineStage::kUndefined) { @@ -3116,18 +3149,10 @@ void Validator::CheckWorkgroupSize(const Function* func) { return; } - if (r->Instruction()->Is()) { - continue; - } - - // TODO(376624999): Finish implementing checking that this is a override/constant - // expression, i.e. calculated from only appropriate values/operations, once override - // implementation is complete - // for each value/operation used to calculate param: - // if not constant expression && not override expression: - // fail - // pass - + // Since above, it is already checked if the value is in the root block, it is assumed + // to be pipeline creatable here, i.e. const/override or derived from consts and + // overrides. + // If that is not true, that indicates an issue in CheckRootBlock(). continue; } @@ -3640,29 +3665,39 @@ void Validator::CheckLocation(Hashmap& locatio void Validator::CheckInterpolation(const CastableBase* anchor, const core::type::Type* ty, - const IOAttributes& attr) { + const IOAttributes& attr, + const Function::PipelineStage stage, + const IODirection dir) { bool ctx = false; WalkTypeAndMembers( ctx, ty, attr, - [this, anchor](bool& in_location_composite, const core::type::Type* t, - const IOAttributes& a) { + [this, anchor, stage, dir](bool& in_location_composite, const core::type::Type* t, + const IOAttributes& a) { + bool has_location = a.location.has_value() || in_location_composite; + if (!has_location) { + if (auto* str = t->As()) { + has_location |= str->Members().All( + [](const auto* mem) { return mem->Attributes().location.has_value(); }); + } + } + if (a.interpolation.has_value()) { + has_location |= (capabilities_.Contains(Capability::kLoosenValidationForShaderIO) && + a.builtin.has_value()); + if (!capabilities_.Contains(Capability::kAllowLocationForNumericElements) && t->As()) { AddError(anchor) << "interpolation cannot be applied to a struct without " "'kAllowLocationForNumericElements' capability"; } - bool has_location = a.location.has_value() || in_location_composite; - if (!has_location) { - if (auto* str = t->As()) { - has_location |= str->Members().All( - [](const auto* mem) { return mem->Attributes().location.has_value(); }); + if (t->IsIntegerScalar()) { + if (a.interpolation.value().type != InterpolationType::kFlat) { + AddError(anchor) + << "interpolation attribute type must be flat for integral types"; } } - has_location |= (capabilities_.Contains(Capability::kLoosenValidationForShaderIO) && - a.builtin.has_value()); if (!has_location) { if (!capabilities_.Contains(Capability::kLoosenValidationForShaderIO)) { @@ -3672,9 +3707,20 @@ void Validator::CheckInterpolation(const CastableBase* anchor, "(or location-like shader I/O annotation)"; } } + } else if (has_location && t->IsIntegerScalarOrVector()) { + // Integral vertex outputs and fragment inputs require flat interpolation. + const bool needs_flat = + (stage == Function::PipelineStage::kVertex && dir == IODirection::kOutput) || + (stage == Function::PipelineStage::kFragment && dir == IODirection::kInput); + if (needs_flat) { + AddError(anchor) << "integral user-defined inputs and outputs must have an " + "@interpolate(flat) attribute"; + } } - in_location_composite |= a.location.has_value(); + if (t->IsAnyOf()) { + in_location_composite |= a.location.has_value(); + } }); } diff --git a/3rdparty/dawn/src/tint/lang/null/writer/common/options.cc b/3rdparty/dawn/src/tint/lang/null/writer/common/options.cc deleted file mode 100644 index 203b7e377..000000000 --- a/3rdparty/dawn/src/tint/lang/null/writer/common/options.cc +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2025 The Dawn & Tint Authors -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// 3. Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "src/tint/lang/null/writer/common/options.h" - -namespace tint::null::writer { - -Options::Options() = default; - -Options::~Options() = default; - -Options::Options(const Options&) = default; - -Options& Options::operator=(const Options&) = default; - -} // namespace tint::null::writer diff --git a/3rdparty/dawn/src/tint/lang/null/writer/common/options.h b/3rdparty/dawn/src/tint/lang/null/writer/common/options.h deleted file mode 100644 index b3d9f0dea..000000000 --- a/3rdparty/dawn/src/tint/lang/null/writer/common/options.h +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2025 The Dawn & Tint Authors -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// 3. Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef SRC_TINT_LANG_NULL_WRITER_COMMON_OPTIONS_H_ -#define SRC_TINT_LANG_NULL_WRITER_COMMON_OPTIONS_H_ - -#include - -#include "src/tint/api/common/substitute_overrides_config.h" -#include "src/tint/utils/reflection.h" - -namespace tint::null::writer { - -/// Configuration options used for Null generator. -struct Options { - /// Constructor - Options(); - /// Destructor - ~Options(); - /// Copy constructor - Options(const Options&); - /// Copy assignment - /// @returns this Options - Options& operator=(const Options&); - - /// The entry point name to emit - std::string entry_point_name = {}; - - // Substitute Overrides - SubstituteOverridesConfig substitute_overrides_config = {}; - - /// Reflect the fields of this class so that it can be used by tint::ForeachField() - TINT_REFLECT(Options, entry_point_name, substitute_overrides_config); - TINT_REFLECT_EQUALS(Options); - TINT_REFLECT_HASH_CODE(Options); -}; - -} // namespace tint::null::writer - -#endif // SRC_TINT_LANG_NULL_WRITER_COMMON_OPTIONS_H_ diff --git a/3rdparty/dawn/src/tint/lang/null/writer/common/output.cc b/3rdparty/dawn/src/tint/lang/null/writer/common/output.cc deleted file mode 100644 index d8c0b825d..000000000 --- a/3rdparty/dawn/src/tint/lang/null/writer/common/output.cc +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2025 The Dawn & Tint Authors -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// 3. Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "src/tint/lang/null/writer/common/output.h" - -namespace tint::null::writer { - -Output::Output() = default; - -Output::~Output() = default; - -Output::Output(const Output&) = default; - -Output& Output::operator=(const Output&) = default; - -} // namespace tint::null::writer diff --git a/3rdparty/dawn/src/tint/lang/null/writer/common/output.h b/3rdparty/dawn/src/tint/lang/null/writer/common/output.h deleted file mode 100644 index 90f5b7ded..000000000 --- a/3rdparty/dawn/src/tint/lang/null/writer/common/output.h +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2025 The Dawn & Tint Authors -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// 3. Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef SRC_TINT_LANG_NULL_WRITER_COMMON_OUTPUT_H_ -#define SRC_TINT_LANG_NULL_WRITER_COMMON_OUTPUT_H_ - -#include -#include - -namespace tint::null::writer { - -/// The output produced by Null writer -struct Output { - /// Constructor - Output(); - - /// Destructor - ~Output(); - - /// Copy constructor - Output(const Output&); - - /// Copy assignment - /// @returns this - Output& operator=(const Output&); - - /// Workgroup size information - struct WorkgroupInfo { - /// The x-component - uint32_t x = 0; - /// The y-component - uint32_t y = 0; - /// The z-component - uint32_t z = 0; - - /// The needed workgroup storage size - size_t storage_size = 0; - }; - - /// The workgroup size information, if the entry point was a compute shader - WorkgroupInfo workgroup_info{}; -}; - -} // namespace tint::null::writer - -#endif // SRC_TINT_LANG_NULL_WRITER_COMMON_OUTPUT_H_ diff --git a/3rdparty/dawn/src/tint/lang/null/writer/raise/raise.cc b/3rdparty/dawn/src/tint/lang/null/writer/raise/raise.cc deleted file mode 100644 index 7e95ce0eb..000000000 --- a/3rdparty/dawn/src/tint/lang/null/writer/raise/raise.cc +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2025 The Dawn & Tint Authors -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// 3. Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "src/tint/lang/null/writer/raise/raise.h" - -#include "src/tint/lang/core/ir/module.h" -#include "src/tint/lang/core/ir/transform/single_entry_point.h" -#include "src/tint/lang/core/ir/transform/substitute_overrides.h" - -namespace tint::null::writer { - -Result Raise(core::ir::Module& module, const Options& options) { - TINT_CHECK_RESULT(core::ir::transform::SingleEntryPoint(module, options.entry_point_name)); - TINT_CHECK_RESULT( - core::ir::transform::SubstituteOverrides(module, options.substitute_overrides_config)); - return Success; -} - -} // namespace tint::null::writer diff --git a/3rdparty/dawn/src/tint/lang/null/writer/raise/raise.h b/3rdparty/dawn/src/tint/lang/null/writer/raise/raise.h deleted file mode 100644 index c166764ea..000000000 --- a/3rdparty/dawn/src/tint/lang/null/writer/raise/raise.h +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2025 The Dawn & Tint Authors -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// 3. Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef SRC_TINT_LANG_NULL_WRITER_RAISE_RAISE_H_ -#define SRC_TINT_LANG_NULL_WRITER_RAISE_RAISE_H_ - -#include "src/tint/lang/null/writer/common/options.h" -#include "src/tint/utils/result.h" - -// Forward declarations -namespace tint::core::ir { -class Module; -} // namespace tint::core::ir - -namespace tint::null::writer { - -/// Run the `Raise` transform of an IR module for the Null backend. -/// @param module the core IR module to raise to Null dialect -/// @param options the printer options -/// @returns success or failure -Result Raise(core::ir::Module& module, const Options& options); - -} // namespace tint::null::writer - -#endif // SRC_TINT_LANG_NULL_WRITER_RAISE_RAISE_H_ diff --git a/3rdparty/dawn/src/tint/lang/null/writer/writer.cc b/3rdparty/dawn/src/tint/lang/null/writer/writer.cc deleted file mode 100644 index 980f3046c..000000000 --- a/3rdparty/dawn/src/tint/lang/null/writer/writer.cc +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2025 The Dawn & Tint Authors -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// 3. Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "src/tint/lang/null/writer/writer.h" - -#include "src/tint/lang/core/ir/module.h" -#include "src/tint/lang/core/ir/reflection.h" -#include "src/tint/lang/core/ir/validator.h" -#include "src/tint/lang/null/writer/raise/raise.h" - -namespace tint::null::writer { - -Result Generate(core::ir::Module& ir, const Options& options) { - Output output; - - // Raise from core-dialect - TINT_CHECK_RESULT(Raise(ir, options)); - - TINT_CHECK_RESULT_UNWRAP(wg_info, GetWorkgroupInfo(ir)); - output.workgroup_info = { - .x = wg_info.x, - .y = wg_info.y, - .z = wg_info.z, - .storage_size = wg_info.storage_size, - }; - - return output; -} - -} // namespace tint::null::writer diff --git a/3rdparty/dawn/src/tint/lang/null/writer/writer.h b/3rdparty/dawn/src/tint/lang/null/writer/writer.h deleted file mode 100644 index f6011c6b1..000000000 --- a/3rdparty/dawn/src/tint/lang/null/writer/writer.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2025 The Dawn & Tint Authors -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// 3. Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef SRC_TINT_LANG_NULL_WRITER_WRITER_H_ -#define SRC_TINT_LANG_NULL_WRITER_WRITER_H_ - -#include "src/tint/lang/null/writer/common/options.h" -#include "src/tint/lang/null/writer/common/output.h" -#include "src/tint/utils/result.h" - -// Forward declarations -namespace tint::core::ir { -class Module; -} // namespace tint::core::ir - -namespace tint::null::writer { - -/// Run generator for the Null backend, according to a set of configuration options. -/// The result will contain the supplementary information, or failure. -/// @param ir the IR module -/// @param options the configuration options to use -/// @returns the supplementary information, or failure -Result Generate(core::ir::Module& ir, const Options& options); - -} // namespace tint::null::writer - -#endif // SRC_TINT_LANG_NULL_WRITER_WRITER_H_ diff --git a/3rdparty/dawn/src/tint/lang/spirv/writer/common/options.h b/3rdparty/dawn/src/tint/lang/spirv/writer/common/options.h index f955100fc..187a9f39a 100644 --- a/3rdparty/dawn/src/tint/lang/spirv/writer/common/options.h +++ b/3rdparty/dawn/src/tint/lang/spirv/writer/common/options.h @@ -106,6 +106,9 @@ struct Options { /// Set to `true` to generate polyfill for f32 abs. bool polyfill_f32_abs = false; + /// Set to `true` to generate polyfill for f16 saturate. + bool polyfill_saturate_as_min_max_f16 = false; + TINT_REFLECT(Workarounds, polyfill_case_switch, scalarize_max_min_clamp, @@ -116,7 +119,8 @@ struct Options { polyfill_subgroup_broadcast_f16, pass_matrix_by_pointer, polyfill_unary_f32_negation, - polyfill_f32_abs); + polyfill_f32_abs, + polyfill_saturate_as_min_max_f16); }; /// Any options which are controlled by the presence/absence of a vulkan extension. diff --git a/3rdparty/dawn/src/tint/lang/spirv/writer/raise/raise.cc b/3rdparty/dawn/src/tint/lang/spirv/writer/raise/raise.cc index 9506c6d0e..48dddb4e5 100644 --- a/3rdparty/dawn/src/tint/lang/spirv/writer/raise/raise.cc +++ b/3rdparty/dawn/src/tint/lang/spirv/writer/raise/raise.cc @@ -134,6 +134,7 @@ Result Raise(core::ir::Module& module, const Options& options) { core_polyfills.pack_unpack_4x8_norm = options.workarounds.polyfill_pack_unpack_4x8_norm; core_polyfills.abs_signed_int = true; core_polyfills.subgroup_broadcast_f16 = options.workarounds.polyfill_subgroup_broadcast_f16; + core_polyfills.saturate_as_min_max = options.workarounds.polyfill_saturate_as_min_max_f16; TINT_CHECK_RESULT(core::ir::transform::BuiltinPolyfill(module, core_polyfills)); core::ir::transform::ConversionPolyfillConfig conversion_polyfills; diff --git a/3rdparty/dawn/src/tint/lang/wgsl/enums.cc b/3rdparty/dawn/src/tint/lang/wgsl/enums.cc index 9ce47b9e0..949d6458d 100644 --- a/3rdparty/dawn/src/tint/lang/wgsl/enums.cc +++ b/3rdparty/dawn/src/tint/lang/wgsl/enums.cc @@ -69,9 +69,6 @@ Extension ParseExtension(std::string_view str) { if (str == "chromium_experimental_subgroup_size_control") { return Extension::kChromiumExperimentalSubgroupSizeControl; } - if (str == "chromium_internal_graphite") { - return Extension::kChromiumInternalGraphite; - } if (str == "chromium_internal_input_attachments") { return Extension::kChromiumInternalInputAttachments; } @@ -110,8 +107,6 @@ std::string_view ToString(Extension value) { return "chromium_experimental_subgroup_matrix"; case Extension::kChromiumExperimentalSubgroupSizeControl: return "chromium_experimental_subgroup_size_control"; - case Extension::kChromiumInternalGraphite: - return "chromium_internal_graphite"; case Extension::kChromiumInternalInputAttachments: return "chromium_internal_input_attachments"; case Extension::kClipDistances: diff --git a/3rdparty/dawn/src/tint/lang/wgsl/enums.h b/3rdparty/dawn/src/tint/lang/wgsl/enums.h index a3de573eb..137dab5fc 100644 --- a/3rdparty/dawn/src/tint/lang/wgsl/enums.h +++ b/3rdparty/dawn/src/tint/lang/wgsl/enums.h @@ -121,7 +121,6 @@ enum class Extension : uint8_t { kChromiumExperimentalResourceTable, kChromiumExperimentalSubgroupMatrix, kChromiumExperimentalSubgroupSizeControl, - kChromiumInternalGraphite, kChromiumInternalInputAttachments, kClipDistances, kDualSourceBlending, @@ -156,7 +155,6 @@ constexpr std::string_view kExtensionStrings[] = { "chromium_experimental_resource_table", "chromium_experimental_subgroup_matrix", "chromium_experimental_subgroup_size_control", - "chromium_internal_graphite", "chromium_internal_input_attachments", "clip_distances", "dual_source_blending", @@ -174,7 +172,6 @@ static constexpr Extension kAllExtensions[] = { Extension::kChromiumExperimentalResourceTable, Extension::kChromiumExperimentalSubgroupMatrix, Extension::kChromiumExperimentalSubgroupSizeControl, - Extension::kChromiumInternalGraphite, Extension::kChromiumInternalInputAttachments, Extension::kClipDistances, Extension::kDualSourceBlending, diff --git a/3rdparty/dawn/src/tint/lang/wgsl/reader/lower/lower.cc b/3rdparty/dawn/src/tint/lang/wgsl/reader/lower/lower.cc deleted file mode 100644 index ee2b4e354..000000000 --- a/3rdparty/dawn/src/tint/lang/wgsl/reader/lower/lower.cc +++ /dev/null @@ -1,270 +0,0 @@ -// Copyright 2023 The Dawn & Tint Authors -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// 3. Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "src/tint/lang/wgsl/reader/lower/lower.h" - -#include - -#include "src/tint/lang/core/enums.h" -#include "src/tint/lang/core/ir/builder.h" -#include "src/tint/lang/core/ir/core_builtin_call.h" -#include "src/tint/lang/core/ir/validator.h" -#include "src/tint/lang/wgsl/enums.h" -#include "src/tint/lang/wgsl/ir/builtin_call.h" -#include "src/tint/utils/ice/ice.h" - -namespace tint::wgsl::reader { -namespace { - -core::BuiltinFn Convert(wgsl::BuiltinFn fn) { -#define CASE(NAME) \ - case wgsl::BuiltinFn::NAME: \ - return core::BuiltinFn::NAME; - - switch (fn) { - CASE(kAbs) - CASE(kAcos) - CASE(kAcosh) - CASE(kAll) - CASE(kAny) - CASE(kArrayLength) - CASE(kAsin) - CASE(kAsinh) - CASE(kAtan) - CASE(kAtan2) - CASE(kAtanh) - CASE(kCeil) - CASE(kClamp) - CASE(kCos) - CASE(kCosh) - CASE(kCountLeadingZeros) - CASE(kCountOneBits) - CASE(kCountTrailingZeros) - CASE(kCross) - CASE(kDegrees) - CASE(kDeterminant) - CASE(kDistance) - CASE(kDot) - CASE(kDot4I8Packed) - CASE(kDot4U8Packed) - CASE(kDpdx) - CASE(kDpdxCoarse) - CASE(kDpdxFine) - CASE(kDpdy) - CASE(kDpdyCoarse) - CASE(kDpdyFine) - CASE(kExp) - CASE(kExp2) - CASE(kExtractBits) - CASE(kFaceForward) - CASE(kFirstLeadingBit) - CASE(kFirstTrailingBit) - CASE(kFloor) - CASE(kFma) - CASE(kFract) - CASE(kFrexp) - CASE(kFwidth) - CASE(kFwidthCoarse) - CASE(kFwidthFine) - CASE(kInsertBits) - CASE(kInverseSqrt) - CASE(kLdexp) - CASE(kLength) - CASE(kLog) - CASE(kLog2) - CASE(kMax) - CASE(kMin) - CASE(kMix) - CASE(kModf) - CASE(kNormalize) - CASE(kPack2X16Float) - CASE(kPack2X16Snorm) - CASE(kPack2X16Unorm) - CASE(kPack4X8Snorm) - CASE(kPack4X8Unorm) - CASE(kPack4XI8) - CASE(kPack4XU8) - CASE(kPack4XI8Clamp) - CASE(kPack4XU8Clamp) - CASE(kPow) - CASE(kQuantizeToF16) - CASE(kRadians) - CASE(kReflect) - CASE(kRefract) - CASE(kReverseBits) - CASE(kRound) - CASE(kSaturate) - CASE(kSelect) - CASE(kSign) - CASE(kSin) - CASE(kSinh) - CASE(kSmoothstep) - CASE(kSqrt) - CASE(kStep) - CASE(kStorageBarrier) - CASE(kTan) - CASE(kTanh) - CASE(kTranspose) - CASE(kTrunc) - CASE(kUnpack2X16Float) - CASE(kUnpack2X16Snorm) - CASE(kUnpack2X16Unorm) - CASE(kUnpack4X8Snorm) - CASE(kUnpack4X8Unorm) - CASE(kUnpack4XI8) - CASE(kUnpack4XU8) - CASE(kWorkgroupBarrier) - CASE(kTextureBarrier) - CASE(kTextureDimensions) - CASE(kTextureGather) - CASE(kTextureGatherCompare) - CASE(kTextureNumLayers) - CASE(kTextureNumLevels) - CASE(kTextureNumSamples) - CASE(kTextureSample) - CASE(kTextureSampleBias) - CASE(kTextureSampleCompare) - CASE(kTextureSampleCompareLevel) - CASE(kTextureSampleGrad) - CASE(kTextureSampleLevel) - CASE(kTextureSampleBaseClampToEdge) - CASE(kTextureStore) - CASE(kTextureLoad) - CASE(kAtomicLoad) - CASE(kAtomicStore) - CASE(kAtomicAdd) - CASE(kAtomicSub) - CASE(kAtomicMax) - CASE(kAtomicMin) - CASE(kAtomicAnd) - CASE(kAtomicOr) - CASE(kAtomicXor) - CASE(kAtomicExchange) - CASE(kAtomicCompareExchangeWeak) - CASE(kSubgroupBallot) - CASE(kSubgroupElect) - CASE(kSubgroupBroadcast) - CASE(kSubgroupBroadcastFirst) - CASE(kSubgroupShuffle) - CASE(kSubgroupShuffleXor) - CASE(kSubgroupShuffleUp) - CASE(kSubgroupShuffleDown) - CASE(kInputAttachmentLoad) - CASE(kSubgroupAdd) - CASE(kSubgroupInclusiveAdd) - CASE(kSubgroupExclusiveAdd) - CASE(kSubgroupMul) - CASE(kSubgroupInclusiveMul) - CASE(kSubgroupExclusiveMul) - CASE(kSubgroupAnd) - CASE(kSubgroupOr) - CASE(kSubgroupXor) - CASE(kSubgroupMin) - CASE(kSubgroupMax) - CASE(kSubgroupAll) - CASE(kSubgroupAny) - CASE(kQuadBroadcast) - CASE(kQuadSwapX) - CASE(kQuadSwapY) - CASE(kQuadSwapDiagonal) - CASE(kSubgroupMatrixLoad) - CASE(kSubgroupMatrixStore) - CASE(kSubgroupMatrixMultiply) - CASE(kSubgroupMatrixMultiplyAccumulate) - CASE(kSubgroupMatrixScalarAdd) - CASE(kSubgroupMatrixScalarSubtract) - CASE(kSubgroupMatrixScalarMultiply) - CASE(kPrint) - CASE(kHasResource) - CASE(kGetResource) - CASE(kBufferView) - CASE(kBufferLength) - case tint::wgsl::BuiltinFn::kBitcast: // should lower to ir::Bitcast - case tint::wgsl::BuiltinFn::kWorkgroupUniformLoad: // should be handled in Lower() - case tint::wgsl::BuiltinFn::kTintMaterialize: - case tint::wgsl::BuiltinFn::kNone: - break; - } - TINT_ICE() << "unhandled builtin function: " << fn; -} - -} // namespace - -Result Lower(core::ir::Module& mod) { - TINT_CHECK_RESULT( - core::ir::ValidateAndDumpIfNeeded(mod, "wgsl.Lower", - core::ir::Capabilities{ - core::ir::Capability::kAllowMultipleEntryPoints, - core::ir::Capability::kAllowOverrides, - core::ir::Capability::kAllow8BitIntegers, - })); - - core::ir::Builder b{mod}; - core::type::Manager& ty{mod.Types()}; - for (auto* inst : mod.Instructions()) { - if (auto* call = inst->As()) { - switch (call->Func()) { - case BuiltinFn::kWorkgroupUniformLoad: { - auto* param0 = call->Args()[0]; - TINT_ASSERT(param0->Type()->Is()); - auto* storeType = param0->Type()->As()->StoreType(); - // Replace: - // %value = call workgroupUniformLoad %ptr - // With: - // call workgroupBarrier - // %value = {load || atomicLoad} &ptr - // call workgroupBarrier - b.InsertBefore(call, [&] { - b.Call(ty.void_(), core::BuiltinFn::kWorkgroupBarrier); - if (storeType->Is()) { - b.CallWithResult(call->DetachResult(), core::BuiltinFn::kAtomicLoad, - param0); - } else { - b.LoadWithResult(call->DetachResult(), param0); - } - b.Call(ty.void_(), core::BuiltinFn::kWorkgroupBarrier); - }); - break; - } - default: { - Vector args(call->Args()); - auto* replacement = b.CallWithResult(call->DetachResult(), - Convert(call->Func()), std::move(args)); - if (!call->ExplicitTemplateParams().IsEmpty()) { - replacement->SetExplicitTemplateParams(call->ExplicitTemplateParams()); - } - call->ReplaceWith(replacement); - break; - } - } - call->Destroy(); - } - } - return Success; -} - -} // namespace tint::wgsl::reader diff --git a/3rdparty/dawn/src/tint/lang/wgsl/reader/lower/lower.h b/3rdparty/dawn/src/tint/lang/wgsl/reader/lower/lower.h deleted file mode 100644 index 146cba989..000000000 --- a/3rdparty/dawn/src/tint/lang/wgsl/reader/lower/lower.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2023 The Dawn & Tint Authors -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// 3. Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef SRC_TINT_LANG_WGSL_READER_LOWER_LOWER_H_ -#define SRC_TINT_LANG_WGSL_READER_LOWER_LOWER_H_ - -#include "src/tint/lang/core/ir/module.h" -#include "src/tint/utils/result.h" - -namespace tint::wgsl::reader { - -/// Lower converts a WGSL-dialect IR module to a core-dialect IR module -/// @param mod the IR module -/// @return the result of the operation -Result Lower(core::ir::Module& mod); - -} // namespace tint::wgsl::reader - -#endif // SRC_TINT_LANG_WGSL_READER_LOWER_LOWER_H_ diff --git a/3rdparty/dawn/src/tint/lang/wgsl/reader/options.h b/3rdparty/dawn/src/tint/lang/wgsl/reader/options.h deleted file mode 100644 index 622d3ca39..000000000 --- a/3rdparty/dawn/src/tint/lang/wgsl/reader/options.h +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2023 The Dawn & Tint Authors -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// 3. Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef SRC_TINT_LANG_WGSL_READER_OPTIONS_H_ -#define SRC_TINT_LANG_WGSL_READER_OPTIONS_H_ - -#include "src/tint/lang/wgsl/allowed_features.h" -#include "src/tint/utils/reflection.h" - -namespace tint::wgsl::reader { - -/// Configuration options used for reading WGSL. -struct Options { - /// The extensions and language features that are allowed to be used. - AllowedFeatures allowed_features{}; - - /// Reflect the fields of this class so that it can be used by tint::ForeachField(). - TINT_REFLECT(Options, allowed_features); -}; - -} // namespace tint::wgsl::reader - -#endif // SRC_TINT_LANG_WGSL_READER_OPTIONS_H_ diff --git a/3rdparty/dawn/src/tint/lang/wgsl/reader/parser/classify_template_args.cc b/3rdparty/dawn/src/tint/lang/wgsl/reader/parser/classify_template_args.cc deleted file mode 100644 index b27d36999..000000000 --- a/3rdparty/dawn/src/tint/lang/wgsl/reader/parser/classify_template_args.cc +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright 2023 The Dawn & Tint Authors -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// 3. Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "src/tint/lang/wgsl/reader/parser/classify_template_args.h" - -#include - -#include "src/tint/utils/containers/vector.h" -#include "src/tint/utils/ice/ice.h" - -namespace tint::wgsl::reader { - -namespace { - -/// If the token at index @p idx is a '>>', '>=' or '>>=', then the token is split into two, with -/// the first being '>', otherwise MaybeSplit() will be a no-op. -/// @param tokens the vector of tokens -/// @param idx the index of the token to (maybe) split -void MaybeSplit(std::vector& tokens, size_t idx) { - auto* cur = &tokens[idx]; - auto* next = &tokens[idx + 1]; - TINT_ASSERT(cur); - TINT_ASSERT(next); - switch (cur->type()) { - case Token::Type::kShiftRight: // '>>' - TINT_ASSERT(next->type() == Token::Type::kPlaceholder); - cur->SetType(Token::Type::kGreaterThan); - next->SetType(Token::Type::kGreaterThan); - break; - case Token::Type::kGreaterThanEqual: // '>=' - TINT_ASSERT(next->type() == Token::Type::kPlaceholder); - cur->SetType(Token::Type::kGreaterThan); - next->SetType(Token::Type::kEqual); - break; - case Token::Type::kShiftRightEqual: // '>>=' - TINT_ASSERT(next->type() == Token::Type::kPlaceholder); - cur->SetType(Token::Type::kGreaterThan); - next->SetType(Token::Type::kGreaterThanEqual); - break; - default: - break; - } -} - -} // namespace - -void ClassifyTemplateArguments(std::vector& tokens) { - const size_t count = tokens.size(); - - // The current expression nesting depth. - // Each '(', '[' increments the depth. - // Each ')', ']' decrements the depth. - uint64_t expr_depth = 0; - - // A stack of '<' tokens. - // Used to pair '<' and '>' tokens at the same expression depth. - struct StackEntry { - Token* token; // A pointer to the opening '<' token - uint64_t expr_depth; // The value of 'expr_depth' for the opening '<' - }; - Vector stack; - - for (size_t i = 0; i < count - 1; i++) { - switch (tokens[i].type()) { - case Token::Type::kIdentifier: - case Token::Type::kVar: { - auto& next = tokens[i + 1]; - if (next.type() == Token::Type::kLessThan) { - // ident '<' - // Push this '<' to the stack, along with the current nesting expr_depth. - stack.Push(StackEntry{&tokens[i + 1], expr_depth}); - i++; // Skip the '<' - } - break; - } - case Token::Type::kGreaterThan: // '>' - case Token::Type::kShiftRight: // '>>' - case Token::Type::kGreaterThanEqual: // '>=' - case Token::Type::kShiftRightEqual: // '>>=' - if (!stack.IsEmpty() && stack.Back().expr_depth == expr_depth) { - // '<' and '>' at same expr_depth, and no terminating tokens in-between. - // Consider both as a template argument list. - MaybeSplit(tokens, i); - stack.Pop().token->SetType(Token::Type::kTemplateArgsLeft); - tokens[i].SetType(Token::Type::kTemplateArgsRight); - } - break; - - case Token::Type::kParenLeft: // '(' - case Token::Type::kBracketLeft: // '[' - // Entering a nested expression - expr_depth++; - break; - - case Token::Type::kParenRight: // ')' - case Token::Type::kBracketRight: // ']' - // Exiting a nested expression - // Pop the stack until we return to the current expression expr_depth - while (!stack.IsEmpty() && stack.Back().expr_depth == expr_depth) { - stack.Pop(); - } - if (expr_depth > 0) { - expr_depth--; - } - break; - - case Token::Type::kSemicolon: // ';' - case Token::Type::kBraceLeft: // '{' - case Token::Type::kEqual: // '=' - case Token::Type::kColon: // ':' - // Expression terminating tokens. No opening template list can hold these tokens, so - // clear the stack and expression depth. - expr_depth = 0; - stack.Clear(); - break; - - case Token::Type::kOrOr: // '||' - case Token::Type::kAndAnd: // '&&' - // Treat 'a < b || c > d' as a logical binary operator of two comparison operators - // instead of a single template argument 'b||c'. - // Use parentheses around 'b||c' to parse as a template argument list. - while (!stack.IsEmpty() && stack.Back().expr_depth == expr_depth) { - stack.Pop(); - } - break; - - default: - break; - } - } -} - -} // namespace tint::wgsl::reader diff --git a/3rdparty/dawn/src/tint/lang/wgsl/reader/parser/classify_template_args.h b/3rdparty/dawn/src/tint/lang/wgsl/reader/parser/classify_template_args.h deleted file mode 100644 index 1b80efab1..000000000 --- a/3rdparty/dawn/src/tint/lang/wgsl/reader/parser/classify_template_args.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2023 The Dawn & Tint Authors -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// 3. Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef SRC_TINT_LANG_WGSL_READER_PARSER_CLASSIFY_TEMPLATE_ARGS_H_ -#define SRC_TINT_LANG_WGSL_READER_PARSER_CLASSIFY_TEMPLATE_ARGS_H_ - -#include - -#include "src/tint/lang/wgsl/reader/parser/token.h" - -namespace tint::wgsl::reader { - -void ClassifyTemplateArguments(std::vector& tokens); - -} // namespace tint::wgsl::reader - -#endif // SRC_TINT_LANG_WGSL_READER_PARSER_CLASSIFY_TEMPLATE_ARGS_H_ diff --git a/3rdparty/dawn/src/tint/lang/wgsl/reader/parser/detail.h b/3rdparty/dawn/src/tint/lang/wgsl/reader/parser/detail.h deleted file mode 100644 index 74287e1d0..000000000 --- a/3rdparty/dawn/src/tint/lang/wgsl/reader/parser/detail.h +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2020 The Dawn & Tint Authors -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// 3. Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef SRC_TINT_LANG_WGSL_READER_PARSER_DETAIL_H_ -#define SRC_TINT_LANG_WGSL_READER_PARSER_DETAIL_H_ - -#include - -namespace tint::wgsl::reader::detail { - -/// OperatorArrow is a traits helper for ParserImpl::Expect::operator->() and -/// ParserImpl::Maybe::operator->() so that pointer types are automatically -/// dereferenced. This simplifies usage by allowing -/// `result.value->field` -/// to be written as: -/// `result->field` -/// As well as reducing the amount of code, using the operator->() asserts that -/// the Expect or Maybe is not in an error state before dereferencing. -template -struct OperatorArrow { - /// type resolves to the return type for the operator->() - using type = T*; - /// @param val the value held by `ParserImpl::Expect` or - /// `ParserImpl::Maybe`. - /// @return a pointer to `val` - static inline T* ptr(T& val) { return &val; } -}; - -/// OperatorArrow template specialization for std::unique_ptr<>. -template -struct OperatorArrow> { - /// type resolves to the return type for the operator->() - using type = T*; - /// @param val the value held by `ParserImpl::Expect` or - /// `ParserImpl::Maybe`. - /// @return the raw pointer held by `val`. - static inline T* ptr(std::unique_ptr& val) { return val.get(); } -}; - -/// OperatorArrow template specialization for T*. -template -struct OperatorArrow { - /// type resolves to the return type for the operator->() - using type = T*; - /// @param val the value held by `ParserImpl::Expect` or - /// `ParserImpl::Maybe`. - /// @return `val`. - static inline T* ptr(T* val) { return val; } -}; - -} // namespace tint::wgsl::reader::detail - -#endif // SRC_TINT_LANG_WGSL_READER_PARSER_DETAIL_H_ diff --git a/3rdparty/dawn/src/tint/lang/wgsl/reader/parser/lexer.cc b/3rdparty/dawn/src/tint/lang/wgsl/reader/parser/lexer.cc deleted file mode 100644 index 6e5fa0645..000000000 --- a/3rdparty/dawn/src/tint/lang/wgsl/reader/parser/lexer.cc +++ /dev/null @@ -1,1343 +0,0 @@ -// Copyright 2020 The Dawn & Tint Authors -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// 3. Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifdef UNSAFE_BUFFERS_BUILD -// TODO(crbug.com/439062058): Remove this and convert code to safer constructs. -#pragma allow_unsafe_buffers -#endif - -#include "src/tint/lang/wgsl/reader/parser/lexer.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "src/tint/lang/core/fluent_types.h" -#include "src/tint/lang/core/number.h" -#include "src/tint/utils/ice/ice.h" -#include "src/tint/utils/strconv/parse_num.h" -#include "src/tint/utils/text/unicode.h" - -using namespace tint::core::fluent_types; // NOLINT - -namespace tint::wgsl::reader { -namespace { - -// Unicode parsing code assumes that the size of a single std::string element is -// 1 byte. -static_assert(sizeof(decltype(tint::Source::FileContent::data[0])) == sizeof(uint8_t), - "tint::wgsl::reader requires the size of a std::string element " - "to be a single byte"); - -// A token is ~80bytes. The 4k here comes from looking at the number of tokens in the benchmark -// programs and being a bit bigger then those need (atan2-const-eval is the outlier here). -static constexpr size_t kDefaultListSize = 4092; - -bool read_blankspace(std::string_view str, - size_t i, - bool* is_blankspace, - uint32_t* blankspace_size) { - // See https://www.w3.org/TR/WGSL/#blankspace - - auto* utf8 = reinterpret_cast(&str[i]); - auto [cp, n] = tint::utf8::Decode(utf8, str.size() - i); - - if (n == 0) { - return false; - } - - static const auto kSpace = tint::CodePoint(0x0020); // space - static const auto kHTab = tint::CodePoint(0x0009); // horizontal tab - static const auto kL2R = tint::CodePoint(0x200E); // left-to-right mark - static const auto kR2L = tint::CodePoint(0x200F); // right-to-left mark - - if (cp == kSpace || cp == kHTab || cp == kL2R || cp == kR2L) { - *is_blankspace = true; - *blankspace_size = static_cast(n); - return true; - } - - *is_blankspace = false; - return true; -} - -uint32_t dec_value(char c) { - if (c >= '0' && c <= '9') { - return static_cast(c - '0'); - } - return 0; -} - -uint32_t hex_value(char c) { - if (c >= '0' && c <= '9') { - return static_cast(c - '0'); - } - if (c >= 'a' && c <= 'f') { - return 0xA + static_cast(c - 'a'); - } - if (c >= 'A' && c <= 'F') { - return 0xA + static_cast(c - 'A'); - } - return 0; -} - -} // namespace - -Lexer::Lexer(const Source::File* file) : file_(file), location_{1, 1} {} - -Lexer::~Lexer() = default; - -std::vector Lexer::Lex() { - std::vector tokens; - tokens.reserve(kDefaultListSize); - - while (true) { - tokens.emplace_back(next()); - if (tokens.back().IsEof() || tokens.back().IsError()) { - break; - } - - // If the token can be split, we insert a placeholder element(s) into the stream to hold the - // split character. - size_t num_placeholders = tokens.back().NumPlaceholders(); - for (size_t i = 0; i < num_placeholders; i++) { - auto src = tokens.back().source(); - src.range.begin.column++; - tokens.emplace_back(Token::Type::kPlaceholder, src); - } - } - return tokens; -} - -std::string_view Lexer::line() const { - if (file_->content.lines.size() == 0) { - static const char* empty_string = ""; - return empty_string; - } - return file_->content.lines[location_.line - 1]; -} - -uint32_t Lexer::pos() const { - return location_.column - 1; -} - -uint32_t Lexer::length() const { - return static_cast(line().size()); -} - -const char& Lexer::at(uint32_t pos) const { - const auto& l = line(); - // Unlike for std::string, if pos == line().size(), indexing `l[pos]` is UB for - // std::string_view. - if (pos >= l.size()) { - static const char zero = 0; - return zero; - } - return l[pos]; -} - -// This pointer is passed into std::from_chars which requires a pointer beyond the end of contiguous -// range, not an end iterator, so will always hit this warning. -TINT_BEGIN_DISABLE_WARNING(UNSAFE_BUFFER_USAGE); -const char* Lexer::line_end() const { - return &(line()[length() - 1]) + 1; -} -TINT_END_DISABLE_WARNING(UNSAFE_BUFFER_USAGE); - -std::string_view Lexer::substr(uint32_t offset, uint32_t count) { - return line().substr(offset, count); -} - -void Lexer::advance(uint32_t offset) { - location_.column += offset; -} - -void Lexer::set_pos(uint32_t pos) { - location_.column = pos + 1; -} - -void Lexer::advance_line() { - location_.line++; - location_.column = 1; -} - -bool Lexer::is_eof() const { - return location_.line >= file_->content.lines.size() && pos() >= length(); -} - -bool Lexer::is_eol() const { - return pos() >= length(); -} - -Token Lexer::next() { - if (auto t = skip_blankspace_and_comments(); t.has_value() && !t->IsUninitialized()) { - return std::move(t.value()); - } - - if (auto t = try_hex_float(); t.has_value() && !t->IsUninitialized()) { - return std::move(t.value()); - } - - if (auto t = try_hex_integer(); t.has_value() && !t->IsUninitialized()) { - return std::move(t.value()); - } - - if (auto t = try_float(); t.has_value() && !t->IsUninitialized()) { - return std::move(t.value()); - } - - if (auto t = try_integer(); t.has_value() && !t->IsUninitialized()) { - return std::move(t.value()); - } - - if (auto t = try_ident(); t.has_value() && !t->IsUninitialized()) { - return std::move(t.value()); - } - - if (auto t = try_punctuation(); t.has_value() && !t->IsUninitialized()) { - return std::move(t.value()); - } - - if (is_null()) { - return {Token::Type::kError, begin_source(), "null character found"}; - } - if (is_bom()) { - return {Token::Type::kError, begin_source(), "invalid character (UTF-8 BOM) found"}; - } - return {Token::Type::kError, begin_source(), "invalid character found"}; -} - -Source Lexer::begin_source() const { - Source src{}; - src.file = file_; - src.range.begin = location_; - src.range.end = location_; - return src; -} - -void Lexer::end_source(Source& src) const { - src.range.end = location_; -} - -bool Lexer::is_null() const { - return (pos() < length()) && (at(pos()) == 0); -} - -bool Lexer::is_bom() const { - if (pos() + 2 >= length()) { - return false; - } - return (static_cast(at(pos())) == 0xEF && - static_cast(at(pos() + 1)) == 0xBB && - static_cast(at(pos() + 2)) == 0xBF); -} - -bool Lexer::is_digit(char ch) const { - return std::isdigit(static_cast(ch)) != 0; -} -bool Lexer::is_hex(char ch) const { - return std::isxdigit(static_cast(ch)) != 0; -} - -bool Lexer::matches(uint32_t pos, std::string_view sub_string) { - if (pos >= length()) { - return false; - } - return substr(pos, static_cast(sub_string.size())) == sub_string; -} - -bool Lexer::matches(uint32_t pos, char ch) { - if (pos >= length()) { - return false; - } - return line()[pos] == ch; -} - -std::optional Lexer::skip_blankspace_and_comments() { - for (;;) { - auto loc = location_; - while (!is_eof()) { - if (is_eol()) { - advance_line(); - continue; - } - - bool is_blankspace; - uint32_t blankspace_size; - if (!read_blankspace(line(), pos(), &is_blankspace, &blankspace_size)) { - return Token{Token::Type::kError, begin_source(), "invalid UTF-8"}; - } - if (!is_blankspace) { - break; - } - - advance(blankspace_size); - } - - auto t = skip_comment(); - if (t.has_value() && !t->IsUninitialized()) { - return t; - } - - // If the cursor didn't advance we didn't remove any blankspace - // so we're done. - if (loc == location_) { - break; - } - } - if (is_eof()) { - return Token{Token::Type::kEOF, begin_source()}; - } - - return {}; -} - -std::optional Lexer::skip_comment() { - auto unicode_length = [](std::string_view str, size_t i) { - auto* utf8 = reinterpret_cast(&str[i]); - auto [_, n] = tint::utf8::Decode(utf8, str.size() - i); - return uint32_t(n); - }; - - if (matches(pos(), "//")) { - // Line comment: ignore everything until the end of line. - while (!is_eol()) { - if (is_null()) { - return Token{Token::Type::kError, begin_source(), "null character found"}; - } - auto n = unicode_length(line(), pos()); - if (n == 0) { - return Token{Token::Type::kError, begin_source(), "invalid UTF-8"}; - } - advance(n); - } - return {}; - } - - if (matches(pos(), "/*")) { - // Block comment: ignore everything until the closing '*/' token. - - // Record source location of the initial '/*' - auto source = begin_source(); - source.range.end.column += 1; - - advance(2); - - int depth = 1; - while (!is_eof() && depth > 0) { - if (matches(pos(), "/*")) { - // Start of block comment: increase nesting depth. - advance(2); - depth++; - } else if (matches(pos(), "*/")) { - // End of block comment: decrease nesting depth. - advance(2); - depth--; - } else if (is_eol()) { - // Newline: skip and update source location. - advance_line(); - } else if (is_null()) { - return Token{Token::Type::kError, begin_source(), "null character found"}; - } else { - auto n = unicode_length(line(), pos()); - if (n == 0) { - return Token{Token::Type::kError, begin_source(), "invalid UTF-8"}; - } - // Anything else: skip and update source location. - advance(n); - } - } - if (depth > 0) { - return Token{Token::Type::kError, source, "unterminated block comment"}; - } - } - return {}; -} - -std::optional Lexer::try_float() { - auto start = pos(); - auto end = pos(); - - auto source = begin_source(); - bool has_mantissa_digits = false; - - std::optional first_significant_digit_position; - while (end < length() && is_digit(at(end))) { - if (!first_significant_digit_position.has_value() && (at(end) != '0')) { - first_significant_digit_position = end; - } - - has_mantissa_digits = true; - end++; - } - - std::optional dot_position; - if (end < length() && matches(end, '.')) { - dot_position = end; - end++; - } - - size_t zeros_before_digit = 0; - while (end < length() && is_digit(at(end))) { - if (!first_significant_digit_position.has_value()) { - if (at(end) == '0') { - zeros_before_digit += 1; - } else { - first_significant_digit_position = end; - } - } - - has_mantissa_digits = true; - end++; - } - - if (!has_mantissa_digits) { - return {}; - } - - // Parse the exponent if one exists - std::optional exponent_value_position; - bool negative_exponent = false; - if (end < length() && (matches(end, 'e') || matches(end, 'E'))) { - end++; - if (end < length() && (matches(end, '+') || matches(end, '-'))) { - negative_exponent = matches(end, '-'); - end++; - } - exponent_value_position = end; - - bool has_digits = false; - while (end < length() && isdigit(at(end))) { - has_digits = true; - end++; - } - - // If an 'e' or 'E' was present, then the number part must also be present. - if (!has_digits) { - const auto str = std::string{substr(start, end - start)}; - return Token{Token::Type::kError, source, - "incomplete exponent for floating point literal: " + str}; - } - } - - bool has_f_suffix = false; - bool has_h_suffix = false; - if (end < length() && matches(end, 'f')) { - has_f_suffix = true; - } else if (end < length() && matches(end, 'h')) { - has_h_suffix = true; - } - - if (!dot_position.has_value() && !exponent_value_position.has_value() && !has_f_suffix && - !has_h_suffix) { - // If it only has digits then it's an integer. - return {}; - } - - auto ret = tint::strconv::ParseDouble(std::string_view(&at(start), end - start)); - double value = ret == Success ? ret.Get() : 0.0; - bool overflow = - ret != Success && ret.Failure() == tint::strconv::ParseNumberError::kResultOutOfRange; - - // If the value didn't fit in a double, check for underflow as that is 0.0 in WGSL and not an - // error. - if (overflow) { - // The exponent is negative, so treat as underflow - if (negative_exponent) { - overflow = false; - value = 0.0; - } else if (dot_position.has_value() && first_significant_digit_position.has_value() && - first_significant_digit_position.value() > dot_position.value()) { - // Parse the exponent from the float if provided - size_t exp_value = 0; - bool exp_conversion_succeeded = true; - if (exponent_value_position.has_value()) { - // Note, the `at` method will return a static `0` if the provided position is >= - // length. The end pointer need to point to the correct memory location in the - // current line to use `from_chars`. - // So, handle the case where end points past the length specially. - auto exp_end = std::min(end, length()) - (has_f_suffix || has_h_suffix ? 1 : 0); - auto* exp_end_ptr = &at(exp_end); - if (exp_end >= length()) { - exp_end_ptr = line_end(); - } - auto exp_ret = std::from_chars(&at(exponent_value_position.value()), exp_end_ptr, - exp_value, 10); - - if (exp_ret.ec != std::errc{}) { - exp_conversion_succeeded = false; - } - } - // If the exponent has gone negative, then this is an underflow case - if (exp_conversion_succeeded && exp_value < zeros_before_digit) { - overflow = false; - value = 0.0; - } - } - } - - advance(end - start); - - if (has_f_suffix) { - auto f = core::CheckedConvert(AFloat(value)); - if (!overflow && f == Success) { - advance(1); - end_source(source); - return Token{Token::Type::kFloatLiteral_F, source, static_cast(f.Get())}; - } - return Token{Token::Type::kError, source, "value cannot be represented as 'f32'"}; - } - - if (has_h_suffix) { - auto f = core::CheckedConvert(AFloat(value)); - if (!overflow && f == Success) { - advance(1); - end_source(source); - return Token{Token::Type::kFloatLiteral_H, source, static_cast(f.Get())}; - } - return Token{Token::Type::kError, source, "value cannot be represented as 'f16'"}; - } - - end_source(source); - - TINT_BEGIN_DISABLE_WARNING(FLOAT_EQUAL); - if (overflow || value == HUGE_VAL || -value == HUGE_VAL) { - return Token{Token::Type::kError, source, - "value cannot be represented as 'abstract-float'"}; - } else { - return Token{Token::Type::kFloatLiteral, source, value}; - } - TINT_END_DISABLE_WARNING(FLOAT_EQUAL); -} - -std::optional Lexer::try_hex_float() { - constexpr uint64_t kExponentBits = 11; - constexpr uint64_t kMantissaBits = 52; - constexpr uint64_t kTotalBits = 1 + kExponentBits + kMantissaBits; - constexpr uint64_t kTotalMsb = kTotalBits - 1; - constexpr uint64_t kMantissaMsb = kMantissaBits - 1; - constexpr uint64_t kMantissaShiftRight = kTotalBits - kMantissaBits; - constexpr int64_t kExponentBias = 1023; - constexpr uint64_t kExponentMask = (1 << kExponentBits) - 1; - constexpr int64_t kExponentMax = kExponentMask; // Including NaN / inf - constexpr uint64_t kExponentLeftShift = kMantissaBits; - constexpr uint64_t kOne = 1; - - auto start = pos(); - auto end = pos(); - - auto source = begin_source(); - - // 0[xX]([0-9a-fA-F]*.?[0-9a-fA-F]+ | [0-9a-fA-F]+.[0-9a-fA-F]*)(p|P)(+|-)?[0-9]+ // NOLINT - - // 0[xX] - if (matches(end, '0') && (matches(end + 1, 'x') || matches(end + 1, 'X'))) { - end += 2; - } else { - return {}; - } - - uint64_t mantissa = 0; - uint64_t exponent = 0; - - // TODO(dneto): Values in the normal range for the format do not explicitly - // store the most significant bit. The algorithm here works hard to eliminate - // that bit in the representation during parsing, and then it backtracks - // when it sees it may have to explicitly represent it, and backtracks again - // when it sees the number is sub-normal (i.e. the exponent underflows). - // I suspect the logic can be clarified by storing it during parsing, and - // then removing it later only when needed. - - // `set_next_mantissa_bit_to` sets next `mantissa` bit starting from msb to - // lsb to value 1 if `set` is true, 0 otherwise. Returns true on success, i.e. - // when the bit can be accommodated in the available space. - uint64_t mantissa_next_bit = kTotalMsb; - auto set_next_mantissa_bit_to = [&](bool set, bool integer_part) -> bool { - // If adding bits for the integer part, we can overflow whether we set the - // bit or not. For the fractional part, we can only overflow when setting - // the bit. - const bool check_overflow = integer_part || set; - // Note: mantissa_next_bit actually decrements, so comparing it as - // larger than a positive number relies on wraparound. - if (check_overflow && (mantissa_next_bit > kTotalMsb)) { - return false; // Overflowed mantissa - } - if (set) { - mantissa |= (kOne << mantissa_next_bit); - } - --mantissa_next_bit; - return true; - }; - - // Collect integer range (if any) - auto integer_range = std::make_pair(end, end); - while (end < length() && is_hex(at(end))) { - integer_range.second = ++end; - } - - // .? - bool hex_point = false; - if (matches(end, '.')) { - hex_point = true; - end++; - } - - // Collect fractional range (if any) - auto fractional_range = std::make_pair(end, end); - while (end < length() && is_hex(at(end))) { - fractional_range.second = ++end; - } - - // Must have at least an integer or fractional part - if ((integer_range.first == integer_range.second) && - (fractional_range.first == fractional_range.second)) { - return {}; - } - - // Is the binary exponent present? It's optional. - const bool has_exponent = (matches(end, 'p') || matches(end, 'P')); - if (has_exponent) { - end++; - } - if (!has_exponent && !hex_point) { - // It's not a hex float. At best it's a hex integer. - return {}; - } - - // At this point, we know for sure our token is a hex float value, - // or an invalid token. - - // Parse integer part - // [0-9a-fA-F]* - - bool has_zero_integer = true; - // The magnitude is zero if and only if seen_prior_one_bits is false. - bool seen_prior_one_bits = false; - for (auto i = integer_range.first; i < integer_range.second; ++i) { - const auto nibble = hex_value(at(i)); - if (nibble != 0) { - has_zero_integer = false; - } - - for (int bit = 3; bit >= 0; --bit) { - auto v = 1 & (nibble >> bit); - - // Skip leading 0s and the first 1 - if (seen_prior_one_bits) { - if (!set_next_mantissa_bit_to(v != 0, true)) { - return Token{Token::Type::kError, source, - "mantissa is too large for hex float"}; - } - ++exponent; - } else { - if (v == 1) { - seen_prior_one_bits = true; - } - } - } - } - - // Parse fractional part - // [0-9a-fA-F]* - for (auto i = fractional_range.first; i < fractional_range.second; ++i) { - auto nibble = hex_value(at(i)); - for (int bit = 3; bit >= 0; --bit) { - auto v = 1 & (nibble >> bit); - - if (v == 1) { - seen_prior_one_bits = true; - } - - // If integer part is 0, we only start writing bits to the - // mantissa once we have a non-zero fractional bit. While the fractional - // values are 0, we adjust the exponent to avoid overflowing `mantissa`. - if (!seen_prior_one_bits) { - --exponent; - } else { - if (!set_next_mantissa_bit_to(v != 0, false)) { - return Token{Token::Type::kError, source, - "mantissa is too large for hex float"}; - } - } - } - } - - // Determine if the value of the mantissa is zero. - // Note: it's not enough to check mantissa == 0 as we drop the initial bit, - // whether it's in the integer part or the fractional part. - const bool is_zero = !seen_prior_one_bits; - TINT_ASSERT(!is_zero || mantissa == 0); - - // Parse the optional exponent. - // ((p|P)(\+|-)?[0-9]+)? - uint64_t input_exponent = 0; // Defaults to 0 if not present - int64_t exponent_sign = 1; - // If the 'p' part is present, the rest of the exponent must exist. - bool has_f_suffix = false; - bool has_h_suffix = false; - if (has_exponent) { - // Parse the rest of the exponent. - // (+|-)? - if (matches(end, '+')) { - end++; - } else if (matches(end, '-')) { - exponent_sign = -1; - end++; - } - - // Parse exponent from input - // [0-9]+ - // Allow overflow (in uint64_t) when the floating point value magnitude is - // zero. - bool has_exponent_digits = false; - while (end < length() && isdigit(at(end))) { - has_exponent_digits = true; - auto prev_exponent = input_exponent; - input_exponent = (input_exponent * 10) + dec_value(at(end)); - // Check if we've overflowed input_exponent. This only matters when - // the mantissa is non-zero. - if (!is_zero && (prev_exponent > input_exponent)) { - return Token{Token::Type::kError, source, "exponent is too large for hex float"}; - } - end++; - } - - // Parse optional 'f' or 'h' suffix. For a hex float, it can only exist - // when the exponent is present. Otherwise it will look like - // one of the mantissa digits. - if (end < length() && matches(end, 'f')) { - has_f_suffix = true; - end++; - } else if (end < length() && matches(end, 'h')) { - has_h_suffix = true; - end++; - } - - if (!has_exponent_digits) { - return Token{Token::Type::kError, source, "expected an exponent value for hex float"}; - } - } - - advance(end - start); - end_source(source); - - if (is_zero) { - // If value is zero, then ignore the exponent and produce a zero - exponent = 0; - } else { - // Ensure input exponent is not too large; i.e. that it won't overflow when - // adding the exponent bias. - const uint64_t kIntMax = static_cast(std::numeric_limits::max()); - const uint64_t kMaxInputExponent = kIntMax - kExponentBias; - if (input_exponent > kMaxInputExponent) { - return Token{Token::Type::kError, source, "exponent is too large for hex float"}; - } - - // Compute exponent so far - exponent += static_cast(static_cast(input_exponent) * exponent_sign); - - // Bias exponent if non-zero - // After this, if exponent is <= 0, our value is a denormal - exponent += kExponentBias; - - // We know the number is not zero. The MSB is 1 (by construction), and - // should be eliminated because it becomes the implicit 1 that isn't - // explicitly represented in the binary32 format. We'll bring it back - // later if we find the exponent actually underflowed, i.e. the number - // is sub-normal. - if (has_zero_integer) { - mantissa <<= 1; - --exponent; - } - } - - // We can now safely work with exponent as a signed quantity, as there's no - // chance to overflow - int64_t signed_exponent = static_cast(exponent); - - // Shift mantissa to occupy the low 23 bits - mantissa >>= kMantissaShiftRight; - - // If denormal, shift mantissa until our exponent is zero - if (!is_zero) { - // Denorm has exponent 0 and non-zero mantissa. We set the top bit here, - // then shift the mantissa to make exponent zero. - if (signed_exponent <= 0) { - mantissa >>= 1; - mantissa |= (kOne << kMantissaMsb); - } - - while (signed_exponent < 0) { - mantissa >>= 1; - ++signed_exponent; - - // If underflow, clamp to zero - if (mantissa == 0) { - signed_exponent = 0; - } - } - } - - if (signed_exponent >= kExponentMax || (signed_exponent == kExponentMax && mantissa != 0)) { - std::string type = has_f_suffix ? "f32" : (has_h_suffix ? "f16" : "abstract-float"); - return Token{Token::Type::kError, source, "value cannot be represented as '" + type + "'"}; - } - - // Combine sign, mantissa, and exponent - uint64_t result_u64 = 0; - result_u64 |= mantissa; - result_u64 |= (static_cast(signed_exponent) & kExponentMask) << kExponentLeftShift; - - // Reinterpret as f16 and return - double result_f64; - std::memcpy(&result_f64, &result_u64, 8); - - if (has_f_suffix) { - // Check value fits in f32 - if (result_f64 < static_cast(f32::kLowestValue) || - result_f64 > static_cast(f32::kHighestValue)) { - return Token{Token::Type::kError, source, "value cannot be represented as 'f32'"}; - } - // Check the value can be exactly represented, i.e. only high 23 mantissa bits are valid for - // normal f32 values, and less for subnormal f32 values. The rest low mantissa bits must be - // 0. - int valid_mantissa_bits = 0; - double abs_result_f64 = std::fabs(result_f64); - if (abs_result_f64 >= static_cast(f32::kSmallestValue)) { - // The result shall be a normal f32 value. - valid_mantissa_bits = 23; - } else if (abs_result_f64 >= static_cast(f32::kSmallestSubnormalValue)) { - // The result shall be a subnormal f32 value, represented as double. - // The smallest positive normal f32 is f32::kSmallestValue = 2^-126 = 0x1.0p-126, and - // the - // smallest positive subnormal f32 is f32::kSmallestSubnormalValue = 2^-149. Thus, the - // value v in range 2^-126 > v >= 2^-149 must be represented as a subnormal f32 - // number, but is still normal double (f64) number, and has a exponent in range -127 - // to -149, inclusive. - // A value v, if 2^-126 > v >= 2^-127, its binary32 representation will have binary form - // s_00000000_1xxxxxxxxxxxxxxxxxxxxxx, having mantissa of 1 leading 1 bit and 22 - // arbitrary bits. Since this value is represented as normal double number, the - // leading 1 bit is omitted, only the highest 22 mantissia bits can be arbitrary, and - // the rest lowest 40 mantissa bits of f64 number must be zero. - // 2^-127 > v >= 2^-128, binary32 s_00000000_01xxxxxxxxxxxxxxxxxxxxx, having mantissa of - // 1 leading 0 bit, 1 leading 1 bit, and 21 arbitrary bits. The f64 representation - // omits the leading 0 and 1 bits, and only the highest 21 mantissia bits can be - // arbitrary. - // 2^-128 > v >= 2^-129, binary32 s_00000000_001xxxxxxxxxxxxxxxxxxxx, 20 arbitrary bits. - // ... - // 2^-147 > v >= 2^-148, binary32 s_00000000_0000000000000000000001x, 1 arbitrary bit. - // 2^-148 > v >= 2^-149, binary32 s_00000000_00000000000000000000001, 0 arbitrary bit. - - // signed_exponent must be in range -149 + 1023 = 874 to -127 + 1023 = 896, inclusive - TINT_ASSERT((874 <= signed_exponent) && (signed_exponent <= 896)); - int unbiased_exponent = - static_cast(signed_exponent) - static_cast(kExponentBias); - TINT_ASSERT((-149 <= unbiased_exponent) && (unbiased_exponent <= -127)); - valid_mantissa_bits = unbiased_exponent + 149; // 0 for -149, and 22 for -127 - } else if (abs_result_f64 != 0.0) { - // The result is smaller than the smallest subnormal f32 value, but not equal to zero. - // Such value will never be exactly represented by f32. - return Token{Token::Type::kError, source, - "value cannot be exactly represented as 'f32'"}; - } - // Check the low 52-valid_mantissa_bits mantissa bits must be 0. - TINT_ASSERT((0 <= valid_mantissa_bits) && (valid_mantissa_bits <= 23)); - if (result_u64 & ((uint64_t(1) << (52 - valid_mantissa_bits)) - 1)) { - return Token{Token::Type::kError, source, - "value cannot be exactly represented as 'f32'"}; - } - return Token{Token::Type::kFloatLiteral_F, source, result_f64}; - } else if (has_h_suffix) { - // Check value fits in f16 - if (result_f64 < static_cast(f16::kLowestValue) || - result_f64 > static_cast(f16::kHighestValue)) { - return Token{Token::Type::kError, source, "value cannot be represented as 'f16'"}; - } - // Check the value can be exactly represented, i.e. only high 10 mantissa bits are valid for - // normal f16 values, and less for subnormal f16 values. The rest low mantissa bits must be - // 0. - int valid_mantissa_bits = 0; - double abs_result_f64 = std::fabs(result_f64); - if (abs_result_f64 >= static_cast(f16::kSmallestValue)) { - // The result shall be a normal f16 value. - valid_mantissa_bits = 10; - } else if (abs_result_f64 >= static_cast(f16::kSmallestSubnormalValue)) { - // The result shall be a subnormal f16 value, represented as double. - // The smallest positive normal f16 is f16::kSmallestValue = 2^-14 = 0x1.0p-14, and the - // smallest positive subnormal f16 is f16::kSmallestSubnormalValue = 2^-24. Thus, the - // value v in range 2^-14 > v >= 2^-24 must be represented as a subnormal f16 number, - // but is still normal double (f64) number, and has a exponent in range -15 to -24, - // inclusive. - // A value v, if 2^-14 > v >= 2^-15, its binary16 representation will have binary form - // s_00000_1xxxxxxxxx, having mantissa of 1 leading 1 bit and 9 arbitrary bits. Since - // this value is represented as normal double number, the leading 1 bit is omitted, - // only the highest 9 mantissia bits can be arbitrary, and the rest lowest 43 mantissa - // bits of f64 number must be zero. - // 2^-15 > v >= 2^-16, binary16 s_00000_01xxxxxxxx, having mantissa of 1 leading 0 bit, - // 1 leading 1 bit, and 8 arbitrary bits. The f64 representation omits the leading 0 - // and 1 bits, and only the highest 8 mantissia bits can be arbitrary. - // 2^-16 > v >= 2^-17, binary16 s_00000_001xxxxxxx, 7 arbitrary bits. - // ... - // 2^-22 > v >= 2^-23, binary16 s_00000_000000001x, 1 arbitrary bits. - // 2^-23 > v >= 2^-24, binary16 s_00000_0000000001, 0 arbitrary bits. - - // signed_exponent must be in range -24 + 1023 = 999 to -15 + 1023 = 1008, inclusive - TINT_ASSERT((999 <= signed_exponent) && (signed_exponent <= 1008)); - int unbiased_exponent = - static_cast(signed_exponent) - static_cast(kExponentBias); - TINT_ASSERT((-24 <= unbiased_exponent) && (unbiased_exponent <= -15)); - valid_mantissa_bits = unbiased_exponent + 24; // 0 for -24, and 9 for -15 - } else if (abs_result_f64 != 0.0) { - // The result is smaller than the smallest subnormal f16 value, but not equal to zero. - // Such value will never be exactly represented by f16. - return Token{Token::Type::kError, source, - "value cannot be exactly represented as 'f16'"}; - } - // Check the low 52-valid_mantissa_bits mantissa bits must be 0. - TINT_ASSERT((0 <= valid_mantissa_bits) && (valid_mantissa_bits <= 10)); - if (result_u64 & ((uint64_t(1) << (52 - valid_mantissa_bits)) - 1)) { - return Token{Token::Type::kError, source, - "value cannot be exactly represented as 'f16'"}; - } - return Token{Token::Type::kFloatLiteral_H, source, result_f64}; - } - - return Token{Token::Type::kFloatLiteral, source, result_f64}; -} - -Token Lexer::build_token_from_int_if_possible(Source source, - uint32_t start, - uint32_t prefix_count, - int32_t base) { - const char* start_ptr = &at(start); - // The call to `from_chars` will return the pointer to just after the last parsed character. - // We also need to tell it the maximum end character to parse. So, instead of walking all the - // characters to find the last possible and using that, we just provide the end of the string. - // We then calculate the count based off the provided end pointer and the start pointer. The - // extra `prefix_count` is to handle a `0x` which is not included in the `start` value. - const char* end_ptr = line_end(); - - int64_t value = 0; - auto res = std::from_chars(start_ptr, end_ptr, value, base); - const bool overflow = res.ec != std::errc(); - advance(static_cast(res.ptr - start_ptr) + prefix_count); - - if (matches(pos(), 'u')) { - if (!overflow && core::CheckedConvert(AInt(value)) == Success) { - advance(1); - end_source(source); - return {Token::Type::kIntLiteral_U, source, value}; - } - return {Token::Type::kError, source, "value cannot be represented as 'u32'"}; - } - - if (matches(pos(), 'i')) { - if (!overflow && core::CheckedConvert(AInt(value)) == Success) { - advance(1); - end_source(source); - return {Token::Type::kIntLiteral_I, source, value}; - } - return {Token::Type::kError, source, "value cannot be represented as 'i32'"}; - } - - // Check this last in order to get the more specific sized error messages - if (overflow) { - return {Token::Type::kError, source, "value cannot be represented as 'abstract-int'"}; - } - - end_source(source); - return {Token::Type::kIntLiteral, source, value}; -} - -std::optional Lexer::try_hex_integer() { - auto start = pos(); - auto curr = start; - - auto source = begin_source(); - - if (matches(curr, '0') && (matches(curr + 1, 'x') || matches(curr + 1, 'X'))) { - curr += 2; - } else { - return {}; - } - - if (!is_hex(at(curr))) { - return Token{Token::Type::kError, source, - "integer or float hex literal has no significant digits"}; - } - - return build_token_from_int_if_possible(source, curr, curr - start, 16); -} - -std::optional Lexer::try_integer() { - auto start = pos(); - auto curr = start; - - auto source = begin_source(); - - if (curr >= length() || !is_digit(at(curr))) { - return {}; - } - - // If the first digit is a zero this must only be zero as leading zeros - // are not allowed. - if (auto next = curr + 1; next < length()) { - if (at(curr) == '0' && is_digit(at(next))) { - return Token{Token::Type::kError, source, "integer literal cannot have leading 0s"}; - } - } - - return build_token_from_int_if_possible(source, start, 0, 10); -} - -std::optional Lexer::try_ident() { - auto source = begin_source(); - auto start = pos(); - - // Must begin with an XID_Source unicode character, or underscore - { - auto* utf8 = reinterpret_cast(&at(pos())); - auto [code_point, n] = tint::utf8::Decode(utf8, length() - pos()); - if (n == 0) { - advance(); // Skip the bad byte. - return Token{Token::Type::kError, source, "invalid UTF-8"}; - } - if (code_point != tint::CodePoint('_') && !code_point.IsXIDStart()) { - return {}; - } - // Consume start codepoint - advance(static_cast(n)); - } - - while (!is_eol()) { - // Must continue with an XID_Continue unicode character - auto* utf8 = reinterpret_cast(&at(pos())); - auto [code_point, n] = tint::utf8::Decode(utf8, line().size() - pos()); - if (n == 0) { - advance(); // Skip the bad byte. - return Token{Token::Type::kError, source, "invalid UTF-8"}; - } - if (!code_point.IsXIDContinue()) { - break; - } - - // Consume continuing codepoint - advance(static_cast(n)); - } - - auto str = substr(start, pos() - start); - end_source(source); - - if (str.length() > 1 && substr(start, 2) == "__") { - // Identifiers prefixed with two or more underscores are not allowed. - return Token{Token::Type::kError, source, - "identifiers must not start with two or more underscores"}; - } - - if (auto t = parse_keyword(str); t.has_value()) { - return Token{t.value(), source, str}; - } - - return Token{Token::Type::kIdentifier, source, str}; -} - -std::optional Lexer::try_punctuation() { - auto source = begin_source(); - auto type = Token::Type::kUninitialized; - - if (matches(pos(), '@')) { - type = Token::Type::kAttr; - advance(1); - } else if (matches(pos(), '(')) { - type = Token::Type::kParenLeft; - advance(1); - } else if (matches(pos(), ')')) { - type = Token::Type::kParenRight; - advance(1); - } else if (matches(pos(), '[')) { - type = Token::Type::kBracketLeft; - advance(1); - } else if (matches(pos(), ']')) { - type = Token::Type::kBracketRight; - advance(1); - } else if (matches(pos(), '{')) { - type = Token::Type::kBraceLeft; - advance(1); - } else if (matches(pos(), '}')) { - type = Token::Type::kBraceRight; - advance(1); - } else if (matches(pos(), '&')) { - if (matches(pos() + 1, '&')) { - type = Token::Type::kAndAnd; - advance(2); - } else if (matches(pos() + 1, '=')) { - type = Token::Type::kAndEqual; - advance(2); - } else { - type = Token::Type::kAnd; - advance(1); - } - } else if (matches(pos(), '/')) { - if (matches(pos() + 1, '=')) { - type = Token::Type::kDivisionEqual; - advance(2); - } else { - type = Token::Type::kForwardSlash; - advance(1); - } - } else if (matches(pos(), '!')) { - if (matches(pos() + 1, '=')) { - type = Token::Type::kNotEqual; - advance(2); - } else { - type = Token::Type::kBang; - advance(1); - } - } else if (matches(pos(), ':')) { - type = Token::Type::kColon; - advance(1); - } else if (matches(pos(), ',')) { - type = Token::Type::kComma; - advance(1); - } else if (matches(pos(), '=')) { - if (matches(pos() + 1, '=')) { - type = Token::Type::kEqualEqual; - advance(2); - } else { - type = Token::Type::kEqual; - advance(1); - } - } else if (matches(pos(), '>')) { - if (matches(pos() + 1, '=')) { - type = Token::Type::kGreaterThanEqual; - advance(2); - } else if (matches(pos() + 1, '>')) { - if (matches(pos() + 2, '=')) { - type = Token::Type::kShiftRightEqual; - advance(3); - } else { - type = Token::Type::kShiftRight; - advance(2); - } - } else { - type = Token::Type::kGreaterThan; - advance(1); - } - } else if (matches(pos(), '<')) { - if (matches(pos() + 1, '=')) { - type = Token::Type::kLessThanEqual; - advance(2); - } else if (matches(pos() + 1, '<')) { - if (matches(pos() + 2, '=')) { - type = Token::Type::kShiftLeftEqual; - advance(3); - } else { - type = Token::Type::kShiftLeft; - advance(2); - } - } else { - type = Token::Type::kLessThan; - advance(1); - } - } else if (matches(pos(), '%')) { - if (matches(pos() + 1, '=')) { - type = Token::Type::kModuloEqual; - advance(2); - } else { - type = Token::Type::kMod; - advance(1); - } - } else if (matches(pos(), '-')) { - if (matches(pos() + 1, '>')) { - type = Token::Type::kArrow; - advance(2); - } else if (matches(pos() + 1, '-')) { - type = Token::Type::kMinusMinus; - advance(2); - } else if (matches(pos() + 1, '=')) { - type = Token::Type::kMinusEqual; - advance(2); - } else { - type = Token::Type::kMinus; - advance(1); - } - } else if (matches(pos(), '.')) { - type = Token::Type::kPeriod; - advance(1); - } else if (matches(pos(), '+')) { - if (matches(pos() + 1, '+')) { - type = Token::Type::kPlusPlus; - advance(2); - } else if (matches(pos() + 1, '=')) { - type = Token::Type::kPlusEqual; - advance(2); - } else { - type = Token::Type::kPlus; - advance(1); - } - } else if (matches(pos(), '|')) { - if (matches(pos() + 1, '|')) { - type = Token::Type::kOrOr; - advance(2); - } else if (matches(pos() + 1, '=')) { - type = Token::Type::kOrEqual; - advance(2); - } else { - type = Token::Type::kOr; - advance(1); - } - } else if (matches(pos(), ';')) { - type = Token::Type::kSemicolon; - advance(1); - } else if (matches(pos(), '*')) { - if (matches(pos() + 1, '=')) { - type = Token::Type::kTimesEqual; - advance(2); - } else { - type = Token::Type::kStar; - advance(1); - } - } else if (matches(pos(), '~')) { - type = Token::Type::kTilde; - advance(1); - } else if (matches(pos(), '_')) { - type = Token::Type::kUnderscore; - advance(1); - } else if (matches(pos(), '^')) { - if (matches(pos() + 1, '=')) { - type = Token::Type::kXorEqual; - advance(2); - } else { - type = Token::Type::kXor; - advance(1); - } - } else { - return {}; - } - - end_source(source); - - return Token{type, source}; -} - -std::optional Lexer::parse_keyword(std::string_view str) { - if (str == "alias") { - return Token::Type::kAlias; - } - if (str == "break") { - return Token::Type::kBreak; - } - if (str == "case") { - return Token::Type::kCase; - } - if (str == "const") { - return Token::Type::kConst; - } - if (str == "const_assert") { - return Token::Type::kConstAssert; - } - if (str == "continue") { - return Token::Type::kContinue; - } - if (str == "continuing") { - return Token::Type::kContinuing; - } - if (str == "diagnostic") { - return Token::Type::kDiagnostic; - } - if (str == "discard") { - return Token::Type::kDiscard; - } - if (str == "default") { - return Token::Type::kDefault; - } - if (str == "else") { - return Token::Type::kElse; - } - if (str == "enable") { - return Token::Type::kEnable; - } - if (str == "fallthrough") { - return Token::Type::kFallthrough; - } - if (str == "false") { - return Token::Type::kFalse; - } - if (str == "fn") { - return Token::Type::kFn; - } - if (str == "for") { - return Token::Type::kFor; - } - if (str == "if") { - return Token::Type::kIf; - } - if (str == "let") { - return Token::Type::kLet; - } - if (str == "loop") { - return Token::Type::kLoop; - } - if (str == "override") { - return Token::Type::kOverride; - } - if (str == "return") { - return Token::Type::kReturn; - } - if (str == "requires") { - return Token::Type::kRequires; - } - if (str == "struct") { - return Token::Type::kStruct; - } - if (str == "switch") { - return Token::Type::kSwitch; - } - if (str == "true") { - return Token::Type::kTrue; - } - if (str == "var") { - return Token::Type::kVar; - } - if (str == "while") { - return Token::Type::kWhile; - } - if (str == "_") { - return Token::Type::kUnderscore; - } - return std::nullopt; -} - -} // namespace tint::wgsl::reader diff --git a/3rdparty/dawn/src/tint/lang/wgsl/reader/parser/lexer.h b/3rdparty/dawn/src/tint/lang/wgsl/reader/parser/lexer.h deleted file mode 100644 index 175d50566..000000000 --- a/3rdparty/dawn/src/tint/lang/wgsl/reader/parser/lexer.h +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright 2020 The Dawn & Tint Authors -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// 3. Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef SRC_TINT_LANG_WGSL_READER_PARSER_LEXER_H_ -#define SRC_TINT_LANG_WGSL_READER_PARSER_LEXER_H_ - -#include -#include - -#include "src/tint/lang/wgsl/reader/parser/token.h" - -namespace tint::wgsl::reader { - -/// Converts the input stream into a series of Tokens -class Lexer { - public: - /// Creates a new Lexer - /// @param file the source file - explicit Lexer(const Source::File* file); - ~Lexer(); - - /// @return the token list. - std::vector Lex(); - - private: - /// Returns the next token in the input stream. - /// @return Token - Token next(); - - /// Advances past blankspace and comments, if present at the current position. - /// @returns error token, EOF, or uninitialized - std::optional skip_blankspace_and_comments(); - /// Advances past a comment at the current position, if one exists. - /// Returns an error if there was an unterminated block comment, - /// or a null character was present. - /// @returns uninitialized token on success, or error - std::optional skip_comment(); - - Token build_token_from_int_if_possible(Source source, - uint32_t start, - uint32_t prefix_count, - int32_t base); - - std::optional parse_keyword(std::string_view); - - /// The try_* methods have the following in common: - /// - They assume there is at least one character to be consumed, - /// i.e. the input has not yet reached end of file. - /// - They return an initialized token when they match and consume - /// a token of the specified kind. - /// - Some can return an error token. - /// - Otherwise they return an uninitialized token when they did not - /// match a token of the specfied kind. - std::optional try_float(); - std::optional try_hex_float(); - std::optional try_hex_integer(); - std::optional try_ident(); - std::optional try_integer(); - std::optional try_punctuation(); - - Source begin_source() const; - void end_source(Source&) const; - - /// @returns view of current line - std::string_view line() const; - /// @returns position in current line - uint32_t pos() const; - /// @returns length of current line - uint32_t length() const; - /// @returns reference to character at `pos` within current line - const char& at(uint32_t pos) const; - /// @returns a point to the character just beyond the end of the current line, similar to how - /// std::end works - const char* line_end() const; - /// @returns substring view at `offset` within current line of length `count` - std::string_view substr(uint32_t offset, uint32_t count); - /// advances current position by `offset` within current line - void advance(uint32_t offset = 1); - /// sets current position to `pos` within current line - void set_pos(uint32_t pos); - /// advances current position to next line - void advance_line(); - /// @returns true if the current position contains a BOM - bool is_bom() const; - /// @returns true if the end of the input has been reached. - bool is_eof() const; - /// @returns true if the end of the current line has been reached. - bool is_eol() const; - /// @returns true if there is another character on the input and - /// it is not null. - bool is_null() const; - /// @param ch a character - /// @returns true if 'ch' is a decimal digit - bool is_digit(char ch) const; - /// @param ch a character - /// @returns true if 'ch' is a hexadecimal digit - bool is_hex(char ch) const; - /// @returns true if string at `pos` matches `substr` - bool matches(uint32_t pos, std::string_view substr); - /// @returns true if char at `pos` matches `ch` - bool matches(uint32_t pos, char ch); - /// The source file content - Source::File const* const file_; - /// The current location within the input - Source::Location location_; -}; - -} // namespace tint::wgsl::reader - -#endif // SRC_TINT_LANG_WGSL_READER_PARSER_LEXER_H_ diff --git a/3rdparty/dawn/src/tint/lang/wgsl/reader/parser/parser.cc b/3rdparty/dawn/src/tint/lang/wgsl/reader/parser/parser.cc deleted file mode 100644 index 252681cc4..000000000 --- a/3rdparty/dawn/src/tint/lang/wgsl/reader/parser/parser.cc +++ /dev/null @@ -1,3542 +0,0 @@ -// Copyright 2020 The Dawn & Tint Authors -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// 3. Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "src/tint/lang/wgsl/reader/parser/parser.h" - -#include -#include - -#include "src/tint/lang/core/enums.h" -#include "src/tint/lang/core/type/depth_texture.h" -#include "src/tint/lang/core/type/external_texture.h" -#include "src/tint/lang/core/type/multisampled_texture.h" -#include "src/tint/lang/core/type/sampled_texture.h" -#include "src/tint/lang/core/type/texture_dimension.h" -#include "src/tint/lang/wgsl/ast/assignment_statement.h" -#include "src/tint/lang/wgsl/ast/break_if_statement.h" -#include "src/tint/lang/wgsl/ast/break_statement.h" -#include "src/tint/lang/wgsl/ast/call_statement.h" -#include "src/tint/lang/wgsl/ast/continue_statement.h" -#include "src/tint/lang/wgsl/ast/discard_statement.h" -#include "src/tint/lang/wgsl/ast/id_attribute.h" -#include "src/tint/lang/wgsl/ast/if_statement.h" -#include "src/tint/lang/wgsl/ast/increment_decrement_statement.h" -#include "src/tint/lang/wgsl/ast/input_attachment_index_attribute.h" -#include "src/tint/lang/wgsl/ast/invariant_attribute.h" -#include "src/tint/lang/wgsl/ast/loop_statement.h" -#include "src/tint/lang/wgsl/ast/return_statement.h" -#include "src/tint/lang/wgsl/ast/stage_attribute.h" -#include "src/tint/lang/wgsl/ast/subgroup_size_attribute.h" -#include "src/tint/lang/wgsl/ast/switch_statement.h" -#include "src/tint/lang/wgsl/ast/unary_op_expression.h" -#include "src/tint/lang/wgsl/ast/var.h" -#include "src/tint/lang/wgsl/ast/variable_decl_statement.h" -#include "src/tint/lang/wgsl/ast/workgroup_attribute.h" -#include "src/tint/lang/wgsl/reader/parser/classify_template_args.h" -#include "src/tint/lang/wgsl/reader/parser/lexer.h" -#include "src/tint/lang/wgsl/reserved_words.h" -#include "src/tint/utils/containers/reverse.h" -#include "src/tint/utils/macros/defer.h" -#include "src/tint/utils/text/string.h" -#include "src/tint/utils/text/string_stream.h" - -namespace tint::wgsl::reader { -namespace { - -using Void = Parser::Void; - -/// An instance of Void that can be used to signal success for functions that return Expect or -/// Maybe. -static constexpr Void kSuccess; - -template -using Expect = Parser::Expect; - -template -using Maybe = Parser::Maybe; - -/// Controls the maximum number of times we'll call into the sync() and -/// unary_expression() functions from themselves. This is to guard against stack -/// overflow when there is an excessive number of blocks. -constexpr uint32_t kMaxParseDepth = 128; - -/// The maximum number of tokens to look ahead to try and sync the -/// parser on error. -constexpr size_t const kMaxResynchronizeLookahead = 32; - -/// Enter-exit counters for block token types. -/// Used by sync_to() to skip over closing block tokens that were opened during -/// the forward scan. -struct BlockCounters { - int brace = 0; // { } - int bracket = 0; // [ ] - int paren = 0; // ( ) - - /// @return the current enter-exit depth for the given block token type. If - /// `t` is not a block token type, then 0 is always returned. - int consume(const Token& t) { - if (t.Is(Token::Type::kBraceLeft)) { - return brace++; - } - if (t.Is(Token::Type::kBraceRight)) { - return brace--; - } - if (t.Is(Token::Type::kBracketLeft)) { - return bracket++; - } - if (t.Is(Token::Type::kBracketRight)) { - return bracket--; - } - if (t.Is(Token::Type::kParenLeft)) { - return paren++; - } - if (t.Is(Token::Type::kParenRight)) { - return paren--; - } - return 0; - } -}; -} // namespace - -/// RAII helper that combines a Source on construction with the last token's -/// source when implicitly converted to `Source`. -class Parser::MultiTokenSource { - public: - /// Constructor that starts with Source at the current peek position - /// @param parser the parser - explicit MultiTokenSource(Parser* parser) - : MultiTokenSource(parser, parser->peek().source().Begin()) {} - - /// Constructor that starts with the input `start` Source - /// @param parser the parser - /// @param start the start source of the range - MultiTokenSource(Parser* parser, const tint::Source& start) : parser_(parser), start_(start) {} - - /// @returns the Source that returns the combined source from start to the current last token's - /// source. - tint::Source operator()() const { return *this; } - - /// @returns the Source that returns the combined source from start to the current last token's - /// source. - operator tint::Source() const { - auto end = parser_->last_source().End(); - if (end < start_) { - end = start_; - } - return Source::Combine(start_, end); - } - - private: - Parser* parser_; - tint::Source start_; -}; - -Parser::TypedIdentifier::TypedIdentifier() = default; - -Parser::TypedIdentifier::TypedIdentifier(const TypedIdentifier&) = default; - -Parser::TypedIdentifier::TypedIdentifier(ast::Type type_in, const ast::Identifier* name_in) - : type(type_in), name(name_in) {} - -Parser::TypedIdentifier::~TypedIdentifier() = default; - -Parser::FunctionHeader::FunctionHeader() = default; - -Parser::FunctionHeader::FunctionHeader(const FunctionHeader&) = default; - -Parser::FunctionHeader::FunctionHeader(Source src, - const ast::Identifier* n, - VectorRef p, - ast::Type ret_ty, - VectorRef ret_attrs) - : source(src), - name(n), - params(std::move(p)), - return_type(ret_ty), - return_type_attributes(std::move(ret_attrs)) {} - -Parser::FunctionHeader::~FunctionHeader() = default; - -Parser::FunctionHeader& Parser::FunctionHeader::operator=(const FunctionHeader& rhs) = default; - -Parser::Parser(Source::File const* file) : file_(file) {} - -Parser::~Parser() = default; - -Parser::Failure::Errored Parser::AddError(const Source& source, - std::string_view err, - std::string_view use) { - if (silence_diags_ == 0) { - StringStream msg; - msg << err; - if (!use.empty()) { - msg << " for " << use; - } - AddError(source, msg.str()); - } - return Failure::kErrored; -} - -Parser::Failure::Errored Parser::AddError(const Token& t, std::string_view err) { - AddError(t.source(), err); - return Failure::kErrored; -} - -Parser::Failure::Errored Parser::AddError(const Source& source, std::string_view err) { - if (silence_diags_ == 0) { - builder_.Diagnostics().AddError(source) << err; - } - return Failure::kErrored; -} - -Parser::Failure::Errored Parser::AddError(const Source& source, StyledText&& err) { - if (silence_diags_ == 0) { - builder_.Diagnostics().AddError(source) << std::move(err); - } - return Failure::kErrored; -} - -void Parser::AddNote(const Source& source, std::string_view err) { - if (silence_diags_ == 0) { - builder_.Diagnostics().AddNote(source) << err; - } -} - -void Parser::deprecated(const Source& source, std::string_view msg) { - if (silence_diags_ == 0) { - builder_.Diagnostics().AddWarning(source) << "use of deprecated language feature: " << msg; - } -} - -const Token& Parser::next() { - // If the next token is already an error or the end of file, stay there. - if (tokens_[next_token_idx_].IsEof() || tokens_[next_token_idx_].IsError()) { - return tokens_[next_token_idx_]; - } - - // Skip over any placeholder elements - while (true) { - if (!tokens_[next_token_idx_].IsPlaceholder()) { - break; - } - next_token_idx_++; - } - last_source_idx_ = next_token_idx_; - - if (!tokens_[next_token_idx_].IsEof() && !tokens_[next_token_idx_].IsError()) { - next_token_idx_++; - } - return tokens_[last_source_idx_]; -} - -const Token& Parser::peek(size_t count) { - for (size_t idx = next_token_idx_; idx < tokens_.size(); idx++) { - if (tokens_[idx].IsPlaceholder()) { - continue; - } - if (count == 0) { - return tokens_[idx]; - } - count--; - } - // Walked off the end of the token list, return last token. - return tokens_[tokens_.size() - 1]; -} - -bool Parser::peek_is(Token::Type tok, size_t idx) { - return peek(idx).Is(tok); -} - -void Parser::split_token(Token::Type lhs, Token::Type rhs) { - TINT_ASSERT(next_token_idx_ != 0) << "attempt to update placeholder at beginning of tokens"; - TINT_ASSERT(next_token_idx_ < tokens_.size()) - << "attempt to update placeholder past end of tokens"; - TINT_ASSERT(tokens_[next_token_idx_].IsPlaceholder()) - << "attempt to update non-placeholder token"; - tokens_[next_token_idx_ - 1].SetType(lhs); - tokens_[next_token_idx_].SetType(rhs); -} - -Source Parser::last_source() const { - return tokens_[last_source_idx_].source(); -} - -void Parser::InitializeLex() { - Lexer l{file_}; - tokens_ = l.Lex(); - ClassifyTemplateArguments(tokens_); -} - -bool Parser::Parse() { - InitializeLex(); - translation_unit(); - return !has_error(); -} - -// translation_unit -// : global_directive* global_decl* EOF -void Parser::translation_unit() { - bool after_global_decl = false; - while (continue_parsing()) { - auto& p = peek(); - if (p.IsEof()) { - break; - } - - auto ed = global_directive(after_global_decl); - if (!ed.matched && !ed.errored) { - auto gd = global_decl(); - if (gd.matched) { - after_global_decl = true; - } - - if (!gd.matched && !gd.errored) { - AddError(p, "unexpected token"); - } - } - - if (builder_.Diagnostics().NumErrors() >= max_errors_) { - AddError(Source{{}, p.source().file}, - "stopping after " + std::to_string(max_errors_) + " errors"); - break; - } - } -} - -// global_directive -// : diagnostic_directive -// | requires_directive -// | enable_directive -Maybe Parser::global_directive(bool have_parsed_decl) { - auto& p = peek(); - Maybe result = diagnostic_directive(); - if (!result.errored && !result.matched) { - result = enable_directive(); - } - if (!result.errored && !result.matched) { - result = requires_directive(); - } - - if (result.matched && have_parsed_decl) { - return AddError(p, "directives must come before all global declarations"); - } - return result; -} - -// diagnostic_directive -// : diagnostic diagnostic_control SEMICOLON -Maybe Parser::diagnostic_directive() { - auto decl = sync(Token::Type::kSemicolon, [&]() -> Maybe { - if (!match(Token::Type::kDiagnostic)) { - return Failure::kNoMatch; - } - - auto source = last_source(); - auto control = expect_diagnostic_control(); - if (control.errored) { - return Failure::kErrored; - } - - if (!expect("diagnostic directive", Token::Type::kSemicolon)) { - return Failure::kErrored; - } - - auto* directive = create(source, std::move(control.value)); - builder_.AST().AddDiagnosticDirective(directive); - - return kSuccess; - }); - - if (decl.errored) { - return Failure::kErrored; - } - return decl; -} - -// enable_directive : -// | 'enable' identifier (COMMA identifier)* COMMA? SEMICOLON -Maybe Parser::enable_directive() { - return sync(Token::Type::kSemicolon, [&]() -> Maybe { - MultiTokenSource decl_source(this); - if (!match(Token::Type::kEnable)) { - return Failure::kNoMatch; - } - - if (peek_is(Token::Type::kParenLeft)) { - // A common error case is writing `enable(foo);` instead of `enable foo;`. - synchronized_ = false; - return AddError(peek().source(), "enable directives don't take parenthesis"); - } - - Vector extensions; - while (continue_parsing()) { - Source ext_src = peek().source(); - auto ext = expect_enum("extension", wgsl::ParseExtension, wgsl::kExtensionStrings); - if (ext.errored) { - return Failure::kErrored; - } - extensions.Push(create(ext_src, ext.value)); - - if (!match(Token::Type::kComma)) { - break; - } - if (peek_is(Token::Type::kSemicolon)) { - break; - } - } - - if (!expect("enable directive", Token::Type::kSemicolon)) { - return Failure::kErrored; - } - - builder_.AST().AddEnable(create(decl_source(), std::move(extensions))); - return kSuccess; - }); -} - -// requires_directive -// : require identifier (COMMA identifier)* COMMA? SEMICOLON -Maybe Parser::requires_directive() { - return sync(Token::Type::kSemicolon, [&]() -> Maybe { - MultiTokenSource decl_source(this); - if (!match(Token::Type::kRequires)) { - return Failure::kNoMatch; - } - - // Match the require name. - auto& t = peek(); - if (handle_error(t)) { - // The token might itself be an error. - return Failure::kErrored; - } - - if (t.Is(Token::Type::kParenLeft)) { - // A common error case is writing `require(foo);` instead of `require foo;`. - synchronized_ = false; - return AddError(t.source(), "requires directives don't take parenthesis"); - } - - ast::Requires::LanguageFeatures features; - while (continue_parsing()) { - auto& t2 = next(); - if (handle_error(t2)) { - // The token might itself be an error. - return Failure::kErrored; - } - - // Match the require name. - if (t2.IsIdentifier()) { - auto feature = wgsl::ParseLanguageFeature(t2.to_str_view()); - if (feature == LanguageFeature::kUndefined) { - // Any identifier is a valid feature name, so we correctly handle new feature - // names getting added in the future, they just all get flagged as not - // supported. - return AddError(t2.source(), "feature '" + t2.to_str() + "' is not supported"); - } - features.Add(feature); - } else { - return AddError(t2.source(), "invalid feature name for requires"); - } - - if (!match(Token::Type::kComma)) { - break; - } - if (peek_is(Token::Type::kSemicolon)) { - break; - } - } - - if (!expect("requires directive", Token::Type::kSemicolon)) { - return Failure::kErrored; - } - - builder_.AST().AddRequires(create(decl_source(), std::move(features))); - return kSuccess; - }); -} - -// global_decl -// : SEMICOLON -// | global_variable_decl SEMICOLON -// | global_constant_decl SEMICOLON -// | type_alias_decl SEMICOLON -// | struct_decl -// | function_decl -// | const_assert_statement SEMICOLON -Maybe Parser::global_decl() { - if (match(Token::Type::kSemicolon) || match(Token::Type::kEOF)) { - return kSuccess; - } - - bool errored = false; - auto attrs = attribute_list(); - if (attrs.errored) { - errored = true; - } - if (!continue_parsing()) { - return Failure::kErrored; - } - - auto decl = sync(Token::Type::kSemicolon, [&]() -> Maybe { - auto gv = global_variable_decl(attrs.value); - if (gv.errored) { - return Failure::kErrored; - } - if (gv.matched) { - if (!expect("variable declaration", Token::Type::kSemicolon)) { - return Failure::kErrored; - } - - builder_.AST().AddGlobalVariable(gv.value); - return kSuccess; - } - - auto gc = global_constant_decl(attrs.value); - if (gc.errored) { - return Failure::kErrored; - } - if (gc.matched) { - // Avoid the cost of the string allocation for the common no-error case - if (!peek().Is(Token::Type::kSemicolon)) { - std::string kind = gc->Kind(); - if (!expect("'" + kind + "' declaration", Token::Type::kSemicolon)) { - return Failure::kErrored; - } - } - return kSuccess; - } - - auto ta = type_alias_decl(); - if (ta.errored) { - return Failure::kErrored; - } - if (ta.matched) { - if (!expect("type alias", Token::Type::kSemicolon)) { - return Failure::kErrored; - } - - builder_.AST().AddTypeDecl(ta.value); - return kSuccess; - } - - auto assertion = const_assert_statement(); - if (assertion.errored) { - return Failure::kErrored; - } - if (assertion.matched) { - builder_.AST().AddConstAssert(assertion.value); - if (!expect("const assertion declaration", Token::Type::kSemicolon)) { - return Failure::kErrored; - } - return kSuccess; - } - - return Failure::kNoMatch; - }); - - if (decl.errored) { - errored = true; - } - if (decl.matched) { - if (expect_attributes_consumed(attrs.value).errored) { - return Failure::kErrored; - } - return kSuccess; - } - - auto str = struct_decl(); - if (str.errored) { - errored = true; - } - if (str.matched) { - if (expect_attributes_consumed(attrs.value).errored) { - return Failure::kErrored; - } - return kSuccess; - } - - auto func = function_decl(attrs.value); - if (func.errored) { - errored = true; - } - if (func.matched) { - return kSuccess; - } - - if (errored) { - return Failure::kErrored; - } - - // Invalid syntax found - try and determine the best error message - - // We have attributes parsed, but nothing to consume them? - if (attrs.value.Length() > 0) { - return AddError(next(), "expected declaration after attributes"); - } - - // We have a statement outside of a function? - auto& t = peek(); - auto stat = without_diag([&] { return statement(); }); - if (stat.matched) { - // Attempt to jump to the next '}' - the function might have just been - // missing an opening line. - sync_to(Token::Type::kBraceRight, true); - return AddError(t, "statement found outside of function body"); - } - if (!stat.errored) { - // No match, no error - the parser might not have progressed. - // Ensure we always make _some_ forward progress. - next(); - } - - // The token might itself be an error. - if (handle_error(t)) { - return Failure::kErrored; - } - - // Exhausted all attempts to make sense of where we're at. - // Return a no-match - - return Failure::kNoMatch; -} - -// global_variable_decl -// : variable_attribute_list* variable_decl (EQUAL expression)? -Maybe Parser::global_variable_decl(AttributeList& attrs) { - MultiTokenSource decl_source(this); - auto decl = variable_decl(); - if (decl.errored) { - return Failure::kErrored; - } - if (!decl.matched) { - return Failure::kNoMatch; - } - - const ast::Expression* initializer = nullptr; - if (match(Token::Type::kEqual)) { - auto expr = expression(); - if (expr.errored) { - return Failure::kErrored; - } - if (!expr.matched) { - return AddError(peek(), "missing initializer for 'var' declaration"); - } - initializer = expr.value; - } - - TINT_DEFER(attrs.Clear()); - - return builder_.create(decl_source(), // source - builder_.Ident(decl->name), // symbol - decl->type, // type - decl->address_space, // address space - decl->access, // access control - initializer, // initializer - std::move(attrs)); // attributes -} - -// global_constant_decl : -// | LET optionally_typed_ident global_const_initializer -// | attribute* override optionally_typed_ident (equal expression)? -// global_const_initializer -// : EQUAL const_expr -Maybe Parser::global_constant_decl(AttributeList& attrs) { - bool is_overridable = false; - const char* use = nullptr; - MultiTokenSource decl_source(this); - Source source; - if (match(Token::Type::kConst)) { - use = "'const' declaration"; - } else if (match(Token::Type::kOverride)) { - use = "'override' declaration"; - is_overridable = true; - } else if (match(Token::Type::kLet, &source)) { - return AddError(source, "module-scope 'let' is invalid, use 'const'"); - } else { - return Failure::kNoMatch; - } - - auto decl = expect_optionally_typed_ident(use); - if (decl.errored) { - return Failure::kErrored; - } - - bool has_initializer = false; - if (is_overridable) { - has_initializer = match(Token::Type::kEqual); - } else { - if (!expect(use, Token::Type::kEqual)) { - return Failure::kErrored; - } - has_initializer = true; - } - - const ast::Expression* initializer = nullptr; - if (has_initializer) { - auto expr = expression(); - if (expr.errored) { - return Failure::kErrored; - } - if (!expr.matched) { - return AddError(peek(), "missing initializer for " + std::string(use)); - } - initializer = std::move(expr.value); - } - - TINT_DEFER(attrs.Clear()); - if (is_overridable) { - return builder_.Override(decl_source(), // source - decl->name, // symbol - decl->type, // type - initializer, // initializer - std::move(attrs)); // attributes - } - return builder_.GlobalConst(decl_source(), // source - decl->name, // symbol - decl->type, // type - initializer, // initializer - std::move(attrs)); // attributes -} - -// variable_decl -// : VAR variable_qualifier? optionally_typed_ident -// -// Note, the `( LESS_THAN address_space ( COMMA access_mode )? GREATER_THAN ) is pulled out into -// a `variable_qualifier` helper. -Maybe Parser::variable_decl() { - Source source; - if (!match(Token::Type::kVar, &source)) { - return Failure::kNoMatch; - } - - VariableQualifier vq; - auto explicit_vq = variable_qualifier(); - if (explicit_vq.errored) { - return Failure::kErrored; - } - if (explicit_vq.matched) { - vq = explicit_vq.value; - } - - auto decl = expect_optionally_typed_ident("variable declaration"); - if (decl.errored) { - return Failure::kErrored; - } - - return VarDeclInfo{decl->name->source, decl->name, vq.address_space, vq.access, decl->type}; -} - -Expect Parser::expect_ident_with_optional_type_specifier( - std::string_view use, - bool allow_inferred) { - auto ident = expect_ident(use); - if (ident.errored) { - return Failure::kErrored; - } - - if (allow_inferred && !peek_is(Token::Type::kColon)) { - return TypedIdentifier{ast::Type{}, ident.value}; - } - - if (!expect(use, Token::Type::kColon)) { - return Failure::kErrored; - } - - auto& t = peek(); - auto type = type_specifier(); - if (type.errored) { - return Failure::kErrored; - } - if (!type.matched) { - return AddError(t.source(), "invalid type", use); - } - - return TypedIdentifier{type.value, ident.value}; -} - -// optionally_typed_ident -// : ident ( COLON typed_decl ) ? -Expect Parser::expect_optionally_typed_ident(std::string_view use) { - return expect_ident_with_optional_type_specifier(use, /* allow_inferred */ true); -} - -// ident_with_type_specifier -// : IDENT COLON type_specifier -Expect Parser::expect_ident_with_type_specifier(std::string_view use) { - return expect_ident_with_optional_type_specifier(use, /* allow_inferred */ false); -} - -// variable_qualifier -// : _template_args_start expression (COMMA expression)? COMMA? _template_args_end -Maybe Parser::variable_qualifier() { - if (!peek_is(Token::Type::kTemplateArgsLeft) && !peek_is(Token::Type::kLessThan)) { - // Note: kLessThan will give a sensible error at expect_template_arg_block() - return Failure::kNoMatch; - } - - auto* use = "variable declaration"; - auto vq = expect_template_arg_block(use, [&]() -> Expect { - auto address_space = expect_expression("'var' address space"); - if (address_space.errored) { - return Failure::kErrored; - } - // The first expression in this condition also matches trailing comma. - if (match(Token::Type::kComma) && !peek().Is(Token::Type::kTemplateArgsRight)) { - auto access = expect_expression("'var' access mode"); - if (access.errored) { - return Failure::kErrored; - } - // Allow for trailing comma. - match(Token::Type::kComma); - return VariableQualifier{address_space.value, access.value}; - } - return VariableQualifier{address_space.value}; - }); - - if (vq.errored) { - return Failure::kErrored; - } - - return vq; -} - -// type_alias_decl -// : ALIAS IDENT EQUAL type_specifier -Maybe Parser::type_alias_decl() { - MultiTokenSource source(this); - if (!match(Token::Type::kAlias)) { - return Failure::kNoMatch; - } - - const char* use = "type alias"; - - auto name = expect_ident(use); - if (name.errored) { - return Failure::kErrored; - } - - if (!expect(use, Token::Type::kEqual)) { - return Failure::kErrored; - } - - auto type = type_specifier(); - if (type.errored) { - return Failure::kErrored; - } - if (!type.matched) { - return AddError(peek(), "invalid type alias"); - } - - return builder_.ty.alias(source(), name.value, type.value); -} - -// type_specifier -// : IDENTIFIER template_arguments? -Maybe Parser::type_specifier() { - MultiTokenSource source(this); - auto& ident = peek(); - if (!match(Token::Type::kIdentifier)) { - return Failure::kNoMatch; - } - - if (!peek_is(Token::Type::kTemplateArgsLeft)) { - return builder_.ty(builder_.Ident(source(), ident.to_str())); - } - - auto args = expect_template_arg_block("type template arguments", [&] { - return expect_expression_list("type template argument list", - Token::Type::kTemplateArgsRight); - }); - if (args.errored) { - return Failure::kErrored; - } - return builder_.ty(builder_.Ident(source(), ident.to_str(), std::move(args.value))); -} - -template -Expect Parser::expect_enum(std::string_view name, - ENUM (*parse)(std::string_view str), - Slice strings, - std::string_view use) { - auto& t = peek(); - auto ident = t.to_str(); - if (t.IsIdentifier()) { - auto val = parse(ident); - if (val != ENUM::kUndefined) { - synchronized_ = true; - next(); - return val; - } - } - - // Was the token itself an error? - if (handle_error(t)) { - return Failure::kErrored; - } - - /// Create a sensible error message - StyledText err; - err << "expected " << name; - - if (!use.empty()) { - err << " for " << use; - } - err << "\n"; - - if (strings == wgsl::kExtensionStrings && !ident.starts_with("chromium")) { - // Filter out 'chromium' prefixed extensions. We don't want to advertise experimental - // extensions to end users (unless it looks like they've actually mis-typed a chromium - // extension name) - Vector filtered; - for (auto str : strings) { - if (!str.starts_with("chromium")) { - filtered.Push(str); - } - } - tint::SuggestAlternatives(ident, filtered.Slice(), err); - } else { - tint::SuggestAlternatives(ident, strings, err); - } - - synchronized_ = false; - return AddError(t.source(), std::move(err)); -} - -Expect Parser::expect_type(std::string_view use) { - auto type = type_specifier(); - if (type.errored) { - return Failure::kErrored; - } - if (!type.matched) { - return AddError(peek().source(), "invalid type", use); - } - return type.value; -} - -// struct_decl -// : STRUCT IDENT struct_body_decl -Maybe Parser::struct_decl() { - MultiTokenSource source(this); - - if (!match(Token::Type::kStruct)) { - return Failure::kNoMatch; - } - - auto name = expect_ident("struct declaration"); - if (name.errored) { - return Failure::kErrored; - } - - auto body = expect_struct_body_decl(); - if (body.errored) { - return Failure::kErrored; - } - - return builder_.Structure(source(), name.value, std::move(body.value)); -} - -// struct_body_decl -// : BRACE_LEFT (struct_member COMMA)* struct_member COMMA? BRACE_RIGHT -Expect Parser::expect_struct_body_decl() { - return expect_brace_block("struct declaration", [&]() -> Expect { - StructMemberList members; - bool errored = false; - while (continue_parsing()) { - // Check for the end of the list. - auto& t = peek(); - if (!t.IsIdentifier() && !t.Is(Token::Type::kAttr)) { - break; - } - - auto member = expect_struct_member(); - if (member.errored) { - errored = true; - if (!sync_to(Token::Type::kComma, /* consume: */ false)) { - return Failure::kErrored; - } - } else { - members.Push(member.value); - } - - if (!match(Token::Type::kComma)) { - break; - } - } - if (errored) { - return Failure::kErrored; - } - return members; - }); -} - -// struct_member -// : attribute* ident_with_type_specifier -Expect Parser::expect_struct_member() { - auto attrs = attribute_list(); - if (attrs.errored) { - return Failure::kErrored; - } - - auto decl = expect_ident_with_type_specifier("struct member"); - if (decl.errored) { - return Failure::kErrored; - } - - return builder_.Member(decl->name->source, decl->name, decl->type, std::move(attrs.value)); -} - -// const_assert_statement -// : STATIC_ASSERT expression -Maybe Parser::const_assert_statement() { - MultiTokenSource source(this); - if (!match(Token::Type::kConstAssert)) { - return Failure::kNoMatch; - } - - auto condition = expression(); - if (condition.errored) { - return Failure::kErrored; - } - if (!condition.matched) { - return AddError(peek(), "unable to parse condition expression"); - } - - return create(source(), condition.value); -} - -// function_decl -// : function_header compound_statement -Maybe Parser::function_decl(AttributeList& attrs) { - MultiTokenSource source(this); - - auto header = function_header(); - if (header.errored) { - if (sync_to(Token::Type::kBraceLeft, /* consume: */ false)) { - // There were errors in the function header, but the parser has managed to - // resynchronize with the opening brace. As there's no outer - // synchronization token for function declarations, attempt to parse the - // function body. The AST isn't used as we've already errored, but this - // catches any errors inside the body, and can help keep the parser in - // sync. - expect_compound_statement("function body"); - } - return Failure::kErrored; - } - if (!header.matched) { - return Failure::kNoMatch; - } - - bool errored = false; - - auto body = expect_compound_statement("function body"); - if (body.errored) { - errored = true; - } - - if (errored) { - return Failure::kErrored; - } - - TINT_DEFER(attrs.Clear()); - - return builder_.Func(source, header->name, header->params, header->return_type, body.value, - std::move(attrs), header->return_type_attributes); -} - -// function_header -// : FN IDENT PAREN_LEFT param_list PAREN_RIGHT return_type_specifier_optional -// return_type_specifier_optional -// : -// | ARROW attribute_list* type_specifier -Maybe Parser::function_header() { - Source source; - if (!match(Token::Type::kFn, &source)) { - return Failure::kNoMatch; - } - - const char* use = "function declaration"; - bool errored = false; - - auto name = expect_ident(use); - if (name.errored) { - errored = true; - if (!sync_to(Token::Type::kParenLeft, /* consume: */ false)) { - return Failure::kErrored; - } - } - - auto params = expect_paren_block(use, [&] { return expect_param_list(); }); - if (params.errored) { - errored = true; - if (!synchronized_) { - return Failure::kErrored; - } - } - - ast::Type return_type; - AttributeList return_attributes; - - if (match(Token::Type::kArrow)) { - auto attrs = attribute_list(); - if (attrs.errored) { - return Failure::kErrored; - } - return_attributes = attrs.value; - - auto type = type_specifier(); - if (type.errored) { - errored = true; - } else if (!type.matched) { - return AddError(peek(), "unable to determine function return type"); - } else { - return_type = type.value; - } - } else { - return_type = builder_.ty.void_(); - } - - if (errored) { - return Failure::kErrored; - } - - return FunctionHeader{ - source, name.value, std::move(params.value), return_type, std::move(return_attributes), - }; -} - -// param_list -// : -// | (param COMMA)* param COMMA? -Expect Parser::expect_param_list() { - ParameterList ret; - while (continue_parsing()) { - // Check for the end of the list. - auto& t = peek(); - if (!t.IsIdentifier() && !t.Is(Token::Type::kAttr)) { - break; - } - - auto param = expect_param(); - if (param.errored) { - return Failure::kErrored; - } - ret.Push(param.value); - - if (!match(Token::Type::kComma)) { - break; - } - } - - return ret; -} - -// param -// : attribute_list* ident COLON type_specifier -Expect Parser::expect_param() { - auto attrs = attribute_list(); - - auto decl = expect_ident_with_type_specifier("parameter"); - if (decl.errored) { - return Failure::kErrored; - } - - return builder_.Param(decl->name->source, // source - decl->name, // symbol - decl->type, // type - std::move(attrs.value)); // attributes -} - -// compound_statement -// : attribute* BRACE_LEFT statement* BRACE_RIGHT -Expect Parser::expect_compound_statement(std::string_view use) { - auto attrs = attribute_list(); - if (attrs.errored) { - return Failure::kErrored; - } - return expect_compound_statement(attrs.value, use); -} - -// compound_statement -// : attribute* BRACE_LEFT statement* BRACE_RIGHT -Expect Parser::expect_compound_statement(AttributeList& attrs, - std::string_view use) { - MultiTokenSource source(this); - auto stmts = - expect_brace_block(use, [&]() -> Expect { return expect_statements(); }); - if (stmts.errored) { - return Failure::kErrored; - } - TINT_DEFER(attrs.Clear()); - return create(source(), stmts.value, std::move(attrs)); -} - -// paren_expression -// : PAREN_LEFT expression PAREN_RIGHT -Expect Parser::expect_paren_expression() { - return expect_paren_block("", [&]() -> Expect { - auto expr = expression(); - if (expr.errored) { - return Failure::kErrored; - } - if (!expr.matched) { - return AddError(peek(), "unable to parse expression"); - } - - return expr.value; - }); -} - -// statements -// : statement* -Expect Parser::expect_statements() { - bool errored = false; - StatementList stmts; - - while (continue_parsing()) { - auto stmt = statement(); - if (stmt.errored) { - errored = true; - } else if (stmt.matched) { - stmts.Push(stmt.value); - } else { - break; - } - } - - if (errored) { - return Failure::kErrored; - } - - return stmts; -} - -// statement -// : SEMICOLON -// | if_statement -// | switch_statement -// | loop_statement -// | for_statement -// | while_statement -// | compound_statement -// | non_block_statement // Note, we inject an extra rule in here for simpler parsing -Maybe Parser::statement() { - while (match(Token::Type::kSemicolon)) { - // Skip empty statements - } - - auto attrs = attribute_list(); - if (attrs.errored) { - return Failure::kErrored; - } - TINT_DEFER(expect_attributes_consumed(attrs.value)); - - // Non-block statements that error can resynchronize on semicolon. - auto stmt = sync(Token::Type::kSemicolon, [&] { return non_block_statement(); }); - if (stmt.errored) { - return Failure::kErrored; - } - if (stmt.matched) { - return stmt; - } - - auto stmt_if = if_statement(attrs.value); - if (stmt_if.errored) { - return Failure::kErrored; - } - if (stmt_if.matched) { - return stmt_if.value; - } - - auto sw = switch_statement(attrs.value); - if (sw.errored) { - return Failure::kErrored; - } - if (sw.matched) { - return sw.value; - } - - auto loop = loop_statement(attrs.value); - if (loop.errored) { - return Failure::kErrored; - } - if (loop.matched) { - return loop.value; - } - - auto stmt_for = for_statement(attrs.value); - if (stmt_for.errored) { - return Failure::kErrored; - } - if (stmt_for.matched) { - return stmt_for.value; - } - - auto stmt_while = while_statement(attrs.value); - if (stmt_while.errored) { - return Failure::kErrored; - } - if (stmt_while.matched) { - return stmt_while.value; - } - - if (peek_is(Token::Type::kBraceLeft)) { - auto body = expect_compound_statement(attrs.value, "block statement"); - if (body.errored) { - return Failure::kErrored; - } - return body.value; - } - - return Failure::kNoMatch; -} - -// non_block_statement (continued) -// : return_statement SEMICOLON -// | func_call_statement SEMICOLON -// | variable_statement SEMICOLON -// | break_statement SEMICOLON -// | continue_statement SEMICOLON -// | DISCARD SEMICOLON -// | variable_updating_statement SEMICOLON -// | const_assert_statement SEMICOLON -Maybe Parser::non_block_statement() { - auto stmt = [&]() -> Maybe { - auto ret_stmt = return_statement(); - if (ret_stmt.errored) { - return Failure::kErrored; - } - if (ret_stmt.matched) { - return ret_stmt.value; - } - - auto func = func_call_statement(); - if (func.errored) { - return Failure::kErrored; - } - if (func.matched) { - return func.value; - } - - auto var = variable_statement(); - if (var.errored) { - return Failure::kErrored; - } - if (var.matched) { - return var.value; - } - - auto b = break_statement(); - if (b.errored) { - return Failure::kErrored; - } - if (b.matched) { - return b.value; - } - - auto cont = continue_statement(); - if (cont.errored) { - return Failure::kErrored; - } - if (cont.matched) { - return cont.value; - } - - Source source; - if (match(Token::Type::kDiscard, &source)) { - return builder_.Discard(source); - } - - // Note, this covers assignment, increment and decrement - auto assign = variable_updating_statement(); - if (assign.errored) { - return Failure::kErrored; - } - if (assign.matched) { - return assign.value; - } - - auto stmt_static_assert = const_assert_statement(); - if (stmt_static_assert.errored) { - return Failure::kErrored; - } - if (stmt_static_assert.matched) { - return stmt_static_assert.value; - } - - return Failure::kNoMatch; - }(); - - if (stmt.matched && !expect(stmt->Name(), Token::Type::kSemicolon)) { - return Failure::kErrored; - } - return stmt; -} - -// return_statement -// : RETURN expression? -Maybe Parser::return_statement() { - Source source; - if (!match(Token::Type::kReturn, &source)) { - return Failure::kNoMatch; - } - - auto expr = expression(); - if (expr.errored) { - return Failure::kErrored; - } - - return expr.matched ? builder_.Return(source, expr.value) : builder_.Return(source); -} - -// variable_statement -// : variable_decl -// | variable_decl EQUAL expression -// | LET optionally_typed_ident EQUAL expression -// | CONST optionally_typed_ident EQUAL expression -Maybe Parser::variable_statement() { - MultiTokenSource decl_source_range(this); - if (match(Token::Type::kConst)) { - auto typed_ident = expect_optionally_typed_ident("'const' declaration"); - if (typed_ident.errored) { - return Failure::kErrored; - } - - auto decl_source = decl_source_range(); - - if (!expect("'const' declaration", Token::Type::kEqual)) { - return Failure::kErrored; - } - - auto initializer = expression(); - if (initializer.errored) { - return Failure::kErrored; - } - if (!initializer.matched) { - return AddError(peek(), "missing initializer for 'const' declaration"); - } - - auto* const_ = builder_.Const(typed_ident->name->source, // source - typed_ident->name, // symbol - typed_ident->type, // type - initializer.value); // initializer - - return create(decl_source, const_); - } - - if (match(Token::Type::kLet)) { - auto typed_ident = expect_optionally_typed_ident("'let' declaration"); - if (typed_ident.errored) { - return Failure::kErrored; - } - - auto decl_source = decl_source_range(); - - if (!expect("'let' declaration", Token::Type::kEqual)) { - return Failure::kErrored; - } - - auto initializer = expression(); - if (initializer.errored) { - return Failure::kErrored; - } - if (!initializer.matched) { - return AddError(peek(), "missing initializer for 'let' declaration"); - } - - auto* let = builder_.Let(typed_ident->name->source, // source - typed_ident->name, // symbol - typed_ident->type, // type - initializer.value); // initializer - - return create(decl_source, let); - } - - auto decl = variable_decl(); - if (decl.errored) { - return Failure::kErrored; - } - if (!decl.matched) { - return Failure::kNoMatch; - } - - auto decl_source = decl_source_range(); - - const ast::Expression* initializer = nullptr; - if (match(Token::Type::kEqual)) { - auto initializer_expr = expression(); - if (initializer_expr.errored) { - return Failure::kErrored; - } - if (!initializer_expr.matched) { - return AddError(peek(), "missing initializer for 'var' declaration"); - } - - initializer = initializer_expr.value; - } - - auto* var = builder_.create(decl_source, // source - builder_.Ident(decl->name), // symbol - decl->type, // type - decl->address_space, // address space - decl->access, // access control - initializer, // initializer - tint::Empty); // attributes - - return create(var->source, var); -} - -// if_statement -// : attribute* if_clause else_if_clause* else_clause? -// if_clause: -// : IF expression compound_stmt -// else_if_clause: -// : ELSE IF expression compound_stmt -// else_clause -// : ELSE compound_statement -Maybe Parser::if_statement(AttributeList& attrs) { - // Parse if-else chains iteratively instead of recursively, to avoid - // stack-overflow for long chains of if-else statements. - - struct IfInfo { - Source source; - const ast::Expression* condition; - const ast::BlockStatement* body; - AttributeList attributes; - }; - - // Parse an if statement, capturing the source, condition, and body statement. - auto parse_if = [&]() -> Maybe { - Source source; - if (!match(Token::Type::kIf, &source)) { - return Failure::kNoMatch; - } - - auto condition = expression(); - if (condition.errored) { - return Failure::kErrored; - } - if (!condition.matched) { - return AddError(peek(), "unable to parse condition expression"); - } - - auto body = expect_compound_statement("if statement"); - if (body.errored) { - return Failure::kErrored; - } - - TINT_DEFER(attrs.Clear()); - return IfInfo{source, condition.value, body.value, std::move(attrs)}; - }; - - std::vector statements; - - // Parse the first if statement. - auto first_if = parse_if(); - if (first_if.errored) { - return Failure::kErrored; - } else if (!first_if.matched) { - return Failure::kNoMatch; - } - statements.push_back(first_if.value); - - // Parse the components of every "else {if}" in the chain. - const ast::Statement* last_stmt = nullptr; - while (continue_parsing()) { - if (!match(Token::Type::kElse)) { - break; - } - - // Try to parse an "else if". - auto else_if = parse_if(); - if (else_if.errored) { - return Failure::kErrored; - } else if (else_if.matched) { - statements.push_back(else_if.value); - continue; - } - - // If it wasn't an "else if", it must just be an "else". - auto else_body = expect_compound_statement("else statement"); - if (else_body.errored) { - return Failure::kErrored; - } - last_stmt = else_body.value; - break; - } - - // Now walk back through the statements to create their AST nodes. - for (auto itr = statements.rbegin(); itr != statements.rend(); itr++) { - last_stmt = create(itr->source, itr->condition, itr->body, last_stmt, - std::move(itr->attributes)); - } - - return last_stmt->As(); -} - -// switch_statement -// : attribute* SWITCH expression BRACKET_LEFT switch_body+ BRACKET_RIGHT -Maybe Parser::switch_statement(AttributeList& attrs) { - Source source; - if (!match(Token::Type::kSwitch, &source)) { - return Failure::kNoMatch; - } - - auto condition = expression(); - if (condition.errored) { - return Failure::kErrored; - } - if (!condition.matched) { - return AddError(peek(), "unable to parse selector expression"); - } - - auto body_attrs = attribute_list(); - if (body_attrs.errored) { - return Failure::kErrored; - } - - auto body = expect_brace_block("switch statement", [&]() -> Expect { - bool errored = false; - CaseStatementList list; - while (continue_parsing()) { - auto stmt = switch_body(); - if (stmt.errored) { - errored = true; - continue; - } - if (!stmt.matched) { - break; - } - list.Push(stmt.value); - } - if (errored) { - return Failure::kErrored; - } - return list; - }); - - if (body.errored) { - return Failure::kErrored; - } - - TINT_DEFER(attrs.Clear()); - return create(source, condition.value, body.value, std::move(attrs), - std::move(body_attrs.value)); -} - -// switch_body -// : CASE case_selectors COLON? compound_statement -// | DEFAULT COLON? compound_statement -Maybe Parser::switch_body() { - if (!peek_is(Token::Type::kCase) && !peek_is(Token::Type::kDefault)) { - return Failure::kNoMatch; - } - - auto& t = next(); - - CaseSelectorList selector_list; - if (t.Is(Token::Type::kCase)) { - auto selectors = expect_case_selectors(); - if (selectors.errored) { - return Failure::kErrored; - } - - selector_list = std::move(selectors.value); - } else { - // Push the default case selector - selector_list.Push(create(t.source())); - } - - // Consume the optional colon if present. - match(Token::Type::kColon); - - const char* use = "case statement"; - auto body = expect_compound_statement(use); - if (body.errored) { - return Failure::kErrored; - } - - return create(t.source(), selector_list, body.value); -} - -// case_selectors -// : case_selector (COMMA case_selector)* COMMA? -Expect Parser::expect_case_selectors() { - CaseSelectorList selectors; - - while (continue_parsing()) { - auto expr = case_selector(); - if (expr.errored) { - return Failure::kErrored; - } - if (!expr.matched) { - break; - } - selectors.Push(expr.value); - - if (!match(Token::Type::kComma)) { - break; - } - } - - if (selectors.IsEmpty()) { - return AddError(peek(), "expected case selector expression or `default`"); - } - - return selectors; -} - -// case_selector -// : DEFAULT -// | expression -Maybe Parser::case_selector() { - auto& p = peek(); - - if (match(Token::Type::kDefault)) { - return create(p.source()); - } - - auto expr = expression(); - if (expr.errored) { - return Failure::kErrored; - } - if (!expr.matched) { - return Failure::kNoMatch; - } - return create(p.source(), expr.value); -} - -// loop_statement -// : attribute* LOOP attribute* BRACKET_LEFT statements continuing_statement? BRACKET_RIGHT -Maybe Parser::loop_statement(AttributeList& attrs) { - Source source; - if (!match(Token::Type::kLoop, &source)) { - return Failure::kNoMatch; - } - - auto body_attrs = attribute_list(); - if (body_attrs.errored) { - return Failure::kErrored; - } - - Maybe continuing(Failure::kErrored); - MultiTokenSource body_source(this); - auto body = expect_brace_block("loop", [&]() -> Maybe { - auto stmts = expect_statements(); - if (stmts.errored) { - return Failure::kErrored; - } - - continuing = continuing_statement(); - if (continuing.errored) { - return Failure::kErrored; - } - return stmts; - }); - if (body.errored) { - return Failure::kErrored; - } - - TINT_DEFER(attrs.Clear()); - return create( - source, create(body_source(), body.value, std::move(body_attrs.value)), - continuing.value, std::move(attrs)); -} - -ForHeader::ForHeader(const ast::Statement* init, - const ast::Expression* cond, - const ast::Statement* cont) - : initializer(init), condition(cond), continuing(cont) {} - -ForHeader::~ForHeader() = default; - -// (variable_statement | variable_updating_statement | func_call_statement)? -Maybe Parser::for_header_initializer() { - auto call = func_call_statement(); - if (call.errored) { - return Failure::kErrored; - } - if (call.matched) { - return call.value; - } - - auto var = variable_statement(); - if (var.errored) { - return Failure::kErrored; - } - if (var.matched) { - return var.value; - } - - auto assign = variable_updating_statement(); - if (assign.errored) { - return Failure::kErrored; - } - if (assign.matched) { - return assign.value; - } - - return Failure::kNoMatch; -} - -// (variable_updating_statement | func_call_statement)? -Maybe Parser::for_header_continuing() { - auto call_stmt = func_call_statement(); - if (call_stmt.errored) { - return Failure::kErrored; - } - if (call_stmt.matched) { - return call_stmt.value; - } - - auto assign = variable_updating_statement(); - if (assign.errored) { - return Failure::kErrored; - } - if (assign.matched) { - return assign.value; - } - - return Failure::kNoMatch; -} - -// for_header -// : for_header_initializer? SEMICOLON expression? SEMICOLON for_header_continuing? -Expect> Parser::expect_for_header() { - auto initializer = for_header_initializer(); - if (initializer.errored) { - return Failure::kErrored; - } - - if (!expect("initializer in for loop", Token::Type::kSemicolon)) { - return Failure::kErrored; - } - - auto condition = expression(); - if (condition.errored) { - return Failure::kErrored; - } - - if (!expect("condition in for loop", Token::Type::kSemicolon)) { - return Failure::kErrored; - } - - auto continuing = for_header_continuing(); - if (continuing.errored) { - return Failure::kErrored; - } - - return std::make_unique(initializer.value, condition.value, continuing.value); -} - -// for_statement -// : FOR PAREN_LEFT for_header PAREN_RIGHT compound_statement -Maybe Parser::for_statement(AttributeList& attrs) { - Source source; - if (!match(Token::Type::kFor, &source)) { - return Failure::kNoMatch; - } - - auto header = expect_paren_block("for loop", [&] { return expect_for_header(); }); - if (header.errored) { - return Failure::kErrored; - } - - auto body = expect_compound_statement("for loop"); - if (body.errored) { - return Failure::kErrored; - } - - TINT_DEFER(attrs.Clear()); - return create(source, header->initializer, header->condition, - header->continuing, body.value, std::move(attrs)); -} - -// while_statement -// : attribute* WHILE expression compound_statement -Maybe Parser::while_statement(AttributeList& attrs) { - Source source; - if (!match(Token::Type::kWhile, &source)) { - return Failure::kNoMatch; - } - - auto condition = expression(); - if (condition.errored) { - return Failure::kErrored; - } - if (!condition.matched) { - return AddError(peek(), "unable to parse while condition expression"); - } - - auto body = expect_compound_statement("while loop"); - if (body.errored) { - return Failure::kErrored; - } - - TINT_DEFER(attrs.Clear()); - return create(source, condition.value, body.value, std::move(attrs)); -} - -// func_call_statement -// : IDENT argument_expression_list -Maybe Parser::func_call_statement() { - auto& t = peek(); - auto& t2 = peek(1); - if (!t.IsIdentifier() || !t2.Is(Token::Type::kParenLeft)) { - return Failure::kNoMatch; - } - - next(); // Consume the first peek - - auto params = expect_argument_expression_list("function call"); - if (params.errored) { - return Failure::kErrored; - } - - return builder_.CallStmt( - t.source(), - builder_.Call(t.source(), builder_.Expr(t.source(), t.to_str()), std::move(params.value))); -} - -// break_statement -// : BREAK -Maybe Parser::break_statement() { - Source source; - if (!match(Token::Type::kBreak, &source)) { - return Failure::kNoMatch; - } - - return create(source); -} - -// continue_statement -// : CONTINUE -Maybe Parser::continue_statement() { - Source source; - if (!match(Token::Type::kContinue, &source)) { - return Failure::kNoMatch; - } - - return create(source); -} - -// break_if_statement: -// 'break' 'if' expression semicolon -Maybe Parser::break_if_statement() { - auto& t1 = peek(); - auto& t2 = peek(1); - - // Match both the `break` and `if` at the same time. - if (!t1.Is(Token::Type::kBreak) || !t2.Is(Token::Type::kIf)) { - return Failure::kNoMatch; - } - next(); // Consume the peek - next(); // Consume the peek - - auto expr = expression(); - if (expr.errored) { - return Failure::kErrored; - } - if (!expr.matched) { - return AddError(t1, "expected expression for `break-if`"); - } - if (!expect("`break-if` statement", Token::Type::kSemicolon)) { - return Failure::kErrored; - } - - return create(t1.source(), expr.value); -} - -// continuing_compound_statement: -// attribute* BRACE_LEFT statement* break_if_statement? BRACE_RIGHT -Maybe Parser::continuing_compound_statement() { - auto attrs = attribute_list(); - if (attrs.errored) { - return Failure::kErrored; - } - - MultiTokenSource source(this); - auto body = expect_brace_block("", [&]() -> Expect { - StatementList stmts; - - while (continue_parsing()) { - // Need to skip empty statements otherwise we can end up in the `statement` code below, - // then we skip the `;` and parse a `break-if` as a `break`. - while (match(Token::Type::kSemicolon)) { - // Skip empty statements - } - - // Note, break-if has to parse before statements because statements includes `break` - auto break_if = break_if_statement(); - if (break_if.errored) { - return Failure::kErrored; - } - if (break_if.matched) { - stmts.Push(break_if.value); - continue; - } - - auto stmt = statement(); - if (stmt.errored) { - return Failure::kErrored; - } - if (!stmt.matched) { - break; - } - stmts.Push(stmt.value); - } - - return stmts; - }); - if (body.errored) { - return Failure::kErrored; - } - - return create(source(), body.value, std::move(attrs.value)); -} - -// continuing_statement -// : CONTINUING continuing_compound_statement -Maybe Parser::continuing_statement() { - if (!match(Token::Type::kContinuing)) { - return create(Source{}, tint::Empty, tint::Empty); - } - - return continuing_compound_statement(); -} - -// primary_expression -// : const_literal -// | IDENT argument_expression_list? -// | paren_expression -// -// Note, PAREN_LEFT ( expression ( COMMA expression ) * COMMA? )? PAREN_RIGHT is replaced -// with `argument_expression_list`. -Maybe Parser::primary_expression() { - auto lit = const_literal(); - if (lit.errored) { - return Failure::kErrored; - } - if (lit.matched) { - return lit.value; - } - - auto& t = peek(); - if (t.IsIdentifier()) { - MultiTokenSource source(this); - next(); - - const ast::Identifier* ident = nullptr; - - if (peek_is(Token::Type::kTemplateArgsLeft)) { - auto tmpl_args = expect_template_arg_block("template arguments", [&] { - return expect_expression_list("template argument list", - Token::Type::kTemplateArgsRight); - }); - ident = builder_.Ident(source(), t.to_str(), std::move(tmpl_args.value)); - } else { - ident = builder_.Ident(source(), t.to_str()); - } - - if (peek_is(Token::Type::kParenLeft)) { - auto params = expect_argument_expression_list("function call"); - if (params.errored) { - return Failure::kErrored; - } - - return builder_.Call(source(), ident, std::move(params.value)); - } - - return builder_.Expr(ident); - } - - if (t.Is(Token::Type::kParenLeft)) { - auto paren = expect_paren_expression(); - if (paren.errored) { - return Failure::kErrored; - } - - return paren.value; - } - - return Failure::kNoMatch; -} - -// component_or_swizzle_specifier -// : -// | BRACE_LEFT expression BRACE_RIGHT component_or_swizzle_specifier? -// | PERIOD member_ident component_or_swizzle_specifier? -// | PERIOD swizzle_name component_or_swizzle_specifier? -Maybe Parser::component_or_swizzle_specifier( - const ast::Expression* prefix) { - MultiTokenSource source(this, prefix->source); - - while (continue_parsing()) { - if (match(Token::Type::kBracketLeft)) { - auto res = sync(Token::Type::kBracketRight, [&]() -> Maybe { - auto param = expression(); - if (param.errored) { - return Failure::kErrored; - } - if (!param.matched) { - return AddError(peek(), "unable to parse expression inside []"); - } - - if (!expect("index accessor", Token::Type::kBracketRight)) { - return Failure::kErrored; - } - - return create(source(), prefix, param.value); - }); - - if (res.errored) { - return res; - } - prefix = res.value; - continue; - } - - if (match(Token::Type::kPeriod)) { - auto ident = expect_ident("member accessor"); - if (ident.errored) { - return Failure::kErrored; - } - - prefix = builder_.MemberAccessor(source(), prefix, ident.value); - continue; - } - - return prefix; - } - - return Failure::kErrored; -} - -// argument_expression_list -// : PAREN_LEFT ((expression COMMA)* expression COMMA?)? PAREN_RIGHT -Expect Parser::expect_argument_expression_list(std::string_view use) { - return expect_paren_block(use, [&]() -> Expect { // - auto list = expression_list(use, Token::Type::kParenRight); - if (list.errored) { - return Failure::kErrored; - } - return list.value; - }); -} - -// bitwise_expression.post.unary_expression -// : AND unary_expression (AND unary_expression)* -// | OR unary_expression (OR unary_expression)* -// | XOR unary_expression (XOR unary_expression)* -Maybe Parser::bitwise_expression_post_unary_expression( - const ast::Expression* lhs, - const Source& lhs_source) { - MultiTokenSource source(this, lhs_source); - auto& t = peek(); - - std::optional op; - switch (t.type()) { - case Token::Type::kAnd: - op = core::BinaryOp::kAnd; - break; - case Token::Type::kOr: - op = core::BinaryOp::kOr; - break; - case Token::Type::kXor: - op = core::BinaryOp::kXor; - break; - default: - return Failure::kNoMatch; - } - next(); // Consume t - - while (continue_parsing()) { - auto rhs = unary_expression(); - if (rhs.errored) { - return Failure::kErrored; - } - if (!rhs.matched) { - return AddError(peek(), std::string("unable to parse right side of ") + - std::string(t.to_name()) + " expression"); - } - - lhs = create(source(), *op, lhs, rhs.value); - - if (!match(t.type())) { - return lhs; - } - } - return Failure::kErrored; -} - -// multiplicative_operator -// : FORWARD_SLASH -// | MODULO -// | STAR -Maybe Parser::multiplicative_operator() { - if (match(Token::Type::kForwardSlash)) { - return core::BinaryOp::kDivide; - } - if (match(Token::Type::kMod)) { - return core::BinaryOp::kModulo; - } - if (match(Token::Type::kStar)) { - return core::BinaryOp::kMultiply; - } - - return Failure::kNoMatch; -} - -// multiplicative_expression.post.unary_expression -// : (multiplicative_operator unary_expression)* -Expect Parser::expect_multiplicative_expression_post_unary_expression( - const ast::Expression* lhs, - const Source& lhs_source) { - MultiTokenSource source(this, lhs_source); - while (continue_parsing()) { - auto& t = peek(); - - auto op = multiplicative_operator(); - if (op.errored) { - return Failure::kErrored; - } - if (!op.matched) { - return lhs; - } - - auto rhs = unary_expression(); - if (rhs.errored) { - return Failure::kErrored; - } - if (!rhs.matched) { - return AddError(peek(), std::string("unable to parse right side of ") + - std::string(t.to_name()) + " expression"); - } - - lhs = create(source(), op.value, lhs, rhs.value); - } - return Failure::kErrored; -} - -// additive_operator -// : MINUS -// | PLUS -// -// Note, this also splits a `--` token. This is currently safe as the only way to get into -// here is through additive expression and rules for where `--` are allowed are very restrictive. -Maybe Parser::additive_operator() { - if (match(Token::Type::kPlus)) { - return core::BinaryOp::kAdd; - } - - auto& t = peek(); - if (t.Is(Token::Type::kMinusMinus)) { - next(); - split_token(Token::Type::kMinus, Token::Type::kMinus); - } else if (t.Is(Token::Type::kMinus)) { - next(); - } else { - return Failure::kNoMatch; - } - - return core::BinaryOp::kSubtract; -} - -// additive_expression.pos.unary_expression -// : (additive_operator unary_expression expect_multiplicative_expression.post.unary_expression)* -// -// This is `( additive_operator unary_expression ( multiplicative_operator unary_expression )* )*` -// split apart. -Expect Parser::expect_additive_expression_post_unary_expression( - const ast::Expression* lhs, - const Source& lhs_source) { - MultiTokenSource source(this, lhs_source); - while (continue_parsing()) { - auto& t = peek(); - - auto op = additive_operator(); - if (op.errored) { - return Failure::kErrored; - } - if (!op.matched) { - return lhs; - } - - auto unary = unary_expression(); - if (unary.errored) { - return Failure::kErrored; - } - if (!unary.matched) { - return AddError(peek(), std::string("unable to parse right side of ") + - std::string(t.to_name()) + " expression"); - } - - // The multiplicative binds tighter, so pass the unary into that and build that expression - // before creating the additive expression. - auto rhs = expect_multiplicative_expression_post_unary_expression(unary.value, lhs_source); - if (rhs.errored) { - return Failure::kErrored; - } - - lhs = create(source(), op.value, lhs, rhs.value); - } - return Failure::kErrored; -} - -// math_expression.post.unary_expression -// : multiplicative_expression.post.unary_expression additive_expression.post.unary_expression -// -// This is `( multiplicative_operator unary_expression )* ( additive_operator unary_expression ( -// multiplicative_operator unary_expression )* )*` split apart. -Expect Parser::expect_math_expression_post_unary_expression( - const ast::Expression* lhs, - const Source& lhs_source) { - MultiTokenSource source(this, lhs_source); - - auto rhs = expect_multiplicative_expression_post_unary_expression(lhs, source); - if (rhs.errored) { - return Failure::kErrored; - } - - return expect_additive_expression_post_unary_expression(rhs.value, source()); -} - -// shift_expression -// : unary_expression shift_expression.post.unary_expression -Maybe Parser::shift_expression() { - MultiTokenSource source(this); - auto lhs = unary_expression(); - if (lhs.errored) { - return Failure::kErrored; - } - if (!lhs.matched) { - return Failure::kNoMatch; - } - return expect_shift_expression_post_unary_expression(lhs.value, source); -} - -// shift_expression.post.unary_expression -// : math_expression.post.unary_expression? -// | SHIFT_LEFT unary_expression -// | SHIFT_RIGHT unary_expression -// -// Note, add the `math_expression.post.unary_expression` is added here to make -// implementation simpler. -Expect Parser::expect_shift_expression_post_unary_expression( - const ast::Expression* lhs, - const Source& lhs_source) { - MultiTokenSource source(this, lhs_source); - - auto& t = peek(); - if (match(Token::Type::kShiftLeft) || match(Token::Type::kShiftRight)) { - std::string name; - std::optional op; - if (t.Is(Token::Type::kShiftLeft)) { - op = core::BinaryOp::kShiftLeft; - name = "<<"; - } else if (t.Is(Token::Type::kShiftRight)) { - op = core::BinaryOp::kShiftRight; - name = ">>"; - } - - auto& rhs_start = peek(); - auto rhs = unary_expression(); - if (rhs.errored) { - return Failure::kErrored; - } - if (!rhs.matched) { - return AddError(rhs_start, - std::string("unable to parse right side of ") + name + " expression"); - } - return create(source(), *op, lhs, rhs.value); - } - - return expect_math_expression_post_unary_expression(lhs, source); -} - -// relational_expression -// : unary_expression relational_expression.post.unary_expression -Maybe Parser::relational_expression() { - MultiTokenSource source(this); - auto lhs = unary_expression(); - if (lhs.errored) { - return Failure::kErrored; - } - if (!lhs.matched) { - return Failure::kNoMatch; - } - return expect_relational_expression_post_unary_expression(lhs.value, source); -} - -// relational_expression.post.unary_expression -// : shift_expression.post.unary_expression -// | shift_expression.post.unary_expression EQUAL_EQUAL shift_expression -// | shift_expression.post.unary_expression GREATER_THAN shift_expression -// | shift_expression.post.unary_expression GREATER_THAN_EQUAL shift_expression -// | shift_expression.post.unary_expression LESS_THAN shift_expression -// | shift_expression.post.unary_expression LESS_THAN_EQUAL shift_expression -// | shift_expression.post.unary_expression NOT_EQUAL shift_expression -// -// Note, a `shift_expression` element was added to simplify many of the right sides -Expect Parser::expect_relational_expression_post_unary_expression( - const ast::Expression* lhs, - const Source& lhs_source) { - MultiTokenSource source(this, lhs_source); - - auto lhs_result = expect_shift_expression_post_unary_expression(lhs, source); - if (lhs_result.errored) { - return Failure::kErrored; - } - lhs = lhs_result.value; - - auto& tok_op = peek(); - - std::optional op; - switch (tok_op.type()) { - case Token::Type::kLessThan: - op = core::BinaryOp::kLessThan; - break; - case Token::Type::kGreaterThan: - op = core::BinaryOp::kGreaterThan; - break; - case Token::Type::kLessThanEqual: - op = core::BinaryOp::kLessThanEqual; - break; - case Token::Type::kGreaterThanEqual: - op = core::BinaryOp::kGreaterThanEqual; - break; - case Token::Type::kEqualEqual: - op = core::BinaryOp::kEqual; - break; - case Token::Type::kNotEqual: - op = core::BinaryOp::kNotEqual; - break; - default: - return lhs; - } - - next(); // consume tok_op - - auto& tok_rhs = peek(); - auto rhs = shift_expression(); - if (rhs.errored) { - return Failure::kErrored; - } - if (!rhs.matched) { - return AddError(tok_rhs, std::string("unable to parse right side of ") + - std::string(tok_op.to_name()) + " expression"); - } - - return create(source(), *op, lhs, rhs.value); -} - -Expect Parser::expect_expression(std::string_view use) { - auto& t = peek(); - auto expr = expression(); - if (expr.errored) { - return Failure::kErrored; - } - if (expr.matched) { - return expr.value; - } - return AddError(t, "expected expression for " + std::string(use)); -} - -Maybe Parser::expression_list(std::string_view use, - Token::Type terminator) { - if (peek_is(terminator)) { - return Failure::kNoMatch; - } - auto list = expect_expression_list(use, terminator); - if (list.errored) { - return Failure::kErrored; - } - return list.value; -} - -Expect Parser::expect_expression_list(std::string_view use, - Token::Type terminator) { - Parser::ExpressionList exprs; - while (continue_parsing()) { - auto expr = expect_expression(use); - if (expr.errored) { - return Failure::kErrored; - } - exprs.Push(expr.value); - if (peek_is(terminator)) { - break; - } - - // Check if the next token is a template start, which was likely intended as a less-than. - if (expect_next_not_template_list(expr->source).errored) { - return Failure::kErrored; // expect_next_not_template_list() raised an error. - } - if (!match(Token::Type::kComma)) { - // Next expression is not a terminator or comma, so this is a parse error. - - // Check if last parsed expression was a templated identifier, which was likely indented - // as a less-than / greater-than. - if (expect_not_templated_ident_expr(expr.value).errored) { - return Failure::kErrored; // expect_not_templated_ident_expr() raised an error. - } - - // Emit the expected ',' error - expect(use, Token::Type::kComma); - return Failure::kErrored; - } - if (peek_is(terminator)) { - break; - } - } - return exprs; -} - -// expression -// : unary_expression bitwise_expression.post.unary_expression -// | unary_expression relational_expression.post.unary_expression -// | unary_expression relational_expression.post.unary_expression and_and -// relational_expression ( and_and relational_expression )* -// | unary_expression relational_expression.post.unary_expression or_or -// relational_expression ( or_or relational_expression )* -// -// Note, a `relational_expression` element was added to simplify many of the right sides -Maybe Parser::expression() { - MultiTokenSource source(this); - Source first_op; - auto expr = [&]() -> Maybe { - auto lhs = unary_expression(); - if (lhs.errored) { - return Failure::kErrored; - } - if (!lhs.matched) { - return Failure::kNoMatch; - } - - first_op = peek().source(); - - auto bitwise = bitwise_expression_post_unary_expression(lhs.value, source); - if (bitwise.errored) { - return Failure::kErrored; - } - if (bitwise.matched) { - return bitwise.value; - } - - auto relational = expect_relational_expression_post_unary_expression(lhs.value, source); - if (relational.errored) { - return Failure::kErrored; - } - auto* ret = relational.value; - - auto& t = peek(); - if (t.Is(Token::Type::kAndAnd) || t.Is(Token::Type::kOrOr)) { - core::BinaryOp op; - if (t.Is(Token::Type::kAndAnd)) { - op = core::BinaryOp::kLogicalAnd; - } else if (t.Is(Token::Type::kOrOr)) { - op = core::BinaryOp::kLogicalOr; - } - - while (continue_parsing()) { - auto& n = peek(); - if (!n.Is(t.type())) { - break; - } - next(); - - auto rhs = relational_expression(); - if (rhs.errored) { - return Failure::kErrored; - } - if (!rhs.matched) { - return AddError(peek(), std::string("unable to parse right side of ") + - std::string(t.to_name()) + " expression"); - } - - ret = create(source(), op, ret, rhs.value); - } - } - return ret; - }(); - - if (expr.matched) { - // Note, expression is greedy an will consume all the operators of the same type - // so, `a & a & a` would all be consumed above. If you see any binary operator - // after this then it _must_ be a different one, and hence an error. - if (auto* lhs = expr->As()) { - if (auto& n = peek(); n.IsBinaryOperator()) { - AddError(Source::Combine(first_op, n.source()), - std::string("mixing '") + ast::Operator(lhs->op) + "' and '" + - std::string(n.to_name()) + "' requires parenthesis"); - return Failure::kErrored; - } - } - } - - return expr; -} - -// singular_expression -// : primary_expression postfix_expr -Maybe Parser::singular_expression() { - auto prefix = primary_expression(); - if (prefix.errored) { - return Failure::kErrored; - } - if (!prefix.matched) { - return Failure::kNoMatch; - } - - return component_or_swizzle_specifier(prefix.value); -} - -// unary_expression -// : singular_expression -// | MINUS unary_expression -// | BANG unary_expression -// | TILDE unary_expression -// | STAR unary_expression -// | AND unary_expression -// -// The `primary_expression component_or_swizzle_specifier ?` is moved out into a -// `singular_expression` -Maybe Parser::unary_expression() { - MultiTokenSource source(this); - - auto& t = peek(); - - // Note that an valid unary Negation expression starts with MINUS can be nested by another - // Negation unary expression, results in the form of (--e). The two MINUS might be tokenized as - // a single kMinusMinus, while kMinusMinus should only be used in a variable updating statement. - // The token should be split and the expression should be parsed as (-(-e)). - // There is no unary expression (+e) so (++e) is not a valid unary expression and kPlusPlus is - // unexpected here. Special casing kPlusPlus to generate a more specific error message. - if (peek_is(Token::Type::kPlusPlus)) { - return AddError(peek(0).source(), - "prefix increment and decrement operators are not supported"); - } - - core::UnaryOp op; - if (t.Is(Token::Type::kMinusMinus)) { - // Split the kMinusMinus token into two kMinus tokens. - next(); - split_token(Token::Type::kMinus, Token::Type::kMinus); - op = core::UnaryOp::kNegation; - } else if (match(Token::Type::kMinus)) { - op = core::UnaryOp::kNegation; - } else if (match(Token::Type::kBang)) { - op = core::UnaryOp::kNot; - } else if (match(Token::Type::kTilde)) { - op = core::UnaryOp::kComplement; - } else if (match(Token::Type::kStar)) { - op = core::UnaryOp::kIndirection; - } else if (match(Token::Type::kAnd)) { - op = core::UnaryOp::kAddressOf; - } else { - return singular_expression(); - } - - if (parse_depth_ >= kMaxParseDepth) { - // We've hit a maximum parser recursive depth. - // We can't call into unary_expression() as we might stack overflow. - // Instead, report an error - AddError(peek(), "maximum parser recursive depth reached"); - return Failure::kErrored; - } - - ++parse_depth_; - auto expr = unary_expression(); - --parse_depth_; - - if (expr.errored) { - return Failure::kErrored; - } - if (!expr.matched) { - return AddError( - peek(), "unable to parse right side of " + std::string(t.to_name()) + " expression"); - } - - return create(source(), op, expr.value); -} - -// compound_assignment_operator -// : plus_equal -// | minus_equal -// | times_equal -// | division_equal -// | modulo_equal -// | and_equal -// | or_equal -// | xor_equal -// | shift_right_equal -// | shift_left_equal -Maybe Parser::compound_assignment_operator() { - std::optional compound_op; - if (peek_is(Token::Type::kPlusEqual)) { - compound_op = core::BinaryOp::kAdd; - } else if (peek_is(Token::Type::kMinusEqual)) { - compound_op = core::BinaryOp::kSubtract; - } else if (peek_is(Token::Type::kTimesEqual)) { - compound_op = core::BinaryOp::kMultiply; - } else if (peek_is(Token::Type::kDivisionEqual)) { - compound_op = core::BinaryOp::kDivide; - } else if (peek_is(Token::Type::kModuloEqual)) { - compound_op = core::BinaryOp::kModulo; - } else if (peek_is(Token::Type::kAndEqual)) { - compound_op = core::BinaryOp::kAnd; - } else if (peek_is(Token::Type::kOrEqual)) { - compound_op = core::BinaryOp::kOr; - } else if (peek_is(Token::Type::kXorEqual)) { - compound_op = core::BinaryOp::kXor; - } else if (peek_is(Token::Type::kShiftLeftEqual)) { - compound_op = core::BinaryOp::kShiftLeft; - } else if (peek_is(Token::Type::kShiftRightEqual)) { - compound_op = core::BinaryOp::kShiftRight; - } - if (compound_op) { - next(); - return *compound_op; - } - return Failure::kNoMatch; -} - -// core_lhs_expression -// : ident -// | PAREN_LEFT lhs_expression PAREN_RIGHT -Maybe Parser::core_lhs_expression() { - auto& t = peek(); - if (t.IsIdentifier()) { - next(); - - return builder_.Expr(t.source(), t.to_str()); - } - - if (peek_is(Token::Type::kParenLeft)) { - return expect_paren_block("", [&]() -> Expect { - auto expr = lhs_expression(); - if (expr.errored) { - return Failure::kErrored; - } - if (!expr.matched) { - return AddError(t, "invalid expression"); - } - return expr.value; - }); - } - - return Failure::kNoMatch; -} - -// lhs_expression -// : core_lhs_expression component_or_swizzle_specifier ? -// | AND lhs_expression -// | STAR lhs_expression -Maybe Parser::lhs_expression() { - auto core_expr = core_lhs_expression(); - if (core_expr.errored) { - return Failure::kErrored; - } - if (core_expr.matched) { - return component_or_swizzle_specifier(core_expr.value); - } - - // Gather up all the `*`, `&` and `&&` tokens into a list and create all of the unary ops at - // once instead of recursing. This handles the case where the fuzzer decides >8k `*`s would be - // fun. - struct LHSData { - Source source; - core::UnaryOp op; - }; - Vector ops; - while (true) { - auto& t = peek(); - if (!t.Is(Token::Type::kAndAnd) && !t.Is(Token::Type::kAnd) && !t.Is(Token::Type::kStar)) { - break; - } - next(); // consume the peek - - if (t.Is(Token::Type::kAndAnd)) { - // The first `&` is consumed as part of the `&&`, so we only push one of the two `&`s. - split_token(Token::Type::kAnd, Token::Type::kAnd); - ops.Push({t.source(), core::UnaryOp::kAddressOf}); - } else if (t.Is(Token::Type::kAnd)) { - ops.Push({t.source(), core::UnaryOp::kAddressOf}); - } else if (t.Is(Token::Type::kStar)) { - ops.Push({t.source(), core::UnaryOp::kIndirection}); - } - } - if (ops.IsEmpty()) { - return Failure::kNoMatch; - } - - auto& t = peek(); - auto expr = lhs_expression(); - if (expr.errored) { - return Failure::kErrored; - } - if (!expr.matched) { - return AddError(t, "missing expression"); - } - - const ast::Expression* ret = expr.value; - // Consume the ops in reverse order so we have the correct AST ordering. - for (auto& info : tint::Reverse(ops)) { - ret = create(info.source, info.op, ret); - } - return ret; -} - -// variable_updating_statement -// : lhs_expression ( EQUAL | compound_assignment_operator ) expression -// | lhs_expression MINUS_MINUS -// | lhs_expression PLUS_PLUS -// | UNDERSCORE EQUAL expression -// -// Note, this is a simplification of the recursive grammar statement with the `lhs_expression` -// substituted back into the expression. -Maybe Parser::variable_updating_statement() { - auto& t = peek(); - - // tint:295 - Test for `ident COLON` - this is invalid grammar, and without - // special casing will error as "missing = for assignment", which is less - // helpful than this error message: - if (peek_is(Token::Type::kIdentifier) && peek_is(Token::Type::kColon, 1)) { - return AddError(peek(0).source(), "expected 'var' for variable declaration"); - } - - // Prefix increment/decrement `++a`/`--a` is invalid grammar, and without - // special casing will return unmatched and no error message. - if (peek_is(Token::Type::kPlusPlus) || peek_is(Token::Type::kMinusMinus)) { - return AddError(peek(0).source(), - "prefix increment and decrement operators are not supported"); - } - - Source source; - const ast::Expression* lhs = nullptr; - std::optional compound_op; - if (peek_is(Token::Type::kUnderscore)) { - next(); // Consume the peek. - - if (!expect("assignment", Token::Type::kEqual)) { - return Failure::kErrored; - } - source = last_source(); - - lhs = create(t.source()); - - } else { - auto lhs_result = lhs_expression(); - if (lhs_result.errored) { - return Failure::kErrored; - } - if (!lhs_result.matched) { - return Failure::kNoMatch; - } - - lhs = lhs_result.value; - - // Handle increment and decrement statements. - if (match(Token::Type::kPlusPlus)) { - return create(last_source(), lhs, true); - } - if (match(Token::Type::kMinusMinus)) { - return create(last_source(), lhs, false); - } - - source = peek().source(); - auto compound_op_result = compound_assignment_operator(); - if (compound_op_result.errored) { - return Failure::kErrored; - } - if (compound_op_result.matched) { - compound_op = compound_op_result.value; - } else { - if (!expect("assignment", Token::Type::kEqual)) { - return Failure::kErrored; - } - } - } - - auto rhs = expression(); - if (rhs.errored) { - return Failure::kErrored; - } - if (!rhs.matched) { - return AddError(peek(), "unable to parse right side of assignment"); - } - - if (compound_op) { - return create(source, lhs, rhs.value, *compound_op); - } - return create(source, lhs, rhs.value); -} - -// const_literal -// : INT_LITERAL -// | FLOAT_LITERAL -// | bool_literal -// -// bool_literal -// : TRUE -// | FALSE -Maybe Parser::const_literal() { - auto& t = peek(); - if (match(Token::Type::kIntLiteral)) { - return create(t.source(), t.to_i64(), - ast::IntLiteralExpression::Suffix::kNone); - } - if (match(Token::Type::kIntLiteral_I)) { - return create(t.source(), t.to_i64(), - ast::IntLiteralExpression::Suffix::kI); - } - if (match(Token::Type::kIntLiteral_U)) { - return create(t.source(), t.to_i64(), - ast::IntLiteralExpression::Suffix::kU); - } - if (match(Token::Type::kFloatLiteral)) { - return create(t.source(), t.to_f64(), - ast::FloatLiteralExpression::Suffix::kNone); - } - if (match(Token::Type::kFloatLiteral_F)) { - return create(t.source(), t.to_f64(), - ast::FloatLiteralExpression::Suffix::kF); - } - if (match(Token::Type::kFloatLiteral_H)) { - return create(t.source(), t.to_f64(), - ast::FloatLiteralExpression::Suffix::kH); - } - if (match(Token::Type::kTrue)) { - return create(t.source(), true); - } - if (match(Token::Type::kFalse)) { - return create(t.source(), false); - } - if (handle_error(t)) { - return Failure::kErrored; - } - return Failure::kNoMatch; -} - -Maybe Parser::attribute_list() { - bool errored = false; - AttributeList attrs; - - while (continue_parsing()) { - if (match(Token::Type::kAttr)) { - if (auto attr = expect_attribute(); attr.errored) { - errored = true; - } else { - attrs.Push(attr.value); - } - } else { - break; - } - } - - if (errored) { - return Failure::kErrored; - } - - if (attrs.IsEmpty()) { - return Failure::kNoMatch; - } - - return attrs; -} - -Expect Parser::expect_attribute() { - auto& t = peek(); - auto attr = attribute(); - if (attr.errored) { - return Failure::kErrored; - } - if (attr.matched) { - return attr.value; - } - return AddError(t, "expected attribute"); -} - -// attribute -// : ATTR identifier ( PAREN_LEFT expression ( COMMA expression )? COMMA? PAREN_RIGHT )? -Maybe Parser::attribute() { - // Note, the ATTR is matched by the called `attribute_list` in this case, so it is not matched - // here and this has to be an attribute. - auto& t = peek(); - - if (match(Token::Type::kConst)) { - return AddError(t.source(), "const attribute may not appear in shaders"); - } - if (match(Token::Type::kDiagnostic)) { - auto control = expect_diagnostic_control(); - if (control.errored) { - return Failure::kErrored; - } - return create(t.source(), std::move(control.value)); - } - - auto attr = expect_enum("attribute", core::ParseAttribute, core::kAttributeStrings); - if (attr.errored) { - return Failure::kErrored; - } - - uint32_t min = 1; - uint32_t max = 1; - switch (attr.value) { - case core::Attribute::kCompute: - case core::Attribute::kFragment: - case core::Attribute::kInvariant: - case core::Attribute::kMustUse: - case core::Attribute::kVertex: - min = 0; - max = 0; - break; - case core::Attribute::kInterpolate: - max = 2; - break; - case core::Attribute::kWorkgroupSize: - max = 3; - break; - default: - break; - } - - // builtin_attr : - // '@' 'builtin' '(' builtin_value_name ',' ? ')' - // | '@' 'builtin' '(' builtin_value_name ',' builtin_depth_mode_name ',' ? ')' - if (attr.value == core::Attribute::kBuiltin) { - return expect_paren_block( - "builtin attribute", [&]() -> Expect { - auto name = expect_enum("builtin value name", core::ParseBuiltinValue, - core::kBuiltinValueStrings); - if (name.errored) { - return Failure::kErrored; - } - if (!match(Token::Type::kComma) || peek().Is(Token::Type::kParenRight)) { - return builder_.Builtin(t.source(), name.value); - } - - auto depth_mode_name = - expect_enum("builtin depth mode name", core::ParseBuiltinDepthMode, - core::kBuiltinDepthModeStrings); - if (depth_mode_name.errored) { - return Failure::kErrored; - } - match(Token::Type::kComma); - - return builder_.Builtin(t.source(), name.value, depth_mode_name.value); - }); - } - - // interpolate_attr : - // '@' 'interpolate' '(' interpolate_type_name ',' ? ')' - // | '@' 'interpolate' '(' interpolate_type_name ',' interpolate_sampling_name ',' ? ')' - if (attr.value == core::Attribute::kInterpolate) { - return expect_paren_block( - "interpolate attribute", [&]() -> Expect { - auto type_name = - expect_enum("interpolation type name", core::ParseInterpolationType, - core::kInterpolationTypeStrings); - if (type_name.errored) { - return Failure::kErrored; - } - if (!match(Token::Type::kComma) || peek().Is(Token::Type::kParenRight)) { - return builder_.Interpolate(t.source(), type_name.value); - } - - auto sampling_name = - expect_enum("interpolation sampling name", core::ParseInterpolationSampling, - core::kInterpolationSamplingStrings); - if (sampling_name.errored) { - return Failure::kErrored; - } - match(Token::Type::kComma); - - return builder_.Interpolate(t.source(), type_name.value, sampling_name.value); - }); - } - - Vector args; - - // Handle no parameter items which should have no parens - if (min == 0) { - auto& t2 = peek(); - if (match(Token::Type::kParenLeft)) { - return AddError(t2.source(), t.to_str() + " attribute doesn't take parenthesis"); - } - } else { - auto res = expect_paren_block(t.to_str() + " attribute", [&]() -> Expect { - while (continue_parsing()) { - if (peek().Is(Token::Type::kParenRight)) { - break; - } - - auto expr = expect_expression(t.to_str()); - if (expr.errored) { - return Failure::kErrored; - } - args.Push(expr.value); - - if (!match(Token::Type::kComma)) { - break; - } - } - return true; - }); - if (res.errored) { - return Failure::kErrored; - } - - if (args.IsEmpty() || args.Length() < min) { - return AddError(t.source(), - t.to_str() + " expects" + (min != max ? " at least " : " ") + - std::to_string(min) + " argument" + (min != 1 ? "s" : "")); - } - if (args.Length() > max) { - return AddError(t.source(), t.to_str() + " expects" + (min != max ? " at most " : " ") + - std::to_string(max) + " argument" + - (max != 1 ? "s" : "") + ", got " + - std::to_string(args.Length())); - } - } - - switch (attr.value) { - case core::Attribute::kAlign: - return create(t.source(), args[0]); - case core::Attribute::kBinding: - return create(t.source(), args[0]); - case core::Attribute::kBlendSrc: - return create(t.source(), args[0]); - case core::Attribute::kColor: - return create(t.source(), args[0]); - case core::Attribute::kCompute: - return create(t.source(), ast::PipelineStage::kCompute); - case core::Attribute::kFragment: - return create(t.source(), ast::PipelineStage::kFragment); - case core::Attribute::kGroup: - return create(t.source(), args[0]); - case core::Attribute::kId: - return create(t.source(), args[0]); - case core::Attribute::kInputAttachmentIndex: - return create(t.source(), args[0]); - case core::Attribute::kInvariant: - return create(t.source()); - case core::Attribute::kLocation: - return builder_.Location(t.source(), args[0]); - case core::Attribute::kMustUse: - return create(t.source()); - case core::Attribute::kSize: - return builder_.MemberSize(t.source(), args[0]); - case core::Attribute::kVertex: - return create(t.source(), ast::PipelineStage::kVertex); - case core::Attribute::kWorkgroupSize: - return create(t.source(), args[0], - args.Length() > 1 ? args[1] : nullptr, - args.Length() > 2 ? args[2] : nullptr); - case core::Attribute::kSubgroupSize: - return create(t.source(), args[0]); - default: - return Failure::kNoMatch; - } -} - -Expect Parser::expect_attributes_consumed(VectorRef in) { - if (in.IsEmpty()) { - return kSuccess; - } - AddError(in[0]->source, "unexpected attributes"); - return Failure::kErrored; -} - -Expect Parser::expect_next_not_template_list(const Source& lhs_source) { - Source end; - if (!match(Token::Type::kTemplateArgsLeft, &end)) { - return kSuccess; - } - - // Try to find end of template - for (size_t i = 0; i < 32; i++) { - if (auto& t = peek(i); t.type() == Token::Type::kTemplateArgsRight) { - end = t.source(); - } - } - Source template_source = lhs_source; - template_source.range.end = end.range.end; - AddError(template_source, "parsed as template list"); - - if (auto rhs = expression(); rhs.matched) { - Source lt_source = lhs_source; - lt_source.range.end = rhs->source.range.end; - AddNote(lt_source, - "if this is intended to be a less-than expression then wrap in parentheses"); - } - return Failure::kErrored; -} - -Expect Parser::expect_not_templated_ident_expr(const ast::Expression* expr) { - auto* ident_expr = expr->As(); - if (!ident_expr) { - return kSuccess; - } - auto* ident = ident_expr->identifier->As(); - if (!ident) { - return kSuccess; - } - - AddError(ident->source, "parsed as template list"); - - if (auto rhs = expression(); rhs.matched) { - Source gt_source = ident->arguments.Back()->source; - gt_source.range.end = rhs->source.range.end; - AddNote(gt_source, - "if this is intended to be a greater-than expression then wrap in parentheses"); - } - return Failure::kErrored; -} - -// severity_control_name -// : 'error' -// | 'warning' -// | 'info' -// | 'off' -Expect Parser::expect_severity_control_name() { - return expect_enum("severity control", wgsl::ParseDiagnosticSeverity, - wgsl::kDiagnosticSeverityStrings); -} - -// diagnostic_control -// : PAREN_LEFT severity_control_name COMMA diagnostic_rule_name COMMA ? PAREN_RIGHT -Expect Parser::expect_diagnostic_control() { - return expect_paren_block("diagnostic control", [&]() -> Expect { - auto severity_control = expect_severity_control_name(); - if (severity_control.errored) { - return Failure::kErrored; - } - - if (!expect("diagnostic control", Token::Type::kComma)) { - return Failure::kErrored; - } - - auto rule_name = expect_diagnostic_rule_name(); - if (rule_name.errored) { - return Failure::kErrored; - } - match(Token::Type::kComma); - - return ast::DiagnosticControl(severity_control.value, rule_name.value); - }); -} - -// diagnostic_rule_name : -// | diagnostic_name_token -// | diagnostic_name_token '.' diagnostic_name_token -Expect Parser::expect_diagnostic_rule_name() { - if (peek_is(Token::Type::kPeriod, 1)) { - auto category = expect_ident("", "diagnostic rule category"); - if (category.errored) { - return Failure::kErrored; - } - if (!expect("diagnostic rule", Token::Type::kPeriod)) { - return Failure::kErrored; - } - auto name = expect_ident("", "diagnostic rule name"); - if (name.errored) { - return Failure::kErrored; - } - return builder_.DiagnosticRuleName(category.value, name.value); - } - auto name = expect_ident("", "diagnostic rule name"); - if (name.errored) { - return Failure::kErrored; - } - return builder_.DiagnosticRuleName(name.value); -} - -bool Parser::match(Token::Type tok, Source* source /*= nullptr*/) { - auto& t = peek(); - - if (source != nullptr) { - *source = t.source(); - } - - if (t.Is(tok)) { - next(); - return true; - } - return false; -} - -bool Parser::expect(std::string_view use, Token::Type tok) { - auto& t = peek(); - if (t.Is(tok)) { - next(); - synchronized_ = true; - return true; - } - - // Special case to split `>>` and `>=` tokens if we are looking for a `>`. - if (tok == Token::Type::kGreaterThan && - (t.Is(Token::Type::kShiftRight) || t.Is(Token::Type::kGreaterThanEqual))) { - next(); - - // Push the second character to the token queue. - if (t.Is(Token::Type::kShiftRight)) { - split_token(Token::Type::kGreaterThan, Token::Type::kGreaterThan); - } else if (t.Is(Token::Type::kGreaterThanEqual)) { - split_token(Token::Type::kGreaterThan, Token::Type::kEqual); - } - - synchronized_ = true; - return true; - } - - // Error cases - synchronized_ = false; - if (handle_error(t)) { - return false; - } - - StringStream err; - if (tok == Token::Type::kTemplateArgsLeft && t.type() == Token::Type::kLessThan) { - err << "missing closing '>'"; - } else { - err << "expected '" << Token::TypeToName(tok) << "'"; - } - if (!use.empty()) { - err << " for " << use; - } - AddError(t, err.str()); - return false; -} - -Expect Parser::expect_sint(std::string_view use, Source* source /* = nullptr */) { - auto& t = peek(); - if (source) { - *source = t.source(); - } - if (!t.Is(Token::Type::kIntLiteral) && !t.Is(Token::Type::kIntLiteral_I)) { - return AddError(t.source(), "expected signed integer literal", use); - } - - int64_t val = t.to_i64(); - if ((val > std::numeric_limits::max()) || - (val < std::numeric_limits::min())) { - // TODO(crbug.com/tint/1504): Test this when abstract int is implemented - return AddError(t.source(), "value overflows i32", use); - } - - next(); - return static_cast(t.to_i64()); -} - -Expect Parser::expect_positive_sint(std::string_view use) { - Source source; - auto sint = expect_sint(use, &source); - if (sint.errored) { - return Failure::kErrored; - } - - if (sint.value < 0) { - return AddError(source, std::string(use) + " must be positive"); - } - - return static_cast(sint.value); -} - -Expect Parser::expect_nonzero_positive_sint(std::string_view use) { - Source source; - auto sint = expect_sint(use, &source); - if (sint.errored) { - return Failure::kErrored; - } - - if (sint.value <= 0) { - return AddError(source, std::string(use) + " must be greater than 0"); - } - - return static_cast(sint.value); -} - -Expect Parser::expect_ident(std::string_view use, - std::string_view kind /* = "identifier" */) { - auto& t = peek(); - if (t.IsIdentifier()) { - synchronized_ = true; - next(); - - if (IsReserved(t.to_str_view())) { - return AddError(t.source(), "'" + t.to_str() + "' is a reserved keyword"); - } - - return builder_.Ident(t.source(), t.to_str()); - } - if (handle_error(t)) { - return Failure::kErrored; - } - synchronized_ = false; - return AddError(t.source(), "expected " + std::string(kind), use); -} - -template -T Parser::expect_block(Token::Type start, Token::Type end, std::string_view use, F&& body) { - if (!expect(use, start)) { - return Failure::kErrored; - } - - return sync(end, [&]() -> T { - auto res = body(); - - if (res.errored) { - return Failure::kErrored; - } - - if (!expect(use, end)) { - return Failure::kErrored; - } - - return res; - }); -} - -template -T Parser::expect_paren_block(std::string_view use, F&& body) { - return expect_block(Token::Type::kParenLeft, Token::Type::kParenRight, use, - std::forward(body)); -} - -template -T Parser::expect_brace_block(std::string_view use, F&& body) { - return expect_block(Token::Type::kBraceLeft, Token::Type::kBraceRight, use, - std::forward(body)); -} - -template -T Parser::expect_lt_gt_block(std::string_view use, F&& body) { - return expect_block(Token::Type::kLessThan, Token::Type::kGreaterThan, use, - std::forward(body)); -} - -template -T Parser::expect_template_arg_block(std::string_view use, F&& body) { - return expect_block(Token::Type::kTemplateArgsLeft, Token::Type::kTemplateArgsRight, use, - std::forward(body)); -} - -template -T Parser::sync(Token::Type tok, F&& body) { - if (parse_depth_ >= kMaxParseDepth) { - // We've hit a maximum parser recursive depth. - // We can't call into body() as we might stack overflow. - // Instead, report an error... - AddError(peek(), "maximum parser recursive depth reached"); - // ...and try to resynchronize. If we cannot resynchronize to `tok` then - // synchronized_ is set to false, and the parser knows that forward progress - // is not being made. - sync_to(tok, /* consume: */ true); - return Failure::kErrored; - } - - sync_tokens_.push_back(tok); - - ++parse_depth_; - auto result = body(); - --parse_depth_; - - TINT_ASSERT(sync_tokens_.back() == tok) << "sync_tokens is out of sync"; - - sync_tokens_.pop_back(); - - if (result.errored) { - sync_to(tok, /* consume: */ true); - } - - return result; -} - -bool Parser::sync_to(Token::Type tok, bool consume) { - // Clear the synchronized state - gets set to true again on success. - synchronized_ = false; - - BlockCounters counters; - - for (size_t i = 0; i < kMaxResynchronizeLookahead; i++) { - auto& t = peek(i); - if (counters.consume(t) > 0) { - continue; // Nested block - } - if (!t.Is(tok) && !is_sync_token(t)) { - continue; // Not a synchronization point - } - - // Synchronization point found. - - // Skip any tokens we don't understand, bringing us to just before the - // resync point. - while (i-- > 0) { - next(); - } - - // Is this synchronization token |tok|? - if (t.Is(tok)) { - if (consume) { - next(); - } - synchronized_ = true; - return true; - } - break; - } - - return false; -} - -bool Parser::is_sync_token(const Token& t) const { - for (auto r : sync_tokens_) { - if (t.Is(r)) { - return true; - } - } - return false; -} - -bool Parser::handle_error(const Token& t) { - // The token might itself be an error. - if (t.IsError()) { - synchronized_ = false; - AddError(t.source(), t.to_str()); - return true; - } - return false; -} - -template -T Parser::without_diag(F&& body) { - silence_diags_++; - auto result = body(); - silence_diags_--; - return result; -} - -} // namespace tint::wgsl::reader diff --git a/3rdparty/dawn/src/tint/lang/wgsl/reader/parser/parser.h b/3rdparty/dawn/src/tint/lang/wgsl/reader/parser/parser.h deleted file mode 100644 index ad2497798..000000000 --- a/3rdparty/dawn/src/tint/lang/wgsl/reader/parser/parser.h +++ /dev/null @@ -1,927 +0,0 @@ -// Copyright 2020 The Dawn & Tint Authors -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// 3. Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef SRC_TINT_LANG_WGSL_READER_PARSER_PARSER_H_ -#define SRC_TINT_LANG_WGSL_READER_PARSER_PARSER_H_ - -#include -#include -#include -#include -#include -#include - -#include "src/tint/lang/core/enums.h" -#include "src/tint/lang/wgsl/program/program_builder.h" -#include "src/tint/lang/wgsl/reader/parser/detail.h" -#include "src/tint/lang/wgsl/reader/parser/token.h" -#include "src/tint/lang/wgsl/resolver/resolve.h" -#include "src/tint/utils/diagnostic/formatter.h" -#include "src/tint/utils/text/styled_text.h" - -namespace tint::ast { -class BreakStatement; -class CallStatement; -class ContinueStatement; -class IfStatement; -class LoopStatement; -class ReturnStatement; -class SwitchStatement; -class VariableDeclStatement; -} // namespace tint::ast - -namespace tint::wgsl::reader { - -class Lexer; - -/// Struct holding information for a for loop -struct ForHeader { - /// Constructor - /// @param init the initializer statement - /// @param cond the condition statement - /// @param cont the continuing statement - ForHeader(const ast::Statement* init, const ast::Expression* cond, const ast::Statement* cont); - - ~ForHeader(); - - /// The for loop initializer - const ast::Statement* initializer = nullptr; - /// The for loop condition - const ast::Expression* condition = nullptr; - /// The for loop continuing statement - const ast::Statement* continuing = nullptr; -}; - -/// Parser for WGSL source data -class Parser { - /// Failure holds enumerator values used for the constructing an Expect and - /// Match in an errored state. - struct Failure { - enum Errored { kErrored }; - enum NoMatch { kNoMatch }; - }; - - public: - /// Pre-determined small vector sizes for AST pointers - //! @cond Doxygen_Suppress - using AttributeList = Vector; - using CaseSelectorList = Vector; - using CaseStatementList = Vector; - using ExpressionList = Vector; - using ParameterList = Vector; - using StatementList = Vector; - using StructMemberList = Vector; - //! @endcond - - /// Empty structure used by functions that do not return a value, but need to signal success / - /// error with Expect or Maybe. - struct Void {}; - - /// Expect is the return type of the parser methods that are expected to - /// return a parsed value of type T, unless there was an parse error. - /// In the case of a parse error the called method will have called - /// AddError() and #errored will be set to true. - template - struct Expect { - /// An alias to the templated type T. - using type = T; - - /// Don't allow an Expect to take a nullptr. - inline Expect(std::nullptr_t) = delete; // NOLINT - - /// Constructor for a successful parse. - /// @param val the result value of the parse - template - inline Expect(U&& val) // NOLINT - : value(std::forward(val)) {} - - /// Constructor for parse error. - inline Expect(Failure::Errored) : errored(true) {} // NOLINT - - /// Copy constructor - inline Expect(const Expect&) = default; - /// Move constructor - inline Expect(Expect&&) = default; - /// Assignment operator - /// @return this Expect - inline Expect& operator=(const Expect&) = default; - /// Assignment move operator - /// @return this Expect - inline Expect& operator=(Expect&&) = default; - - /// @return a pointer to the returned value. If T is a pointer or - /// std::unique_ptr, operator->() automatically dereferences so that the - /// return type will always be a pointer to a non-pointer type. #errored - /// must be false to call. - inline typename detail::OperatorArrow::type operator->() { - TINT_ASSERT(!errored); - return detail::OperatorArrow::ptr(value); - } - - /// The expected value of a successful parse. - /// Zero-initialized when there was a parse error. - T value{}; - /// True if there was a error parsing. - bool errored = false; - }; - - /// Maybe is the return type of the parser methods that attempts to match a - /// grammar and return a parsed value of type T, or may parse part of the - /// grammar and then hit a parse error. - /// In the case of a successful grammar match, the Maybe will have #matched - /// set to true. - /// In the case of a parse error the called method will have called - /// AddError() and the Maybe will have #errored set to true. - template - struct Maybe { - inline Maybe(std::nullptr_t) = delete; // NOLINT - - /// Constructor for a successful parse. - /// @param val the result value of the parse - template - inline Maybe(U&& val) // NOLINT - : value(std::forward(val)), matched(true) {} - - /// Constructor for parse error state. - inline Maybe(Failure::Errored) : errored(true) {} // NOLINT - - /// Constructor for the no-match state. - inline Maybe(Failure::NoMatch) {} // NOLINT - - /// Constructor from an Expect. - /// @param e the Expect to copy this Maybe from - template - inline Maybe(const Expect& e) // NOLINT - : value(e.value), errored(e.errored), matched(!e.errored) {} - - /// Move from an Expect. - /// @param e the Expect to move this Maybe from - template - inline Maybe(Expect&& e) // NOLINT - : value(std::move(e.value)), errored(e.errored), matched(!e.errored) {} - - /// Copy constructor - inline Maybe(const Maybe&) = default; - /// Move constructor - inline Maybe(Maybe&&) = default; - /// Assignment operator - /// @return this Maybe - inline Maybe& operator=(const Maybe&) = default; - /// Assignment move operator - /// @return this Maybe - inline Maybe& operator=(Maybe&&) = default; - - /// @return a pointer to the returned value. If T is a pointer or - /// std::unique_ptr, operator->() automatically dereferences so that the - /// return type will always be a pointer to a non-pointer type. #errored - /// must be false to call. - inline typename detail::OperatorArrow::type operator->() { - TINT_ASSERT(!errored); - return detail::OperatorArrow::ptr(value); - } - - /// The value of a successful parse. - /// Zero-initialized when there was a parse error. - T value{}; - /// True if there was a error parsing. - bool errored = false; - /// True if there was a error parsing. - bool matched = false; - }; - - /// TypedIdentifier holds a parsed identifier and type. Returned by - /// variable_ident_decl(). - struct TypedIdentifier { - /// Constructor - TypedIdentifier(); - /// Copy constructor - /// @param other the FunctionHeader to copy - TypedIdentifier(const TypedIdentifier& other); - /// Constructor - /// @param type_in parsed type - /// @param name_in parsed identifier - TypedIdentifier(ast::Type type_in, const ast::Identifier* name_in); - /// Destructor - ~TypedIdentifier(); - - /// Parsed type. type.expr be nullptr for inferred types. - ast::Type type; - /// Parsed identifier. - const ast::Identifier* name = nullptr; - }; - - /// FunctionHeader contains the parsed information for a function header. - struct FunctionHeader { - /// Constructor - FunctionHeader(); - /// Copy constructor - /// @param other the FunctionHeader to copy - FunctionHeader(const FunctionHeader& other); - /// Constructor - /// @param src parsed header source - /// @param n function name - /// @param p function parameters - /// @param ret_ty function return type - /// @param ret_attrs return type attributes - FunctionHeader(Source src, - const ast::Identifier* n, - VectorRef p, - ast::Type ret_ty, - VectorRef ret_attrs); - /// Destructor - ~FunctionHeader(); - /// Assignment operator - /// @param other the FunctionHeader to copy - /// @returns this FunctionHeader - FunctionHeader& operator=(const FunctionHeader& other); - - /// Parsed header source - Source source; - /// Function name - const ast::Identifier* name; - /// Function parameters - Vector params; - /// Function return type - ast::Type return_type; - /// Function return type attributes - AttributeList return_type_attributes; - }; - - /// VarDeclInfo contains the parsed information for variable declaration. - struct VarDeclInfo { - /// Variable declaration source - Source source; - /// Variable name - const ast::Identifier* name = nullptr; - /// Variable address space - const ast::Expression* address_space = nullptr; - /// Variable access control - const ast::Expression* access = nullptr; - /// Variable type - ast::Type type; - }; - - /// VariableQualifier contains the parsed information for a variable qualifier - struct VariableQualifier { - /// The variable's address space - const ast::Expression* address_space = nullptr; - /// The variable's access control - const ast::Expression* access = nullptr; - }; - - /// MatrixDimensions contains the column and row information for a matrix - struct MatrixDimensions { - /// The number of columns - uint32_t columns = 0; - /// The number of rows - uint32_t rows = 0; - }; - - /// Creates a new parser using the given file - /// @param file the input source file to parse - explicit Parser(Source::File const* file); - ~Parser(); - - /// Reads tokens from the source file. This will be called automatically - /// by |parse|. - void InitializeLex(); - - /// Run the parser - /// @returns true if the parse was successful, false otherwise. - bool Parse(); - - /// set_max_diagnostics sets the maximum number of reported errors before - /// aborting parsing. - /// @param limit the new maximum number of errors - void set_max_errors(size_t limit) { max_errors_ = limit; } - - /// @return the number of maximum number of reported errors before aborting - /// parsing. - size_t get_max_errors() const { return max_errors_; } - - /// @returns true if an error was encountered. - bool has_error() const { return builder_.Diagnostics().ContainsErrors(); } - - /// @returns the parser error string - std::string error() const { - diag::Formatter formatter{{false, false, false, false}}; - return formatter.Format(builder_.Diagnostics()).Plain(); - } - - /// @returns the Program. The program builder in the parser will be reset - /// after this. - Program program() { return resolver::Resolve(builder_); } - - /// @returns the program builder. - ProgramBuilder& builder() { return builder_; } - - /// @returns the next token - const Token& next(); - /// Peeks ahead and returns the token at `idx` ahead of the current position - /// @param idx the index of the token to return - /// @returns the token `idx` positions ahead without advancing - const Token& peek(size_t idx = 0); - /// Peeks ahead and returns true if the token at `idx` ahead of the current - /// position is |tok| - /// @param idx the index of the token to return - /// @param tok the token to look for - /// @returns true if the token `idx` positions ahead is |tok| - bool peek_is(Token::Type tok, size_t idx = 0); - /// @returns the last source location that was returned by `next()` - Source last_source() const; - /// Appends an error at `t` with the message `msg` - /// @param t the token to associate the error with - /// @param msg the error message - /// @return `Failure::Errored::kError` so that you can combine an AddError() - /// call and return on the same line. - Failure::Errored AddError(const Token& t, std::string_view msg); - /// Appends an error raised when parsing `use` at `t` with the message - /// `msg` - /// @param source the source to associate the error with - /// @param msg the error message - /// @param use a description of what was being parsed when the error was - /// raised. - /// @return `Failure::Errored::kError` so that you can combine an AddError() - /// call and return on the same line. - Failure::Errored AddError(const Source& source, std::string_view msg, std::string_view use); - /// Appends an error at `source` with the message `msg` - /// @param source the source to associate the error with - /// @param msg the error message - /// @return `Failure::Errored::kError` so that you can combine an AddError() - /// call and return on the same line. - Failure::Errored AddError(const Source& source, std::string_view msg); - /// Appends an error at `source` with the message `msg` - /// @param source the source to associate the error with - /// @param msg the error message - /// @return `Failure::Errored::kError` so that you can combine an AddError() - /// call and return on the same line. - Failure::Errored AddError(const Source& source, StyledText&& msg); - /// Appends a note at `source` with the message `msg` - /// @param source the source to associate the error with - /// @param msg the note message - void AddNote(const Source& source, std::string_view msg); - /// Appends a deprecated-language-feature warning at `source` with the message - /// `msg` - /// @param source the source to associate the error with - /// @param msg the warning message - void deprecated(const Source& source, std::string_view msg); - /// Parses the `translation_unit` grammar element - void translation_unit(); - /// Parses the `global_directive` grammar element, erroring on parse failure. - /// @param has_parsed_decl flag indicating if the parser has consumed a global declaration. - /// @return true on parse success, otherwise an error or no-match. - Maybe global_directive(bool has_parsed_decl); - /// Parses the `diagnostic_directive` grammar element, erroring on parse failure. - /// @return true on parse success, otherwise an error or no-match. - Maybe diagnostic_directive(); - /// Parses the `enable_directive` grammar element, erroring on parse failure. - /// @return true on parse success, otherwise an error or no-match. - Maybe enable_directive(); - /// Parses the `requires_directive` grammar element, erroring on parse failure. - /// @return true on parse success, otherwise an error or no-match. - Maybe requires_directive(); - /// Parses the `global_decl` grammar element, erroring on parse failure. - /// @return true on parse success, otherwise an error or no-match. - Maybe global_decl(); - /// Parses a `global_variable_decl` grammar element with the initial - /// `variable_attribute_list*` provided as `attrs` - /// @returns the variable parsed or nullptr - /// @param attrs the list of attributes for the variable declaration. If attributes are consumed - /// by the declaration, then this vector is cleared before returning. - Maybe global_variable_decl(AttributeList& attrs); - /// Parses a `global_constant_decl` grammar element with the initial - /// `variable_attribute_list*` provided as `attrs` - /// @returns the const object or nullptr - /// @param attrs the list of attributes for the constant declaration. If attributes are consumed - /// by the declaration, then this vector is cleared before returning. - Maybe global_constant_decl(AttributeList& attrs); - /// Parses a `variable_decl` grammar element - /// @returns the parsed variable declaration info - Maybe variable_decl(); - /// Helper for parsing ident with an optional type declaration. Should not be called directly, - /// use the specific version below. - /// @param use a description of what was being parsed if an error was raised. - /// @param allow_inferred allow the identifier to be parsed without a type - /// @returns the parsed identifier, and possibly type, or empty otherwise - Expect expect_ident_with_optional_type_specifier(std::string_view use, - bool allow_inferred); - /// Parses a `ident` or a `variable_ident_decl` grammar element, erroring on parse failure. - /// @param use a description of what was being parsed if an error was raised. - /// @returns the identifier or empty otherwise. - Expect expect_optionally_typed_ident(std::string_view use); - /// Parses a `variable_ident_decl` grammar element, erroring on parse failure. - /// @param use a description of what was being parsed if an error was raised. - /// @returns the identifier and type parsed or empty otherwise - Expect expect_ident_with_type_specifier(std::string_view use); - /// Parses a `variable_qualifier` grammar element - /// @returns the variable qualifier information - Maybe variable_qualifier(); - /// Parses a `type_alias_decl` grammar element - /// @returns the type alias or nullptr on error - Maybe type_alias_decl(); - /// Parses a `type_specifier` grammar element - /// @returns the parsed Type or nullptr if none matched. - Maybe type_specifier(); - /// Parses a `struct_decl` grammar element. - /// @returns the struct type or nullptr on error - Maybe struct_decl(); - /// Parses a `struct_body_decl` grammar element, erroring on parse failure. - /// @returns the struct members - Expect expect_struct_body_decl(); - /// Parses a `struct_member` grammar element, erroring on parse failure. - /// @returns the struct member or nullptr - Expect expect_struct_member(); - /// Parses a `function_decl` grammar element with the initial - /// `function_attribute_decl*` provided as `attrs`. - /// @param attrs the list of attributes for the function declaration. If attributes are consumed - /// by the declaration, then this vector is cleared before returning. - /// @returns the parsed function, nullptr otherwise - Maybe function_decl(AttributeList& attrs); - /// Parses a `const_assert_statement` grammar element - /// @returns returns the const assert, if it matched. - Maybe const_assert_statement(); - /// Parses a `function_header` grammar element - /// @returns the parsed function header - Maybe function_header(); - /// Parses a `param_list` grammar element, erroring on parse failure. - /// @returns the parsed variables - Expect expect_param_list(); - /// Parses a `param` grammar element, erroring on parse failure. - /// @returns the parsed variable - Expect expect_param(); - /// Parses a `pipeline_stage` grammar element, erroring if the next token does - /// not match a stage name. - /// @returns the pipeline stage. - Expect expect_pipeline_stage(); - /// Parses a `compound_statement` grammar element, erroring on parse failure. - /// @param use a description of what was being parsed if an error was raised - /// @returns the parsed statements - Expect expect_compound_statement(std::string_view use); - /// Parses a `compound_statement` grammar element, with the attribute list provided as `attrs`. - /// @param attrs the list of attributes for the statement - /// @param use a description of what was being parsed if an error was raised - /// @returns the parsed statements - Expect expect_compound_statement(AttributeList& attrs, - std::string_view use); - /// Parses a `paren_expression` grammar element, erroring on parse failure. - /// @returns the parsed element or nullptr - Expect expect_paren_expression(); - /// Parses a `statements` grammar element - /// @returns the statements parsed - Expect expect_statements(); - /// Parses a `statement` grammar element - /// @returns the parsed statement or nullptr - Maybe statement(); - /// Parses a `break_statement` grammar element - /// @returns the parsed statement or nullptr - Maybe break_statement(); - /// Parses a `return_statement` grammar element - /// @returns the parsed statement or nullptr - Maybe return_statement(); - /// Parses a `continue_statement` grammar element - /// @returns the parsed statement or nullptr - Maybe continue_statement(); - /// Parses a `variable_statement` grammar element - /// @returns the parsed variable or nullptr - Maybe variable_statement(); - /// Parses a `if_statement` grammar element, with the attribute list provided as `attrs`. - /// @param attrs the list of attributes for the statement - /// @returns the parsed statement or nullptr - Maybe if_statement(AttributeList& attrs); - /// Parses a `switch_statement` grammar element - /// @param attrs the list of attributes for the statement - /// @returns the parsed statement or nullptr - Maybe switch_statement(AttributeList& attrs); - /// Parses a `switch_body` grammar element - /// @returns the parsed statement or nullptr - Maybe switch_body(); - /// Parses a `case_selectors` grammar element - /// @returns the list of literals - Expect expect_case_selectors(); - /// Parses a `case_selector` grammar element - /// @returns the selector - Maybe case_selector(); - /// Parses a `func_call_statement` grammar element - /// @returns the parsed function call or nullptr - Maybe func_call_statement(); - /// Parses a `loop_statement` grammar element, with the attribute list provided as `attrs`. - /// @param attrs the list of attributes for the statement - /// @returns the parsed loop or nullptr - Maybe loop_statement(AttributeList& attrs); - /// Parses a `for_header` grammar element, erroring on parse failure. - /// @returns the parsed for header or nullptr - Expect> expect_for_header(); - /// Parses a `for_statement` grammar element, with the attribute list provided as `attrs`. - /// @param attrs the list of attributes for the statement - /// @returns the parsed for loop or nullptr - Maybe for_statement(AttributeList& attrs); - /// Parses a `while_statement` grammar element, with the attribute list provided as `attrs`. - /// @param attrs the list of attributes for the statement - /// @returns the parsed while loop or nullptr - Maybe while_statement(AttributeList& attrs); - /// Parses a `break_if_statement` grammar element - /// @returns the parsed statement or nullptr - Maybe break_if_statement(); - /// Parses a `continuing_compound_statement` grammar element - /// @returns the parsed statements - Maybe continuing_compound_statement(); - /// Parses a `continuing_statement` grammar element - /// @returns the parsed statements - Maybe continuing_statement(); - /// Parses a `const_literal` grammar element - /// @returns the const literal parsed or nullptr if none found - Maybe const_literal(); - /// Parses a `primary_expression` grammar element - /// @returns the parsed expression or nullptr - Maybe primary_expression(); - /// Parses a `argument_expression_list` grammar element, erroring on parse - /// failure. - /// @param use a description of what was being parsed if an error was raised - /// @returns the list of arguments - Expect expect_argument_expression_list(std::string_view use); - /// Parses the recursive portion of the component_or_swizzle_specifier - /// @param prefix the left side of the expression - /// @returns the parsed expression or nullptr - Maybe component_or_swizzle_specifier(const ast::Expression* prefix); - /// Parses a `singular_expression` grammar elment - /// @returns the parsed expression or nullptr - Maybe singular_expression(); - /// Parses a `unary_expression` grammar element - /// @returns the parsed expression or nullptr - Maybe unary_expression(); - /// Parses the `expression` grammar rule - /// @returns the parsed expression or nullptr - Maybe expression(); - /// Parses the `expression` grammar rule - /// @param use the use of the expression - /// @returns the parsed expression or error - Expect expect_expression(std::string_view use); - /// Parses a comma separated expression list - /// @param use the use of the expression list - /// @param terminator the terminating token for the list - /// @returns the parsed expression list or error - Maybe expression_list(std::string_view use, Token::Type terminator); - /// Parses a comma separated expression list, with at least one expression - /// @param use the use of the expression list - /// @param terminator the terminating token for the list - /// @returns the parsed expression list or error - Expect expect_expression_list(std::string_view use, - Token::Type terminator); - /// Parses the `bitwise_expression.post.unary_expression` grammar element - /// @param lhs the left side of the expression - /// @param lhs_source the source span for the left side of the expression - /// @returns the parsed expression or nullptr - Maybe bitwise_expression_post_unary_expression( - const ast::Expression* lhs, - const Source& lhs_source); - /// Parse the `multiplicative_operator` grammar element - /// @returns the parsed operator if successful - Maybe multiplicative_operator(); - /// Parses multiplicative elements - /// @param lhs the left side of the expression - /// @param lhs_source the source span for the left side of the expression - /// @returns the parsed expression or `lhs` if no match - Expect expect_multiplicative_expression_post_unary_expression( - const ast::Expression* lhs, - const Source& lhs_source); - /// Parses additive elements - /// @param lhs the left side of the expression - /// @param lhs_source the source span for the left side of the expression - /// @returns the parsed expression or `lhs` if no match - Expect expect_additive_expression_post_unary_expression( - const ast::Expression* lhs, - const Source& lhs_source); - /// Parses math elements - /// @param lhs the left side of the expression - /// @param lhs_source the source span for the left side of the expression - /// @returns the parsed expression or `lhs` if no match - Expect expect_math_expression_post_unary_expression( - const ast::Expression* lhs, - const Source& lhs_source); - /// Parses a `unary_expression shift.post.unary_expression` - /// @returns the parsed expression or nullptr - Maybe shift_expression(); - /// Parses a `shift_expression.post.unary_expression` grammar element - /// @param lhs the left side of the expression - /// @param lhs_source the source span for the left side of the expression - /// @returns the parsed expression or `lhs` if no match - Expect expect_shift_expression_post_unary_expression( - const ast::Expression* lhs, - const Source& lhs_source); - /// Parses a `unary_expression relational_expression.post.unary_expression` - /// @returns the parsed expression or nullptr - Maybe relational_expression(); - /// Parses a `relational_expression.post.unary_expression` grammar element - /// @param lhs the left side of the expression - /// @param lhs_source the source span for the left side of the expression - /// @returns the parsed expression or `lhs` if no match - Expect expect_relational_expression_post_unary_expression( - const ast::Expression* lhs, - const Source& lhs_source); - /// Parse the `additive_operator` grammar element - /// @returns the parsed operator if successful - Maybe additive_operator(); - /// Parses a `compound_assignment_operator` grammar element - /// @returns the parsed compound assignment operator - Maybe compound_assignment_operator(); - /// Parses a `core_lhs_expression` grammar element - /// @returns the parsed expression or a non-kMatched failure - Maybe core_lhs_expression(); - /// Parses a `lhs_expression` grammar element - /// @returns the parsed expression or a non-kMatched failure - Maybe lhs_expression(); - /// Parses a `variable_updating_statement` grammar element - /// @returns the parsed assignment or nullptr - Maybe variable_updating_statement(); - /// Parses one or more attribute lists. - /// @return the parsed attribute list, or an empty list on error. - Maybe attribute_list(); - /// Parses a single attribute of the following types: - /// * `struct_attribute` - /// * `struct_member_attribute` - /// * `array_attribute` - /// * `variable_attribute` - /// * `global_const_attribute` - /// * `function_attribute` - /// @return the parsed attribute, or nullptr. - Maybe attribute(); - /// Parses a single attribute, reporting an error if the next token does not - /// represent a attribute. - /// @see #attribute for the full list of attributes this method parses. - /// @return the parsed attribute. - Expect expect_attribute(); - /// Parses a severity_control_name grammar element. - /// @return the parsed severity control name. - Expect expect_severity_control_name(); - /// Parses a diagnostic_control grammar element. - /// @return the parsed diagnostic control. - Expect expect_diagnostic_control(); - /// Parses a diagnostic_rule_name grammar element. - /// @return the parsed diagnostic rule name. - Expect expect_diagnostic_rule_name(); - - /// Splits a peekable token into to parts filling in the peekable fields. - /// @param lhs the token to set in the current position - /// @param rhs the token to set in the placeholder - void split_token(Token::Type lhs, Token::Type rhs); - - private: - /// ReturnType resolves to the return type for the function or lambda F. - template - using ReturnType = typename std::invoke_result::type; - - /// ResultType resolves to `T` for a `RESULT` of type Expect. - template - using ResultType = typename RESULT::type; - - /// @returns true and consumes the next token if it equals `tok` - /// @param source if not nullptr, the next token's source is written to this - /// pointer, regardless of success or error - bool match(Token::Type tok, Source* source = nullptr); - /// Errors if the next token is not equal to `tok` - /// Consumes the next token on match. - /// expect() also updates #synchronized_, setting it to `true` if the next - /// token is equal to `tok`, otherwise `false`. - /// @param use a description of what was being parsed if an error was raised. - /// @param tok the token to test against - /// @returns true if the next token equals `tok` - bool expect(std::string_view use, Token::Type tok); - /// Parses a signed integer from the next token in the stream, erroring if the - /// next token is not a signed integer. - /// Consumes the next token on match. - /// @param use a description of what was being parsed if an error was raised - /// @returns the parsed integer. - /// @param source if not nullptr, the next token's source is written to this - /// pointer, regardless of success or error - Expect expect_sint(std::string_view use, Source* source = nullptr); - /// Parses a signed integer from the next token in the stream, erroring if - /// the next token is not a signed integer or is negative. - /// Consumes the next token if it is a signed integer (not necessarily - /// negative). - /// @param use a description of what was being parsed if an error was raised - /// @returns the parsed integer. - Expect expect_positive_sint(std::string_view use); - /// Parses a non-zero signed integer from the next token in the stream, - /// erroring if the next token is not a signed integer or is less than 1. - /// Consumes the next token if it is a signed integer (not necessarily - /// >= 1). - /// @param use a description of what was being parsed if an error was raised - /// @returns the parsed integer. - Expect expect_nonzero_positive_sint(std::string_view use); - /// Errors if the next token is not an identifier. - /// Consumes the next token on match. - /// @param use a description of what was being parsed if an error was raised - /// @param kind a string describing the kind of identifier. - /// Examples: "identifier", "diagnostic name" - /// @returns the parsed identifier. - Expect expect_ident(std::string_view use, - std::string_view kind = "identifier"); - /// Parses a lexical block starting with the token `start` and ending with - /// the token `end`. `body` is called to parse the lexical block body - /// between the `start` and `end` tokens. If the `start` or `end` tokens - /// are not matched then an error is generated and a zero-initialized `T` is - /// returned. If `body` raises an error while parsing then a zero-initialized - /// `T` is returned. - /// @param start the token that begins the lexical block - /// @param end the token that ends the lexical block - /// @param use a description of what was being parsed if an error was raised - /// @param body a function or lambda that is called to parse the lexical block - /// body, with the signature: `Expect()` or `Maybe()`. - /// @return the value returned by `body` if no errors are raised, otherwise - /// an Expect with error state. - template > - T expect_block(Token::Type start, Token::Type end, std::string_view use, F&& body); - /// A convenience function that calls expect_block() passing - /// `Token::Type::kParenLeft` and `Token::Type::kParenRight` for the `start` - /// and `end` arguments, respectively. - /// @param use a description of what was being parsed if an error was raised - /// @param body a function or lambda that is called to parse the lexical block - /// body, with the signature: `Expect()` or `Maybe()`. - /// @return the value returned by `body` if no errors are raised, otherwise - /// an Expect with error state. - template > - T expect_paren_block(std::string_view use, F&& body); - /// A convenience function that calls `expect_block` passing - /// `Token::Type::kBraceLeft` and `Token::Type::kBraceRight` for the `start` - /// and `end` arguments, respectively. - /// @param use a description of what was being parsed if an error was raised - /// @param body a function or lambda that is called to parse the lexical block - /// body, with the signature: `Expect()` or `Maybe()`. - /// @return the value returned by `body` if no errors are raised, otherwise - /// an Expect with error state. - template > - T expect_brace_block(std::string_view use, F&& body); - /// A convenience function that calls `expect_block` passing - /// `Token::Type::kLessThan` and `Token::Type::kGreaterThan` for the `start` - /// and `end` arguments, respectively. - /// @param use a description of what was being parsed if an error was raised - /// @param body a function or lambda that is called to parse the lexical block - /// body, with the signature: `Expect()` or `Maybe()`. - /// @return the value returned by `body` if no errors are raised, otherwise - /// an Expect with error state. - template > - T expect_lt_gt_block(std::string_view use, F&& body); - /// A convenience function that calls `expect_block` passing - /// `Token::Type::kTemplateArgsLeft` and `Token::Type::kTemplateArgsRight` for the `start` and - /// `end` arguments, respectively. - /// @param use a description of what was being parsed if an error was raised - /// @param body a function or lambda that is called to parse the lexical block body, with the - /// signature: `Expect()` or `Maybe()`. - /// @return the value returned by `body` if no errors are raised, otherwise an Expect with error - /// state. - template > - T expect_template_arg_block(std::string_view use, F&& body); - - /// sync() calls the function `func`, and attempts to resynchronize the - /// parser to the next found resynchronization token if `func` fails. If the - /// next found resynchronization token is `tok`, then sync will also consume - /// `tok`. - /// - /// sync() will transiently add `tok` to the parser's stack of - /// synchronization tokens for the duration of the call to `func`. Once @p - /// func returns, - /// `tok` is removed from the stack of resynchronization tokens. sync calls - /// may be nested, and so the number of resynchronization tokens is equal to - /// the number of sync() calls in the current stack frame. - /// - /// sync() updates #synchronized_, setting it to `true` if the next - /// resynchronization token found was `tok`, otherwise `false`. - /// - /// @param tok the token to attempt to synchronize the parser to if `func` - /// fails. - /// @param func a function or lambda with the signature: `Expect()` or - /// `Maybe()`. - /// @return the value returned by `func` - template > - T sync(Token::Type tok, F&& func); - /// sync_to() attempts to resynchronize the parser to the next found - /// resynchronization token or `tok` (whichever comes first). - /// - /// Synchronization tokens are transiently defined by calls to sync(). - /// - /// sync_to() updates #synchronized_, setting it to `true` if a - /// resynchronization token was found and it was `tok`, otherwise `false`. - /// - /// @param tok the token to attempt to synchronize the parser to. - /// @param consume if true and the next found resynchronization token is - /// `tok` then sync_to() will also consume `tok`. - /// @return the state of #synchronized_. - /// @see sync(). - bool sync_to(Token::Type tok, bool consume); - /// @return true if `t` is in the stack of resynchronization tokens. - /// @see sync(). - bool is_sync_token(const Token& t) const; - - /// If `t` is an error token, then `synchronized_` is set to false and the - /// token's error is appended to the builder's diagnostics. If `t` is not an - /// error token, then this function does nothing and false is returned. - /// @returns true if `t` is an error, otherwise false. - bool handle_error(const Token& t); - - /// @returns true if #synchronized_ is true and the number of reported errors - /// is less than #max_errors_. - bool continue_parsing() { - return synchronized_ && builder_.Diagnostics().NumErrors() < max_errors_; - } - - /// without_diag() calls the function `func` muting any diagnostics found while executing the - /// function. This can be used to silence spew when attempting to resynchronize the parser. - /// @param func a function or lambda with the signature: `Expect()` or - /// `Maybe()`. - /// @return the value returned by `func` - template > - T without_diag(F&& func); - - /// Reports an error if the attribute list `list` is not empty. - /// Used to ensure that all attributes are consumed. - Expect expect_attributes_consumed(VectorRef list); - - /// Raises an error if the next token is the start of a template list. - /// Used to hint to the user that the parser interpreted the following as a templated identifier - /// expression: - /// - /// ``` - /// a < b, c > - /// ^~~~~~~~ - /// ``` - Expect expect_next_not_template_list(const Source& lhs_source); - - /// Raises an error if the parsed expression is a templated identifier expression - /// Used to hint to the user that the parser intepreted the following as a templated identifier - /// expression: - /// - /// ``` - /// a < b, c > d - /// ^^^^^^^^^^ - /// expr - /// ``` - Expect expect_not_templated_ident_expr(const ast::Expression* expr); - - /// Parses the given enum, providing sensible error messages if the next token does not match - /// any of the enum values. - /// @param name the name of the enumerator - /// @param parse the optimized function used to parse the enum - /// @param strings the list of possible strings in the enum - /// @param use an optional description of what was being parsed if an error was raised. - template - Expect expect_enum(std::string_view name, - ENUM (*parse)(std::string_view str), - Slice strings, - std::string_view use = ""); - - Expect expect_type(std::string_view use); - - Maybe non_block_statement(); - Maybe for_header_initializer(); - Maybe for_header_continuing(); - - class MultiTokenSource; - - /// Creates a new `ast::Node` owned by the Module. When the Module is - /// destructed, the `ast::Node` will also be destructed. - /// @param args the arguments to pass to the constructor - /// @returns the node pointer - template - T* create(ARGS&&... args) { - return builder_.create(std::forward(args)...); - } - - Source::File const* const file_; - std::vector tokens_; - size_t next_token_idx_ = 0; - size_t last_source_idx_ = 0; - bool synchronized_ = true; - uint32_t parse_depth_ = 0; - std::vector sync_tokens_; - int silence_diags_ = 0; - ProgramBuilder builder_; - size_t max_errors_ = 25; -}; - -} // namespace tint::wgsl::reader - -#endif // SRC_TINT_LANG_WGSL_READER_PARSER_PARSER_H_ diff --git a/3rdparty/dawn/src/tint/lang/wgsl/reader/parser/token.cc b/3rdparty/dawn/src/tint/lang/wgsl/reader/parser/token.cc deleted file mode 100644 index 9aef695c0..000000000 --- a/3rdparty/dawn/src/tint/lang/wgsl/reader/parser/token.cc +++ /dev/null @@ -1,290 +0,0 @@ -// Copyright 2020 The Dawn & Tint Authors -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// 3. Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "src/tint/lang/wgsl/reader/parser/token.h" - -namespace tint::wgsl::reader { - -// static -std::string_view Token::TypeToName(Type type) { - switch (type) { - case Token::Type::kError: - return "error"; - case Token::Type::kEOF: - return "end of file"; - case Token::Type::kIdentifier: - return "identifier"; - case Token::Type::kFloatLiteral: - return "abstract float literal"; - case Token::Type::kFloatLiteral_F: - return "'f'-suffixed float literal"; - case Token::Type::kFloatLiteral_H: - return "'h'-suffixed float literal"; - case Token::Type::kIntLiteral: - return "abstract integer literal"; - case Token::Type::kIntLiteral_I: - return "'i'-suffixed integer literal"; - case Token::Type::kIntLiteral_U: - return "'u'-suffixed integer literal"; - case Token::Type::kPlaceholder: - return "placeholder"; - case Token::Type::kUninitialized: - return "uninitialized"; - - case Token::Type::kAnd: - return "&"; - case Token::Type::kAndAnd: - return "&&"; - case Token::Type::kArrow: - return "->"; - case Token::Type::kAttr: - return "@"; - case Token::Type::kForwardSlash: - return "/"; - case Token::Type::kBang: - return "!"; - case Token::Type::kBracketLeft: - return "["; - case Token::Type::kBracketRight: - return "]"; - case Token::Type::kBraceLeft: - return "{"; - case Token::Type::kBraceRight: - return "}"; - case Token::Type::kColon: - return ":"; - case Token::Type::kComma: - return ","; - case Token::Type::kEqual: - return "="; - case Token::Type::kEqualEqual: - return "=="; - case Token::Type::kTemplateArgsRight: - case Token::Type::kGreaterThan: - return ">"; - case Token::Type::kGreaterThanEqual: - return ">="; - case Token::Type::kShiftRight: - return ">>"; - case Token::Type::kTemplateArgsLeft: - case Token::Type::kLessThan: - return "<"; - case Token::Type::kLessThanEqual: - return "<="; - case Token::Type::kShiftLeft: - return "<<"; - case Token::Type::kMod: - return "%"; - case Token::Type::kNotEqual: - return "!="; - case Token::Type::kMinus: - return "-"; - case Token::Type::kMinusMinus: - return "--"; - case Token::Type::kPeriod: - return "."; - case Token::Type::kPlus: - return "+"; - case Token::Type::kPlusPlus: - return "++"; - case Token::Type::kOr: - return "|"; - case Token::Type::kOrOr: - return "||"; - case Token::Type::kParenLeft: - return "("; - case Token::Type::kParenRight: - return ")"; - case Token::Type::kSemicolon: - return ";"; - case Token::Type::kStar: - return "*"; - case Token::Type::kTilde: - return "~"; - case Token::Type::kUnderscore: - return "_"; - case Token::Type::kXor: - return "^"; - case Token::Type::kPlusEqual: - return "+="; - case Token::Type::kMinusEqual: - return "-="; - case Token::Type::kTimesEqual: - return "*="; - case Token::Type::kDivisionEqual: - return "/="; - case Token::Type::kModuloEqual: - return "%="; - case Token::Type::kAndEqual: - return "&="; - case Token::Type::kOrEqual: - return "|="; - case Token::Type::kXorEqual: - return "^="; - case Token::Type::kShiftLeftEqual: - return "<<="; - case Token::Type::kShiftRightEqual: - return ">>="; - - case Token::Type::kAlias: - return "alias"; - case Token::Type::kBreak: - return "break"; - case Token::Type::kCase: - return "case"; - case Token::Type::kConst: - return "const"; - case Token::Type::kConstAssert: - return "const_assert"; - case Token::Type::kContinue: - return "continue"; - case Token::Type::kContinuing: - return "continuing"; - case Token::Type::kDiagnostic: - return "diagnostic"; - case Token::Type::kDiscard: - return "discard"; - case Token::Type::kDefault: - return "default"; - case Token::Type::kElse: - return "else"; - case Token::Type::kEnable: - return "enable"; - case Token::Type::kFallthrough: - return "fallthrough"; - case Token::Type::kFalse: - return "false"; - case Token::Type::kFn: - return "fn"; - case Token::Type::kFor: - return "for"; - case Token::Type::kIf: - return "if"; - case Token::Type::kLet: - return "let"; - case Token::Type::kLoop: - return "loop"; - case Token::Type::kOverride: - return "override"; - case Token::Type::kReturn: - return "return"; - case Token::Type::kRequires: - return "requires"; - case Token::Type::kStruct: - return "struct"; - case Token::Type::kSwitch: - return "switch"; - case Token::Type::kTrue: - return "true"; - case Token::Type::kVar: - return "var"; - case Token::Type::kWhile: - return "while"; - } - - return ""; -} - -Token::Token() : type_(Type::kUninitialized) {} - -Token::Token(Type type, const Source& source, std::string_view view) - : type_(type), source_(source), value_(view) {} - -Token::Token(Type type, const Source& source, const std::string& str) - : type_(type), source_(source), value_(str) {} - -Token::Token(Type type, const Source& source, const char* str) - : type_(type), source_(source), value_(std::string_view(str)) {} - -Token::Token(Type type, const Source& source, int64_t val) - : type_(type), source_(source), value_(val) {} - -Token::Token(Type type, const Source& source, double val) - : type_(type), source_(source), value_(val) {} - -Token::Token(Type type, const Source& source) : type_(type), source_(source) {} - -Token::Token(Token&&) = default; - -Token::~Token() = default; - -bool Token::operator==(std::string_view ident) const { - if (type_ != Type::kIdentifier) { - return false; - } - if (auto* view = std::get_if(&value_)) { - return *view == ident; - } - return std::get(value_) == ident; -} - -std::string Token::to_str() const { - switch (type_) { - case Type::kFloatLiteral: - return std::to_string(std::get(value_)); - case Type::kFloatLiteral_F: - return std::to_string(std::get(value_)) + "f"; - case Type::kFloatLiteral_H: - return std::to_string(std::get(value_)) + "h"; - case Type::kIntLiteral: - return std::to_string(std::get(value_)); - case Type::kIntLiteral_I: - return std::to_string(std::get(value_)) + "i"; - case Type::kIntLiteral_U: - return std::to_string(std::get(value_)) + "u"; - case Type::kIdentifier: - case Type::kError: - if (auto* view = std::get_if(&value_)) { - return std::string(*view); - } - return std::get(value_); - default: - return ""; - } -} - -std::string_view Token::to_str_view() const { - if (type_ != Type::kIdentifier) { - return {}; - } - - if (auto* view = std::get_if(&value_)) { - return *view; - } - auto& s = std::get(value_); - return {s.data(), s.length()}; -} - -double Token::to_f64() const { - return std::get(value_); -} - -int64_t Token::to_i64() const { - return std::get(value_); -} - -} // namespace tint::wgsl::reader diff --git a/3rdparty/dawn/src/tint/lang/wgsl/reader/parser/token.h b/3rdparty/dawn/src/tint/lang/wgsl/reader/parser/token.h deleted file mode 100644 index e6b1d21c6..000000000 --- a/3rdparty/dawn/src/tint/lang/wgsl/reader/parser/token.h +++ /dev/null @@ -1,382 +0,0 @@ -// Copyright 2020 The Dawn & Tint Authors -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// 3. Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef SRC_TINT_LANG_WGSL_READER_PARSER_TOKEN_H_ -#define SRC_TINT_LANG_WGSL_READER_PARSER_TOKEN_H_ - -#include -#include -#include - -#include "src/tint/utils/diagnostic/source.h" - -namespace tint::wgsl::reader { - -/// Stores tokens generated by the Lexer -class Token { - public: - /// The type of the parsed token - enum class Type { - /// Error result - kError = -2, - /// Uninitialized token - kUninitialized = 0, - /// Placeholder token which maybe filled in later - kPlaceholder = 1, - /// End of input string reached - kEOF, - - /// An identifier - kIdentifier, - /// A float literal with no suffix - kFloatLiteral, - /// A float literal with an 'f' suffix - kFloatLiteral_F, - /// A float literal with an 'h' suffix - kFloatLiteral_H, - /// An integer literal with no suffix - kIntLiteral, - /// An integer literal with an 'i' suffix - kIntLiteral_I, - /// An integer literal with a 'u' suffix - kIntLiteral_U, - - /// A '&' - kAnd, - /// A '&&' - kAndAnd, - /// A '->' - kArrow, - /// A '@' - kAttr, - /// A '/' - kForwardSlash, - /// A '!' - kBang, - /// A '[' - kBracketLeft, - /// A ']' - kBracketRight, - /// A '{' - kBraceLeft, - /// A '}' - kBraceRight, - /// A ':' - kColon, - /// A ',' - kComma, - /// A '=' - kEqual, - /// A '==' - kEqualEqual, - /// A '>' (post template-args classification) - kTemplateArgsRight, - /// A '>' - kGreaterThan, - /// A '>=' - kGreaterThanEqual, - /// A '>>' - kShiftRight, - /// A '<' (post template-args classification) - kTemplateArgsLeft, - /// A '<' - kLessThan, - /// A '<=' - kLessThanEqual, - /// A '<<' - kShiftLeft, - /// A '%' - kMod, - /// A '-' - kMinus, - /// A '--' - kMinusMinus, - /// A '!=' - kNotEqual, - /// A '.' - kPeriod, - /// A '+' - kPlus, - /// A '++' - kPlusPlus, - /// A '|' - kOr, - /// A '||' - kOrOr, - /// A '(' - kParenLeft, - /// A ')' - kParenRight, - /// A ';' - kSemicolon, - /// A '*' - kStar, - /// A '~' - kTilde, - /// A '_' - kUnderscore, - /// A '^' - kXor, - /// A '+=' - kPlusEqual, - /// A '-=' - kMinusEqual, - /// A '*=' - kTimesEqual, - /// A '/=' - kDivisionEqual, - /// A '%=' - kModuloEqual, - /// A '&=' - kAndEqual, - /// A '|=' - kOrEqual, - /// A '^=' - kXorEqual, - /// A '>>=' - kShiftRightEqual, - /// A '<<=' - kShiftLeftEqual, - - /// A 'alias' - kAlias, - /// A 'break' - kBreak, - /// A 'case' - kCase, - /// A 'const' - kConst, - /// A 'const_assert' - kConstAssert, - /// A 'continue' - kContinue, - /// A 'continuing' - kContinuing, - /// A 'default' - kDefault, - /// A 'diagnostic' - kDiagnostic, - /// A 'discard' - kDiscard, - /// A 'else' - kElse, - /// A 'enable' - kEnable, - /// A 'fallthrough' - // Note, this isn't a keyword, but a reserved word. We match it as a keyword in order to - // provide better diagnostics in case a `fallthrough` is added to a case body. - kFallthrough, - /// A 'false' - kFalse, - /// A 'fn' - kFn, - // A 'for' - kFor, - /// A 'if' - kIf, - /// A 'let' - kLet, - /// A 'loop' - kLoop, - /// A 'override' - kOverride, - /// A 'requires' - kRequires, - /// A 'return' - kReturn, - /// A 'struct' - kStruct, - /// A 'switch' - kSwitch, - /// A 'true' - kTrue, - /// A 'var' - kVar, - /// A 'while' - kWhile, - }; - - /// Converts a token type to a name - /// @param type the type to convert - /// @returns the token type as as string - static std::string_view TypeToName(Type type); - - /// Creates an uninitialized token - Token(); - /// Create a Token - /// @param type the Token::Type of the token - /// @param source the source of the token - Token(Type type, const Source& source); - - /// Create a string Token - /// @param type the Token::Type of the token - /// @param source the source of the token - /// @param view the source string view for the token - Token(Type type, const Source& source, std::string_view view); - /// Create a string Token - /// @param type the Token::Type of the token - /// @param source the source of the token - /// @param str the source string for the token - Token(Type type, const Source& source, const std::string& str); - /// Create a string Token - /// @param type the Token::Type of the token - /// @param source the source of the token - /// @param str the source string for the token - Token(Type type, const Source& source, const char* str); - /// Create a integer Token of the given type - /// @param type the Token::Type of the token - /// @param source the source of the token - /// @param val the source unsigned for the token - Token(Type type, const Source& source, int64_t val); - /// Create a double Token - /// @param type the Token::Type of the token - /// @param source the source of the token - /// @param val the source double for the token - Token(Type type, const Source& source, double val); - /// Move constructor - Token(Token&&); - ~Token(); - - /// Equality operator with an identifier - /// @param ident the identifier string - /// @return true if this token is an identifier and is equal to ident. - bool operator==(std::string_view ident) const; - - /// Sets the token to the given type - /// @param type the type to set - void SetType(Token::Type type) { type_ = type; } - - /// Returns true if the token is of the given type - /// @param t the type to check against. - /// @returns true if the token is of type `t` - bool Is(Type t) const { return type_ == t; } - - /// @returns true if the token is uninitialized - bool IsUninitialized() const { return type_ == Type::kUninitialized; } - /// @returns true if the token is a placeholder - bool IsPlaceholder() const { return type_ == Type::kPlaceholder; } - /// @returns true if the token is EOF - bool IsEof() const { return type_ == Type::kEOF; } - /// @returns true if the token is Error - bool IsError() const { return type_ == Type::kError; } - /// @returns true if the token is an identifier - bool IsIdentifier() const { return type_ == Type::kIdentifier; } - /// @returns true if the token is a literal - bool IsLiteral() const { - return type_ == Type::kIntLiteral || type_ == Type::kIntLiteral_I || - type_ == Type::kIntLiteral_U || type_ == Type::kFalse || type_ == Type::kTrue || - type_ == Type::kFloatLiteral || type_ == Type::kFloatLiteral_F || - type_ == Type::kFloatLiteral_H; - } - - /// @returns the number of placeholder tokens required to follow the token, in order to provide - /// space for token splitting. - size_t NumPlaceholders() const { - switch (type_) { - case Type::kShiftRightEqual: - return 2; - case Type::kShiftRight: - case Type::kGreaterThanEqual: - case Type::kAndAnd: - case Type::kMinusMinus: - return 1; - default: - return 0; - } - } - - /// @returns true if the token is a binary operator - bool IsBinaryOperator() const { - switch (type_) { - case Type::kAnd: - case Type::kAndAnd: - case Type::kEqualEqual: - case Type::kForwardSlash: - case Type::kGreaterThan: - case Type::kGreaterThanEqual: - case Type::kLessThan: - case Type::kLessThanEqual: - case Type::kMinus: - case Type::kMod: - case Type::kNotEqual: - case Type::kOr: - case Type::kOrOr: - case Type::kPlus: - case Type::kShiftLeft: - case Type::kShiftRight: - case Type::kStar: - case Type::kXor: - return true; - default: - return false; - } - } - - /// @returns the source information for this token - Source source() const { return source_; } - - /// @returns the type of the token - Type type() const { return type_; } - - /// Returns the string value of the token - /// @return std::string - std::string to_str() const; - /// Returns the string view of the token - /// @return std::string_view - /// @note if the token is not an identifier, an empty string_view will be returned. - std::string_view to_str_view() const; - /// Returns the float value of the token. 0 is returned if the token does not - /// contain a float value. - /// @return double - double to_f64() const; - /// Returns the int64_t value of the token. 0 is returned if the token does - /// not contain an integer value. - /// @return int64_t - int64_t to_i64() const; - - /// @returns the token type as string - std::string_view to_name() const { return Token::TypeToName(type_); } - - private: - /// The Token::Type of the token - Type type_ = Type::kError; - /// The source where the token appeared - Source source_; - /// The value represented by the token - std::variant value_; -}; - -template - requires(traits::IsOStream) -auto& operator<<(STREAM& out, Token::Type type) { - out << Token::TypeToName(type); - return out; -} - -} // namespace tint::wgsl::reader - -#endif // SRC_TINT_LANG_WGSL_READER_PARSER_TOKEN_H_ diff --git a/3rdparty/dawn/src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.cc b/3rdparty/dawn/src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.cc deleted file mode 100644 index 0c1ad6a82..000000000 --- a/3rdparty/dawn/src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.cc +++ /dev/null @@ -1,1408 +0,0 @@ -// Copyright 2023 The Dawn & Tint Authors -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// 3. Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.h" - -#include -#include - -#include "src/tint/lang/core/fluent_types.h" -#include "src/tint/lang/core/ir/builder.h" -#include "src/tint/lang/core/ir/constant.h" -#include "src/tint/lang/core/ir/exit_if.h" -#include "src/tint/lang/core/ir/exit_loop.h" -#include "src/tint/lang/core/ir/exit_switch.h" -#include "src/tint/lang/core/ir/function.h" -#include "src/tint/lang/core/ir/if.h" -#include "src/tint/lang/core/ir/loop.h" -#include "src/tint/lang/core/ir/module.h" -#include "src/tint/lang/core/ir/switch.h" -#include "src/tint/lang/core/ir/type/array_count.h" -#include "src/tint/lang/core/ir/value.h" -#include "src/tint/lang/core/type/pointer.h" -#include "src/tint/lang/core/type/reference.h" -#include "src/tint/lang/core/type/struct.h" -#include "src/tint/lang/wgsl/ast/accessor_expression.h" -#include "src/tint/lang/wgsl/ast/alias.h" -#include "src/tint/lang/wgsl/ast/assignment_statement.h" -#include "src/tint/lang/wgsl/ast/binary_expression.h" -#include "src/tint/lang/wgsl/ast/block_statement.h" -#include "src/tint/lang/wgsl/ast/break_if_statement.h" -#include "src/tint/lang/wgsl/ast/break_statement.h" -#include "src/tint/lang/wgsl/ast/call_expression.h" -#include "src/tint/lang/wgsl/ast/call_statement.h" -#include "src/tint/lang/wgsl/ast/compound_assignment_statement.h" -#include "src/tint/lang/wgsl/ast/const.h" -#include "src/tint/lang/wgsl/ast/const_assert.h" -#include "src/tint/lang/wgsl/ast/continue_statement.h" -#include "src/tint/lang/wgsl/ast/diagnostic_directive.h" -#include "src/tint/lang/wgsl/ast/discard_statement.h" -#include "src/tint/lang/wgsl/ast/enable.h" -#include "src/tint/lang/wgsl/ast/for_loop_statement.h" -#include "src/tint/lang/wgsl/ast/function.h" -#include "src/tint/lang/wgsl/ast/identifier.h" -#include "src/tint/lang/wgsl/ast/identifier_expression.h" -#include "src/tint/lang/wgsl/ast/if_statement.h" -#include "src/tint/lang/wgsl/ast/increment_decrement_statement.h" -#include "src/tint/lang/wgsl/ast/index_accessor_expression.h" -#include "src/tint/lang/wgsl/ast/interpolate_attribute.h" -#include "src/tint/lang/wgsl/ast/invariant_attribute.h" -#include "src/tint/lang/wgsl/ast/let.h" -#include "src/tint/lang/wgsl/ast/literal_expression.h" -#include "src/tint/lang/wgsl/ast/loop_statement.h" -#include "src/tint/lang/wgsl/ast/member_accessor_expression.h" -#include "src/tint/lang/wgsl/ast/override.h" -#include "src/tint/lang/wgsl/ast/phony_expression.h" -#include "src/tint/lang/wgsl/ast/requires.h" -#include "src/tint/lang/wgsl/ast/return_statement.h" -#include "src/tint/lang/wgsl/ast/statement.h" -#include "src/tint/lang/wgsl/ast/struct.h" -#include "src/tint/lang/wgsl/ast/subgroup_size_attribute.h" -#include "src/tint/lang/wgsl/ast/switch_statement.h" -#include "src/tint/lang/wgsl/ast/templated_identifier.h" -#include "src/tint/lang/wgsl/ast/unary_op_expression.h" -#include "src/tint/lang/wgsl/ast/var.h" -#include "src/tint/lang/wgsl/ast/variable_decl_statement.h" -#include "src/tint/lang/wgsl/ast/while_statement.h" -#include "src/tint/lang/wgsl/ast/workgroup_attribute.h" -#include "src/tint/lang/wgsl/ir/builtin_call.h" -#include "src/tint/lang/wgsl/program/program.h" -#include "src/tint/lang/wgsl/sem/array_count.h" -#include "src/tint/lang/wgsl/sem/builtin_enum_expression.h" -#include "src/tint/lang/wgsl/sem/builtin_fn.h" -#include "src/tint/lang/wgsl/sem/call.h" -#include "src/tint/lang/wgsl/sem/function.h" -#include "src/tint/lang/wgsl/sem/index_accessor_expression.h" -#include "src/tint/lang/wgsl/sem/load.h" -#include "src/tint/lang/wgsl/sem/member_accessor_expression.h" -#include "src/tint/lang/wgsl/sem/module.h" -#include "src/tint/lang/wgsl/sem/switch_statement.h" -#include "src/tint/lang/wgsl/sem/type_expression.h" -#include "src/tint/lang/wgsl/sem/value_constructor.h" -#include "src/tint/lang/wgsl/sem/value_conversion.h" -#include "src/tint/lang/wgsl/sem/value_expression.h" -#include "src/tint/lang/wgsl/sem/variable.h" -#include "src/tint/utils/containers/reverse.h" -#include "src/tint/utils/containers/scope_stack.h" -#include "src/tint/utils/macros/defer.h" -#include "src/tint/utils/macros/scoped_assignment.h" -#include "src/tint/utils/rtti/switch.h" - -using namespace tint::core::number_suffixes; // NOLINT -using namespace tint::core::fluent_types; // NOLINT - -namespace tint::wgsl::reader { -namespace { - -using ResultType = diag::Result; - -/// Impl is the private-implementation of FromProgram(). -class Impl { - public: - /// Constructor - /// @param program the program to convert to IR - explicit Impl(const Program& program) : program_(program) {} - - /// Builds an IR module from the program passed to the constructor. - /// @return the IR module or an error. - ResultType Build() { return EmitModule(); } - - private: - enum class ControlFlags { kNone, kExcludeSwitch }; - - // The input Program - const Program& program_; - - /// The IR module being built - core::ir::Module mod; - - /// The IR builder being used by the impl. - core::ir::Builder builder_{mod}; - - // The clone context used to clone data from #program_ - core::constant::CloneContext clone_ctx_{ - /* type_ctx */ core::type::CloneContext{ - /* src */ {&program_.Symbols()}, - /* dst */ {&builder_.ir.symbols, &builder_.ir.Types()}, - }, - /* dst */ {builder_.ir.constant_values}, - }; - - /// The stack of flow control instructions. - Vector control_stack_; - - struct VectorRefElementAccess { - core::ir::Value* vector = nullptr; - core::ir::Value* index = nullptr; - }; - - using ValueOrVecElAccess = std::variant; - - /// The current block for expressions. - core::ir::Block* current_block_ = nullptr; - - /// The current function being processed. - core::ir::Function* current_function_ = nullptr; - - /// The current stack of scopes being processed. - ScopeStack scopes_; - - /// The diagnostic that have been raised. - diag::List diagnostics_; - - class StackScope { - public: - explicit StackScope(Impl* impl) : impl_(impl) { impl->scopes_.Push(); } - - ~StackScope() { impl_->scopes_.Pop(); } - - protected: - Impl* impl_; - }; - - class ControlStackScope : public StackScope { - public: - ControlStackScope(Impl* impl, core::ir::ControlInstruction* b) : StackScope(impl) { - impl_->control_stack_.Push(b); - } - - ~ControlStackScope() { impl_->control_stack_.Pop(); } - }; - - diag::Diagnostic& AddError(const Source& source) { return diagnostics_.AddError(source); } - - bool NeedTerminator() { - return (current_block_ != nullptr) && (current_block_->Terminator() == nullptr); - } - - void SetTerminator(core::ir::Terminator* terminator) { - TINT_ASSERT(current_block_); - TINT_ASSERT(!current_block_->Terminator()); - - current_block_->Append(terminator); - current_block_ = nullptr; - } - - core::ir::Instruction* FindEnclosingControl(ControlFlags flags) { - for (auto it = control_stack_.rbegin(); it != control_stack_.rend(); ++it) { - if ((*it)->Is()) { - return *it; - } - if (flags == ControlFlags::kExcludeSwitch) { - continue; - } - if ((*it)->Is()) { - return *it; - } - } - return nullptr; - } - - ResultType EmitModule() { - auto* sem = program_.Sem().Module(); - - for (auto* decl : sem->DependencyOrderedDeclarations()) { - tint::Switch( - decl, // - [&](const ast::Struct*) { - // Will be encoded into the `type::Struct` when used. We will then hoist all - // used structs up to module scope when converting IR. - }, - [&](const ast::Alias*) { - // Folded away and doesn't appear in the IR. - }, - [&](const ast::Variable* var) { - // Setup the current block to be the root block for the module. The builder - // will handle creating it if it doesn't exist already. - TINT_SCOPED_ASSIGNMENT(current_block_, mod.root_block); - EmitVariable(var); - }, - [&](const ast::Function* func) { EmitFunction(func); }, - [&](const ast::Enable*) { - // TODO(dsinclair): Implement? I think these need to be passed along so further - // stages know what is enabled. - }, - [&](const ast::ConstAssert*) { - // Evaluated by the resolver, drop from the IR. - }, - [&](const ast::DiagnosticDirective*) { - // Ignored for now. - }, // - [&](const ast::Requires*) { - // Ignored for now. - }, // - TINT_ICE_ON_NO_MATCH); - } - - if (diagnostics_.ContainsErrors()) { - return diag::Failure{std::move(diagnostics_)}; - } - - return std::move(mod); - } - - void EmitFunction(const ast::Function* ast_func) { - // The flow stack should have been emptied when the previous function finished building. - TINT_ASSERT(control_stack_.IsEmpty()); - - const auto* sem = program_.Sem().Get(ast_func); - - auto* ir_func = builder_.Function(ast_func->name->symbol.NameView(), - sem->ReturnType()->Clone(clone_ctx_.type_ctx)); - current_function_ = ir_func; - scopes_.Set(ast_func->name->symbol, ir_func); - - if (ast_func->IsEntryPoint()) { - switch (ast_func->PipelineStage()) { - case ast::PipelineStage::kVertex: - ir_func->SetStage(core::ir::Function::PipelineStage::kVertex); - break; - case ast::PipelineStage::kFragment: - ir_func->SetStage(core::ir::Function::PipelineStage::kFragment); - break; - case ast::PipelineStage::kCompute: { - ir_func->SetStage(core::ir::Function::PipelineStage::kCompute); - - auto attr = ast::GetAttribute(ast_func->attributes); - TINT_ASSERT(attr) << "Missing workgroup attribute for compute entry point."; - - TINT_SCOPED_ASSIGNMENT(current_block_, mod.root_block); - - // The x size is always required (y, z are optional). - auto value_x = EmitValueExpression(attr->x); - bool is_unsigned = value_x->Type()->IsUnsignedIntegerScalar(); - - auto* one_const = is_unsigned ? builder_.Constant(1_u) : builder_.Constant(1_i); - - ir_func->SetWorkgroupSize(value_x, - attr->y ? EmitValueExpression(attr->y) : one_const, - attr->z ? EmitValueExpression(attr->z) : one_const); - - const auto subgroup_attr = - ast::GetAttribute(ast_func->attributes); - if (subgroup_attr) { - auto* subgroup_size = EmitValueExpression(subgroup_attr->subgroup_size); - ir_func->SetSubgroupSize(subgroup_size); - } - - break; - } - default: { - TINT_ICE() << "Invalid pipeline stage"; - } - } - - for (auto* attr : ast_func->return_type_attributes) { - tint::Switch( - attr, // - [&](const ast::InterpolateAttribute* interp) { - ir_func->SetReturnInterpolation(interp->interpolation); - }, - [&](const ast::InvariantAttribute*) { ir_func->SetReturnInvariant(true); }, - [&](const ast::BuiltinAttribute* b) { - ir_func->SetReturnBuiltin(b->builtin); - ir_func->SetReturnDepthMode(b->depth_mode); - }); - } - ir_func->SetReturnLocation(sem->ReturnLocation()); - } - - scopes_.Push(); - TINT_DEFER(scopes_.Pop()); - - Vector params; - for (auto* p : ast_func->params) { - const auto* param_sem = program_.Sem().Get(p)->As(); - auto* ty = RemapOverrideSizedArrayIfNeeded(param_sem->Type()); - auto* param = builder_.FunctionParam(p->name->symbol.NameView(), ty); - - for (auto* attr : p->attributes) { - tint::Switch( - attr, // - [&](const ast::InterpolateAttribute* interp) { - param->SetInterpolation(interp->interpolation); - }, - [&](const ast::InvariantAttribute*) { param->SetInvariant(true); }, - [&](const ast::BuiltinAttribute* b) { param->SetBuiltin(b->builtin); }); - - param->SetLocation(param_sem->Attributes().location); - param->SetColor(param_sem->Attributes().color); - } - - scopes_.Set(p->name->symbol, param); - params.Push(param); - } - ir_func->SetParams(params); - - TINT_SCOPED_ASSIGNMENT(current_block_, ir_func->Block()); - EmitBlock(ast_func->body); - - // Add a terminator if one was not already created. - if (NeedTerminator()) { - if (!program_.Sem().Get(ast_func->body)->Behaviors().Contains(sem::Behavior::kNext)) { - SetTerminator(builder_.Unreachable()); - } else { - SetTerminator(builder_.Return(current_function_)); - } - } - - TINT_ASSERT(control_stack_.IsEmpty()); - current_block_ = nullptr; - current_function_ = nullptr; - } - - void EmitStatements(VectorRef stmts) { - for (auto* s : stmts) { - EmitStatement(s); - - if (auto* sem = program_.Sem().Get(s); - sem && !sem->Behaviors().Contains(sem::Behavior::kNext)) { - break; // Unreachable statement. - } - } - } - - void EmitStatement(const ast::Statement* stmt) { - tint::Switch( - stmt, // - [&](const ast::AssignmentStatement* a) { EmitAssignment(a); }, - [&](const ast::BlockStatement* b) { EmitBlock(b); }, - [&](const ast::BreakStatement* b) { EmitBreak(b); }, - [&](const ast::BreakIfStatement* b) { EmitBreakIf(b); }, - [&](const ast::CallStatement* c) { EmitCall(c); }, - [&](const ast::CompoundAssignmentStatement* c) { EmitCompoundAssignment(c); }, - [&](const ast::ContinueStatement* c) { EmitContinue(c); }, - [&](const ast::DiscardStatement* d) { EmitDiscard(d); }, - [&](const ast::IfStatement* i) { EmitIf(i); }, - [&](const ast::LoopStatement* l) { EmitLoop(l); }, - [&](const ast::ForLoopStatement* l) { EmitForLoop(l); }, - [&](const ast::WhileStatement* l) { EmitWhile(l); }, - [&](const ast::ReturnStatement* r) { EmitReturn(r); }, - [&](const ast::SwitchStatement* s) { EmitSwitch(s); }, - [&](const ast::VariableDeclStatement* v) { EmitVariable(v->variable); }, - [&](const ast::IncrementDecrementStatement* i) { EmitIncrementDecrement(i); }, - [&](const ast::ConstAssert*) { - // Not emitted - }, // - TINT_ICE_ON_NO_MATCH); - } - - void EmitAssignment(const ast::AssignmentStatement* stmt) { - // If assigning to a phony, and the expression evaluation stage is runtime or override, just - // generate the RHS and we're done. Note that, because this isn't used, a subsequent - // transform could remove it due to it being dead code. This could then change the interface - // for the program (i.e. a global var no longer used). If that happens we have to either fix - // this to store to a phony value, or make sure we pull the interface before doing the dead - // code elimination. - if (stmt->lhs->Is()) { - const auto* sem = program_.Sem().GetVal(stmt->rhs); - switch (sem->Stage()) { - case core::EvaluationStage::kRuntime: - case core::EvaluationStage::kOverride: { - auto* value = EmitValueExpression(stmt->rhs); - auto* result = value->As(); - // Overrides need to be referenced if they are to be retained in single entry - // point in the case of phony assignment. - if (!result || result->Instruction()->Block() == mod.root_block) { - current_block_->Append(builder_.Let(value)); - } - } break; - case core::EvaluationStage::kNotEvaluated: - case core::EvaluationStage::kConstant: - // Don't emit. - break; - } - return; - } - - auto lhs = EmitExpression(stmt->lhs); - - auto rhs = EmitValueExpression(stmt->rhs); - if (!rhs) { - return; - } - - auto b = builder_.Append(current_block_); - if (auto* v = std::get_if(&lhs)) { - b.Store(*v, rhs); - } else if (auto ref = std::get_if(&lhs)) { - b.StoreVectorElement(ref->vector, ref->index, rhs); - } - } - - void EmitIncrementDecrement(const ast::IncrementDecrementStatement* stmt) { - auto lhs = EmitExpression(stmt->lhs); - - auto* one = program_.TypeOf(stmt->lhs)->UnwrapRef()->IsSignedIntegerScalar() - ? builder_.Constant(1_i) - : builder_.Constant(1_u); - - EmitCompoundAssignment(lhs, one, - stmt->increment ? core::BinaryOp::kAdd : core::BinaryOp::kSubtract); - } - - void EmitCompoundAssignment(const ast::CompoundAssignmentStatement* stmt) { - auto lhs = EmitExpression(stmt->lhs); - - auto rhs = EmitValueExpression(stmt->rhs); - if (!rhs) { - return; - } - - EmitCompoundAssignment(lhs, rhs, stmt->op); - } - - void EmitCompoundAssignment(ValueOrVecElAccess lhs, core::ir::Value* rhs, core::BinaryOp op) { - auto b = builder_.Append(current_block_); - if (auto* v = std::get_if(&lhs)) { - auto* load = b.Load(*v); - auto* inst = current_block_->Append(BinaryOp(load->Result(), rhs, op)); - b.Store(*v, inst); - } else if (auto ref = std::get_if(&lhs)) { - auto* load = b.LoadVectorElement(ref->vector, ref->index); - auto* inst = b.Append(BinaryOp(load->Result(), rhs, op)); - b.StoreVectorElement(ref->vector, ref->index, inst); - } - } - - void EmitBlock(const ast::BlockStatement* block) { - scopes_.Push(); - TINT_DEFER(scopes_.Pop()); - - // Note, this doesn't need to emit a Block as the current block should be sufficient as the - // blocks all get flattened. Each flow control node will inject the basic blocks it - // requires. - EmitStatements(block->statements); - } - - void EmitIf(const ast::IfStatement* stmt) { - // Emit the if condition into the end of the preceding block - auto reg = EmitValueExpression(stmt->condition); - if (!reg) { - return; - } - auto* if_inst = builder_.If(reg); - current_block_->Append(if_inst); - - { - ControlStackScope scope(this, if_inst); - - { - TINT_SCOPED_ASSIGNMENT(current_block_, if_inst->True()); - EmitBlock(stmt->body); - - // If the true block did not terminate, then emit an exit_if - if (NeedTerminator()) { - SetTerminator(builder_.ExitIf(if_inst)); - } - } - - if (stmt->else_statement) { - TINT_SCOPED_ASSIGNMENT(current_block_, if_inst->False()); - EmitStatement(stmt->else_statement); - - // If the false block did not terminate, then emit an exit_if - if (NeedTerminator()) { - SetTerminator(builder_.ExitIf(if_inst)); - } - } - } - } - - void EmitLoop(const ast::LoopStatement* stmt) { - auto* loop_inst = builder_.Loop(); - current_block_->Append(loop_inst); - - // Note: The loop doesn't use EmitBlock because it needs the scope stack to not get popped - // until after the continuing block. - - ControlStackScope scope(this, loop_inst); - - auto& body_behaviors = program_.Sem().Get(stmt->body)->Behaviors(); - { - TINT_SCOPED_ASSIGNMENT(current_block_, loop_inst->Body()); - - EmitStatements(stmt->body->statements); - - // The current block didn't `break`, `return` or `continue`, go to the continuing block - // or mark the end of the block as unreachable. - if (NeedTerminator()) { - if (body_behaviors.Contains(sem::Behavior::kNext)) { - SetTerminator(builder_.Continue(loop_inst)); - } else { - SetTerminator(builder_.Unreachable()); - } - } - } - - // Emit a continuing block if it is reachable. - if (body_behaviors.Contains(sem::Behavior::kNext) || - body_behaviors.Contains(sem::Behavior::kContinue)) { - TINT_SCOPED_ASSIGNMENT(current_block_, loop_inst->Continuing()); - if (stmt->continuing) { - EmitBlock(stmt->continuing); - } - - // Branch back to the start block if the continue target didn't terminate already - if (NeedTerminator()) { - SetTerminator(builder_.NextIteration(loop_inst)); - } - } - } - - void EmitWhile(const ast::WhileStatement* stmt) { - auto* loop_inst = builder_.Loop(); - current_block_->Append(loop_inst); - - ControlStackScope scope(this, loop_inst); - - // Continue is always empty, just go back to the start - { - TINT_SCOPED_ASSIGNMENT(current_block_, loop_inst->Continuing()); - SetTerminator(builder_.NextIteration(loop_inst)); - } - - { - TINT_SCOPED_ASSIGNMENT(current_block_, loop_inst->Body()); - - // Emit the while condition into the Start().target of the loop - auto reg = EmitValueExpression(stmt->condition); - if (!reg) { - return; - } - - // Create an `if (cond) {} else {break;}` control flow - auto* if_inst = builder_.If(reg); - current_block_->Append(if_inst); - - { - TINT_SCOPED_ASSIGNMENT(current_block_, if_inst->True()); - SetTerminator(builder_.ExitIf(if_inst)); - } - - { - TINT_SCOPED_ASSIGNMENT(current_block_, if_inst->False()); - SetTerminator(builder_.ExitLoop(loop_inst)); - } - - EmitStatements(stmt->body->statements); - - // The current block didn't `break`, `return` or `continue`, go to the continuing block. - if (NeedTerminator()) { - SetTerminator(builder_.Continue(loop_inst)); - } - } - } - - void EmitForLoop(const ast::ForLoopStatement* stmt) { - auto* loop_inst = builder_.Loop(); - current_block_->Append(loop_inst); - - ControlStackScope scope(this, loop_inst); - - if (stmt->initializer) { - TINT_SCOPED_ASSIGNMENT(current_block_, loop_inst->Initializer()); - - // Emit the for initializer before branching to the loop body - EmitStatement(stmt->initializer); - - if (NeedTerminator()) { - SetTerminator(builder_.NextIteration(loop_inst)); - } - } - - TINT_SCOPED_ASSIGNMENT(current_block_, loop_inst->Body()); - - if (stmt->condition) { - // Emit the condition into the target target of the loop body - auto reg = EmitValueExpression(stmt->condition); - if (!reg) { - return; - } - - // Create an `if (cond) {} else {break;}` control flow - auto* if_inst = builder_.If(reg); - current_block_->Append(if_inst); - - { - TINT_SCOPED_ASSIGNMENT(current_block_, if_inst->True()); - SetTerminator(builder_.ExitIf(if_inst)); - } - - { - TINT_SCOPED_ASSIGNMENT(current_block_, if_inst->False()); - SetTerminator(builder_.ExitLoop(loop_inst)); - } - } - - EmitBlock(stmt->body); - if (NeedTerminator()) { - SetTerminator(builder_.Continue(loop_inst)); - } - - if (stmt->continuing) { - TINT_SCOPED_ASSIGNMENT(current_block_, loop_inst->Continuing()); - EmitStatement(stmt->continuing); - SetTerminator(builder_.NextIteration(loop_inst)); - } - } - - void EmitSwitch(const ast::SwitchStatement* stmt) { - // Emit the condition into the preceding block - auto reg = EmitValueExpression(stmt->condition); - if (!reg) { - return; - } - auto* switch_inst = builder_.Switch(reg); - current_block_->Append(switch_inst); - - ControlStackScope scope(this, switch_inst); - - const auto* sem = program_.Sem().Get(stmt); - for (const auto* c : sem->Cases()) { - Vector selectors; - for (const auto* selector : c->Selectors()) { - if (selector->IsDefault()) { - selectors.Push(nullptr); - } else { - selectors.Push(builder_.Constant(selector->Value()->Clone(clone_ctx_))); - } - } - - TINT_SCOPED_ASSIGNMENT(current_block_, builder_.Case(switch_inst, selectors)); - EmitBlock(c->Body()->Declaration()); - - if (NeedTerminator()) { - SetTerminator(builder_.ExitSwitch(switch_inst)); - } - } - } - - void EmitReturn(const ast::ReturnStatement* stmt) { - core::ir::Value* ret_value = nullptr; - if (stmt->value) { - auto ret = EmitValueExpression(stmt->value); - if (!ret) { - return; - } - ret_value = ret; - } - if (ret_value) { - SetTerminator(builder_.Return(current_function_, ret_value)); - } else { - SetTerminator(builder_.Return(current_function_)); - } - } - - void EmitBreak(const ast::BreakStatement*) { - auto* current_control = FindEnclosingControl(ControlFlags::kNone); - TINT_ASSERT(current_control); - - if (auto* c = current_control->As()) { - SetTerminator(builder_.ExitLoop(c)); - } else if (auto* s = current_control->As()) { - SetTerminator(builder_.ExitSwitch(s)); - } else { - TINT_UNREACHABLE(); - } - } - - void EmitContinue(const ast::ContinueStatement*) { - auto* current_control = FindEnclosingControl(ControlFlags::kExcludeSwitch); - TINT_ASSERT(current_control); - - if (auto* c = current_control->As()) { - SetTerminator(builder_.Continue(c)); - } else { - TINT_UNREACHABLE(); - } - } - - // Discard is being treated as an instruction. The semantics in WGSL is demote_to_helper, so - // the code has to continue as before it just predicates writes. If WGSL grows some kind of - // terminating discard that would probably make sense as a Block but would then require - // figuring out the multi-level exit that is triggered. - void EmitDiscard(const ast::DiscardStatement*) { current_block_->Append(builder_.Discard()); } - - void EmitBreakIf(const ast::BreakIfStatement* stmt) { - auto* current_control = FindEnclosingControl(ControlFlags::kExcludeSwitch); - - // Emit the break-if condition into the end of the preceding block - auto cond = EmitValueExpression(stmt->condition); - if (!cond) { - return; - } - SetTerminator(builder_.BreakIf(current_control->As(), cond)); - } - - ValueOrVecElAccess EmitExpression(const ast::Expression* root) { - struct Emitter { - explicit Emitter(Impl& i) : impl(i) {} - - ValueOrVecElAccess Emit(const ast::Expression* root) { - // Process the root expression. This will likely add tasks. - Process(root); - - // Execute all the tasks until all expressions have been resolved. - while (!tasks.IsEmpty()) { - auto task = tasks.Pop(); - task(); - } - - // Get the resolved root expression. - return Get(root); - } - - private: - Impl& impl; - Vector blocks; - Vector, 64> tasks; - Hashmap bindings_; - - void Bind(const ast::Expression* expr, core::ir::Value* value) { - // If this expression maps to sem::Load, insert a load instruction to get the result - if (impl.program_.Sem().Get(expr)) { - auto* load = impl.builder_.Load(value); - impl.current_block_->Append(load); - value = load->Result(); - } - bindings_.Add(expr, value); - } - - void Bind(const ast::Expression* expr, const VectorRefElementAccess& access) { - // If this expression maps to sem::Load, insert a load instruction to get the result - if (impl.program_.Sem().Get(expr)) { - auto* load = impl.builder_.LoadVectorElement(access.vector, access.index); - impl.current_block_->Append(load); - bindings_.Add(expr, load->Result()); - } else { - bindings_.Add(expr, access); - } - } - - ValueOrVecElAccess Get(const ast::Expression* expr) { - auto val = bindings_.Get(expr); - if (!val) { - return nullptr; - } - return *val; - } - - core::ir::Value* GetValue(const ast::Expression* expr) { - auto res = Get(expr); - if (auto** val = std::get_if(&res)) { - return *val; - } - TINT_ICE() << "expression did not resolve to a value"; - } - - void PushBlock(core::ir::Block* block) { - blocks.Push(impl.current_block_); - impl.current_block_ = block; - } - - void PopBlock() { impl.current_block_ = blocks.Pop(); } - - core::ir::Value* EmitConstant(const ast::Expression* expr) { - if (auto* sem = impl.program_.Sem().GetVal(expr)) { - if (auto* v = sem->ConstantValue()) { - if (auto* cv = v->Clone(impl.clone_ctx_)) { - auto* val = impl.builder_.Constant(cv); - bindings_.Add(expr, val); - return val; - } - } - } - return nullptr; - } - - void EmitAccess(const ast::AccessorExpression* expr) { - if (auto vec_access = AsVectorRefElementAccess(expr)) { - Bind(expr, vec_access.value()); - return; - } - - auto* obj = GetValue(expr->object); - if (!obj) { - TINT_UNREACHABLE() << "no object result"; - } - - auto* sem = impl.program_.Sem().Get(expr)->Unwrap(); - - // The access result type should match the source result type. If the source is a - // pointer, we generate a pointer. - const core::type::Type* ty = - sem->Type()->UnwrapRef()->Clone(impl.clone_ctx_.type_ctx); - if (auto* ptr = obj->Type()->As(); - ptr && !ty->Is()) { - ty = impl.builder_.ir.Types().ptr(ptr->AddressSpace(), ty, ptr->Access()); - } - - auto index = tint::Switch( - sem, - [&](const sem::IndexAccessorExpression* idx) -> core::ir::Value* { - if (auto* v = idx->Index()->ConstantValue()) { - if (auto* cv = v->Clone(impl.clone_ctx_)) { - return impl.builder_.Constant(cv); - } - TINT_UNREACHABLE() << "constant clone failed"; - } - return GetValue(idx->Index()->Declaration()); - }, - [&](const sem::StructMemberAccess* access) -> core::ir::Value* { - return impl.builder_.Constant(u32((access->Member()->Index()))); - }, - [&](const sem::Swizzle* swizzle) -> core::ir::Value* { - auto& indices = swizzle->Indices(); - - // A single element swizzle is just treated as an accessor. - if (indices.Length() == 1) { - return impl.builder_.Constant(u32(indices[0])); - } - auto* val = impl.builder_.Swizzle(ty, obj, std::move(indices)); - impl.current_block_->Append(val); - Bind(expr, val->Result()); - return nullptr; - }, // - TINT_ICE_ON_NO_MATCH); - - if (!index) { - return; - } - - // If the object is an unnamed value (a subexpression, not a let) and is the result - // of another access, then we can just append the index to that access. - if (!impl.mod.NameOf(obj).IsValid()) { - if (auto* inst_res = obj->As()) { - if (auto* access = inst_res->Instruction()->As()) { - access->AddIndex(index); - access->Result()->SetType(ty); - bindings_.Remove(expr->object); - // Move the access after the index expression. - if (impl.current_block_->Back() != access) { - impl.current_block_->Remove(access); - impl.current_block_->Append(access); - } - Bind(expr, access->Result()); - return; - } - } - } - - // Create a new access - auto* access = impl.builder_.Access(ty, obj, index); - impl.current_block_->Append(access); - Bind(expr, access->Result()); - } - - void EmitBinary(const ast::BinaryExpression* b) { - auto lhs = GetValue(b->lhs); - if (!lhs) { - return; - } - auto rhs = GetValue(b->rhs); - if (!rhs) { - return; - } - auto* inst = impl.BinaryOp(lhs, rhs, b->op); - if (!inst) { - return; - } - impl.current_block_->Append(inst); - Bind(b, inst->Result()); - } - - void EmitUnary(const ast::UnaryOpExpression* expr) { - auto val = GetValue(expr->expr); - if (!val) { - return; - } - core::ir::Instruction* inst = nullptr; - switch (expr->op) { - case core::UnaryOp::kAddressOf: - case core::UnaryOp::kIndirection: - // 'address-of' and 'indirection' just fold away and we propagate the - // pointer. - Bind(expr, val); - return; - case core::UnaryOp::kComplement: { - inst = impl.builder_.Complement(val); - break; - } - case core::UnaryOp::kNegation: { - inst = impl.builder_.Negation(val); - break; - } - case core::UnaryOp::kNot: { - inst = impl.builder_.Not(val); - break; - } - } - impl.current_block_->Append(inst); - Bind(expr, inst->Result()); - } - - void EmitCall(const ast::CallExpression* expr) { - // If this is a materialized semantic node, just use the constant value. - if (auto* mat = impl.program_.Sem().Get(expr)) { - if (mat->ConstantValue()) { - auto* cv = mat->ConstantValue()->Clone(impl.clone_ctx_); - if (!cv) { - impl.AddError(expr->source) << "failed to get constant value for call " - << expr->TypeInfo().name; - return; - } - Bind(expr, impl.builder_.Constant(cv)); - return; - } - } - Vector args; - args.Reserve(expr->args.Length()); - // Emit the arguments - for (const auto* arg : expr->args) { - auto value = GetValue(arg); - if (!value) { - impl.AddError(arg->source) << "failed to convert arguments"; - return; - } - args.Push(value); - } - auto* sem = impl.program_.Sem().Get(expr); - if (!sem) { - impl.AddError(expr->source) - << "failed to get semantic information for call " << expr->TypeInfo().name; - return; - } - auto* ty = sem->Target()->ReturnType()->Clone(impl.clone_ctx_.type_ctx); - core::ir::Instruction* inst = nullptr; - // If this is a builtin function, emit the specific builtin value - if (auto* b = sem->Target()->As()) { - if (b->Fn() == wgsl::BuiltinFn::kBitcast) { - inst = impl.builder_.Bitcast(ty, args[0]); - } else { - auto* call = - impl.builder_.Call(ty, b->Fn(), std::move(args)); - - // Set explicit template parameters if present. - if (b->Overload().num_explicit_templates > 0) { - auto* tmpl = expr->target->identifier->As(); - TINT_ASSERT(tmpl); - Vector explicit_types; - for (uint32_t i = 0; i < b->Overload().num_explicit_templates; i++) { - auto* tmpl_sem = impl.program_.Sem().Get(tmpl->arguments[i]); - auto* tmpl_ty = tmpl_sem->As(); - TINT_ASSERT(tmpl_ty); - auto* cloned_ty = tmpl_ty->Type()->Clone(impl.clone_ctx_.type_ctx); - explicit_types.Push(cloned_ty); - } - call->SetExplicitTemplateParams(std::move(explicit_types)); - } - - inst = call; - } - } else if (sem->Target()->As()) { - inst = impl.builder_.Construct(ty, std::move(args)); - } else if (sem->Target()->Is()) { - inst = impl.builder_.Convert(ty, args[0]); - } else if (expr->target->identifier->Is()) { - TINT_UNIMPLEMENTED() << "missing templated ident support"; - } else { - // Not a builtin and not a templated call, so this is a user function. - inst = impl.builder_.Call(ty, - impl.scopes_.Get(expr->target->identifier->symbol) - ->As(), - std::move(args)); - } - if (inst == nullptr) { - return; - } - impl.current_block_->Append(inst); - Bind(expr, inst->Result()); - } - - void EmitIdentifier(const ast::IdentifierExpression* i) { - auto* v = impl.scopes_.Get(i->identifier->symbol); - if (DAWN_UNLIKELY(!v)) { - impl.AddError(i->source) - << "unable to find identifier " << i->identifier->symbol.Name(); - return; - } - Bind(i, v); - } - - void EmitLiteral(const ast::LiteralExpression* lit) { - auto* sem = impl.program_.Sem().Get(lit); - if (!sem) { - impl.AddError(lit->source) - << "failed to get semantic information for node " << lit->TypeInfo().name; - return; - } - auto* cv = sem->ConstantValue()->Clone(impl.clone_ctx_); - if (!cv) { - impl.AddError(lit->source) - << "failed to get constant value for node " << lit->TypeInfo().name; - return; - } - auto* val = impl.builder_.Constant(cv); - Bind(lit, val); - } - - std::optional AsVectorRefElementAccess( - const ast::Expression* expr) { - return AsVectorRefElementAccess( - impl.program_.Sem().Get(expr)->UnwrapLoad()); - } - - std::optional AsVectorRefElementAccess( - const sem::ValueExpression* expr) { - auto* access = As(expr); - if (!access) { - return std::nullopt; - } - - auto* memory_view = access->Object()->Type()->As(); - if (!memory_view) { - return std::nullopt; - } - - if (!memory_view->StoreType()->Is()) { - return std::nullopt; - } - return tint::Switch( - access, - [&](const sem::Swizzle* s) -> std::optional { - if (auto vec = GetValue(access->Object()->Declaration())) { - return VectorRefElementAccess{ - vec, impl.builder_.Constant(u32(s->Indices()[0]))}; - } - return std::nullopt; - }, - [&](const sem::IndexAccessorExpression* i) - -> std::optional { - if (auto vec = GetValue(access->Object()->Declaration())) { - if (auto idx = GetValue(i->Index()->Declaration())) { - return VectorRefElementAccess{vec, idx}; - } - } - return std::nullopt; - }); - } - - void BeginShortCircuit(const ast::BinaryExpression* expr) { - auto lhs = GetValue(expr->lhs); - if (!lhs) { - return; - } - - const auto* lhs_sem = impl.program_.Sem().GetVal(expr->lhs); - const auto* rhs_sem = impl.program_.Sem().GetVal(expr->rhs); - - const bool is_const_eval = lhs_sem->Stage() <= core::EvaluationStage::kOverride && - rhs_sem->Stage() <= core::EvaluationStage::kOverride; - - auto& b = impl.builder_; - core::ir::If* if_inst = nullptr; - if (is_const_eval) { - if_inst = b.ConstExprIf(lhs); - } else { - if_inst = b.If(lhs); - } - - impl.current_block_->Append(if_inst); - - auto* result = b.InstructionResult(b.ir.Types().bool_()); - if_inst->SetResult(result); - - if (expr->op == core::BinaryOp::kLogicalAnd) { - if_inst->False()->Append(b.ExitIf(if_inst, b.Constant(false))); - PushBlock(if_inst->True()); - } else { - if_inst->True()->Append(b.ExitIf(if_inst, b.Constant(true))); - PushBlock(if_inst->False()); - } - - Bind(expr, result); - } - - void EndShortCircuit(const ast::BinaryExpression* b) { - auto res = GetValue(b); - auto* src = res->As()->Instruction(); - auto* if_ = src->As(); - TINT_ASSERT(if_); - auto rhs = GetValue(b->rhs); - if (!rhs) { - return; - } - impl.current_block_->Append(impl.builder_.ExitIf(if_, rhs)); - PopBlock(); - } - - void Process(const ast::Expression* expr) { - if (EmitConstant(expr)) { - // If this is a value that has been const-eval'd, then no need to traverse - // deeper. - return; - } - - tint::Switch( - expr, // - [&](const ast::BinaryExpression* e) { - if (e->op == core::BinaryOp::kLogicalAnd || - e->op == core::BinaryOp::kLogicalOr) { - tasks.Push([this, e] { EndShortCircuit(e); }); - tasks.Push([this, e] { Process(e->rhs); }); - tasks.Push([this, e] { BeginShortCircuit(e); }); - tasks.Push([this, e] { Process(e->lhs); }); - } else { - tasks.Push([this, e] { EmitBinary(e); }); - tasks.Push([this, e] { Process(e->rhs); }); - tasks.Push([this, e] { Process(e->lhs); }); - } - }, - [&](const ast::IndexAccessorExpression* e) { - tasks.Push([this, e] { EmitAccess(e); }); - tasks.Push([this, e] { Process(e->index); }); - tasks.Push([this, e] { Process(e->object); }); - }, - [&](const ast::MemberAccessorExpression* e) { - tasks.Push([this, e] { EmitAccess(e); }); - tasks.Push([this, e] { Process(e->object); }); - }, - [&](const ast::UnaryOpExpression* e) { - tasks.Push([this, e] { EmitUnary(e); }); - tasks.Push([this, e] { Process(e->expr); }); - }, - [&](const ast::CallExpression* e) { - tasks.Push([this, e] { EmitCall(e); }); - for (auto* arg : tint::Reverse(e->args)) { - tasks.Push([this, arg] { Process(arg); }); - } - }, - [&](const ast::LiteralExpression* e) { EmitLiteral(e); }, - [&](const ast::IdentifierExpression* e) { EmitIdentifier(e); }, // - TINT_ICE_ON_NO_MATCH); - } - }; - - return Emitter(*this).Emit(root); - } - - core::ir::Value* EmitValueExpression(const ast::Expression* root) { - auto res = EmitExpression(root); - if (auto** val = std::get_if(&res)) { - builder_.ir.SetSource(*val, root->source); - return *val; - } - TINT_ICE() << "expression did not resolve to a value"; - } - - void EmitCall(const ast::CallStatement* stmt) { (void)EmitValueExpression(stmt->expr); } - - void EmitVariable(const ast::Variable* var) { - auto* sem = program_.Sem().Get(var); - - return tint::Switch( // - var, - [&](const ast::Var* v) { - auto* ref = sem->Type()->As(); - auto* store_ty = RemapOverrideSizedArrayIfNeeded(ref->StoreType()); - auto* ty = builder_.ir.Types().Get(ref->AddressSpace(), - store_ty, ref->Access()); - - auto* val = builder_.Var(ty); - if (v->initializer) { - auto init = EmitValueExpression(v->initializer); - if (!init) { - return; - } - val->SetInitializer(init); - } - current_block_->Append(val); - - if (auto* gv = sem->As(); gv) { - if (var->HasBindingPoint()) { - val->SetBindingPoint(gv->Attributes().binding_point->group, - gv->Attributes().binding_point->binding); - } - if (var->HasInputAttachmentIndex()) { - val->SetInputAttachmentIndex( - gv->Attributes().input_attachment_index.value()); - } - } - - // Store the declaration so we can get the instruction to store too - scopes_.Set(v->name->symbol, val->Result()); - - // Record the original name and source of the var - builder_.ir.SetName(val, v->name->symbol.Name()); - builder_.ir.SetSource(val, v->source); - }, - [&](const ast::Let* l) { - auto init = EmitValueExpression(l->initializer); - if (!init) { - return; - } - - // If we've emitted a texture or a sampler to the let then we have - // `texture_and_sampler_let` enabled and we want to just strip the let and use the - // originating value. - if (init->Type()->IsAnyOf()) { - scopes_.Set(l->name->symbol, init); - return; - } - - auto* let = current_block_->Append(builder_.Let(l->name->symbol.Name(), init)); - - // Store the results of the initialization - scopes_.Set(l->name->symbol, let->Result()); - builder_.ir.SetSource(let, l->source); - }, - [&](const ast::Override* o) { - auto* o_sem = program_.Sem().Get(o); - auto* ty = sem->Type()->Clone(clone_ctx_.type_ctx); - - auto* override = builder_.Override(ty); - if (o->initializer) { - auto init = EmitValueExpression(o->initializer); - if (!init) { - return; - } - override->SetInitializer(init); - } - current_block_->Append(override); - - TINT_ASSERT(o_sem->Attributes().override_id.has_value()); - override->SetOverrideId(o_sem->Attributes().override_id.value()); - - // Store the declaration so we can get the instruction to store too - scopes_.Set(o->name->symbol, override->Result()); - - // Record the original name and source of the var - builder_.ir.SetName(override, o->name->symbol.Name()); - builder_.ir.SetSource(override, o->source); - }, - [&](const ast::Const*) { - // Skip. This should be handled by const-eval already, so the const will be a - // `core::constant::` value at the usage sites. Can just ignore the `const` variable - // as it should never be used. - }, - TINT_ICE_ON_NO_MATCH); - } - - core::ir::CoreBinary* BinaryOp(core::ir::Value* lhs, core::ir::Value* rhs, core::BinaryOp op) { - switch (op) { - case core::BinaryOp::kAnd: - return builder_.And(lhs, rhs); - case core::BinaryOp::kOr: - return builder_.Or(lhs, rhs); - case core::BinaryOp::kXor: - return builder_.Xor(lhs, rhs); - case core::BinaryOp::kEqual: - return builder_.Equal(lhs, rhs); - case core::BinaryOp::kNotEqual: - return builder_.NotEqual(lhs, rhs); - case core::BinaryOp::kLessThan: - return builder_.LessThan(lhs, rhs); - case core::BinaryOp::kGreaterThan: - return builder_.GreaterThan(lhs, rhs); - case core::BinaryOp::kLessThanEqual: - return builder_.LessThanEqual(lhs, rhs); - case core::BinaryOp::kGreaterThanEqual: - return builder_.GreaterThanEqual(lhs, rhs); - case core::BinaryOp::kShiftLeft: - return builder_.ShiftLeft(lhs, rhs); - case core::BinaryOp::kShiftRight: - return builder_.ShiftRight(lhs, rhs); - case core::BinaryOp::kAdd: - return builder_.Add(lhs, rhs); - case core::BinaryOp::kSubtract: - return builder_.Subtract(lhs, rhs); - case core::BinaryOp::kMultiply: - return builder_.Multiply(lhs, rhs); - case core::BinaryOp::kDivide: - return builder_.Divide(lhs, rhs); - case core::BinaryOp::kModulo: - return builder_.Modulo(lhs, rhs); - case core::BinaryOp::kLogicalAnd: - case core::BinaryOp::kLogicalOr: - TINT_ICE() << "short circuit op should have already been handled"; - } - TINT_UNREACHABLE(); - } - - const core::type::Type* RemapOverrideSizedArrayIfNeeded(const core::type::Type* ty) { - // Check that we have an override-sized array, or a pointer to one. - const auto* ary = ty->UnwrapPtr()->As(); - if (!ary || - !ary->Count() - ->IsAnyOf()) { - return ty->Clone(clone_ctx_.type_ctx); - } - - // If the array has an override count, we need to remap it to a value array count. - core::ir::Value* count = tint::Switch( - ary->Count(), // - [&](const sem::UnnamedOverrideArrayCount* u) { - return EmitValueExpression(u->expr->Declaration()); - }, - [&](const sem::NamedOverrideArrayCount* n) { - return scopes_.Get(n->variable->Declaration()->name->symbol); - }, - TINT_ICE_ON_NO_MATCH); - - auto* ary_count = builder_.ir.Types().Get(count); - const core::type::Type* remapped_ty = builder_.ir.Types().Get( - ary->ElemType()->Clone(clone_ctx_.type_ctx), ary_count, ary->Size()); - - // If the original type was a pointer, wrap the remapped array in a pointer too. - if (auto* ptr = ty->As()) { - remapped_ty = builder_.ir.Types().ptr(ptr->AddressSpace(), remapped_ty, ptr->Access()); - } - - return remapped_ty; - } -}; - -} // namespace - -Result ProgramToIR(const Program& program) { - if (!program.IsValid()) { - return Failure{program.Diagnostics().Str()}; - } - - Impl b(program); - auto r = b.Build(); - if (r != Success) { - diag::List err = std::move(r.Failure().reason); - err.AddNote(Source{}) << "AST:\n" + Program::printer(program); - return Failure{err.Str()}; - } - - return r.Move(); -} - -} // namespace tint::wgsl::reader diff --git a/3rdparty/dawn/src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.h b/3rdparty/dawn/src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.h deleted file mode 100644 index 0a5ec1ab9..000000000 --- a/3rdparty/dawn/src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.h +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2023 The Dawn & Tint Authors -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// 3. Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef SRC_TINT_LANG_WGSL_READER_PROGRAM_TO_IR_PROGRAM_TO_IR_H_ -#define SRC_TINT_LANG_WGSL_READER_PROGRAM_TO_IR_PROGRAM_TO_IR_H_ - -#include "src/tint/lang/core/ir/module.h" -#include "src/tint/utils/result.h" - -// Forward Declarations -namespace tint { -class Program; -} // namespace tint - -namespace tint::wgsl::reader { - -/// Builds a WGSL-dialect core::ir::Module from the given Program -/// @param program the Program to use. -/// @returns the WGSL-dialect IR module. -/// -/// @note this assumes the `program.IsValid()`, and has had const-eval done so -/// any abstract values have been calculated and converted into the relevant -/// concrete types. -Result ProgramToIR(const Program& program); - -} // namespace tint::wgsl::reader - -#endif // SRC_TINT_LANG_WGSL_READER_PROGRAM_TO_IR_PROGRAM_TO_IR_H_ diff --git a/3rdparty/dawn/src/tint/lang/wgsl/reader/reader.cc b/3rdparty/dawn/src/tint/lang/wgsl/reader/reader.cc deleted file mode 100644 index f19044f87..000000000 --- a/3rdparty/dawn/src/tint/lang/wgsl/reader/reader.cc +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2020 The Dawn & Tint Authors -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// 3. Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "src/tint/lang/wgsl/reader/reader.h" - -#include -#include - -#include "src/tint/lang/wgsl/reader/lower/lower.h" -#include "src/tint/lang/wgsl/reader/parser/parser.h" -#include "src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.h" -#include "src/tint/lang/wgsl/resolver/resolve.h" - -namespace tint::wgsl::reader { - -Program Parse(const Source::File* file, const Options& options) { - if (DAWN_UNLIKELY(file->content.data.size() > - static_cast(std::numeric_limits::max()))) { - ProgramBuilder b; - b.Diagnostics().AddError(tint::Source{}) << "WGSL source must be 0xffffffff bytes or fewer"; - return Program(std::move(b)); - } - Parser parser(file); - parser.Parse(); - return resolver::Resolve(parser.builder(), options.allowed_features); -} - -Result WgslToIR(const Source::File* file, const Options& options) { - Program program = Parse(file, options); - return ProgramToLoweredIR(program); -} - -Result ProgramToLoweredIR(const Program& program, - InternalCompilerErrorCallback ice_callback) { - TINT_CHECK_RESULT_UNWRAP(ir, ProgramToIR(program)); - ir.ice_callback = ice_callback; - - // Lower from WGSL-dialect to core-dialect - TINT_CHECK_RESULT(Lower(ir)); - - return ir; -} - -bool IsUnsupportedByIR(const ast::Enable* enable) { - for (auto ext : enable->extensions) { - switch (ext->name) { - case tint::wgsl::Extension::kChromiumExperimentalFramebufferFetch: - return true; - default: - break; - } - } - return false; -} - -} // namespace tint::wgsl::reader diff --git a/3rdparty/dawn/src/tint/lang/wgsl/reader/reader.h b/3rdparty/dawn/src/tint/lang/wgsl/reader/reader.h deleted file mode 100644 index 682441c94..000000000 --- a/3rdparty/dawn/src/tint/lang/wgsl/reader/reader.h +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2020 The Dawn & Tint Authors -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// 3. Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef SRC_TINT_LANG_WGSL_READER_READER_H_ -#define SRC_TINT_LANG_WGSL_READER_READER_H_ - -#include "src/tint/lang/core/ir/module.h" -#include "src/tint/lang/wgsl/program/program.h" -#include "src/tint/lang/wgsl/reader/options.h" -#include "src/tint/utils/result.h" - -namespace tint::ast { -class Enable; -} // namespace tint::ast - -namespace tint::wgsl::reader { - -/// Parses the WGSL source, returning the parsed program. -/// If the source fails to parse then the returned -/// `program.Diagnostics.ContainsErrors()` will be true, and the -/// `program.Diagnostics()` will describe the error. -/// @param file the source file -/// @param options the configuration options to use when parsing WGSL -/// @returns the parsed program -Program Parse(const Source::File* file, const Options& options = {}); - -/// Parse a WGSL program from source, and return an IR module. -/// @param file the input WGSL file -/// @param options the configuration options to use when parsing WGSL -/// @returns the resulting IR module, or failure -Result WgslToIR(const Source::File* file, const Options& options = {}); - -/// Builds a core-dialect core::ir::Module from the given Program -/// @param program the Program to use. -/// @param ice_callback the callback to use for any ICE produced while processing the IR module -/// @returns the core-dialect IR module. -/// -/// @note this assumes the `program.IsValid()`, and has had const-eval done so -/// any abstract values have been calculated and converted into the relevant -/// concrete types. -Result ProgramToLoweredIR( - const Program& program, - InternalCompilerErrorCallback ice_callback = std::nullopt); - -/// Allows for checking if an extension is currently supported/unsupported by IR -/// before trying to convert to it. -bool IsUnsupportedByIR(const ast::Enable* enable); - -} // namespace tint::wgsl::reader - -#endif // SRC_TINT_LANG_WGSL_READER_READER_H_ diff --git a/3rdparty/dawn/src/tint/lang/wgsl/writer/ir_to_program/ir_to_program.cc b/3rdparty/dawn/src/tint/lang/wgsl/writer/ir_to_program/ir_to_program.cc index d5b453903..5df3aa10b 100644 --- a/3rdparty/dawn/src/tint/lang/wgsl/writer/ir_to_program/ir_to_program.cc +++ b/3rdparty/dawn/src/tint/lang/wgsl/writer/ir_to_program/ir_to_program.cc @@ -1059,10 +1059,6 @@ class State { return b.ty.sampled_texture(t->Dim(), el); }, [&](const core::type::StorageTexture* t) { - if (RequiresChromiumInternalGraphite(t)) { - Enable(wgsl::Extension::kChromiumInternalGraphite); - } - return b.ty.storage_texture(t->Dim(), t->TexelFormat(), t->Access()); }, [&](const core::type::Sampler* s) { return b.ty.sampler(s->Kind()); }, @@ -1411,12 +1407,6 @@ class State { return false; } } - - /// @returns true if the storage texture type requires the kChromiumInternalGraphite extension - /// to be enabled. - bool RequiresChromiumInternalGraphite(const core::type::StorageTexture* tex) { - return tex->TexelFormat() == core::TexelFormat::kR8Unorm; - } }; } // namespace diff --git a/3rdparty/dawn/src/tint/utils/math/math.h b/3rdparty/dawn/src/tint/utils/math/math.h index 8b5783aaf..d0410521c 100644 --- a/3rdparty/dawn/src/tint/utils/math/math.h +++ b/3rdparty/dawn/src/tint/utils/math/math.h @@ -57,7 +57,7 @@ inline constexpr bool IsPowerOfTwo(T value) { inline constexpr uint32_t Log2(uint64_t value) { #if defined(__clang__) || defined(__GNUC__) return 63 - static_cast(__builtin_clzll(value)); -#elif defined(_MSC_VER) && !defined(__clang__) && __cplusplus >= 202002L && defined(__x86_64__) // MSVC and C++20+ +#elif 0 //defined(_MSC_VER) && !defined(__clang__) && __cplusplus >= 202002L // MSVC and C++20+ // note: std::is_constant_evaluated() added in C++20 // required here as _BitScanReverse64 is not constexpr if (!std::is_constant_evaluated()) { @@ -65,7 +65,7 @@ inline constexpr uint32_t Log2(uint64_t value) { if constexpr (sizeof(unsigned long) == 8) { // 64-bit // NOLINTNEXTLINE(runtime/int) unsigned long first_bit_index = 0; - _tzcnt_u64(&first_bit_index, value); + _BitScanReverse64(&first_bit_index, value); return first_bit_index; } else { // 32-bit // NOLINTNEXTLINE(runtime/int) diff --git a/3rdparty/dawn/src/tint/utils/protos/ir/ir.pb.cc b/3rdparty/dawn/src/tint/utils/protos/ir/ir.pb.cc deleted file mode 100644 index 88f3fa936..000000000 --- a/3rdparty/dawn/src/tint/utils/protos/ir/ir.pb.cc +++ /dev/null @@ -1,21506 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: src/tint/utils/protos/ir/ir.proto -// Protobuf C++ Version: 6.32.0 - -#include "src/tint/utils/protos/ir/ir.pb.h" - -#include -#include -#include "google/protobuf/io/coded_stream.h" -#include "google/protobuf/generated_message_tctable_impl.h" -#include "google/protobuf/extension_set.h" -#include "google/protobuf/generated_message_util.h" -#include "google/protobuf/wire_format_lite.h" -#include "google/protobuf/descriptor.h" -#include "google/protobuf/generated_message_reflection.h" -#include "google/protobuf/reflection_ops.h" -#include "google/protobuf/wire_format.h" -// @@protoc_insertion_point(includes) - -// Must be included last. -#include "google/protobuf/port_def.inc" -PROTOBUF_PRAGMA_INIT_SEG -namespace _pb = ::google::protobuf; -namespace _pbi = ::google::protobuf::internal; -namespace _fl = ::google::protobuf::internal::field_layout; -namespace tint { -namespace core { -namespace ir { -namespace binary { -namespace pb { - -inline constexpr WorkgroupSize::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - x_{0u}, - y_{0u}, - z_{0u} {} - -template -PROTOBUF_CONSTEXPR WorkgroupSize::WorkgroupSize(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(WorkgroupSize_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct WorkgroupSizeDefaultTypeInternal { - PROTOBUF_CONSTEXPR WorkgroupSizeDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~WorkgroupSizeDefaultTypeInternal() {} - union { - WorkgroupSize _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 WorkgroupSizeDefaultTypeInternal _WorkgroupSize_default_instance_; - -inline constexpr TypeVector::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - width_{0u}, - element_type_{0u} {} - -template -PROTOBUF_CONSTEXPR TypeVector::TypeVector(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(TypeVector_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct TypeVectorDefaultTypeInternal { - PROTOBUF_CONSTEXPR TypeVectorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~TypeVectorDefaultTypeInternal() {} - union { - TypeVector _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TypeVectorDefaultTypeInternal _TypeVector_default_instance_; - -inline constexpr TypeTexelBuffer::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - texel_format_{static_cast< ::tint::core::ir::binary::pb::TexelFormat >(0)}, - access_{static_cast< ::tint::core::ir::binary::pb::AccessControl >(0)} {} - -template -PROTOBUF_CONSTEXPR TypeTexelBuffer::TypeTexelBuffer(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(TypeTexelBuffer_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct TypeTexelBufferDefaultTypeInternal { - PROTOBUF_CONSTEXPR TypeTexelBufferDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~TypeTexelBufferDefaultTypeInternal() {} - union { - TypeTexelBuffer _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TypeTexelBufferDefaultTypeInternal _TypeTexelBuffer_default_instance_; - -inline constexpr TypeSubgroupMatrix::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - sub_type_{0u}, - rows_{0u}, - columns_{0u} {} - -template -PROTOBUF_CONSTEXPR TypeSubgroupMatrix::TypeSubgroupMatrix(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(TypeSubgroupMatrix_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct TypeSubgroupMatrixDefaultTypeInternal { - PROTOBUF_CONSTEXPR TypeSubgroupMatrixDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~TypeSubgroupMatrixDefaultTypeInternal() {} - union { - TypeSubgroupMatrix _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TypeSubgroupMatrixDefaultTypeInternal _TypeSubgroupMatrix_default_instance_; - -inline constexpr TypeStorageTexture::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - dimension_{static_cast< ::tint::core::ir::binary::pb::TextureDimension >(0)}, - texel_format_{static_cast< ::tint::core::ir::binary::pb::TexelFormat >(0)}, - access_{static_cast< ::tint::core::ir::binary::pb::AccessControl >(0)} {} - -template -PROTOBUF_CONSTEXPR TypeStorageTexture::TypeStorageTexture(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(TypeStorageTexture_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct TypeStorageTextureDefaultTypeInternal { - PROTOBUF_CONSTEXPR TypeStorageTextureDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~TypeStorageTextureDefaultTypeInternal() {} - union { - TypeStorageTexture _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TypeStorageTextureDefaultTypeInternal _TypeStorageTexture_default_instance_; - -inline constexpr TypeSampler::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - kind_{static_cast< ::tint::core::ir::binary::pb::SamplerKind >(0)} {} - -template -PROTOBUF_CONSTEXPR TypeSampler::TypeSampler(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(TypeSampler_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct TypeSamplerDefaultTypeInternal { - PROTOBUF_CONSTEXPR TypeSamplerDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~TypeSamplerDefaultTypeInternal() {} - union { - TypeSampler _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TypeSamplerDefaultTypeInternal _TypeSampler_default_instance_; - -inline constexpr TypeSampledTexture::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - dimension_{static_cast< ::tint::core::ir::binary::pb::TextureDimension >(0)}, - sub_type_{0u} {} - -template -PROTOBUF_CONSTEXPR TypeSampledTexture::TypeSampledTexture(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(TypeSampledTexture_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct TypeSampledTextureDefaultTypeInternal { - PROTOBUF_CONSTEXPR TypeSampledTextureDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~TypeSampledTextureDefaultTypeInternal() {} - union { - TypeSampledTexture _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TypeSampledTextureDefaultTypeInternal _TypeSampledTexture_default_instance_; -template -PROTOBUF_CONSTEXPR TypeResourceBinding::TypeResourceBinding(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(TypeResourceBinding_class_data_.base()){} -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase() { -} -#endif // PROTOBUF_CUSTOM_VTABLE -struct TypeResourceBindingDefaultTypeInternal { - PROTOBUF_CONSTEXPR TypeResourceBindingDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~TypeResourceBindingDefaultTypeInternal() {} - union { - TypeResourceBinding _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TypeResourceBindingDefaultTypeInternal _TypeResourceBinding_default_instance_; - -inline constexpr TypePointer::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - address_space_{static_cast< ::tint::core::ir::binary::pb::AddressSpace >(0)}, - store_type_{0u}, - access_{static_cast< ::tint::core::ir::binary::pb::AccessControl >(0)} {} - -template -PROTOBUF_CONSTEXPR TypePointer::TypePointer(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(TypePointer_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct TypePointerDefaultTypeInternal { - PROTOBUF_CONSTEXPR TypePointerDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~TypePointerDefaultTypeInternal() {} - union { - TypePointer _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TypePointerDefaultTypeInternal _TypePointer_default_instance_; - -inline constexpr TypeMultisampledTexture::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - dimension_{static_cast< ::tint::core::ir::binary::pb::TextureDimension >(0)}, - sub_type_{0u} {} - -template -PROTOBUF_CONSTEXPR TypeMultisampledTexture::TypeMultisampledTexture(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(TypeMultisampledTexture_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct TypeMultisampledTextureDefaultTypeInternal { - PROTOBUF_CONSTEXPR TypeMultisampledTextureDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~TypeMultisampledTextureDefaultTypeInternal() {} - union { - TypeMultisampledTexture _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TypeMultisampledTextureDefaultTypeInternal _TypeMultisampledTexture_default_instance_; - -inline constexpr TypeMatrix::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - num_columns_{0u}, - num_rows_{0u}, - element_type_{0u} {} - -template -PROTOBUF_CONSTEXPR TypeMatrix::TypeMatrix(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(TypeMatrix_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct TypeMatrixDefaultTypeInternal { - PROTOBUF_CONSTEXPR TypeMatrixDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~TypeMatrixDefaultTypeInternal() {} - union { - TypeMatrix _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TypeMatrixDefaultTypeInternal _TypeMatrix_default_instance_; - -inline constexpr TypeInputAttachment::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - sub_type_{0u} {} - -template -PROTOBUF_CONSTEXPR TypeInputAttachment::TypeInputAttachment(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(TypeInputAttachment_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct TypeInputAttachmentDefaultTypeInternal { - PROTOBUF_CONSTEXPR TypeInputAttachmentDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~TypeInputAttachmentDefaultTypeInternal() {} - union { - TypeInputAttachment _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TypeInputAttachmentDefaultTypeInternal _TypeInputAttachment_default_instance_; -template -PROTOBUF_CONSTEXPR TypeExternalTexture::TypeExternalTexture(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(TypeExternalTexture_class_data_.base()){} -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase() { -} -#endif // PROTOBUF_CUSTOM_VTABLE -struct TypeExternalTextureDefaultTypeInternal { - PROTOBUF_CONSTEXPR TypeExternalTextureDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~TypeExternalTextureDefaultTypeInternal() {} - union { - TypeExternalTexture _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TypeExternalTextureDefaultTypeInternal _TypeExternalTexture_default_instance_; - -inline constexpr TypeDepthTexture::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - dimension_{static_cast< ::tint::core::ir::binary::pb::TextureDimension >(0)} {} - -template -PROTOBUF_CONSTEXPR TypeDepthTexture::TypeDepthTexture(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(TypeDepthTexture_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct TypeDepthTextureDefaultTypeInternal { - PROTOBUF_CONSTEXPR TypeDepthTextureDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~TypeDepthTextureDefaultTypeInternal() {} - union { - TypeDepthTexture _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TypeDepthTextureDefaultTypeInternal _TypeDepthTexture_default_instance_; - -inline constexpr TypeDepthMultisampledTexture::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - dimension_{static_cast< ::tint::core::ir::binary::pb::TextureDimension >(0)} {} - -template -PROTOBUF_CONSTEXPR TypeDepthMultisampledTexture::TypeDepthMultisampledTexture(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(TypeDepthMultisampledTexture_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct TypeDepthMultisampledTextureDefaultTypeInternal { - PROTOBUF_CONSTEXPR TypeDepthMultisampledTextureDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~TypeDepthMultisampledTextureDefaultTypeInternal() {} - union { - TypeDepthMultisampledTexture _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TypeDepthMultisampledTextureDefaultTypeInternal _TypeDepthMultisampledTexture_default_instance_; - -inline constexpr TypeBuffer::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - count_{0u} {} - -template -PROTOBUF_CONSTEXPR TypeBuffer::TypeBuffer(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(TypeBuffer_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct TypeBufferDefaultTypeInternal { - PROTOBUF_CONSTEXPR TypeBufferDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~TypeBufferDefaultTypeInternal() {} - union { - TypeBuffer _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TypeBufferDefaultTypeInternal _TypeBuffer_default_instance_; - -inline constexpr TypeBindingArray::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - element_{0u}, - count_{0u} {} - -template -PROTOBUF_CONSTEXPR TypeBindingArray::TypeBindingArray(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(TypeBindingArray_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct TypeBindingArrayDefaultTypeInternal { - PROTOBUF_CONSTEXPR TypeBindingArrayDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~TypeBindingArrayDefaultTypeInternal() {} - union { - TypeBindingArray _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TypeBindingArrayDefaultTypeInternal _TypeBindingArray_default_instance_; - -inline constexpr TypeAtomic::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - type_{0u} {} - -template -PROTOBUF_CONSTEXPR TypeAtomic::TypeAtomic(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(TypeAtomic_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct TypeAtomicDefaultTypeInternal { - PROTOBUF_CONSTEXPR TypeAtomicDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~TypeAtomicDefaultTypeInternal() {} - union { - TypeAtomic _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TypeAtomicDefaultTypeInternal _TypeAtomic_default_instance_; - -inline constexpr TypeArray::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - element_{0u}, - count_{0u} {} - -template -PROTOBUF_CONSTEXPR TypeArray::TypeArray(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(TypeArray_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct TypeArrayDefaultTypeInternal { - PROTOBUF_CONSTEXPR TypeArrayDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~TypeArrayDefaultTypeInternal() {} - union { - TypeArray _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TypeArrayDefaultTypeInternal _TypeArray_default_instance_; - -inline constexpr SwitchCase::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - selectors_{}, - _selectors_cached_byte_size_{0}, - block_{0u}, - is_default_{false} {} - -template -PROTOBUF_CONSTEXPR SwitchCase::SwitchCase(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(SwitchCase_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct SwitchCaseDefaultTypeInternal { - PROTOBUF_CONSTEXPR SwitchCaseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~SwitchCaseDefaultTypeInternal() {} - union { - SwitchCase _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SwitchCaseDefaultTypeInternal _SwitchCase_default_instance_; - -inline constexpr Interpolation::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - type_{static_cast< ::tint::core::ir::binary::pb::InterpolationType >(0)}, - sampling_{static_cast< ::tint::core::ir::binary::pb::InterpolationSampling >(0)} {} - -template -PROTOBUF_CONSTEXPR Interpolation::Interpolation(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(Interpolation_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct InterpolationDefaultTypeInternal { - PROTOBUF_CONSTEXPR InterpolationDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~InterpolationDefaultTypeInternal() {} - union { - Interpolation _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InterpolationDefaultTypeInternal _Interpolation_default_instance_; -template -PROTOBUF_CONSTEXPR InstructionUserCall::InstructionUserCall(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(InstructionUserCall_class_data_.base()){} -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase() { -} -#endif // PROTOBUF_CUSTOM_VTABLE -struct InstructionUserCallDefaultTypeInternal { - PROTOBUF_CONSTEXPR InstructionUserCallDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~InstructionUserCallDefaultTypeInternal() {} - union { - InstructionUserCall _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InstructionUserCallDefaultTypeInternal _InstructionUserCall_default_instance_; -template -PROTOBUF_CONSTEXPR InstructionUnreachable::InstructionUnreachable(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(InstructionUnreachable_class_data_.base()){} -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase() { -} -#endif // PROTOBUF_CUSTOM_VTABLE -struct InstructionUnreachableDefaultTypeInternal { - PROTOBUF_CONSTEXPR InstructionUnreachableDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~InstructionUnreachableDefaultTypeInternal() {} - union { - InstructionUnreachable _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InstructionUnreachableDefaultTypeInternal _InstructionUnreachable_default_instance_; - -inline constexpr InstructionUnary::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - op_{static_cast< ::tint::core::ir::binary::pb::UnaryOp >(0)} {} - -template -PROTOBUF_CONSTEXPR InstructionUnary::InstructionUnary(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(InstructionUnary_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct InstructionUnaryDefaultTypeInternal { - PROTOBUF_CONSTEXPR InstructionUnaryDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~InstructionUnaryDefaultTypeInternal() {} - union { - InstructionUnary _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InstructionUnaryDefaultTypeInternal _InstructionUnary_default_instance_; - -inline constexpr InstructionSwizzle::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : indices_{}, - _indices_cached_byte_size_{0}, - _cached_size_{0} {} - -template -PROTOBUF_CONSTEXPR InstructionSwizzle::InstructionSwizzle(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(InstructionSwizzle_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct InstructionSwizzleDefaultTypeInternal { - PROTOBUF_CONSTEXPR InstructionSwizzleDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~InstructionSwizzleDefaultTypeInternal() {} - union { - InstructionSwizzle _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InstructionSwizzleDefaultTypeInternal _InstructionSwizzle_default_instance_; -template -PROTOBUF_CONSTEXPR InstructionStoreVectorElement::InstructionStoreVectorElement(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(InstructionStoreVectorElement_class_data_.base()){} -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase() { -} -#endif // PROTOBUF_CUSTOM_VTABLE -struct InstructionStoreVectorElementDefaultTypeInternal { - PROTOBUF_CONSTEXPR InstructionStoreVectorElementDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~InstructionStoreVectorElementDefaultTypeInternal() {} - union { - InstructionStoreVectorElement _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InstructionStoreVectorElementDefaultTypeInternal _InstructionStoreVectorElement_default_instance_; -template -PROTOBUF_CONSTEXPR InstructionStore::InstructionStore(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(InstructionStore_class_data_.base()){} -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase() { -} -#endif // PROTOBUF_CUSTOM_VTABLE -struct InstructionStoreDefaultTypeInternal { - PROTOBUF_CONSTEXPR InstructionStoreDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~InstructionStoreDefaultTypeInternal() {} - union { - InstructionStore _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InstructionStoreDefaultTypeInternal _InstructionStore_default_instance_; -template -PROTOBUF_CONSTEXPR InstructionReturn::InstructionReturn(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(InstructionReturn_class_data_.base()){} -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase() { -} -#endif // PROTOBUF_CUSTOM_VTABLE -struct InstructionReturnDefaultTypeInternal { - PROTOBUF_CONSTEXPR InstructionReturnDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~InstructionReturnDefaultTypeInternal() {} - union { - InstructionReturn _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InstructionReturnDefaultTypeInternal _InstructionReturn_default_instance_; - -inline constexpr InstructionResult::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - name_( - &::google::protobuf::internal::fixed_address_empty_string, - ::_pbi::ConstantInitialized()), - type_{0u} {} - -template -PROTOBUF_CONSTEXPR InstructionResult::InstructionResult(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(InstructionResult_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct InstructionResultDefaultTypeInternal { - PROTOBUF_CONSTEXPR InstructionResultDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~InstructionResultDefaultTypeInternal() {} - union { - InstructionResult _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InstructionResultDefaultTypeInternal _InstructionResult_default_instance_; -template -PROTOBUF_CONSTEXPR InstructionNextIteration::InstructionNextIteration(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(InstructionNextIteration_class_data_.base()){} -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase() { -} -#endif // PROTOBUF_CUSTOM_VTABLE -struct InstructionNextIterationDefaultTypeInternal { - PROTOBUF_CONSTEXPR InstructionNextIterationDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~InstructionNextIterationDefaultTypeInternal() {} - union { - InstructionNextIteration _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InstructionNextIterationDefaultTypeInternal _InstructionNextIteration_default_instance_; - -inline constexpr InstructionLoop::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - initializer_{0u}, - body_{0u}, - continuing_{0u} {} - -template -PROTOBUF_CONSTEXPR InstructionLoop::InstructionLoop(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(InstructionLoop_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct InstructionLoopDefaultTypeInternal { - PROTOBUF_CONSTEXPR InstructionLoopDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~InstructionLoopDefaultTypeInternal() {} - union { - InstructionLoop _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InstructionLoopDefaultTypeInternal _InstructionLoop_default_instance_; -template -PROTOBUF_CONSTEXPR InstructionLoadVectorElement::InstructionLoadVectorElement(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(InstructionLoadVectorElement_class_data_.base()){} -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase() { -} -#endif // PROTOBUF_CUSTOM_VTABLE -struct InstructionLoadVectorElementDefaultTypeInternal { - PROTOBUF_CONSTEXPR InstructionLoadVectorElementDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~InstructionLoadVectorElementDefaultTypeInternal() {} - union { - InstructionLoadVectorElement _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InstructionLoadVectorElementDefaultTypeInternal _InstructionLoadVectorElement_default_instance_; -template -PROTOBUF_CONSTEXPR InstructionLoad::InstructionLoad(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(InstructionLoad_class_data_.base()){} -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase() { -} -#endif // PROTOBUF_CUSTOM_VTABLE -struct InstructionLoadDefaultTypeInternal { - PROTOBUF_CONSTEXPR InstructionLoadDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~InstructionLoadDefaultTypeInternal() {} - union { - InstructionLoad _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InstructionLoadDefaultTypeInternal _InstructionLoad_default_instance_; -template -PROTOBUF_CONSTEXPR InstructionLet::InstructionLet(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(InstructionLet_class_data_.base()){} -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase() { -} -#endif // PROTOBUF_CUSTOM_VTABLE -struct InstructionLetDefaultTypeInternal { - PROTOBUF_CONSTEXPR InstructionLetDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~InstructionLetDefaultTypeInternal() {} - union { - InstructionLet _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InstructionLetDefaultTypeInternal _InstructionLet_default_instance_; - -inline constexpr InstructionIf::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - true__{0u}, - false__{0u} {} - -template -PROTOBUF_CONSTEXPR InstructionIf::InstructionIf(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(InstructionIf_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct InstructionIfDefaultTypeInternal { - PROTOBUF_CONSTEXPR InstructionIfDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~InstructionIfDefaultTypeInternal() {} - union { - InstructionIf _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InstructionIfDefaultTypeInternal _InstructionIf_default_instance_; -template -PROTOBUF_CONSTEXPR InstructionExitSwitch::InstructionExitSwitch(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(InstructionExitSwitch_class_data_.base()){} -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase() { -} -#endif // PROTOBUF_CUSTOM_VTABLE -struct InstructionExitSwitchDefaultTypeInternal { - PROTOBUF_CONSTEXPR InstructionExitSwitchDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~InstructionExitSwitchDefaultTypeInternal() {} - union { - InstructionExitSwitch _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InstructionExitSwitchDefaultTypeInternal _InstructionExitSwitch_default_instance_; -template -PROTOBUF_CONSTEXPR InstructionExitLoop::InstructionExitLoop(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(InstructionExitLoop_class_data_.base()){} -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase() { -} -#endif // PROTOBUF_CUSTOM_VTABLE -struct InstructionExitLoopDefaultTypeInternal { - PROTOBUF_CONSTEXPR InstructionExitLoopDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~InstructionExitLoopDefaultTypeInternal() {} - union { - InstructionExitLoop _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InstructionExitLoopDefaultTypeInternal _InstructionExitLoop_default_instance_; -template -PROTOBUF_CONSTEXPR InstructionExitIf::InstructionExitIf(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(InstructionExitIf_class_data_.base()){} -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase() { -} -#endif // PROTOBUF_CUSTOM_VTABLE -struct InstructionExitIfDefaultTypeInternal { - PROTOBUF_CONSTEXPR InstructionExitIfDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~InstructionExitIfDefaultTypeInternal() {} - union { - InstructionExitIf _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InstructionExitIfDefaultTypeInternal _InstructionExitIf_default_instance_; -template -PROTOBUF_CONSTEXPR InstructionDiscard::InstructionDiscard(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(InstructionDiscard_class_data_.base()){} -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase() { -} -#endif // PROTOBUF_CUSTOM_VTABLE -struct InstructionDiscardDefaultTypeInternal { - PROTOBUF_CONSTEXPR InstructionDiscardDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~InstructionDiscardDefaultTypeInternal() {} - union { - InstructionDiscard _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InstructionDiscardDefaultTypeInternal _InstructionDiscard_default_instance_; -template -PROTOBUF_CONSTEXPR InstructionConvert::InstructionConvert(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(InstructionConvert_class_data_.base()){} -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase() { -} -#endif // PROTOBUF_CUSTOM_VTABLE -struct InstructionConvertDefaultTypeInternal { - PROTOBUF_CONSTEXPR InstructionConvertDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~InstructionConvertDefaultTypeInternal() {} - union { - InstructionConvert _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InstructionConvertDefaultTypeInternal _InstructionConvert_default_instance_; -template -PROTOBUF_CONSTEXPR InstructionContinue::InstructionContinue(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(InstructionContinue_class_data_.base()){} -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase() { -} -#endif // PROTOBUF_CUSTOM_VTABLE -struct InstructionContinueDefaultTypeInternal { - PROTOBUF_CONSTEXPR InstructionContinueDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~InstructionContinueDefaultTypeInternal() {} - union { - InstructionContinue _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InstructionContinueDefaultTypeInternal _InstructionContinue_default_instance_; -template -PROTOBUF_CONSTEXPR InstructionConstruct::InstructionConstruct(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(InstructionConstruct_class_data_.base()){} -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase() { -} -#endif // PROTOBUF_CUSTOM_VTABLE -struct InstructionConstructDefaultTypeInternal { - PROTOBUF_CONSTEXPR InstructionConstructDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~InstructionConstructDefaultTypeInternal() {} - union { - InstructionConstruct _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InstructionConstructDefaultTypeInternal _InstructionConstruct_default_instance_; - -inline constexpr InstructionBuiltinCall::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - explicit_template_params_{}, - _explicit_template_params_cached_byte_size_{0}, - builtin_{static_cast< ::tint::core::ir::binary::pb::BuiltinFn >(0)} {} - -template -PROTOBUF_CONSTEXPR InstructionBuiltinCall::InstructionBuiltinCall(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(InstructionBuiltinCall_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct InstructionBuiltinCallDefaultTypeInternal { - PROTOBUF_CONSTEXPR InstructionBuiltinCallDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~InstructionBuiltinCallDefaultTypeInternal() {} - union { - InstructionBuiltinCall _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InstructionBuiltinCallDefaultTypeInternal _InstructionBuiltinCall_default_instance_; - -inline constexpr InstructionBreakIf::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - num_next_iter_values_{0u} {} - -template -PROTOBUF_CONSTEXPR InstructionBreakIf::InstructionBreakIf(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(InstructionBreakIf_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct InstructionBreakIfDefaultTypeInternal { - PROTOBUF_CONSTEXPR InstructionBreakIfDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~InstructionBreakIfDefaultTypeInternal() {} - union { - InstructionBreakIf _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InstructionBreakIfDefaultTypeInternal _InstructionBreakIf_default_instance_; -template -PROTOBUF_CONSTEXPR InstructionBitcast::InstructionBitcast(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(InstructionBitcast_class_data_.base()){} -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase() { -} -#endif // PROTOBUF_CUSTOM_VTABLE -struct InstructionBitcastDefaultTypeInternal { - PROTOBUF_CONSTEXPR InstructionBitcastDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~InstructionBitcastDefaultTypeInternal() {} - union { - InstructionBitcast _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InstructionBitcastDefaultTypeInternal _InstructionBitcast_default_instance_; - -inline constexpr InstructionBinary::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - op_{static_cast< ::tint::core::ir::binary::pb::BinaryOp >(0)} {} - -template -PROTOBUF_CONSTEXPR InstructionBinary::InstructionBinary(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(InstructionBinary_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct InstructionBinaryDefaultTypeInternal { - PROTOBUF_CONSTEXPR InstructionBinaryDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~InstructionBinaryDefaultTypeInternal() {} - union { - InstructionBinary _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InstructionBinaryDefaultTypeInternal _InstructionBinary_default_instance_; -template -PROTOBUF_CONSTEXPR InstructionAccess::InstructionAccess(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(InstructionAccess_class_data_.base()){} -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase() { -} -#endif // PROTOBUF_CUSTOM_VTABLE -struct InstructionAccessDefaultTypeInternal { - PROTOBUF_CONSTEXPR InstructionAccessDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~InstructionAccessDefaultTypeInternal() {} - union { - InstructionAccess _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InstructionAccessDefaultTypeInternal _InstructionAccess_default_instance_; - -inline constexpr ConstantValueSplat::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - type_{0u}, - elements_{0u}, - count_{0u} {} - -template -PROTOBUF_CONSTEXPR ConstantValueSplat::ConstantValueSplat(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(ConstantValueSplat_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct ConstantValueSplatDefaultTypeInternal { - PROTOBUF_CONSTEXPR ConstantValueSplatDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~ConstantValueSplatDefaultTypeInternal() {} - union { - ConstantValueSplat _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ConstantValueSplatDefaultTypeInternal _ConstantValueSplat_default_instance_; - -inline constexpr ConstantValueScalar::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : kind_{}, - _cached_size_{0}, - _oneof_case_{} {} - -template -PROTOBUF_CONSTEXPR ConstantValueScalar::ConstantValueScalar(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(ConstantValueScalar_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct ConstantValueScalarDefaultTypeInternal { - PROTOBUF_CONSTEXPR ConstantValueScalarDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~ConstantValueScalarDefaultTypeInternal() {} - union { - ConstantValueScalar _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ConstantValueScalarDefaultTypeInternal _ConstantValueScalar_default_instance_; - -inline constexpr ConstantValueComposite::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - elements_{}, - _elements_cached_byte_size_{0}, - type_{0u} {} - -template -PROTOBUF_CONSTEXPR ConstantValueComposite::ConstantValueComposite(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(ConstantValueComposite_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct ConstantValueCompositeDefaultTypeInternal { - PROTOBUF_CONSTEXPR ConstantValueCompositeDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~ConstantValueCompositeDefaultTypeInternal() {} - union { - ConstantValueComposite _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ConstantValueCompositeDefaultTypeInternal _ConstantValueComposite_default_instance_; - -inline constexpr BlockParameter::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - name_( - &::google::protobuf::internal::fixed_address_empty_string, - ::_pbi::ConstantInitialized()), - type_{0u} {} - -template -PROTOBUF_CONSTEXPR BlockParameter::BlockParameter(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(BlockParameter_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct BlockParameterDefaultTypeInternal { - PROTOBUF_CONSTEXPR BlockParameterDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~BlockParameterDefaultTypeInternal() {} - union { - BlockParameter _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BlockParameterDefaultTypeInternal _BlockParameter_default_instance_; - -inline constexpr BindingPoint::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - group_{0u}, - binding_{0u} {} - -template -PROTOBUF_CONSTEXPR BindingPoint::BindingPoint(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(BindingPoint_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct BindingPointDefaultTypeInternal { - PROTOBUF_CONSTEXPR BindingPointDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~BindingPointDefaultTypeInternal() {} - union { - BindingPoint _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BindingPointDefaultTypeInternal _BindingPoint_default_instance_; - -inline constexpr InstructionVar::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - binding_point_{nullptr}, - input_attachment_index_{0u} {} - -template -PROTOBUF_CONSTEXPR InstructionVar::InstructionVar(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(InstructionVar_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct InstructionVarDefaultTypeInternal { - PROTOBUF_CONSTEXPR InstructionVarDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~InstructionVarDefaultTypeInternal() {} - union { - InstructionVar _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InstructionVarDefaultTypeInternal _InstructionVar_default_instance_; - -inline constexpr InstructionSwitch::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : cases_{}, - _cached_size_{0} {} - -template -PROTOBUF_CONSTEXPR InstructionSwitch::InstructionSwitch(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(InstructionSwitch_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct InstructionSwitchDefaultTypeInternal { - PROTOBUF_CONSTEXPR InstructionSwitchDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~InstructionSwitchDefaultTypeInternal() {} - union { - InstructionSwitch _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InstructionSwitchDefaultTypeInternal _InstructionSwitch_default_instance_; - -inline constexpr Function::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - parameters_{}, - _parameters_cached_byte_size_{0}, - name_( - &::google::protobuf::internal::fixed_address_empty_string, - ::_pbi::ConstantInitialized()), - workgroup_size_{nullptr}, - return_interpolation_{nullptr}, - return_type_{0u}, - block_{0u}, - pipeline_stage_{static_cast< ::tint::core::ir::binary::pb::PipelineStage >(0)}, - return_location_{0u}, - return_builtin_{static_cast< ::tint::core::ir::binary::pb::BuiltinValue >(0)}, - return_invariant_{false}, - subgroup_size_{0u} {} - -template -PROTOBUF_CONSTEXPR Function::Function(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(Function_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct FunctionDefaultTypeInternal { - PROTOBUF_CONSTEXPR FunctionDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~FunctionDefaultTypeInternal() {} - union { - Function _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FunctionDefaultTypeInternal _Function_default_instance_; - -inline constexpr ConstantValue::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : kind_{}, - _cached_size_{0}, - _oneof_case_{} {} - -template -PROTOBUF_CONSTEXPR ConstantValue::ConstantValue(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(ConstantValue_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct ConstantValueDefaultTypeInternal { - PROTOBUF_CONSTEXPR ConstantValueDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~ConstantValueDefaultTypeInternal() {} - union { - ConstantValue _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ConstantValueDefaultTypeInternal _ConstantValue_default_instance_; - -inline constexpr AttributesStructMember::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - interpolation_{nullptr}, - location_{0u}, - blend_src_{0u}, - color_{0u}, - builtin_{static_cast< ::tint::core::ir::binary::pb::BuiltinValue >(0)}, - invariant_{false} {} - -template -PROTOBUF_CONSTEXPR AttributesStructMember::AttributesStructMember(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(AttributesStructMember_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct AttributesStructMemberDefaultTypeInternal { - PROTOBUF_CONSTEXPR AttributesStructMemberDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~AttributesStructMemberDefaultTypeInternal() {} - union { - AttributesStructMember _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AttributesStructMemberDefaultTypeInternal _AttributesStructMember_default_instance_; - -inline constexpr AttributesFunctionParameter::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - interpolation_{nullptr}, - binding_point_{nullptr}, - builtin_{static_cast< ::tint::core::ir::binary::pb::BuiltinValue >(0)}, - location_{0u}, - color_{0u}, - invariant_{false} {} - -template -PROTOBUF_CONSTEXPR AttributesFunctionParameter::AttributesFunctionParameter(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(AttributesFunctionParameter_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct AttributesFunctionParameterDefaultTypeInternal { - PROTOBUF_CONSTEXPR AttributesFunctionParameterDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~AttributesFunctionParameterDefaultTypeInternal() {} - union { - AttributesFunctionParameter _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AttributesFunctionParameterDefaultTypeInternal _AttributesFunctionParameter_default_instance_; - -inline constexpr TypeStructMember::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - name_( - &::google::protobuf::internal::fixed_address_empty_string, - ::_pbi::ConstantInitialized()), - attributes_{nullptr}, - type_{0u}, - size_{0u}, - align_{0u} {} - -template -PROTOBUF_CONSTEXPR TypeStructMember::TypeStructMember(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(TypeStructMember_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct TypeStructMemberDefaultTypeInternal { - PROTOBUF_CONSTEXPR TypeStructMemberDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~TypeStructMemberDefaultTypeInternal() {} - union { - TypeStructMember _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TypeStructMemberDefaultTypeInternal _TypeStructMember_default_instance_; - -inline constexpr Instruction::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : operands_{}, - _operands_cached_byte_size_{0}, - results_{}, - _results_cached_byte_size_{0}, - kind_{}, - _cached_size_{0}, - _oneof_case_{} {} - -template -PROTOBUF_CONSTEXPR Instruction::Instruction(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(Instruction_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct InstructionDefaultTypeInternal { - PROTOBUF_CONSTEXPR InstructionDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~InstructionDefaultTypeInternal() {} - union { - Instruction _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InstructionDefaultTypeInternal _Instruction_default_instance_; - -inline constexpr FunctionParameter::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - name_( - &::google::protobuf::internal::fixed_address_empty_string, - ::_pbi::ConstantInitialized()), - attributes_{nullptr}, - type_{0u} {} - -template -PROTOBUF_CONSTEXPR FunctionParameter::FunctionParameter(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(FunctionParameter_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct FunctionParameterDefaultTypeInternal { - PROTOBUF_CONSTEXPR FunctionParameterDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~FunctionParameterDefaultTypeInternal() {} - union { - FunctionParameter _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FunctionParameterDefaultTypeInternal _FunctionParameter_default_instance_; - -inline constexpr Value::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : kind_{}, - _cached_size_{0}, - _oneof_case_{} {} - -template -PROTOBUF_CONSTEXPR Value::Value(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(Value_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct ValueDefaultTypeInternal { - PROTOBUF_CONSTEXPR ValueDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~ValueDefaultTypeInternal() {} - union { - Value _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ValueDefaultTypeInternal _Value_default_instance_; - -inline constexpr TypeStruct::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - member_{}, - name_( - &::google::protobuf::internal::fixed_address_empty_string, - ::_pbi::ConstantInitialized()) {} - -template -PROTOBUF_CONSTEXPR TypeStruct::TypeStruct(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(TypeStruct_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct TypeStructDefaultTypeInternal { - PROTOBUF_CONSTEXPR TypeStructDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~TypeStructDefaultTypeInternal() {} - union { - TypeStruct _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TypeStructDefaultTypeInternal _TypeStruct_default_instance_; - -inline constexpr Block::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - parameters_{}, - _parameters_cached_byte_size_{0}, - instructions_{}, - is_multi_in_{false} {} - -template -PROTOBUF_CONSTEXPR Block::Block(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(Block_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct BlockDefaultTypeInternal { - PROTOBUF_CONSTEXPR BlockDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~BlockDefaultTypeInternal() {} - union { - Block _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BlockDefaultTypeInternal _Block_default_instance_; - -inline constexpr Type::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : kind_{}, - _cached_size_{0}, - _oneof_case_{} {} - -template -PROTOBUF_CONSTEXPR Type::Type(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(Type_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct TypeDefaultTypeInternal { - PROTOBUF_CONSTEXPR TypeDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~TypeDefaultTypeInternal() {} - union { - Type _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TypeDefaultTypeInternal _Type_default_instance_; - -inline constexpr Module::Impl_::Impl_( - ::_pbi::ConstantInitialized) noexcept - : _cached_size_{0}, - types_{}, - values_{}, - constant_values_{}, - functions_{}, - blocks_{}, - root_block_{0u} {} - -template -PROTOBUF_CONSTEXPR Module::Module(::_pbi::ConstantInitialized) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(Module_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(::_pbi::ConstantInitialized()) { -} -struct ModuleDefaultTypeInternal { - PROTOBUF_CONSTEXPR ModuleDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~ModuleDefaultTypeInternal() {} - union { - Module _instance; - }; -}; - -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT_WITH_PTR - PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ModuleDefaultTypeInternal _Module_default_instance_; -} // namespace pb -} // namespace binary -} // namespace ir -} // namespace core -} // namespace tint -static const ::_pb::EnumDescriptor* PROTOBUF_NONNULL - file_level_enum_descriptors_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto[14]; -static constexpr const ::_pb::ServiceDescriptor *PROTOBUF_NONNULL *PROTOBUF_NULLABLE - file_level_service_descriptors_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto = nullptr; -const ::uint32_t - TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto::offsets[] ABSL_ATTRIBUTE_SECTION_VARIABLE( - protodesc_cold) = { - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Module, _impl_._has_bits_), - 9, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Module, _impl_.types_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Module, _impl_.values_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Module, _impl_.constant_values_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Module, _impl_.functions_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Module, _impl_.blocks_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Module, _impl_.root_block_), - ~0u, - ~0u, - ~0u, - ~0u, - ~0u, - 0, - 0x004, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Type, _impl_._oneof_case_[0]), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Type, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Type, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Type, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Type, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Type, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Type, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Type, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Type, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Type, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Type, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Type, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Type, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Type, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Type, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Type, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Type, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Type, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Type, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Type, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Type, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Type, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Type, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Type, _impl_.kind_), - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeVector, _impl_._has_bits_), - 5, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeVector, _impl_.width_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeVector, _impl_.element_type_), - 0, - 1, - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeMatrix, _impl_._has_bits_), - 6, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeMatrix, _impl_.num_columns_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeMatrix, _impl_.num_rows_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeMatrix, _impl_.element_type_), - 0, - 1, - 2, - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeArray, _impl_._has_bits_), - 5, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeArray, _impl_.element_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeArray, _impl_.count_), - 0, - 1, - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeBindingArray, _impl_._has_bits_), - 5, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeBindingArray, _impl_.element_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeBindingArray, _impl_.count_), - 0, - 1, - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypePointer, _impl_._has_bits_), - 6, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypePointer, _impl_.address_space_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypePointer, _impl_.store_type_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypePointer, _impl_.access_), - 0, - 1, - 2, - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeStruct, _impl_._has_bits_), - 5, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeStruct, _impl_.name_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeStruct, _impl_.member_), - 0, - ~0u, - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeStructMember, _impl_._has_bits_), - 8, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeStructMember, _impl_.name_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeStructMember, _impl_.type_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeStructMember, _impl_.size_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeStructMember, _impl_.align_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeStructMember, _impl_.attributes_), - 0, - 2, - 3, - 4, - 1, - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeAtomic, _impl_._has_bits_), - 4, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeAtomic, _impl_.type_), - 0, - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeDepthTexture, _impl_._has_bits_), - 4, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeDepthTexture, _impl_.dimension_), - 0, - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeSampledTexture, _impl_._has_bits_), - 5, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeSampledTexture, _impl_.dimension_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeSampledTexture, _impl_.sub_type_), - 0, - 1, - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeMultisampledTexture, _impl_._has_bits_), - 5, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeMultisampledTexture, _impl_.dimension_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeMultisampledTexture, _impl_.sub_type_), - 0, - 1, - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeDepthMultisampledTexture, _impl_._has_bits_), - 4, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeDepthMultisampledTexture, _impl_.dimension_), - 0, - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeStorageTexture, _impl_._has_bits_), - 6, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeStorageTexture, _impl_.dimension_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeStorageTexture, _impl_.texel_format_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeStorageTexture, _impl_.access_), - 0, - 1, - 2, - 0x000, // bitmap - 0x000, // bitmap - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeSampler, _impl_._has_bits_), - 4, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeSampler, _impl_.kind_), - 0, - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeInputAttachment, _impl_._has_bits_), - 4, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeInputAttachment, _impl_.sub_type_), - 0, - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeSubgroupMatrix, _impl_._has_bits_), - 6, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeSubgroupMatrix, _impl_.sub_type_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeSubgroupMatrix, _impl_.rows_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeSubgroupMatrix, _impl_.columns_), - 0, - 1, - 2, - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeBuffer, _impl_._has_bits_), - 4, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeBuffer, _impl_.count_), - 0, - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeTexelBuffer, _impl_._has_bits_), - 5, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeTexelBuffer, _impl_.texel_format_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::TypeTexelBuffer, _impl_.access_), - 0, - 1, - 0x004, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Value, _impl_._oneof_case_[0]), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Value, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Value, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Value, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Value, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Value, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Value, _impl_.kind_), - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::InstructionResult, _impl_._has_bits_), - 5, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::InstructionResult, _impl_.type_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::InstructionResult, _impl_.name_), - 1, - 0, - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::FunctionParameter, _impl_._has_bits_), - 6, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::FunctionParameter, _impl_.type_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::FunctionParameter, _impl_.name_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::FunctionParameter, _impl_.attributes_), - 2, - 0, - 1, - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::BlockParameter, _impl_._has_bits_), - 5, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::BlockParameter, _impl_.type_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::BlockParameter, _impl_.name_), - 1, - 0, - 0x004, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::ConstantValue, _impl_._oneof_case_[0]), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::ConstantValue, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::ConstantValue, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::ConstantValue, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::ConstantValue, _impl_.kind_), - 0x004, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::ConstantValueScalar, _impl_._oneof_case_[0]), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::ConstantValueScalar, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::ConstantValueScalar, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::ConstantValueScalar, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::ConstantValueScalar, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::ConstantValueScalar, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::ConstantValueScalar, _impl_.kind_), - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::ConstantValueComposite, _impl_._has_bits_), - 5, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::ConstantValueComposite, _impl_.type_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::ConstantValueComposite, _impl_.elements_), - 0, - ~0u, - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::ConstantValueSplat, _impl_._has_bits_), - 6, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::ConstantValueSplat, _impl_.type_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::ConstantValueSplat, _impl_.elements_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::ConstantValueSplat, _impl_.count_), - 0, - 1, - 2, - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Function, _impl_._has_bits_), - 14, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Function, _impl_.return_type_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Function, _impl_.block_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Function, _impl_.name_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Function, _impl_.pipeline_stage_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Function, _impl_.workgroup_size_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Function, _impl_.parameters_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Function, _impl_.return_location_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Function, _impl_.return_interpolation_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Function, _impl_.return_builtin_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Function, _impl_.return_invariant_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Function, _impl_.subgroup_size_), - 3, - 4, - 0, - 5, - 1, - ~0u, - 6, - 2, - 7, - 8, - 9, - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::WorkgroupSize, _impl_._has_bits_), - 6, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::WorkgroupSize, _impl_.x_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::WorkgroupSize, _impl_.y_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::WorkgroupSize, _impl_.z_), - 0, - 1, - 2, - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Block, _impl_._has_bits_), - 6, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Block, _impl_.parameters_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Block, _impl_.instructions_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Block, _impl_.is_multi_in_), - ~0u, - ~0u, - 0, - 0x004, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Instruction, _impl_._oneof_case_[0]), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Instruction, _impl_.operands_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Instruction, _impl_.results_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Instruction, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Instruction, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Instruction, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Instruction, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Instruction, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Instruction, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Instruction, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Instruction, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Instruction, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Instruction, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Instruction, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Instruction, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Instruction, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Instruction, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Instruction, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Instruction, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Instruction, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Instruction, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Instruction, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Instruction, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Instruction, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Instruction, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Instruction, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Instruction, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Instruction, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Instruction, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Instruction, _impl_.kind_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Instruction, _impl_.kind_), - 0x000, // bitmap - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::InstructionUnary, _impl_._has_bits_), - 4, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::InstructionUnary, _impl_.op_), - 0, - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::InstructionBinary, _impl_._has_bits_), - 4, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::InstructionBinary, _impl_.op_), - 0, - 0x000, // bitmap - 0x000, // bitmap - 0x000, // bitmap - 0x000, // bitmap - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::InstructionVar, _impl_._has_bits_), - 5, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::InstructionVar, _impl_.binding_point_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::InstructionVar, _impl_.input_attachment_index_), - 0, - 1, - 0x000, // bitmap - 0x000, // bitmap - 0x000, // bitmap - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::InstructionBuiltinCall, _impl_._has_bits_), - 5, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::InstructionBuiltinCall, _impl_.builtin_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::InstructionBuiltinCall, _impl_.explicit_template_params_), - 0, - ~0u, - 0x000, // bitmap - 0x000, // bitmap - 0x000, // bitmap - 0x000, // bitmap - 0x000, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::InstructionSwizzle, _impl_.indices_), - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::InstructionIf, _impl_._has_bits_), - 5, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::InstructionIf, _impl_.true__), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::InstructionIf, _impl_.false__), - 0, - 1, - 0x000, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::InstructionSwitch, _impl_.cases_), - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::InstructionLoop, _impl_._has_bits_), - 6, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::InstructionLoop, _impl_.initializer_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::InstructionLoop, _impl_.body_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::InstructionLoop, _impl_.continuing_), - 0, - 1, - 2, - 0x000, // bitmap - 0x000, // bitmap - 0x000, // bitmap - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::SwitchCase, _impl_._has_bits_), - 6, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::SwitchCase, _impl_.block_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::SwitchCase, _impl_.selectors_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::SwitchCase, _impl_.is_default_), - 0, - ~0u, - 1, - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::BindingPoint, _impl_._has_bits_), - 5, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::BindingPoint, _impl_.group_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::BindingPoint, _impl_.binding_), - 0, - 1, - 0x000, // bitmap - 0x000, // bitmap - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::InstructionBreakIf, _impl_._has_bits_), - 4, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::InstructionBreakIf, _impl_.num_next_iter_values_), - 0, - 0x000, // bitmap - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::AttributesStructMember, _impl_._has_bits_), - 9, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::AttributesStructMember, _impl_.location_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::AttributesStructMember, _impl_.blend_src_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::AttributesStructMember, _impl_.color_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::AttributesStructMember, _impl_.builtin_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::AttributesStructMember, _impl_.interpolation_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::AttributesStructMember, _impl_.invariant_), - 1, - 2, - 3, - 4, - 0, - 5, - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::AttributesFunctionParameter, _impl_._has_bits_), - 9, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::AttributesFunctionParameter, _impl_.builtin_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::AttributesFunctionParameter, _impl_.location_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::AttributesFunctionParameter, _impl_.color_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::AttributesFunctionParameter, _impl_.interpolation_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::AttributesFunctionParameter, _impl_.binding_point_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::AttributesFunctionParameter, _impl_.invariant_), - 2, - 3, - 4, - 0, - 1, - 5, - 0x081, // bitmap - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Interpolation, _impl_._has_bits_), - 5, // hasbit index offset - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Interpolation, _impl_.type_), - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Interpolation, _impl_.sampling_), - 0, - 1, -}; - -static const ::_pbi::MigrationSchema - schemas[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { - {0, sizeof(::tint::core::ir::binary::pb::Module)}, - {15, sizeof(::tint::core::ir::binary::pb::Type)}, - {40, sizeof(::tint::core::ir::binary::pb::TypeVector)}, - {47, sizeof(::tint::core::ir::binary::pb::TypeMatrix)}, - {56, sizeof(::tint::core::ir::binary::pb::TypeArray)}, - {63, sizeof(::tint::core::ir::binary::pb::TypeBindingArray)}, - {70, sizeof(::tint::core::ir::binary::pb::TypePointer)}, - {79, sizeof(::tint::core::ir::binary::pb::TypeStruct)}, - {86, sizeof(::tint::core::ir::binary::pb::TypeStructMember)}, - {99, sizeof(::tint::core::ir::binary::pb::TypeAtomic)}, - {104, sizeof(::tint::core::ir::binary::pb::TypeDepthTexture)}, - {109, sizeof(::tint::core::ir::binary::pb::TypeSampledTexture)}, - {116, sizeof(::tint::core::ir::binary::pb::TypeMultisampledTexture)}, - {123, sizeof(::tint::core::ir::binary::pb::TypeDepthMultisampledTexture)}, - {128, sizeof(::tint::core::ir::binary::pb::TypeStorageTexture)}, - {137, sizeof(::tint::core::ir::binary::pb::TypeResourceBinding)}, - {138, sizeof(::tint::core::ir::binary::pb::TypeExternalTexture)}, - {139, sizeof(::tint::core::ir::binary::pb::TypeSampler)}, - {144, sizeof(::tint::core::ir::binary::pb::TypeInputAttachment)}, - {149, sizeof(::tint::core::ir::binary::pb::TypeSubgroupMatrix)}, - {158, sizeof(::tint::core::ir::binary::pb::TypeBuffer)}, - {163, sizeof(::tint::core::ir::binary::pb::TypeTexelBuffer)}, - {170, sizeof(::tint::core::ir::binary::pb::Value)}, - {178, sizeof(::tint::core::ir::binary::pb::InstructionResult)}, - {185, sizeof(::tint::core::ir::binary::pb::FunctionParameter)}, - {194, sizeof(::tint::core::ir::binary::pb::BlockParameter)}, - {201, sizeof(::tint::core::ir::binary::pb::ConstantValue)}, - {207, sizeof(::tint::core::ir::binary::pb::ConstantValueScalar)}, - {215, sizeof(::tint::core::ir::binary::pb::ConstantValueComposite)}, - {222, sizeof(::tint::core::ir::binary::pb::ConstantValueSplat)}, - {231, sizeof(::tint::core::ir::binary::pb::Function)}, - {256, sizeof(::tint::core::ir::binary::pb::WorkgroupSize)}, - {265, sizeof(::tint::core::ir::binary::pb::Block)}, - {274, sizeof(::tint::core::ir::binary::pb::Instruction)}, - {306, sizeof(::tint::core::ir::binary::pb::InstructionReturn)}, - {307, sizeof(::tint::core::ir::binary::pb::InstructionUnary)}, - {312, sizeof(::tint::core::ir::binary::pb::InstructionBinary)}, - {317, sizeof(::tint::core::ir::binary::pb::InstructionBitcast)}, - {318, sizeof(::tint::core::ir::binary::pb::InstructionConstruct)}, - {319, sizeof(::tint::core::ir::binary::pb::InstructionDiscard)}, - {320, sizeof(::tint::core::ir::binary::pb::InstructionLet)}, - {321, sizeof(::tint::core::ir::binary::pb::InstructionVar)}, - {328, sizeof(::tint::core::ir::binary::pb::InstructionConvert)}, - {329, sizeof(::tint::core::ir::binary::pb::InstructionAccess)}, - {330, sizeof(::tint::core::ir::binary::pb::InstructionUserCall)}, - {331, sizeof(::tint::core::ir::binary::pb::InstructionBuiltinCall)}, - {338, sizeof(::tint::core::ir::binary::pb::InstructionLoad)}, - {339, sizeof(::tint::core::ir::binary::pb::InstructionStore)}, - {340, sizeof(::tint::core::ir::binary::pb::InstructionLoadVectorElement)}, - {341, sizeof(::tint::core::ir::binary::pb::InstructionStoreVectorElement)}, - {342, sizeof(::tint::core::ir::binary::pb::InstructionSwizzle)}, - {344, sizeof(::tint::core::ir::binary::pb::InstructionIf)}, - {351, sizeof(::tint::core::ir::binary::pb::InstructionSwitch)}, - {353, sizeof(::tint::core::ir::binary::pb::InstructionLoop)}, - {362, sizeof(::tint::core::ir::binary::pb::InstructionExitIf)}, - {363, sizeof(::tint::core::ir::binary::pb::InstructionExitSwitch)}, - {364, sizeof(::tint::core::ir::binary::pb::InstructionExitLoop)}, - {365, sizeof(::tint::core::ir::binary::pb::SwitchCase)}, - {374, sizeof(::tint::core::ir::binary::pb::BindingPoint)}, - {381, sizeof(::tint::core::ir::binary::pb::InstructionNextIteration)}, - {382, sizeof(::tint::core::ir::binary::pb::InstructionContinue)}, - {383, sizeof(::tint::core::ir::binary::pb::InstructionBreakIf)}, - {388, sizeof(::tint::core::ir::binary::pb::InstructionUnreachable)}, - {389, sizeof(::tint::core::ir::binary::pb::AttributesStructMember)}, - {404, sizeof(::tint::core::ir::binary::pb::AttributesFunctionParameter)}, - {419, sizeof(::tint::core::ir::binary::pb::Interpolation)}, -}; -static const ::_pb::Message* PROTOBUF_NONNULL const file_default_instances[] = { - &::tint::core::ir::binary::pb::_Module_default_instance_._instance, - &::tint::core::ir::binary::pb::_Type_default_instance_._instance, - &::tint::core::ir::binary::pb::_TypeVector_default_instance_._instance, - &::tint::core::ir::binary::pb::_TypeMatrix_default_instance_._instance, - &::tint::core::ir::binary::pb::_TypeArray_default_instance_._instance, - &::tint::core::ir::binary::pb::_TypeBindingArray_default_instance_._instance, - &::tint::core::ir::binary::pb::_TypePointer_default_instance_._instance, - &::tint::core::ir::binary::pb::_TypeStruct_default_instance_._instance, - &::tint::core::ir::binary::pb::_TypeStructMember_default_instance_._instance, - &::tint::core::ir::binary::pb::_TypeAtomic_default_instance_._instance, - &::tint::core::ir::binary::pb::_TypeDepthTexture_default_instance_._instance, - &::tint::core::ir::binary::pb::_TypeSampledTexture_default_instance_._instance, - &::tint::core::ir::binary::pb::_TypeMultisampledTexture_default_instance_._instance, - &::tint::core::ir::binary::pb::_TypeDepthMultisampledTexture_default_instance_._instance, - &::tint::core::ir::binary::pb::_TypeStorageTexture_default_instance_._instance, - &::tint::core::ir::binary::pb::_TypeResourceBinding_default_instance_._instance, - &::tint::core::ir::binary::pb::_TypeExternalTexture_default_instance_._instance, - &::tint::core::ir::binary::pb::_TypeSampler_default_instance_._instance, - &::tint::core::ir::binary::pb::_TypeInputAttachment_default_instance_._instance, - &::tint::core::ir::binary::pb::_TypeSubgroupMatrix_default_instance_._instance, - &::tint::core::ir::binary::pb::_TypeBuffer_default_instance_._instance, - &::tint::core::ir::binary::pb::_TypeTexelBuffer_default_instance_._instance, - &::tint::core::ir::binary::pb::_Value_default_instance_._instance, - &::tint::core::ir::binary::pb::_InstructionResult_default_instance_._instance, - &::tint::core::ir::binary::pb::_FunctionParameter_default_instance_._instance, - &::tint::core::ir::binary::pb::_BlockParameter_default_instance_._instance, - &::tint::core::ir::binary::pb::_ConstantValue_default_instance_._instance, - &::tint::core::ir::binary::pb::_ConstantValueScalar_default_instance_._instance, - &::tint::core::ir::binary::pb::_ConstantValueComposite_default_instance_._instance, - &::tint::core::ir::binary::pb::_ConstantValueSplat_default_instance_._instance, - &::tint::core::ir::binary::pb::_Function_default_instance_._instance, - &::tint::core::ir::binary::pb::_WorkgroupSize_default_instance_._instance, - &::tint::core::ir::binary::pb::_Block_default_instance_._instance, - &::tint::core::ir::binary::pb::_Instruction_default_instance_._instance, - &::tint::core::ir::binary::pb::_InstructionReturn_default_instance_._instance, - &::tint::core::ir::binary::pb::_InstructionUnary_default_instance_._instance, - &::tint::core::ir::binary::pb::_InstructionBinary_default_instance_._instance, - &::tint::core::ir::binary::pb::_InstructionBitcast_default_instance_._instance, - &::tint::core::ir::binary::pb::_InstructionConstruct_default_instance_._instance, - &::tint::core::ir::binary::pb::_InstructionDiscard_default_instance_._instance, - &::tint::core::ir::binary::pb::_InstructionLet_default_instance_._instance, - &::tint::core::ir::binary::pb::_InstructionVar_default_instance_._instance, - &::tint::core::ir::binary::pb::_InstructionConvert_default_instance_._instance, - &::tint::core::ir::binary::pb::_InstructionAccess_default_instance_._instance, - &::tint::core::ir::binary::pb::_InstructionUserCall_default_instance_._instance, - &::tint::core::ir::binary::pb::_InstructionBuiltinCall_default_instance_._instance, - &::tint::core::ir::binary::pb::_InstructionLoad_default_instance_._instance, - &::tint::core::ir::binary::pb::_InstructionStore_default_instance_._instance, - &::tint::core::ir::binary::pb::_InstructionLoadVectorElement_default_instance_._instance, - &::tint::core::ir::binary::pb::_InstructionStoreVectorElement_default_instance_._instance, - &::tint::core::ir::binary::pb::_InstructionSwizzle_default_instance_._instance, - &::tint::core::ir::binary::pb::_InstructionIf_default_instance_._instance, - &::tint::core::ir::binary::pb::_InstructionSwitch_default_instance_._instance, - &::tint::core::ir::binary::pb::_InstructionLoop_default_instance_._instance, - &::tint::core::ir::binary::pb::_InstructionExitIf_default_instance_._instance, - &::tint::core::ir::binary::pb::_InstructionExitSwitch_default_instance_._instance, - &::tint::core::ir::binary::pb::_InstructionExitLoop_default_instance_._instance, - &::tint::core::ir::binary::pb::_SwitchCase_default_instance_._instance, - &::tint::core::ir::binary::pb::_BindingPoint_default_instance_._instance, - &::tint::core::ir::binary::pb::_InstructionNextIteration_default_instance_._instance, - &::tint::core::ir::binary::pb::_InstructionContinue_default_instance_._instance, - &::tint::core::ir::binary::pb::_InstructionBreakIf_default_instance_._instance, - &::tint::core::ir::binary::pb::_InstructionUnreachable_default_instance_._instance, - &::tint::core::ir::binary::pb::_AttributesStructMember_default_instance_._instance, - &::tint::core::ir::binary::pb::_AttributesFunctionParameter_default_instance_._instance, - &::tint::core::ir::binary::pb::_Interpolation_default_instance_._instance, -}; -const char descriptor_table_protodef_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE( - protodesc_cold) = { - "\n!src/tint/utils/protos/ir/ir.proto\022\026tin" - "t.core.ir.binary.pb\"\234\002\n\006Module\022+\n\005types\030" - "\001 \003(\0132\034.tint.core.ir.binary.pb.Type\022-\n\006v" - "alues\030\002 \003(\0132\035.tint.core.ir.binary.pb.Val" - "ue\022>\n\017constant_values\030\003 \003(\0132%.tint.core." - "ir.binary.pb.ConstantValue\0223\n\tfunctions\030" - "\004 \003(\0132 .tint.core.ir.binary.pb.Function\022" - "-\n\006blocks\030\005 \003(\0132\035.tint.core.ir.binary.pb" - ".Block\022\022\n\nroot_block\030\006 \001(\r\"\314\013\n\004Type\0222\n\005b" - "asic\030\001 \001(\0162!.tint.core.ir.binary.pb.Type" - "BasicH\000\0224\n\006vector\030\002 \001(\0132\".tint.core.ir.b" - "inary.pb.TypeVectorH\000\0224\n\006matrix\030\003 \001(\0132\"." - "tint.core.ir.binary.pb.TypeMatrixH\000\0222\n\005a" - "rray\030\004 \001(\0132!.tint.core.ir.binary.pb.Type" - "ArrayH\000\0226\n\007pointer\030\005 \001(\0132#.tint.core.ir." - "binary.pb.TypePointerH\000\0224\n\006struct\030\006 \001(\0132" - "\".tint.core.ir.binary.pb.TypeStructH\000\0224\n" - "\006atomic\030\007 \001(\0132\".tint.core.ir.binary.pb.T" - "ypeAtomicH\000\022A\n\rdepth_texture\030\010 \001(\0132(.tin" - "t.core.ir.binary.pb.TypeDepthTextureH\000\022E" - "\n\017sampled_texture\030\t \001(\0132*.tint.core.ir.b" - "inary.pb.TypeSampledTextureH\000\022O\n\024multisa" - "mpled_texture\030\n \001(\0132/.tint.core.ir.binar" - "y.pb.TypeMultisampledTextureH\000\022Z\n\032depth_" - "multisampled_texture\030\013 \001(\01324.tint.core.i" - "r.binary.pb.TypeDepthMultisampledTexture" - "H\000\022E\n\017storage_texture\030\014 \001(\0132*.tint.core." - "ir.binary.pb.TypeStorageTextureH\000\022G\n\020ext" - "ernal_texture\030\r \001(\0132+.tint.core.ir.binar" - "y.pb.TypeExternalTextureH\000\0226\n\007sampler\030\016 " - "\001(\0132#.tint.core.ir.binary.pb.TypeSampler" - "H\000\022G\n\020input_attachment\030\017 \001(\0132+.tint.core" - ".ir.binary.pb.TypeInputAttachmentH\000\022J\n\024s" - "ubgroup_matrix_left\030\020 \001(\0132*.tint.core.ir" - ".binary.pb.TypeSubgroupMatrixH\000\022K\n\025subgr" - "oup_matrix_right\030\021 \001(\0132*.tint.core.ir.bi" - "nary.pb.TypeSubgroupMatrixH\000\022L\n\026subgroup" - "_matrix_result\030\022 \001(\0132*.tint.core.ir.bina" - "ry.pb.TypeSubgroupMatrixH\000\022C\n\016builtin_st" - "ruct\030\023 \001(\0162).tint.core.ir.binary.pb.Type" - "BuiltinStructH\000\022A\n\rbinding_array\030\024 \001(\0132(" - ".tint.core.ir.binary.pb.TypeBindingArray" - "H\000\022\?\n\014texel_buffer\030\025 \001(\0132\'.tint.core.ir." - "binary.pb.TypeTexelBufferH\000\0224\n\006buffer\030\027 " - "\001(\0132\".tint.core.ir.binary.pb.TypeBufferH" - "\000B\006\n\004kindJ\004\010\026\020\027R\020resource_binding\"1\n\nTyp" - "eVector\022\r\n\005width\030\001 \001(\r\022\024\n\014element_type\030\002" - " \001(\r\"I\n\nTypeMatrix\022\023\n\013num_columns\030\001 \001(\r\022" - "\020\n\010num_rows\030\002 \001(\r\022\024\n\014element_type\030\003 \001(\r\"" - "9\n\tTypeArray\022\017\n\007element\030\001 \001(\r\022\r\n\005count\030\003" - " \001(\rJ\004\010\002\020\003R\006stride\"2\n\020TypeBindingArray\022\017" - "\n\007element\030\001 \001(\r\022\r\n\005count\030\002 \001(\r\"\225\001\n\013TypeP" - "ointer\022;\n\raddress_space\030\001 \001(\0162$.tint.cor" - "e.ir.binary.pb.AddressSpace\022\022\n\nstore_typ" - "e\030\002 \001(\r\0225\n\006access\030\003 \001(\0162%.tint.core.ir.b" - "inary.pb.AccessControl\"T\n\nTypeStruct\022\014\n\004" - "name\030\001 \001(\t\0228\n\006member\030\002 \003(\0132(.tint.core.i" - "r.binary.pb.TypeStructMember\"\243\001\n\020TypeStr" - "uctMember\022\014\n\004name\030\001 \001(\t\022\014\n\004type\030\002 \001(\r\022\014\n" - "\004size\030\003 \001(\r\022\r\n\005align\030\004 \001(\r\022G\n\nattributes" - "\030\005 \001(\0132..tint.core.ir.binary.pb.Attribut" - "esStructMemberH\000\210\001\001B\r\n\013_attributes\"\032\n\nTy" - "peAtomic\022\014\n\004type\030\001 \001(\r\"O\n\020TypeDepthTextu" - "re\022;\n\tdimension\030\001 \001(\0162(.tint.core.ir.bin" - "ary.pb.TextureDimension\"c\n\022TypeSampledTe" - "xture\022;\n\tdimension\030\001 \001(\0162(.tint.core.ir." - "binary.pb.TextureDimension\022\020\n\010sub_type\030\002" - " \001(\r\"h\n\027TypeMultisampledTexture\022;\n\tdimen" - "sion\030\001 \001(\0162(.tint.core.ir.binary.pb.Text" - "ureDimension\022\020\n\010sub_type\030\002 \001(\r\"[\n\034TypeDe" - "pthMultisampledTexture\022;\n\tdimension\030\001 \001(" - "\0162(.tint.core.ir.binary.pb.TextureDimens" - "ion\"\303\001\n\022TypeStorageTexture\022;\n\tdimension\030" - "\001 \001(\0162(.tint.core.ir.binary.pb.TextureDi" - "mension\0229\n\014texel_format\030\002 \001(\0162#.tint.cor" - "e.ir.binary.pb.TexelFormat\0225\n\006access\030\003 \001" - "(\0162%.tint.core.ir.binary.pb.AccessContro" - "l\"\025\n\023TypeResourceBinding\"\025\n\023TypeExternal" - "Texture\"@\n\013TypeSampler\0221\n\004kind\030\001 \001(\0162#.t" - "int.core.ir.binary.pb.SamplerKind\"\'\n\023Typ" - "eInputAttachment\022\020\n\010sub_type\030\001 \001(\r\"E\n\022Ty" - "peSubgroupMatrix\022\020\n\010sub_type\030\001 \001(\r\022\014\n\004ro" - "ws\030\002 \001(\r\022\017\n\007columns\030\003 \001(\r\"\033\n\nTypeBuffer\022" - "\r\n\005count\030\001 \001(\r\"\203\001\n\017TypeTexelBuffer\0229\n\014te" - "xel_format\030\001 \001(\0162#.tint.core.ir.binary.p" - "b.TexelFormat\0225\n\006access\030\002 \001(\0162%.tint.cor" - "e.ir.binary.pb.AccessControl\"\214\002\n\005Value\022\022" - "\n\010function\030\001 \001(\rH\000\022G\n\022instruction_result" - "\030\002 \001(\0132).tint.core.ir.binary.pb.Instruct" - "ionResultH\000\022G\n\022function_parameter\030\003 \001(\0132" - ").tint.core.ir.binary.pb.FunctionParamet" - "erH\000\022A\n\017block_parameter\030\004 \001(\0132&.tint.cor" - "e.ir.binary.pb.BlockParameterH\000\022\022\n\010const" - "ant\030\005 \001(\rH\000B\006\n\004kind\"=\n\021InstructionResult" - "\022\014\n\004type\030\001 \001(\r\022\021\n\004name\030\002 \001(\tH\000\210\001\001B\007\n\005_na" - "me\"\232\001\n\021FunctionParameter\022\014\n\004type\030\001 \001(\r\022\021" - "\n\004name\030\002 \001(\tH\000\210\001\001\022L\n\nattributes\030\003 \001(\01323." - "tint.core.ir.binary.pb.AttributesFunctio" - "nParameterH\001\210\001\001B\007\n\005_nameB\r\n\013_attributes\"" - ":\n\016BlockParameter\022\014\n\004type\030\001 \001(\r\022\021\n\004name\030" - "\002 \001(\tH\000\210\001\001B\007\n\005_name\"\330\001\n\rConstantValue\022=\n" - "\006scalar\030\001 \001(\0132+.tint.core.ir.binary.pb.C" - "onstantValueScalarH\000\022C\n\tcomposite\030\002 \001(\0132" - "..tint.core.ir.binary.pb.ConstantValueCo" - "mpositeH\000\022;\n\005splat\030\003 \001(\0132*.tint.core.ir." - "binary.pb.ConstantValueSplatH\000B\006\n\004kind\"i" - "\n\023ConstantValueScalar\022\016\n\004bool\030\001 \001(\010H\000\022\r\n" - "\003i32\030\002 \001(\005H\000\022\r\n\003u32\030\003 \001(\rH\000\022\r\n\003f32\030\004 \001(\002" - "H\000\022\r\n\003f16\030\005 \001(\002H\000B\006\n\004kind\"8\n\026ConstantVal" - "ueComposite\022\014\n\004type\030\001 \001(\r\022\020\n\010elements\030\002 " - "\003(\r\"C\n\022ConstantValueSplat\022\014\n\004type\030\001 \001(\r\022" - "\020\n\010elements\030\002 \001(\r\022\r\n\005count\030\003 \001(\r\"\277\004\n\010Fun" - "ction\022\023\n\013return_type\030\001 \001(\r\022\r\n\005block\030\002 \001(" - "\r\022\021\n\004name\030\003 \001(\tH\000\210\001\001\022B\n\016pipeline_stage\030\004" - " \001(\0162%.tint.core.ir.binary.pb.PipelineSt" - "ageH\001\210\001\001\022B\n\016workgroup_size\030\005 \001(\0132%.tint." - "core.ir.binary.pb.WorkgroupSizeH\002\210\001\001\022\022\n\n" - "parameters\030\006 \003(\r\022\034\n\017return_location\030\007 \001(" - "\rH\003\210\001\001\022H\n\024return_interpolation\030\010 \001(\0132%.t" - "int.core.ir.binary.pb.InterpolationH\004\210\001\001" - "\022A\n\016return_builtin\030\t \001(\0162$.tint.core.ir." - "binary.pb.BuiltinValueH\005\210\001\001\022\030\n\020return_in" - "variant\030\n \001(\010\022\032\n\rsubgroup_size\030\013 \001(\rH\006\210\001" - "\001B\007\n\005_nameB\021\n\017_pipeline_stageB\021\n\017_workgr" - "oup_sizeB\022\n\020_return_locationB\027\n\025_return_" - "interpolationB\021\n\017_return_builtinB\020\n\016_sub" - "group_size\"0\n\rWorkgroupSize\022\t\n\001x\030\001 \001(\r\022\t" - "\n\001y\030\002 \001(\r\022\t\n\001z\030\003 \001(\r\"k\n\005Block\022\022\n\nparamet" - "ers\030\001 \003(\r\0229\n\014instructions\030\002 \003(\0132#.tint.c" - "ore.ir.binary.pb.Instruction\022\023\n\013is_multi" - "_in\030\003 \001(\010\"\206\016\n\013Instruction\022\020\n\010operands\030\001 " - "\003(\r\022\017\n\007results\030\002 \003(\r\022;\n\006return\030\003 \001(\0132).t" - "int.core.ir.binary.pb.InstructionReturnH" - "\000\0229\n\005unary\030\004 \001(\0132(.tint.core.ir.binary.p" - "b.InstructionUnaryH\000\022;\n\006binary\030\005 \001(\0132).t" - "int.core.ir.binary.pb.InstructionBinaryH" - "\000\022=\n\007discard\030\006 \001(\0132*.tint.core.ir.binary" - ".pb.InstructionDiscardH\000\0225\n\003let\030\007 \001(\0132&." - "tint.core.ir.binary.pb.InstructionLetH\000\022" - "5\n\003var\030\010 \001(\0132&.tint.core.ir.binary.pb.In" - "structionVarH\000\022=\n\007bitcast\030\t \001(\0132*.tint.c" - "ore.ir.binary.pb.InstructionBitcastH\000\022A\n" - "\tconstruct\030\n \001(\0132,.tint.core.ir.binary.p" - "b.InstructionConstructH\000\022=\n\007convert\030\013 \001(" - "\0132*.tint.core.ir.binary.pb.InstructionCo" - "nvertH\000\022;\n\006access\030\014 \001(\0132).tint.core.ir.b" - "inary.pb.InstructionAccessH\000\022@\n\tuser_cal" - "l\030\r \001(\0132+.tint.core.ir.binary.pb.Instruc" - "tionUserCallH\000\022F\n\014builtin_call\030\016 \001(\0132..t" - "int.core.ir.binary.pb.InstructionBuiltin" - "CallH\000\0227\n\004load\030\017 \001(\0132\'.tint.core.ir.bina" - "ry.pb.InstructionLoadH\000\0229\n\005store\030\020 \001(\0132(" - ".tint.core.ir.binary.pb.InstructionStore" - "H\000\022S\n\023load_vector_element\030\021 \001(\01324.tint.c" - "ore.ir.binary.pb.InstructionLoadVectorEl" - "ementH\000\022U\n\024store_vector_element\030\022 \001(\01325." - "tint.core.ir.binary.pb.InstructionStoreV" - "ectorElementH\000\022=\n\007swizzle\030\023 \001(\0132*.tint.c" - "ore.ir.binary.pb.InstructionSwizzleH\000\0223\n" - "\002if\030\024 \001(\0132%.tint.core.ir.binary.pb.Instr" - "uctionIfH\000\022;\n\006switch\030\025 \001(\0132).tint.core.i" - "r.binary.pb.InstructionSwitchH\000\0227\n\004loop\030" - "\026 \001(\0132\'.tint.core.ir.binary.pb.Instructi" - "onLoopH\000\022<\n\007exit_if\030\027 \001(\0132).tint.core.ir" - ".binary.pb.InstructionExitIfH\000\022D\n\013exit_s" - "witch\030\030 \001(\0132-.tint.core.ir.binary.pb.Ins" - "tructionExitSwitchH\000\022@\n\texit_loop\030\031 \001(\0132" - "+.tint.core.ir.binary.pb.InstructionExit" - "LoopH\000\022J\n\016next_iteration\030\032 \001(\01320.tint.co" - "re.ir.binary.pb.InstructionNextIteration" - "H\000\022\?\n\010continue\030\033 \001(\0132+.tint.core.ir.bina" - "ry.pb.InstructionContinueH\000\022>\n\010break_if\030" - "\034 \001(\0132*.tint.core.ir.binary.pb.Instructi" - "onBreakIfH\000\022E\n\013unreachable\030\035 \001(\0132..tint." - "core.ir.binary.pb.InstructionUnreachable" - "H\000B\006\n\004kind\"\023\n\021InstructionReturn\"\?\n\020Instr" - "uctionUnary\022+\n\002op\030\001 \001(\0162\037.tint.core.ir.b" - "inary.pb.UnaryOp\"A\n\021InstructionBinary\022,\n" - "\002op\030\001 \001(\0162 .tint.core.ir.binary.pb.Binar" - "yOp\"\024\n\022InstructionBitcast\"\026\n\024Instruction" - "Construct\"\024\n\022InstructionDiscard\"\020\n\016Instr" - "uctionLet\"\244\001\n\016InstructionVar\022@\n\rbinding_" - "point\030\001 \001(\0132$.tint.core.ir.binary.pb.Bin" - "dingPointH\000\210\001\001\022#\n\026input_attachment_index" - "\030\002 \001(\rH\001\210\001\001B\020\n\016_binding_pointB\031\n\027_input_" - "attachment_index\"\024\n\022InstructionConvert\"\023" - "\n\021InstructionAccess\"\025\n\023InstructionUserCa" - "ll\"n\n\026InstructionBuiltinCall\0222\n\007builtin\030" - "\001 \001(\0162!.tint.core.ir.binary.pb.BuiltinFn" - "\022 \n\030explicit_template_params\030\002 \003(\r\"\021\n\017In" - "structionLoad\"\022\n\020InstructionStore\"\036\n\034Ins" - "tructionLoadVectorElement\"\037\n\035Instruction" - "StoreVectorElement\"%\n\022InstructionSwizzle" - "\022\017\n\007indices\030\001 \003(\r\"I\n\rInstructionIf\022\021\n\004tr" - "ue\030\001 \001(\rH\000\210\001\001\022\022\n\005false\030\002 \001(\rH\001\210\001\001B\007\n\005_tr" - "ueB\010\n\006_false\"F\n\021InstructionSwitch\0221\n\005cas" - "es\030\001 \003(\0132\".tint.core.ir.binary.pb.Switch" - "Case\"\177\n\017InstructionLoop\022\030\n\013initializer\030\001" - " \001(\rH\000\210\001\001\022\021\n\004body\030\002 \001(\rH\001\210\001\001\022\027\n\ncontinui" - "ng\030\003 \001(\rH\002\210\001\001B\016\n\014_initializerB\007\n\005_bodyB\r" - "\n\013_continuing\"\023\n\021InstructionExitIf\"\027\n\025In" - "structionExitSwitch\"\025\n\023InstructionExitLo" - "op\"B\n\nSwitchCase\022\r\n\005block\030\001 \001(\r\022\021\n\tselec" - "tors\030\002 \003(\r\022\022\n\nis_default\030\003 \001(\010\".\n\014Bindin" - "gPoint\022\r\n\005group\030\001 \001(\r\022\017\n\007binding\030\002 \001(\r\"\032" - "\n\030InstructionNextIteration\"\025\n\023Instructio" - "nContinue\"2\n\022InstructionBreakIf\022\034\n\024num_n" - "ext_iter_values\030\001 \001(\r\"\030\n\026InstructionUnre" - "achable\"\260\002\n\026AttributesStructMember\022\025\n\010lo" - "cation\030\001 \001(\rH\000\210\001\001\022\026\n\tblend_src\030\002 \001(\rH\001\210\001" - "\001\022\022\n\005color\030\003 \001(\rH\002\210\001\001\022:\n\007builtin\030\004 \001(\0162$" - ".tint.core.ir.binary.pb.BuiltinValueH\003\210\001" - "\001\022A\n\rinterpolation\030\005 \001(\0132%.tint.core.ir." - "binary.pb.InterpolationH\004\210\001\001\022\021\n\tinvarian" - "t\030\006 \001(\010B\013\n\t_locationB\014\n\n_blend_srcB\010\n\006_c" - "olorB\n\n\010_builtinB\020\n\016_interpolation\"\343\002\n\033A" - "ttributesFunctionParameter\022:\n\007builtin\030\001 " - "\001(\0162$.tint.core.ir.binary.pb.BuiltinValu" - "eH\000\210\001\001\022\025\n\010location\030\002 \001(\rH\001\210\001\001\022\022\n\005color\030\003" - " \001(\rH\002\210\001\001\022A\n\rinterpolation\030\004 \001(\0132%.tint." - "core.ir.binary.pb.InterpolationH\003\210\001\001\022@\n\r" - "binding_point\030\005 \001(\0132$.tint.core.ir.binar" - "y.pb.BindingPointH\004\210\001\001\022\021\n\tinvariant\030\006 \001(" - "\010B\n\n\010_builtinB\013\n\t_locationB\010\n\006_colorB\020\n\016" - "_interpolationB\020\n\016_binding_point\"\233\001\n\rInt" - "erpolation\0227\n\004type\030\001 \001(\0162).tint.core.ir." - "binary.pb.InterpolationType\022D\n\010sampling\030" - "\002 \001(\0162-.tint.core.ir.binary.pb.Interpola" - "tionSamplingH\000\210\001\001B\013\n\t_sampling*S\n\tTypeBa" - "sic\022\010\n\004void\020\000\022\010\n\004bool\020\001\022\007\n\003i32\020\002\022\007\n\003u32\020" - "\003\022\007\n\003f32\020\004\022\007\n\003f16\020\005\022\006\n\002i8\020\006\022\006\n\002u8\020\007*\303\003\n\021" - "TypeBuiltinStruct\022\"\n\036AtomicCompareExchan" - "geResultI32\020\000\022\"\n\036AtomicCompareExchangeRe" - "sultU32\020\001\022\022\n\016FrexpResultF16\020\002\022\022\n\016FrexpRe" - "sultF32\020\003\022\026\n\022FrexpResultVec2F16\020\004\022\026\n\022Fre" - "xpResultVec2F32\020\005\022\026\n\022FrexpResultVec3F16\020" - "\006\022\026\n\022FrexpResultVec3F32\020\007\022\026\n\022FrexpResult" - "Vec4F16\020\010\022\026\n\022FrexpResultVec4F32\020\t\022\021\n\rMod" - "fResultF16\020\n\022\021\n\rModfResultF32\020\013\022\025\n\021ModfR" - "esultVec2F16\020\014\022\025\n\021ModfResultVec2F32\020\r\022\025\n" - "\021ModfResultVec3F16\020\016\022\025\n\021ModfResultVec3F3" - "2\020\017\022\025\n\021ModfResultVec4F16\020\020\022\025\n\021ModfResult" - "Vec4F32\020\021*6\n\rPipelineStage\022\013\n\007Compute\020\000\022" - "\014\n\010Fragment\020\001\022\n\n\006Vertex\020\002*~\n\014AddressSpac" - "e\022\014\n\010function\020\000\022\n\n\006handle\020\001\022\017\n\013pixel_loc" - "al\020\002\022\013\n\007private\020\003\022\r\n\timmediate\020\004\022\013\n\007stor" - "age\020\005\022\013\n\007uniform\020\006\022\r\n\tworkgroup\020\007*4\n\rAcc" - "essControl\022\010\n\004read\020\000\022\t\n\005write\020\001\022\016\n\nread_" - "write\020\002*Q\n\007UnaryOp\022\016\n\ncomplement\020\000\022\014\n\010ne" - "gation\020\001\022\016\n\naddress_of\020\002\022\017\n\013indirection\020" - "\003\022\007\n\003not\020\004*\216\002\n\010BinaryOp\022\010\n\004add_\020\000\022\014\n\010sub" - "tract\020\001\022\014\n\010multiply\020\002\022\n\n\006divide\020\003\022\n\n\006mod" - "ulo\020\004\022\007\n\003and\020\005\022\007\n\003or_\020\006\022\010\n\004xor_\020\007\022\t\n\005equ" - "al\020\010\022\r\n\tnot_equal\020\t\022\r\n\tless_than\020\n\022\020\n\014gr" - "eater_than\020\013\022\023\n\017less_than_equal\020\014\022\026\n\022gre" - "ater_than_equal\020\r\022\016\n\nshift_left\020\016\022\017\n\013shi" - "ft_right\020\017\022\017\n\013logical_and\020\020\022\016\n\nlogical_o" - "r\020\021*V\n\020TextureDimension\022\007\n\003_1d\020\000\022\007\n\003_2d\020" - "\001\022\r\n\t_2d_array\020\002\022\007\n\003_3d\020\003\022\010\n\004cube\020\004\022\016\n\nc" - "ube_array\020\005*\205\005\n\013TexelFormat\022\017\n\013bgra8_uno" - "rm\020\000\022\014\n\010r8_unorm\020\001\022\r\n\tr32_float\020\002\022\014\n\010r32" - "_sint\020\003\022\014\n\010r32_uint\020\004\022\016\n\nrg32_float\020\005\022\r\n" - "\trg32_sint\020\006\022\r\n\trg32_uint\020\007\022\020\n\014rgba16_fl" - "oat\020\010\022\017\n\013rgba16_sint\020\t\022\017\n\013rgba16_uint\020\n\022" - "\020\n\014rgba32_float\020\013\022\017\n\013rgba32_sint\020\014\022\017\n\013rg" - "ba32_uint\020\r\022\016\n\nrgba8_sint\020\016\022\017\n\013rgba8_sno" - "rm\020\017\022\016\n\nrgba8_uint\020\020\022\017\n\013rgba8_unorm\020\021\022\014\n" - "\010r8_snorm\020\022\022\013\n\007r8_uint\020\023\022\013\n\007r8_sint\020\024\022\r\n" - "\trg8_unorm\020\025\022\r\n\trg8_snorm\020\026\022\014\n\010rg8_uint\020" - "\027\022\014\n\010rg8_sint\020\030\022\014\n\010r16_uint\020\031\022\014\n\010r16_sin" - "t\020\032\022\r\n\tr16_float\020\033\022\r\n\trg16_uint\020\034\022\r\n\trg1" - "6_sint\020\035\022\016\n\nrg16_float\020\036\022\020\n\014rgb10a2_uint" - "\020\037\022\021\n\rrgb10a2_unorm\020 \022\022\n\016rg11b10_ufloat\020" - "!\022\r\n\tr16_unorm\020\"\022\r\n\tr16_snorm\020#\022\016\n\nrg16_" - "unorm\020$\022\016\n\nrg16_snorm\020%\022\020\n\014rgba16_unorm\020" - "&\022\020\n\014rgba16_snorm\020\'**\n\013SamplerKind\022\013\n\007sa" - "mpler\020\000\022\016\n\ncomparison\020\001*:\n\021Interpolation" - "Type\022\010\n\004flat\020\000\022\n\n\006linear\020\001\022\017\n\013perspectiv" - "e\020\002*T\n\025InterpolationSampling\022\n\n\006center\020\000" - "\022\014\n\010centroid\020\001\022\n\n\006sample\020\002\022\t\n\005first\020\003\022\n\n" - "\006either\020\004*\262\003\n\014BuiltinValue\022\016\n\npoint_size" - "\020\000\022\016\n\nfrag_depth\020\001\022\020\n\014front_facing\020\002\022\030\n\024" - "global_invocation_id\020\003\022\022\n\016instance_index" - "\020\004\022\027\n\023local_invocation_id\020\005\022\032\n\026local_inv" - "ocation_index\020\006\022\022\n\016num_workgroups\020\007\022\014\n\010p" - "osition\020\010\022\020\n\014sample_index\020\t\022\017\n\013sample_ma" - "sk\020\n\022\032\n\026subgroup_invocation_id\020\013\022\021\n\rsubg" - "roup_size\020\014\022\020\n\014vertex_index\020\r\022\020\n\014workgro" - "up_id\020\016\022\022\n\016clip_distances\020\017\022\021\n\rcull_dist" - "ance\020\020\022\017\n\013subgroup_id\020\021\022\023\n\017primitive_ind" - "ex\020\022\022\025\n\021barycentric_coord\020\023\022\021\n\rnum_subgr" - "oups\020\024*\312\026\n\tBuiltinFn\022\007\n\003abs\020\000\022\010\n\004acos\020\001\022" - "\t\n\005acosh\020\002\022\007\n\003all\020\003\022\007\n\003any\020\004\022\020\n\014array_le" - "ngth\020\005\022\010\n\004asin\020\006\022\t\n\005asinh\020\007\022\010\n\004atan\020\010\022\t\n" - "\005atan2\020\t\022\t\n\005atanh\020\n\022\010\n\004ceil\020\013\022\t\n\005clamp\020\014" - "\022\007\n\003cos\020\r\022\010\n\004cosh\020\016\022\027\n\023count_leading_zer" - "os\020\017\022\022\n\016count_one_bits\020\020\022\030\n\024count_traili" - "ng_zeros\020\021\022\t\n\005cross\020\022\022\013\n\007degrees\020\023\022\017\n\013de" - "terminant\020\024\022\014\n\010distance\020\025\022\007\n\003dot\020\026\022\021\n\rdo" - "t4i8_packed\020\027\022\021\n\rdot4u8_packed\020\030\022\010\n\004dpdx" - "\020\031\022\017\n\013dpdx_coarse\020\032\022\r\n\tdpdx_fine\020\033\022\010\n\004dp" - "dy\020\034\022\017\n\013dpdy_coarse\020\035\022\r\n\tdpdy_fine\020\036\022\007\n\003" - "exp\020\037\022\010\n\004exp2\020 \022\020\n\014extract_bits\020!\022\020\n\014fac" - "e_forward\020\"\022\025\n\021first_leading_bit\020#\022\026\n\022fi" - "rst_trailing_bit\020$\022\t\n\005floor\020%\022\007\n\003fma\020&\022\t" - "\n\005fract\020\'\022\t\n\005frexp\020(\022\n\n\006fwidth\020)\022\021\n\rfwid" - "th_coarse\020*\022\017\n\013fwidth_fine\020+\022\017\n\013insert_b" - "its\020,\022\020\n\014inverse_sqrt\020-\022\t\n\005ldexp\020.\022\n\n\006le" - "ngth\020/\022\007\n\003log\0200\022\010\n\004log2\0201\022\007\n\003max\0202\022\007\n\003mi" - "n\0203\022\007\n\003mix\0204\022\010\n\004modf\0205\022\r\n\tnormalize\0206\022\022\n" - "\016pack2x16_float\0207\022\022\n\016pack2x16_snorm\0208\022\022\n" - "\016pack2x16_unorm\0209\022\021\n\rpack4x8_snorm\020:\022\021\n\r" - "pack4x8_unorm\020;\022\014\n\010pack4xi8\020<\022\014\n\010pack4xu" - "8\020=\022\022\n\016pack4xi8_clamp\020>\022\022\n\016pack4xu8_clam" - "p\020\?\022\007\n\003pow\020@\022\023\n\017quantize_to_f16\020A\022\013\n\007rad" - "ians\020B\022\013\n\007reflect\020C\022\013\n\007refract\020D\022\020\n\014reve" - "rse_bits\020E\022\t\n\005round\020F\022\014\n\010saturate\020G\022\n\n\006s" - "elect\020H\022\010\n\004sign\020I\022\007\n\003sin\020J\022\010\n\004sinh\020K\022\016\n\n" - "smoothstep\020L\022\010\n\004sqrt\020M\022\010\n\004step\020N\022\023\n\017stor" - "age_barrier\020O\022\007\n\003tan\020P\022\010\n\004tanh\020Q\022\r\n\ttran" - "spose\020R\022\t\n\005trunc\020S\022\024\n\020unpack2x16_float\020T" - "\022\024\n\020unpack2x16_snorm\020U\022\024\n\020unpack2x16_uno" - "rm\020V\022\023\n\017unpack4x8_snorm\020W\022\023\n\017unpack4x8_u" - "norm\020X\022\016\n\nunpack4xi8\020Y\022\016\n\nunpack4xu8\020Z\022\025" - "\n\021workgroup_barrier\020[\022\023\n\017texture_barrier" - "\020\\\022\026\n\022texture_dimensions\020]\022\022\n\016texture_ga" - "ther\020^\022\032\n\026texture_gather_compare\020_\022\026\n\022te" - "xture_num_layers\020`\022\026\n\022texture_num_levels" - "\020a\022\027\n\023texture_num_samples\020b\022\022\n\016texture_s" - "ample\020c\022\027\n\023texture_sample_bias\020d\022\032\n\026text" - "ure_sample_compare\020e\022 \n\034texture_sample_c" - "ompare_level\020f\022\027\n\023texture_sample_grad\020g\022" - "\030\n\024texture_sample_level\020h\022%\n!texture_sam" - "ple_base_clamp_to_edge\020i\022\021\n\rtexture_stor" - "e\020j\022\020\n\014texture_load\020k\022\017\n\013atomic_load\020l\022\020" - "\n\014atomic_store\020m\022\016\n\natomic_add\020n\022\016\n\natom" - "ic_sub\020o\022\016\n\natomic_max\020p\022\016\n\natomic_min\020q" - "\022\016\n\natomic_and\020r\022\r\n\tatomic_or\020s\022\016\n\natomi" - "c_xor\020t\022\023\n\017atomic_exchange\020u\022 \n\034atomic_c" - "ompare_exchange_weak\020v\022\023\n\017subgroup_ballo" - "t\020w\022\026\n\022subgroup_broadcast\020x\022\031\n\025input_att" - "achment_load\020y\022\020\n\014subgroup_add\020z\022\032\n\026subg" - "roup_exclusive_add\020{\022\020\n\014subgroup_mul\020|\022\032" - "\n\026subgroup_exclusive_mul\020}\022\020\n\014subgroup_a" - "nd\020~\022\017\n\013subgroup_or\020\177\022\021\n\014subgroup_xor\020\200\001" - "\022\021\n\014subgroup_min\020\201\001\022\021\n\014subgroup_max\020\202\001\022\021" - "\n\014subgroup_any\020\203\001\022\021\n\014subgroup_all\020\204\001\022\023\n\016" - "subgroup_elect\020\205\001\022\035\n\030subgroup_broadcast_" - "first\020\206\001\022\025\n\020subgroup_shuffle\020\207\001\022\031\n\024subgr" - "oup_shuffle_xor\020\210\001\022\030\n\023subgroup_shuffle_u" - "p\020\211\001\022\032\n\025subgroup_shuffle_down\020\212\001\022\023\n\016quad" - "_broadcast\020\213\001\022\020\n\013quad_swap_x\020\214\001\022\020\n\013quad_" - "swap_y\020\215\001\022\027\n\022quad_swap_diagonal\020\216\001\022\033\n\026su" - "bgroup_inclusive_add\020\217\001\022\033\n\026subgroup_incl" - "usive_mul\020\220\001\022\031\n\024subgroup_matrix_load\020\221\001\022" - "\032\n\025subgroup_matrix_store\020\222\001\022\035\n\030subgroup_" - "matrix_multiply\020\223\001\022(\n#subgroup_matrix_mu" - "ltiply_accumulate\020\224\001\022\n\n\005print\020\225\001\022\037\n\032subg" - "roup_matrix_scalar_add\020\230\001\022$\n\037subgroup_ma" - "trix_scalar_multiply\020\231\001\022$\n\037subgroup_matr" - "ix_scalar_subtract\020\232\001\022\021\n\014has_resource\020\233\001" - "\022\021\n\014get_resource\020\234\001\022\020\n\013buffer_view\020\235\001\022\022\n" - "\rbuffer_length\020\236\001\"\006\010\226\001\020\226\001\"\006\010\227\001\020\227\001*\013has_b" - "inding*\013get_bindingb\006proto3" -}; -static ::absl::once_flag descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto_once; -PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto = { - false, - false, - 14547, - descriptor_table_protodef_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - "src/tint/utils/protos/ir/ir.proto", - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto_once, - nullptr, - 0, - 66, - schemas, - file_default_instances, - TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto::offsets, - file_level_enum_descriptors_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - file_level_service_descriptors_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, -}; -namespace tint { -namespace core { -namespace ir { -namespace binary { -namespace pb { -const ::google::protobuf::EnumDescriptor* PROTOBUF_NONNULL TypeBasic_descriptor() { - ::google::protobuf::internal::AssignDescriptors(&descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto); - return file_level_enum_descriptors_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto[0]; -} -PROTOBUF_CONSTINIT const uint32_t TypeBasic_internal_data_[] = { - 524288u, 0u, }; -const ::google::protobuf::EnumDescriptor* PROTOBUF_NONNULL TypeBuiltinStruct_descriptor() { - ::google::protobuf::internal::AssignDescriptors(&descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto); - return file_level_enum_descriptors_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto[1]; -} -PROTOBUF_CONSTINIT const uint32_t TypeBuiltinStruct_internal_data_[] = { - 1179648u, 0u, }; -const ::google::protobuf::EnumDescriptor* PROTOBUF_NONNULL PipelineStage_descriptor() { - ::google::protobuf::internal::AssignDescriptors(&descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto); - return file_level_enum_descriptors_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto[2]; -} -PROTOBUF_CONSTINIT const uint32_t PipelineStage_internal_data_[] = { - 196608u, 0u, }; -const ::google::protobuf::EnumDescriptor* PROTOBUF_NONNULL AddressSpace_descriptor() { - ::google::protobuf::internal::AssignDescriptors(&descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto); - return file_level_enum_descriptors_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto[3]; -} -PROTOBUF_CONSTINIT const uint32_t AddressSpace_internal_data_[] = { - 524288u, 0u, }; -const ::google::protobuf::EnumDescriptor* PROTOBUF_NONNULL AccessControl_descriptor() { - ::google::protobuf::internal::AssignDescriptors(&descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto); - return file_level_enum_descriptors_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto[4]; -} -PROTOBUF_CONSTINIT const uint32_t AccessControl_internal_data_[] = { - 196608u, 0u, }; -const ::google::protobuf::EnumDescriptor* PROTOBUF_NONNULL UnaryOp_descriptor() { - ::google::protobuf::internal::AssignDescriptors(&descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto); - return file_level_enum_descriptors_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto[5]; -} -PROTOBUF_CONSTINIT const uint32_t UnaryOp_internal_data_[] = { - 327680u, 0u, }; -const ::google::protobuf::EnumDescriptor* PROTOBUF_NONNULL BinaryOp_descriptor() { - ::google::protobuf::internal::AssignDescriptors(&descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto); - return file_level_enum_descriptors_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto[6]; -} -PROTOBUF_CONSTINIT const uint32_t BinaryOp_internal_data_[] = { - 1179648u, 0u, }; -const ::google::protobuf::EnumDescriptor* PROTOBUF_NONNULL TextureDimension_descriptor() { - ::google::protobuf::internal::AssignDescriptors(&descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto); - return file_level_enum_descriptors_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto[7]; -} -PROTOBUF_CONSTINIT const uint32_t TextureDimension_internal_data_[] = { - 393216u, 0u, }; -const ::google::protobuf::EnumDescriptor* PROTOBUF_NONNULL TexelFormat_descriptor() { - ::google::protobuf::internal::AssignDescriptors(&descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto); - return file_level_enum_descriptors_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto[8]; -} -PROTOBUF_CONSTINIT const uint32_t TexelFormat_internal_data_[] = { - 2621440u, 0u, }; -const ::google::protobuf::EnumDescriptor* PROTOBUF_NONNULL SamplerKind_descriptor() { - ::google::protobuf::internal::AssignDescriptors(&descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto); - return file_level_enum_descriptors_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto[9]; -} -PROTOBUF_CONSTINIT const uint32_t SamplerKind_internal_data_[] = { - 131072u, 0u, }; -const ::google::protobuf::EnumDescriptor* PROTOBUF_NONNULL InterpolationType_descriptor() { - ::google::protobuf::internal::AssignDescriptors(&descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto); - return file_level_enum_descriptors_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto[10]; -} -PROTOBUF_CONSTINIT const uint32_t InterpolationType_internal_data_[] = { - 196608u, 0u, }; -const ::google::protobuf::EnumDescriptor* PROTOBUF_NONNULL InterpolationSampling_descriptor() { - ::google::protobuf::internal::AssignDescriptors(&descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto); - return file_level_enum_descriptors_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto[11]; -} -PROTOBUF_CONSTINIT const uint32_t InterpolationSampling_internal_data_[] = { - 327680u, 0u, }; -const ::google::protobuf::EnumDescriptor* PROTOBUF_NONNULL BuiltinValue_descriptor() { - ::google::protobuf::internal::AssignDescriptors(&descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto); - return file_level_enum_descriptors_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto[12]; -} -PROTOBUF_CONSTINIT const uint32_t BuiltinValue_internal_data_[] = { - 1376256u, 0u, }; -const ::google::protobuf::EnumDescriptor* PROTOBUF_NONNULL BuiltinFn_descriptor() { - ::google::protobuf::internal::AssignDescriptors(&descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto); - return file_level_enum_descriptors_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto[13]; -} -PROTOBUF_CONSTINIT const uint32_t BuiltinFn_internal_data_[] = { - 9830400u, 32u, 508u, }; -// =================================================================== - -class Module::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(Module, _impl_._has_bits_); -}; - -Module::Module(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, Module_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.Module) -} -PROTOBUF_NDEBUG_INLINE Module::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - [[maybe_unused]] const ::tint::core::ir::binary::pb::Module& from_msg) - : _has_bits_{from._has_bits_}, - _cached_size_{0}, - types_{visibility, arena, from.types_}, - values_{visibility, arena, from.values_}, - constant_values_{visibility, arena, from.constant_values_}, - functions_{visibility, arena, from.functions_}, - blocks_{visibility, arena, from.blocks_} {} - -Module::Module( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const Module& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, Module_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - Module* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); - _impl_.root_block_ = from._impl_.root_block_; - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.Module) -} -PROTOBUF_NDEBUG_INLINE Module::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0}, - types_{visibility, arena}, - values_{visibility, arena}, - constant_values_{visibility, arena}, - functions_{visibility, arena}, - blocks_{visibility, arena} {} - -inline void Module::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - _impl_.root_block_ = {}; -} -Module::~Module() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.Module) - SharedDtor(*this); -} -inline void Module::SharedDtor(MessageLite& self) { - Module& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL Module::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) Module(arena); -} -constexpr auto Module::InternalNewImpl_() { - constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ - PROTOBUF_FIELD_OFFSET(Module, _impl_.types_) + - decltype(Module::_impl_.types_):: - InternalGetArenaOffset( - ::google::protobuf::Message::internal_visibility()), - PROTOBUF_FIELD_OFFSET(Module, _impl_.values_) + - decltype(Module::_impl_.values_):: - InternalGetArenaOffset( - ::google::protobuf::Message::internal_visibility()), - PROTOBUF_FIELD_OFFSET(Module, _impl_.constant_values_) + - decltype(Module::_impl_.constant_values_):: - InternalGetArenaOffset( - ::google::protobuf::Message::internal_visibility()), - PROTOBUF_FIELD_OFFSET(Module, _impl_.functions_) + - decltype(Module::_impl_.functions_):: - InternalGetArenaOffset( - ::google::protobuf::Message::internal_visibility()), - PROTOBUF_FIELD_OFFSET(Module, _impl_.blocks_) + - decltype(Module::_impl_.blocks_):: - InternalGetArenaOffset( - ::google::protobuf::Message::internal_visibility()), - }); - if constexpr (arena_bits.has_value()) { - return ::google::protobuf::internal::MessageCreator::ZeroInit( - sizeof(Module), alignof(Module), *arena_bits); - } else { - return ::google::protobuf::internal::MessageCreator(&Module::PlacementNew_, - sizeof(Module), - alignof(Module)); - } -} -constexpr auto Module::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_Module_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &Module::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &Module::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &Module::ByteSizeLong, - &Module::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(Module, _impl_._cached_size_), - false, - }, - &Module::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull Module_class_data_ = - Module::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -Module::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&Module_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(Module_class_data_.tc_table); - return Module_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<3, 6, 5, 0, 2> -Module::_table_ = { - { - PROTOBUF_FIELD_OFFSET(Module, _impl_._has_bits_), - 0, // no _extensions_ - 6, 56, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967232, // skipmap - offsetof(decltype(_table_), field_entries), - 6, // num_field_entries - 5, // num_aux_entries - offsetof(decltype(_table_), aux_entries), - Module_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::Module>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - // repeated .tint.core.ir.binary.pb.Type types = 1; - {::_pbi::TcParser::FastMtR1, - {10, 63, 0, PROTOBUF_FIELD_OFFSET(Module, _impl_.types_)}}, - // repeated .tint.core.ir.binary.pb.Value values = 2; - {::_pbi::TcParser::FastMtR1, - {18, 63, 1, PROTOBUF_FIELD_OFFSET(Module, _impl_.values_)}}, - // repeated .tint.core.ir.binary.pb.ConstantValue constant_values = 3; - {::_pbi::TcParser::FastMtR1, - {26, 63, 2, PROTOBUF_FIELD_OFFSET(Module, _impl_.constant_values_)}}, - // repeated .tint.core.ir.binary.pb.Function functions = 4; - {::_pbi::TcParser::FastMtR1, - {34, 63, 3, PROTOBUF_FIELD_OFFSET(Module, _impl_.functions_)}}, - // repeated .tint.core.ir.binary.pb.Block blocks = 5; - {::_pbi::TcParser::FastMtR1, - {42, 63, 4, PROTOBUF_FIELD_OFFSET(Module, _impl_.blocks_)}}, - // uint32 root_block = 6; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Module, _impl_.root_block_), 0>(), - {48, 0, 0, PROTOBUF_FIELD_OFFSET(Module, _impl_.root_block_)}}, - {::_pbi::TcParser::MiniParse, {}}, - }}, {{ - 65535, 65535 - }}, {{ - // repeated .tint.core.ir.binary.pb.Type types = 1; - {PROTOBUF_FIELD_OFFSET(Module, _impl_.types_), -1, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, - // repeated .tint.core.ir.binary.pb.Value values = 2; - {PROTOBUF_FIELD_OFFSET(Module, _impl_.values_), -1, 1, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, - // repeated .tint.core.ir.binary.pb.ConstantValue constant_values = 3; - {PROTOBUF_FIELD_OFFSET(Module, _impl_.constant_values_), -1, 2, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, - // repeated .tint.core.ir.binary.pb.Function functions = 4; - {PROTOBUF_FIELD_OFFSET(Module, _impl_.functions_), -1, 3, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, - // repeated .tint.core.ir.binary.pb.Block blocks = 5; - {PROTOBUF_FIELD_OFFSET(Module, _impl_.blocks_), -1, 4, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, - // uint32 root_block = 6; - {PROTOBUF_FIELD_OFFSET(Module, _impl_.root_block_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - }}, - {{ - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::Type>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::Value>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::ConstantValue>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::Function>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::Block>()}, - }}, - {{ - }}, -}; -PROTOBUF_NOINLINE void Module::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.Module) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.types_.Clear(); - _impl_.values_.Clear(); - _impl_.constant_values_.Clear(); - _impl_.functions_.Clear(); - _impl_.blocks_.Clear(); - _impl_.root_block_ = 0u; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL Module::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const Module& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL Module::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const Module& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.Module) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // repeated .tint.core.ir.binary.pb.Type types = 1; - for (unsigned i = 0, n = static_cast( - this_._internal_types_size()); - i < n; i++) { - const auto& repfield = this_._internal_types().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 1, repfield, repfield.GetCachedSize(), - target, stream); - } - - // repeated .tint.core.ir.binary.pb.Value values = 2; - for (unsigned i = 0, n = static_cast( - this_._internal_values_size()); - i < n; i++) { - const auto& repfield = this_._internal_values().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 2, repfield, repfield.GetCachedSize(), - target, stream); - } - - // repeated .tint.core.ir.binary.pb.ConstantValue constant_values = 3; - for (unsigned i = 0, n = static_cast( - this_._internal_constant_values_size()); - i < n; i++) { - const auto& repfield = this_._internal_constant_values().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 3, repfield, repfield.GetCachedSize(), - target, stream); - } - - // repeated .tint.core.ir.binary.pb.Function functions = 4; - for (unsigned i = 0, n = static_cast( - this_._internal_functions_size()); - i < n; i++) { - const auto& repfield = this_._internal_functions().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 4, repfield, repfield.GetCachedSize(), - target, stream); - } - - // repeated .tint.core.ir.binary.pb.Block blocks = 5; - for (unsigned i = 0, n = static_cast( - this_._internal_blocks_size()); - i < n; i++) { - const auto& repfield = this_._internal_blocks().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 5, repfield, repfield.GetCachedSize(), - target, stream); - } - - // uint32 root_block = 6; - if ((this_._impl_._has_bits_[0] & 0x00000001U) != 0) { - if (this_._internal_root_block() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 6, this_._internal_root_block(), target); - } - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.Module) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t Module::ByteSizeLong(const MessageLite& base) { - const Module& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t Module::ByteSizeLong() const { - const Module& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.Module) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - ::_pbi::Prefetch5LinesFrom7Lines(&this_); - { - // repeated .tint.core.ir.binary.pb.Type types = 1; - { - total_size += 1UL * this_._internal_types_size(); - for (const auto& msg : this_._internal_types()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - // repeated .tint.core.ir.binary.pb.Value values = 2; - { - total_size += 1UL * this_._internal_values_size(); - for (const auto& msg : this_._internal_values()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - // repeated .tint.core.ir.binary.pb.ConstantValue constant_values = 3; - { - total_size += 1UL * this_._internal_constant_values_size(); - for (const auto& msg : this_._internal_constant_values()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - // repeated .tint.core.ir.binary.pb.Function functions = 4; - { - total_size += 1UL * this_._internal_functions_size(); - for (const auto& msg : this_._internal_functions()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - // repeated .tint.core.ir.binary.pb.Block blocks = 5; - { - total_size += 1UL * this_._internal_blocks_size(); - for (const auto& msg : this_._internal_blocks()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - } - { - // uint32 root_block = 6; - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000001U) != 0) { - if (this_._internal_root_block() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_root_block()); - } - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void Module::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.Module) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - _this->_internal_mutable_types()->MergeFrom( - from._internal_types()); - _this->_internal_mutable_values()->MergeFrom( - from._internal_values()); - _this->_internal_mutable_constant_values()->MergeFrom( - from._internal_constant_values()); - _this->_internal_mutable_functions()->MergeFrom( - from._internal_functions()); - _this->_internal_mutable_blocks()->MergeFrom( - from._internal_blocks()); - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000001U) != 0) { - if (from._internal_root_block() != 0) { - _this->_impl_.root_block_ = from._impl_.root_block_; - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void Module::CopyFrom(const Module& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.Module) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void Module::InternalSwap(Module* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - _impl_.types_.InternalSwap(&other->_impl_.types_); - _impl_.values_.InternalSwap(&other->_impl_.values_); - _impl_.constant_values_.InternalSwap(&other->_impl_.constant_values_); - _impl_.functions_.InternalSwap(&other->_impl_.functions_); - _impl_.blocks_.InternalSwap(&other->_impl_.blocks_); - swap(_impl_.root_block_, other->_impl_.root_block_); -} - -::google::protobuf::Metadata Module::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class Type::_Internal { - public: - static constexpr ::int32_t kOneofCaseOffset = - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Type, _impl_._oneof_case_); -}; - -void Type::set_allocated_vector(::tint::core::ir::binary::pb::TypeVector* PROTOBUF_NULLABLE vector) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (vector) { - ::google::protobuf::Arena* submessage_arena = vector->GetArena(); - if (message_arena != submessage_arena) { - vector = ::google::protobuf::internal::GetOwnedMessage(message_arena, vector, submessage_arena); - } - set_has_vector(); - _impl_.kind_.vector_ = vector; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Type.vector) -} -void Type::set_allocated_matrix(::tint::core::ir::binary::pb::TypeMatrix* PROTOBUF_NULLABLE matrix) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (matrix) { - ::google::protobuf::Arena* submessage_arena = matrix->GetArena(); - if (message_arena != submessage_arena) { - matrix = ::google::protobuf::internal::GetOwnedMessage(message_arena, matrix, submessage_arena); - } - set_has_matrix(); - _impl_.kind_.matrix_ = matrix; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Type.matrix) -} -void Type::set_allocated_array(::tint::core::ir::binary::pb::TypeArray* PROTOBUF_NULLABLE array) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (array) { - ::google::protobuf::Arena* submessage_arena = array->GetArena(); - if (message_arena != submessage_arena) { - array = ::google::protobuf::internal::GetOwnedMessage(message_arena, array, submessage_arena); - } - set_has_array(); - _impl_.kind_.array_ = array; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Type.array) -} -void Type::set_allocated_pointer(::tint::core::ir::binary::pb::TypePointer* PROTOBUF_NULLABLE pointer) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (pointer) { - ::google::protobuf::Arena* submessage_arena = pointer->GetArena(); - if (message_arena != submessage_arena) { - pointer = ::google::protobuf::internal::GetOwnedMessage(message_arena, pointer, submessage_arena); - } - set_has_pointer(); - _impl_.kind_.pointer_ = pointer; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Type.pointer) -} -void Type::set_allocated_struct_(::tint::core::ir::binary::pb::TypeStruct* PROTOBUF_NULLABLE struct_) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (struct_) { - ::google::protobuf::Arena* submessage_arena = struct_->GetArena(); - if (message_arena != submessage_arena) { - struct_ = ::google::protobuf::internal::GetOwnedMessage(message_arena, struct_, submessage_arena); - } - set_has_struct_(); - _impl_.kind_.struct__ = struct_; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Type.struct) -} -void Type::set_allocated_atomic(::tint::core::ir::binary::pb::TypeAtomic* PROTOBUF_NULLABLE atomic) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (atomic) { - ::google::protobuf::Arena* submessage_arena = atomic->GetArena(); - if (message_arena != submessage_arena) { - atomic = ::google::protobuf::internal::GetOwnedMessage(message_arena, atomic, submessage_arena); - } - set_has_atomic(); - _impl_.kind_.atomic_ = atomic; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Type.atomic) -} -void Type::set_allocated_depth_texture(::tint::core::ir::binary::pb::TypeDepthTexture* PROTOBUF_NULLABLE depth_texture) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (depth_texture) { - ::google::protobuf::Arena* submessage_arena = depth_texture->GetArena(); - if (message_arena != submessage_arena) { - depth_texture = ::google::protobuf::internal::GetOwnedMessage(message_arena, depth_texture, submessage_arena); - } - set_has_depth_texture(); - _impl_.kind_.depth_texture_ = depth_texture; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Type.depth_texture) -} -void Type::set_allocated_sampled_texture(::tint::core::ir::binary::pb::TypeSampledTexture* PROTOBUF_NULLABLE sampled_texture) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (sampled_texture) { - ::google::protobuf::Arena* submessage_arena = sampled_texture->GetArena(); - if (message_arena != submessage_arena) { - sampled_texture = ::google::protobuf::internal::GetOwnedMessage(message_arena, sampled_texture, submessage_arena); - } - set_has_sampled_texture(); - _impl_.kind_.sampled_texture_ = sampled_texture; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Type.sampled_texture) -} -void Type::set_allocated_multisampled_texture(::tint::core::ir::binary::pb::TypeMultisampledTexture* PROTOBUF_NULLABLE multisampled_texture) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (multisampled_texture) { - ::google::protobuf::Arena* submessage_arena = multisampled_texture->GetArena(); - if (message_arena != submessage_arena) { - multisampled_texture = ::google::protobuf::internal::GetOwnedMessage(message_arena, multisampled_texture, submessage_arena); - } - set_has_multisampled_texture(); - _impl_.kind_.multisampled_texture_ = multisampled_texture; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Type.multisampled_texture) -} -void Type::set_allocated_depth_multisampled_texture(::tint::core::ir::binary::pb::TypeDepthMultisampledTexture* PROTOBUF_NULLABLE depth_multisampled_texture) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (depth_multisampled_texture) { - ::google::protobuf::Arena* submessage_arena = depth_multisampled_texture->GetArena(); - if (message_arena != submessage_arena) { - depth_multisampled_texture = ::google::protobuf::internal::GetOwnedMessage(message_arena, depth_multisampled_texture, submessage_arena); - } - set_has_depth_multisampled_texture(); - _impl_.kind_.depth_multisampled_texture_ = depth_multisampled_texture; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Type.depth_multisampled_texture) -} -void Type::set_allocated_storage_texture(::tint::core::ir::binary::pb::TypeStorageTexture* PROTOBUF_NULLABLE storage_texture) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (storage_texture) { - ::google::protobuf::Arena* submessage_arena = storage_texture->GetArena(); - if (message_arena != submessage_arena) { - storage_texture = ::google::protobuf::internal::GetOwnedMessage(message_arena, storage_texture, submessage_arena); - } - set_has_storage_texture(); - _impl_.kind_.storage_texture_ = storage_texture; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Type.storage_texture) -} -void Type::set_allocated_external_texture(::tint::core::ir::binary::pb::TypeExternalTexture* PROTOBUF_NULLABLE external_texture) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (external_texture) { - ::google::protobuf::Arena* submessage_arena = external_texture->GetArena(); - if (message_arena != submessage_arena) { - external_texture = ::google::protobuf::internal::GetOwnedMessage(message_arena, external_texture, submessage_arena); - } - set_has_external_texture(); - _impl_.kind_.external_texture_ = external_texture; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Type.external_texture) -} -void Type::set_allocated_sampler(::tint::core::ir::binary::pb::TypeSampler* PROTOBUF_NULLABLE sampler) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (sampler) { - ::google::protobuf::Arena* submessage_arena = sampler->GetArena(); - if (message_arena != submessage_arena) { - sampler = ::google::protobuf::internal::GetOwnedMessage(message_arena, sampler, submessage_arena); - } - set_has_sampler(); - _impl_.kind_.sampler_ = sampler; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Type.sampler) -} -void Type::set_allocated_input_attachment(::tint::core::ir::binary::pb::TypeInputAttachment* PROTOBUF_NULLABLE input_attachment) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (input_attachment) { - ::google::protobuf::Arena* submessage_arena = input_attachment->GetArena(); - if (message_arena != submessage_arena) { - input_attachment = ::google::protobuf::internal::GetOwnedMessage(message_arena, input_attachment, submessage_arena); - } - set_has_input_attachment(); - _impl_.kind_.input_attachment_ = input_attachment; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Type.input_attachment) -} -void Type::set_allocated_subgroup_matrix_left(::tint::core::ir::binary::pb::TypeSubgroupMatrix* PROTOBUF_NULLABLE subgroup_matrix_left) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (subgroup_matrix_left) { - ::google::protobuf::Arena* submessage_arena = subgroup_matrix_left->GetArena(); - if (message_arena != submessage_arena) { - subgroup_matrix_left = ::google::protobuf::internal::GetOwnedMessage(message_arena, subgroup_matrix_left, submessage_arena); - } - set_has_subgroup_matrix_left(); - _impl_.kind_.subgroup_matrix_left_ = subgroup_matrix_left; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Type.subgroup_matrix_left) -} -void Type::set_allocated_subgroup_matrix_right(::tint::core::ir::binary::pb::TypeSubgroupMatrix* PROTOBUF_NULLABLE subgroup_matrix_right) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (subgroup_matrix_right) { - ::google::protobuf::Arena* submessage_arena = subgroup_matrix_right->GetArena(); - if (message_arena != submessage_arena) { - subgroup_matrix_right = ::google::protobuf::internal::GetOwnedMessage(message_arena, subgroup_matrix_right, submessage_arena); - } - set_has_subgroup_matrix_right(); - _impl_.kind_.subgroup_matrix_right_ = subgroup_matrix_right; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Type.subgroup_matrix_right) -} -void Type::set_allocated_subgroup_matrix_result(::tint::core::ir::binary::pb::TypeSubgroupMatrix* PROTOBUF_NULLABLE subgroup_matrix_result) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (subgroup_matrix_result) { - ::google::protobuf::Arena* submessage_arena = subgroup_matrix_result->GetArena(); - if (message_arena != submessage_arena) { - subgroup_matrix_result = ::google::protobuf::internal::GetOwnedMessage(message_arena, subgroup_matrix_result, submessage_arena); - } - set_has_subgroup_matrix_result(); - _impl_.kind_.subgroup_matrix_result_ = subgroup_matrix_result; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Type.subgroup_matrix_result) -} -void Type::set_allocated_binding_array(::tint::core::ir::binary::pb::TypeBindingArray* PROTOBUF_NULLABLE binding_array) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (binding_array) { - ::google::protobuf::Arena* submessage_arena = binding_array->GetArena(); - if (message_arena != submessage_arena) { - binding_array = ::google::protobuf::internal::GetOwnedMessage(message_arena, binding_array, submessage_arena); - } - set_has_binding_array(); - _impl_.kind_.binding_array_ = binding_array; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Type.binding_array) -} -void Type::set_allocated_texel_buffer(::tint::core::ir::binary::pb::TypeTexelBuffer* PROTOBUF_NULLABLE texel_buffer) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (texel_buffer) { - ::google::protobuf::Arena* submessage_arena = texel_buffer->GetArena(); - if (message_arena != submessage_arena) { - texel_buffer = ::google::protobuf::internal::GetOwnedMessage(message_arena, texel_buffer, submessage_arena); - } - set_has_texel_buffer(); - _impl_.kind_.texel_buffer_ = texel_buffer; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Type.texel_buffer) -} -void Type::set_allocated_buffer(::tint::core::ir::binary::pb::TypeBuffer* PROTOBUF_NULLABLE buffer) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (buffer) { - ::google::protobuf::Arena* submessage_arena = buffer->GetArena(); - if (message_arena != submessage_arena) { - buffer = ::google::protobuf::internal::GetOwnedMessage(message_arena, buffer, submessage_arena); - } - set_has_buffer(); - _impl_.kind_.buffer_ = buffer; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Type.buffer) -} -Type::Type(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, Type_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.Type) -} -PROTOBUF_NDEBUG_INLINE Type::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - [[maybe_unused]] const ::tint::core::ir::binary::pb::Type& from_msg) - : kind_{}, - _cached_size_{0}, - _oneof_case_{from._oneof_case_[0]} {} - -Type::Type( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const Type& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, Type_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - Type* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); - switch (kind_case()) { - case KIND_NOT_SET: - break; - case kBasic: - _impl_.kind_.basic_ = from._impl_.kind_.basic_; - break; - case kVector: - _impl_.kind_.vector_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.vector_); - break; - case kMatrix: - _impl_.kind_.matrix_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.matrix_); - break; - case kArray: - _impl_.kind_.array_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.array_); - break; - case kPointer: - _impl_.kind_.pointer_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.pointer_); - break; - case kStruct: - _impl_.kind_.struct__ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.struct__); - break; - case kAtomic: - _impl_.kind_.atomic_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.atomic_); - break; - case kDepthTexture: - _impl_.kind_.depth_texture_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.depth_texture_); - break; - case kSampledTexture: - _impl_.kind_.sampled_texture_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.sampled_texture_); - break; - case kMultisampledTexture: - _impl_.kind_.multisampled_texture_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.multisampled_texture_); - break; - case kDepthMultisampledTexture: - _impl_.kind_.depth_multisampled_texture_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.depth_multisampled_texture_); - break; - case kStorageTexture: - _impl_.kind_.storage_texture_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.storage_texture_); - break; - case kExternalTexture: - _impl_.kind_.external_texture_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.external_texture_); - break; - case kSampler: - _impl_.kind_.sampler_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.sampler_); - break; - case kInputAttachment: - _impl_.kind_.input_attachment_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.input_attachment_); - break; - case kSubgroupMatrixLeft: - _impl_.kind_.subgroup_matrix_left_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.subgroup_matrix_left_); - break; - case kSubgroupMatrixRight: - _impl_.kind_.subgroup_matrix_right_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.subgroup_matrix_right_); - break; - case kSubgroupMatrixResult: - _impl_.kind_.subgroup_matrix_result_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.subgroup_matrix_result_); - break; - case kBuiltinStruct: - _impl_.kind_.builtin_struct_ = from._impl_.kind_.builtin_struct_; - break; - case kBindingArray: - _impl_.kind_.binding_array_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.binding_array_); - break; - case kTexelBuffer: - _impl_.kind_.texel_buffer_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.texel_buffer_); - break; - case kBuffer: - _impl_.kind_.buffer_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.buffer_); - break; - } - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.Type) -} -PROTOBUF_NDEBUG_INLINE Type::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : kind_{}, - _cached_size_{0}, - _oneof_case_{} {} - -inline void Type::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); -} -Type::~Type() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.Type) - SharedDtor(*this); -} -inline void Type::SharedDtor(MessageLite& self) { - Type& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - if (this_.has_kind()) { - this_.clear_kind(); - } - this_._impl_.~Impl_(); -} - -void Type::clear_kind() { -// @@protoc_insertion_point(one_of_clear_start:tint.core.ir.binary.pb.Type) - ::google::protobuf::internal::TSanWrite(&_impl_); - switch (kind_case()) { - case kBasic: { - // No need to clear - break; - } - case kVector: { - if (GetArena() == nullptr) { - delete _impl_.kind_.vector_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.vector_); - } - break; - } - case kMatrix: { - if (GetArena() == nullptr) { - delete _impl_.kind_.matrix_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.matrix_); - } - break; - } - case kArray: { - if (GetArena() == nullptr) { - delete _impl_.kind_.array_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.array_); - } - break; - } - case kPointer: { - if (GetArena() == nullptr) { - delete _impl_.kind_.pointer_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.pointer_); - } - break; - } - case kStruct: { - if (GetArena() == nullptr) { - delete _impl_.kind_.struct__; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.struct__); - } - break; - } - case kAtomic: { - if (GetArena() == nullptr) { - delete _impl_.kind_.atomic_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.atomic_); - } - break; - } - case kDepthTexture: { - if (GetArena() == nullptr) { - delete _impl_.kind_.depth_texture_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.depth_texture_); - } - break; - } - case kSampledTexture: { - if (GetArena() == nullptr) { - delete _impl_.kind_.sampled_texture_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.sampled_texture_); - } - break; - } - case kMultisampledTexture: { - if (GetArena() == nullptr) { - delete _impl_.kind_.multisampled_texture_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.multisampled_texture_); - } - break; - } - case kDepthMultisampledTexture: { - if (GetArena() == nullptr) { - delete _impl_.kind_.depth_multisampled_texture_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.depth_multisampled_texture_); - } - break; - } - case kStorageTexture: { - if (GetArena() == nullptr) { - delete _impl_.kind_.storage_texture_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.storage_texture_); - } - break; - } - case kExternalTexture: { - if (GetArena() == nullptr) { - delete _impl_.kind_.external_texture_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.external_texture_); - } - break; - } - case kSampler: { - if (GetArena() == nullptr) { - delete _impl_.kind_.sampler_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.sampler_); - } - break; - } - case kInputAttachment: { - if (GetArena() == nullptr) { - delete _impl_.kind_.input_attachment_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.input_attachment_); - } - break; - } - case kSubgroupMatrixLeft: { - if (GetArena() == nullptr) { - delete _impl_.kind_.subgroup_matrix_left_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.subgroup_matrix_left_); - } - break; - } - case kSubgroupMatrixRight: { - if (GetArena() == nullptr) { - delete _impl_.kind_.subgroup_matrix_right_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.subgroup_matrix_right_); - } - break; - } - case kSubgroupMatrixResult: { - if (GetArena() == nullptr) { - delete _impl_.kind_.subgroup_matrix_result_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.subgroup_matrix_result_); - } - break; - } - case kBuiltinStruct: { - // No need to clear - break; - } - case kBindingArray: { - if (GetArena() == nullptr) { - delete _impl_.kind_.binding_array_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.binding_array_); - } - break; - } - case kTexelBuffer: { - if (GetArena() == nullptr) { - delete _impl_.kind_.texel_buffer_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.texel_buffer_); - } - break; - } - case kBuffer: { - if (GetArena() == nullptr) { - delete _impl_.kind_.buffer_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.buffer_); - } - break; - } - case KIND_NOT_SET: { - break; - } - } - _impl_._oneof_case_[0] = KIND_NOT_SET; -} - - -inline void* PROTOBUF_NONNULL Type::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) Type(arena); -} -constexpr auto Type::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(Type), - alignof(Type)); -} -constexpr auto Type::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_Type_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &Type::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &Type::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &Type::ByteSizeLong, - &Type::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(Type, _impl_._cached_size_), - false, - }, - &Type::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull Type_class_data_ = - Type::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -Type::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&Type_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(Type_class_data_.tc_table); - return Type_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 22, 20, 0, 2> -Type::_table_ = { - { - 0, // no _has_bits_ - 0, // no _extensions_ - 23, 0, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4288675840, // skipmap - offsetof(decltype(_table_), field_entries), - 22, // num_field_entries - 20, // num_aux_entries - offsetof(decltype(_table_), aux_entries), - Type_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::Type>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - }}, {{ - 65535, 65535 - }}, {{ - // .tint.core.ir.binary.pb.TypeBasic basic = 1; - {PROTOBUF_FIELD_OFFSET(Type, _impl_.kind_.basic_), _Internal::kOneofCaseOffset + 0, 0, (0 | ::_fl::kFcOneof | ::_fl::kOpenEnum)}, - // .tint.core.ir.binary.pb.TypeVector vector = 2; - {PROTOBUF_FIELD_OFFSET(Type, _impl_.kind_.vector_), _Internal::kOneofCaseOffset + 0, 0, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.TypeMatrix matrix = 3; - {PROTOBUF_FIELD_OFFSET(Type, _impl_.kind_.matrix_), _Internal::kOneofCaseOffset + 0, 1, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.TypeArray array = 4; - {PROTOBUF_FIELD_OFFSET(Type, _impl_.kind_.array_), _Internal::kOneofCaseOffset + 0, 2, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.TypePointer pointer = 5; - {PROTOBUF_FIELD_OFFSET(Type, _impl_.kind_.pointer_), _Internal::kOneofCaseOffset + 0, 3, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.TypeStruct struct = 6; - {PROTOBUF_FIELD_OFFSET(Type, _impl_.kind_.struct__), _Internal::kOneofCaseOffset + 0, 4, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.TypeAtomic atomic = 7; - {PROTOBUF_FIELD_OFFSET(Type, _impl_.kind_.atomic_), _Internal::kOneofCaseOffset + 0, 5, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.TypeDepthTexture depth_texture = 8; - {PROTOBUF_FIELD_OFFSET(Type, _impl_.kind_.depth_texture_), _Internal::kOneofCaseOffset + 0, 6, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.TypeSampledTexture sampled_texture = 9; - {PROTOBUF_FIELD_OFFSET(Type, _impl_.kind_.sampled_texture_), _Internal::kOneofCaseOffset + 0, 7, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.TypeMultisampledTexture multisampled_texture = 10; - {PROTOBUF_FIELD_OFFSET(Type, _impl_.kind_.multisampled_texture_), _Internal::kOneofCaseOffset + 0, 8, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.TypeDepthMultisampledTexture depth_multisampled_texture = 11; - {PROTOBUF_FIELD_OFFSET(Type, _impl_.kind_.depth_multisampled_texture_), _Internal::kOneofCaseOffset + 0, 9, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.TypeStorageTexture storage_texture = 12; - {PROTOBUF_FIELD_OFFSET(Type, _impl_.kind_.storage_texture_), _Internal::kOneofCaseOffset + 0, 10, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.TypeExternalTexture external_texture = 13; - {PROTOBUF_FIELD_OFFSET(Type, _impl_.kind_.external_texture_), _Internal::kOneofCaseOffset + 0, 11, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.TypeSampler sampler = 14; - {PROTOBUF_FIELD_OFFSET(Type, _impl_.kind_.sampler_), _Internal::kOneofCaseOffset + 0, 12, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.TypeInputAttachment input_attachment = 15; - {PROTOBUF_FIELD_OFFSET(Type, _impl_.kind_.input_attachment_), _Internal::kOneofCaseOffset + 0, 13, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.TypeSubgroupMatrix subgroup_matrix_left = 16; - {PROTOBUF_FIELD_OFFSET(Type, _impl_.kind_.subgroup_matrix_left_), _Internal::kOneofCaseOffset + 0, 14, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.TypeSubgroupMatrix subgroup_matrix_right = 17; - {PROTOBUF_FIELD_OFFSET(Type, _impl_.kind_.subgroup_matrix_right_), _Internal::kOneofCaseOffset + 0, 15, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.TypeSubgroupMatrix subgroup_matrix_result = 18; - {PROTOBUF_FIELD_OFFSET(Type, _impl_.kind_.subgroup_matrix_result_), _Internal::kOneofCaseOffset + 0, 16, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.TypeBuiltinStruct builtin_struct = 19; - {PROTOBUF_FIELD_OFFSET(Type, _impl_.kind_.builtin_struct_), _Internal::kOneofCaseOffset + 0, 0, (0 | ::_fl::kFcOneof | ::_fl::kOpenEnum)}, - // .tint.core.ir.binary.pb.TypeBindingArray binding_array = 20; - {PROTOBUF_FIELD_OFFSET(Type, _impl_.kind_.binding_array_), _Internal::kOneofCaseOffset + 0, 17, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.TypeTexelBuffer texel_buffer = 21; - {PROTOBUF_FIELD_OFFSET(Type, _impl_.kind_.texel_buffer_), _Internal::kOneofCaseOffset + 0, 18, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.TypeBuffer buffer = 23; - {PROTOBUF_FIELD_OFFSET(Type, _impl_.kind_.buffer_), _Internal::kOneofCaseOffset + 0, 19, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - }}, - {{ - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeVector>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeMatrix>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeArray>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypePointer>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeStruct>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeAtomic>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeDepthTexture>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeSampledTexture>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeMultisampledTexture>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeDepthMultisampledTexture>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeStorageTexture>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeExternalTexture>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeSampler>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeInputAttachment>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeSubgroupMatrix>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeSubgroupMatrix>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeSubgroupMatrix>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeBindingArray>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeTexelBuffer>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeBuffer>()}, - }}, - {{ - }}, -}; -PROTOBUF_NOINLINE void Type::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.Type) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - clear_kind(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL Type::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const Type& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL Type::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const Type& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.Type) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - switch (this_.kind_case()) { - case kBasic: { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 1, this_._internal_basic(), target); - break; - } - case kVector: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 2, *this_._impl_.kind_.vector_, this_._impl_.kind_.vector_->GetCachedSize(), target, - stream); - break; - } - case kMatrix: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 3, *this_._impl_.kind_.matrix_, this_._impl_.kind_.matrix_->GetCachedSize(), target, - stream); - break; - } - case kArray: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 4, *this_._impl_.kind_.array_, this_._impl_.kind_.array_->GetCachedSize(), target, - stream); - break; - } - case kPointer: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 5, *this_._impl_.kind_.pointer_, this_._impl_.kind_.pointer_->GetCachedSize(), target, - stream); - break; - } - case kStruct: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 6, *this_._impl_.kind_.struct__, this_._impl_.kind_.struct__->GetCachedSize(), target, - stream); - break; - } - case kAtomic: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 7, *this_._impl_.kind_.atomic_, this_._impl_.kind_.atomic_->GetCachedSize(), target, - stream); - break; - } - case kDepthTexture: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 8, *this_._impl_.kind_.depth_texture_, this_._impl_.kind_.depth_texture_->GetCachedSize(), target, - stream); - break; - } - case kSampledTexture: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 9, *this_._impl_.kind_.sampled_texture_, this_._impl_.kind_.sampled_texture_->GetCachedSize(), target, - stream); - break; - } - case kMultisampledTexture: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 10, *this_._impl_.kind_.multisampled_texture_, this_._impl_.kind_.multisampled_texture_->GetCachedSize(), target, - stream); - break; - } - case kDepthMultisampledTexture: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 11, *this_._impl_.kind_.depth_multisampled_texture_, this_._impl_.kind_.depth_multisampled_texture_->GetCachedSize(), target, - stream); - break; - } - case kStorageTexture: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 12, *this_._impl_.kind_.storage_texture_, this_._impl_.kind_.storage_texture_->GetCachedSize(), target, - stream); - break; - } - case kExternalTexture: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 13, *this_._impl_.kind_.external_texture_, this_._impl_.kind_.external_texture_->GetCachedSize(), target, - stream); - break; - } - case kSampler: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 14, *this_._impl_.kind_.sampler_, this_._impl_.kind_.sampler_->GetCachedSize(), target, - stream); - break; - } - case kInputAttachment: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 15, *this_._impl_.kind_.input_attachment_, this_._impl_.kind_.input_attachment_->GetCachedSize(), target, - stream); - break; - } - case kSubgroupMatrixLeft: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 16, *this_._impl_.kind_.subgroup_matrix_left_, this_._impl_.kind_.subgroup_matrix_left_->GetCachedSize(), target, - stream); - break; - } - case kSubgroupMatrixRight: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 17, *this_._impl_.kind_.subgroup_matrix_right_, this_._impl_.kind_.subgroup_matrix_right_->GetCachedSize(), target, - stream); - break; - } - case kSubgroupMatrixResult: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 18, *this_._impl_.kind_.subgroup_matrix_result_, this_._impl_.kind_.subgroup_matrix_result_->GetCachedSize(), target, - stream); - break; - } - case kBuiltinStruct: { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 19, this_._internal_builtin_struct(), target); - break; - } - case kBindingArray: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 20, *this_._impl_.kind_.binding_array_, this_._impl_.kind_.binding_array_->GetCachedSize(), target, - stream); - break; - } - case kTexelBuffer: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 21, *this_._impl_.kind_.texel_buffer_, this_._impl_.kind_.texel_buffer_->GetCachedSize(), target, - stream); - break; - } - case kBuffer: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 23, *this_._impl_.kind_.buffer_, this_._impl_.kind_.buffer_->GetCachedSize(), target, - stream); - break; - } - default: - break; - } - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.Type) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t Type::ByteSizeLong(const MessageLite& base) { - const Type& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t Type::ByteSizeLong() const { - const Type& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.Type) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - switch (this_.kind_case()) { - // .tint.core.ir.binary.pb.TypeBasic basic = 1; - case kBasic: { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this_._internal_basic()); - break; - } - // .tint.core.ir.binary.pb.TypeVector vector = 2; - case kVector: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.vector_); - break; - } - // .tint.core.ir.binary.pb.TypeMatrix matrix = 3; - case kMatrix: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.matrix_); - break; - } - // .tint.core.ir.binary.pb.TypeArray array = 4; - case kArray: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.array_); - break; - } - // .tint.core.ir.binary.pb.TypePointer pointer = 5; - case kPointer: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.pointer_); - break; - } - // .tint.core.ir.binary.pb.TypeStruct struct = 6; - case kStruct: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.struct__); - break; - } - // .tint.core.ir.binary.pb.TypeAtomic atomic = 7; - case kAtomic: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.atomic_); - break; - } - // .tint.core.ir.binary.pb.TypeDepthTexture depth_texture = 8; - case kDepthTexture: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.depth_texture_); - break; - } - // .tint.core.ir.binary.pb.TypeSampledTexture sampled_texture = 9; - case kSampledTexture: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.sampled_texture_); - break; - } - // .tint.core.ir.binary.pb.TypeMultisampledTexture multisampled_texture = 10; - case kMultisampledTexture: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.multisampled_texture_); - break; - } - // .tint.core.ir.binary.pb.TypeDepthMultisampledTexture depth_multisampled_texture = 11; - case kDepthMultisampledTexture: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.depth_multisampled_texture_); - break; - } - // .tint.core.ir.binary.pb.TypeStorageTexture storage_texture = 12; - case kStorageTexture: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.storage_texture_); - break; - } - // .tint.core.ir.binary.pb.TypeExternalTexture external_texture = 13; - case kExternalTexture: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.external_texture_); - break; - } - // .tint.core.ir.binary.pb.TypeSampler sampler = 14; - case kSampler: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.sampler_); - break; - } - // .tint.core.ir.binary.pb.TypeInputAttachment input_attachment = 15; - case kInputAttachment: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.input_attachment_); - break; - } - // .tint.core.ir.binary.pb.TypeSubgroupMatrix subgroup_matrix_left = 16; - case kSubgroupMatrixLeft: { - total_size += 2 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.subgroup_matrix_left_); - break; - } - // .tint.core.ir.binary.pb.TypeSubgroupMatrix subgroup_matrix_right = 17; - case kSubgroupMatrixRight: { - total_size += 2 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.subgroup_matrix_right_); - break; - } - // .tint.core.ir.binary.pb.TypeSubgroupMatrix subgroup_matrix_result = 18; - case kSubgroupMatrixResult: { - total_size += 2 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.subgroup_matrix_result_); - break; - } - // .tint.core.ir.binary.pb.TypeBuiltinStruct builtin_struct = 19; - case kBuiltinStruct: { - total_size += 2 + - ::_pbi::WireFormatLite::EnumSize(this_._internal_builtin_struct()); - break; - } - // .tint.core.ir.binary.pb.TypeBindingArray binding_array = 20; - case kBindingArray: { - total_size += 2 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.binding_array_); - break; - } - // .tint.core.ir.binary.pb.TypeTexelBuffer texel_buffer = 21; - case kTexelBuffer: { - total_size += 2 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.texel_buffer_); - break; - } - // .tint.core.ir.binary.pb.TypeBuffer buffer = 23; - case kBuffer: { - total_size += 2 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.buffer_); - break; - } - case KIND_NOT_SET: { - break; - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void Type::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - ::google::protobuf::Arena* arena = _this->GetArena(); - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.Type) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (const uint32_t oneof_from_case = from._impl_._oneof_case_[0]) { - const uint32_t oneof_to_case = _this->_impl_._oneof_case_[0]; - const bool oneof_needs_init = oneof_to_case != oneof_from_case; - if (oneof_needs_init) { - if (oneof_to_case != 0) { - _this->clear_kind(); - } - _this->_impl_._oneof_case_[0] = oneof_from_case; - } - - switch (oneof_from_case) { - case kBasic: { - _this->_impl_.kind_.basic_ = from._impl_.kind_.basic_; - break; - } - case kVector: { - if (oneof_needs_init) { - _this->_impl_.kind_.vector_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.vector_); - } else { - _this->_impl_.kind_.vector_->MergeFrom(*from._impl_.kind_.vector_); - } - break; - } - case kMatrix: { - if (oneof_needs_init) { - _this->_impl_.kind_.matrix_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.matrix_); - } else { - _this->_impl_.kind_.matrix_->MergeFrom(*from._impl_.kind_.matrix_); - } - break; - } - case kArray: { - if (oneof_needs_init) { - _this->_impl_.kind_.array_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.array_); - } else { - _this->_impl_.kind_.array_->MergeFrom(*from._impl_.kind_.array_); - } - break; - } - case kPointer: { - if (oneof_needs_init) { - _this->_impl_.kind_.pointer_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.pointer_); - } else { - _this->_impl_.kind_.pointer_->MergeFrom(*from._impl_.kind_.pointer_); - } - break; - } - case kStruct: { - if (oneof_needs_init) { - _this->_impl_.kind_.struct__ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.struct__); - } else { - _this->_impl_.kind_.struct__->MergeFrom(*from._impl_.kind_.struct__); - } - break; - } - case kAtomic: { - if (oneof_needs_init) { - _this->_impl_.kind_.atomic_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.atomic_); - } else { - _this->_impl_.kind_.atomic_->MergeFrom(*from._impl_.kind_.atomic_); - } - break; - } - case kDepthTexture: { - if (oneof_needs_init) { - _this->_impl_.kind_.depth_texture_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.depth_texture_); - } else { - _this->_impl_.kind_.depth_texture_->MergeFrom(*from._impl_.kind_.depth_texture_); - } - break; - } - case kSampledTexture: { - if (oneof_needs_init) { - _this->_impl_.kind_.sampled_texture_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.sampled_texture_); - } else { - _this->_impl_.kind_.sampled_texture_->MergeFrom(*from._impl_.kind_.sampled_texture_); - } - break; - } - case kMultisampledTexture: { - if (oneof_needs_init) { - _this->_impl_.kind_.multisampled_texture_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.multisampled_texture_); - } else { - _this->_impl_.kind_.multisampled_texture_->MergeFrom(*from._impl_.kind_.multisampled_texture_); - } - break; - } - case kDepthMultisampledTexture: { - if (oneof_needs_init) { - _this->_impl_.kind_.depth_multisampled_texture_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.depth_multisampled_texture_); - } else { - _this->_impl_.kind_.depth_multisampled_texture_->MergeFrom(*from._impl_.kind_.depth_multisampled_texture_); - } - break; - } - case kStorageTexture: { - if (oneof_needs_init) { - _this->_impl_.kind_.storage_texture_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.storage_texture_); - } else { - _this->_impl_.kind_.storage_texture_->MergeFrom(*from._impl_.kind_.storage_texture_); - } - break; - } - case kExternalTexture: { - if (oneof_needs_init) { - _this->_impl_.kind_.external_texture_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.external_texture_); - } else { - _this->_impl_.kind_.external_texture_->MergeFrom(*from._impl_.kind_.external_texture_); - } - break; - } - case kSampler: { - if (oneof_needs_init) { - _this->_impl_.kind_.sampler_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.sampler_); - } else { - _this->_impl_.kind_.sampler_->MergeFrom(*from._impl_.kind_.sampler_); - } - break; - } - case kInputAttachment: { - if (oneof_needs_init) { - _this->_impl_.kind_.input_attachment_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.input_attachment_); - } else { - _this->_impl_.kind_.input_attachment_->MergeFrom(*from._impl_.kind_.input_attachment_); - } - break; - } - case kSubgroupMatrixLeft: { - if (oneof_needs_init) { - _this->_impl_.kind_.subgroup_matrix_left_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.subgroup_matrix_left_); - } else { - _this->_impl_.kind_.subgroup_matrix_left_->MergeFrom(*from._impl_.kind_.subgroup_matrix_left_); - } - break; - } - case kSubgroupMatrixRight: { - if (oneof_needs_init) { - _this->_impl_.kind_.subgroup_matrix_right_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.subgroup_matrix_right_); - } else { - _this->_impl_.kind_.subgroup_matrix_right_->MergeFrom(*from._impl_.kind_.subgroup_matrix_right_); - } - break; - } - case kSubgroupMatrixResult: { - if (oneof_needs_init) { - _this->_impl_.kind_.subgroup_matrix_result_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.subgroup_matrix_result_); - } else { - _this->_impl_.kind_.subgroup_matrix_result_->MergeFrom(*from._impl_.kind_.subgroup_matrix_result_); - } - break; - } - case kBuiltinStruct: { - _this->_impl_.kind_.builtin_struct_ = from._impl_.kind_.builtin_struct_; - break; - } - case kBindingArray: { - if (oneof_needs_init) { - _this->_impl_.kind_.binding_array_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.binding_array_); - } else { - _this->_impl_.kind_.binding_array_->MergeFrom(*from._impl_.kind_.binding_array_); - } - break; - } - case kTexelBuffer: { - if (oneof_needs_init) { - _this->_impl_.kind_.texel_buffer_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.texel_buffer_); - } else { - _this->_impl_.kind_.texel_buffer_->MergeFrom(*from._impl_.kind_.texel_buffer_); - } - break; - } - case kBuffer: { - if (oneof_needs_init) { - _this->_impl_.kind_.buffer_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.buffer_); - } else { - _this->_impl_.kind_.buffer_->MergeFrom(*from._impl_.kind_.buffer_); - } - break; - } - case KIND_NOT_SET: - break; - } - } - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void Type::CopyFrom(const Type& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.Type) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void Type::InternalSwap(Type* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_.kind_, other->_impl_.kind_); - swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); -} - -::google::protobuf::Metadata Type::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class TypeVector::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(TypeVector, _impl_._has_bits_); -}; - -TypeVector::TypeVector(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, TypeVector_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.TypeVector) -} -TypeVector::TypeVector( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TypeVector& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, TypeVector_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(from._impl_) { - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); -} -PROTOBUF_NDEBUG_INLINE TypeVector::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0} {} - -inline void TypeVector::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - ::memset(reinterpret_cast(&_impl_) + - offsetof(Impl_, width_), - 0, - offsetof(Impl_, element_type_) - - offsetof(Impl_, width_) + - sizeof(Impl_::element_type_)); -} -TypeVector::~TypeVector() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.TypeVector) - SharedDtor(*this); -} -inline void TypeVector::SharedDtor(MessageLite& self) { - TypeVector& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL TypeVector::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) TypeVector(arena); -} -constexpr auto TypeVector::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(TypeVector), - alignof(TypeVector)); -} -constexpr auto TypeVector::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_TypeVector_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &TypeVector::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &TypeVector::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &TypeVector::ByteSizeLong, - &TypeVector::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(TypeVector, _impl_._cached_size_), - false, - }, - &TypeVector::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull TypeVector_class_data_ = - TypeVector::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -TypeVector::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&TypeVector_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(TypeVector_class_data_.tc_table); - return TypeVector_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<1, 2, 0, 0, 2> -TypeVector::_table_ = { - { - PROTOBUF_FIELD_OFFSET(TypeVector, _impl_._has_bits_), - 0, // no _extensions_ - 2, 8, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967292, // skipmap - offsetof(decltype(_table_), field_entries), - 2, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - TypeVector_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeVector>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - // uint32 element_type = 2; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(TypeVector, _impl_.element_type_), 1>(), - {16, 1, 0, PROTOBUF_FIELD_OFFSET(TypeVector, _impl_.element_type_)}}, - // uint32 width = 1; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(TypeVector, _impl_.width_), 0>(), - {8, 0, 0, PROTOBUF_FIELD_OFFSET(TypeVector, _impl_.width_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // uint32 width = 1; - {PROTOBUF_FIELD_OFFSET(TypeVector, _impl_.width_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - // uint32 element_type = 2; - {PROTOBUF_FIELD_OFFSET(TypeVector, _impl_.element_type_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - }}, - // no aux_entries - {{ - }}, -}; -PROTOBUF_NOINLINE void TypeVector::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.TypeVector) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - ::memset(&_impl_.width_, 0, static_cast<::size_t>( - reinterpret_cast(&_impl_.element_type_) - - reinterpret_cast(&_impl_.width_)) + sizeof(_impl_.element_type_)); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL TypeVector::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const TypeVector& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL TypeVector::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const TypeVector& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.TypeVector) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // uint32 width = 1; - if ((this_._impl_._has_bits_[0] & 0x00000001U) != 0) { - if (this_._internal_width() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 1, this_._internal_width(), target); - } - } - - // uint32 element_type = 2; - if ((this_._impl_._has_bits_[0] & 0x00000002U) != 0) { - if (this_._internal_element_type() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 2, this_._internal_element_type(), target); - } - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.TypeVector) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t TypeVector::ByteSizeLong(const MessageLite& base) { - const TypeVector& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t TypeVector::ByteSizeLong() const { - const TypeVector& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.TypeVector) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - ::_pbi::Prefetch5LinesFrom7Lines(&this_); - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - // uint32 width = 1; - if ((cached_has_bits & 0x00000001U) != 0) { - if (this_._internal_width() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_width()); - } - } - // uint32 element_type = 2; - if ((cached_has_bits & 0x00000002U) != 0) { - if (this_._internal_element_type() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_element_type()); - } - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void TypeVector::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.TypeVector) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - if ((cached_has_bits & 0x00000001U) != 0) { - if (from._internal_width() != 0) { - _this->_impl_.width_ = from._impl_.width_; - } - } - if ((cached_has_bits & 0x00000002U) != 0) { - if (from._internal_element_type() != 0) { - _this->_impl_.element_type_ = from._impl_.element_type_; - } - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void TypeVector::CopyFrom(const TypeVector& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.TypeVector) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void TypeVector::InternalSwap(TypeVector* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::google::protobuf::internal::memswap< - PROTOBUF_FIELD_OFFSET(TypeVector, _impl_.element_type_) - + sizeof(TypeVector::_impl_.element_type_) - - PROTOBUF_FIELD_OFFSET(TypeVector, _impl_.width_)>( - reinterpret_cast(&_impl_.width_), - reinterpret_cast(&other->_impl_.width_)); -} - -::google::protobuf::Metadata TypeVector::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class TypeMatrix::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(TypeMatrix, _impl_._has_bits_); -}; - -TypeMatrix::TypeMatrix(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, TypeMatrix_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.TypeMatrix) -} -TypeMatrix::TypeMatrix( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TypeMatrix& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, TypeMatrix_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(from._impl_) { - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); -} -PROTOBUF_NDEBUG_INLINE TypeMatrix::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0} {} - -inline void TypeMatrix::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - ::memset(reinterpret_cast(&_impl_) + - offsetof(Impl_, num_columns_), - 0, - offsetof(Impl_, element_type_) - - offsetof(Impl_, num_columns_) + - sizeof(Impl_::element_type_)); -} -TypeMatrix::~TypeMatrix() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.TypeMatrix) - SharedDtor(*this); -} -inline void TypeMatrix::SharedDtor(MessageLite& self) { - TypeMatrix& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL TypeMatrix::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) TypeMatrix(arena); -} -constexpr auto TypeMatrix::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(TypeMatrix), - alignof(TypeMatrix)); -} -constexpr auto TypeMatrix::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_TypeMatrix_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &TypeMatrix::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &TypeMatrix::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &TypeMatrix::ByteSizeLong, - &TypeMatrix::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(TypeMatrix, _impl_._cached_size_), - false, - }, - &TypeMatrix::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull TypeMatrix_class_data_ = - TypeMatrix::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -TypeMatrix::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&TypeMatrix_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(TypeMatrix_class_data_.tc_table); - return TypeMatrix_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<2, 3, 0, 0, 2> -TypeMatrix::_table_ = { - { - PROTOBUF_FIELD_OFFSET(TypeMatrix, _impl_._has_bits_), - 0, // no _extensions_ - 3, 24, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967288, // skipmap - offsetof(decltype(_table_), field_entries), - 3, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - TypeMatrix_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeMatrix>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - // uint32 num_columns = 1; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(TypeMatrix, _impl_.num_columns_), 0>(), - {8, 0, 0, PROTOBUF_FIELD_OFFSET(TypeMatrix, _impl_.num_columns_)}}, - // uint32 num_rows = 2; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(TypeMatrix, _impl_.num_rows_), 1>(), - {16, 1, 0, PROTOBUF_FIELD_OFFSET(TypeMatrix, _impl_.num_rows_)}}, - // uint32 element_type = 3; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(TypeMatrix, _impl_.element_type_), 2>(), - {24, 2, 0, PROTOBUF_FIELD_OFFSET(TypeMatrix, _impl_.element_type_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // uint32 num_columns = 1; - {PROTOBUF_FIELD_OFFSET(TypeMatrix, _impl_.num_columns_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - // uint32 num_rows = 2; - {PROTOBUF_FIELD_OFFSET(TypeMatrix, _impl_.num_rows_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - // uint32 element_type = 3; - {PROTOBUF_FIELD_OFFSET(TypeMatrix, _impl_.element_type_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - }}, - // no aux_entries - {{ - }}, -}; -PROTOBUF_NOINLINE void TypeMatrix::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.TypeMatrix) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000007U) != 0) { - ::memset(&_impl_.num_columns_, 0, static_cast<::size_t>( - reinterpret_cast(&_impl_.element_type_) - - reinterpret_cast(&_impl_.num_columns_)) + sizeof(_impl_.element_type_)); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL TypeMatrix::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const TypeMatrix& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL TypeMatrix::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const TypeMatrix& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.TypeMatrix) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // uint32 num_columns = 1; - if ((this_._impl_._has_bits_[0] & 0x00000001U) != 0) { - if (this_._internal_num_columns() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 1, this_._internal_num_columns(), target); - } - } - - // uint32 num_rows = 2; - if ((this_._impl_._has_bits_[0] & 0x00000002U) != 0) { - if (this_._internal_num_rows() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 2, this_._internal_num_rows(), target); - } - } - - // uint32 element_type = 3; - if ((this_._impl_._has_bits_[0] & 0x00000004U) != 0) { - if (this_._internal_element_type() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 3, this_._internal_element_type(), target); - } - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.TypeMatrix) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t TypeMatrix::ByteSizeLong(const MessageLite& base) { - const TypeMatrix& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t TypeMatrix::ByteSizeLong() const { - const TypeMatrix& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.TypeMatrix) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - ::_pbi::Prefetch5LinesFrom7Lines(&this_); - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000007U) != 0) { - // uint32 num_columns = 1; - if ((cached_has_bits & 0x00000001U) != 0) { - if (this_._internal_num_columns() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_num_columns()); - } - } - // uint32 num_rows = 2; - if ((cached_has_bits & 0x00000002U) != 0) { - if (this_._internal_num_rows() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_num_rows()); - } - } - // uint32 element_type = 3; - if ((cached_has_bits & 0x00000004U) != 0) { - if (this_._internal_element_type() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_element_type()); - } - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void TypeMatrix::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.TypeMatrix) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000007U) != 0) { - if ((cached_has_bits & 0x00000001U) != 0) { - if (from._internal_num_columns() != 0) { - _this->_impl_.num_columns_ = from._impl_.num_columns_; - } - } - if ((cached_has_bits & 0x00000002U) != 0) { - if (from._internal_num_rows() != 0) { - _this->_impl_.num_rows_ = from._impl_.num_rows_; - } - } - if ((cached_has_bits & 0x00000004U) != 0) { - if (from._internal_element_type() != 0) { - _this->_impl_.element_type_ = from._impl_.element_type_; - } - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void TypeMatrix::CopyFrom(const TypeMatrix& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.TypeMatrix) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void TypeMatrix::InternalSwap(TypeMatrix* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::google::protobuf::internal::memswap< - PROTOBUF_FIELD_OFFSET(TypeMatrix, _impl_.element_type_) - + sizeof(TypeMatrix::_impl_.element_type_) - - PROTOBUF_FIELD_OFFSET(TypeMatrix, _impl_.num_columns_)>( - reinterpret_cast(&_impl_.num_columns_), - reinterpret_cast(&other->_impl_.num_columns_)); -} - -::google::protobuf::Metadata TypeMatrix::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class TypeArray::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(TypeArray, _impl_._has_bits_); -}; - -TypeArray::TypeArray(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, TypeArray_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.TypeArray) -} -TypeArray::TypeArray( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TypeArray& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, TypeArray_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(from._impl_) { - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); -} -PROTOBUF_NDEBUG_INLINE TypeArray::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0} {} - -inline void TypeArray::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - ::memset(reinterpret_cast(&_impl_) + - offsetof(Impl_, element_), - 0, - offsetof(Impl_, count_) - - offsetof(Impl_, element_) + - sizeof(Impl_::count_)); -} -TypeArray::~TypeArray() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.TypeArray) - SharedDtor(*this); -} -inline void TypeArray::SharedDtor(MessageLite& self) { - TypeArray& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL TypeArray::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) TypeArray(arena); -} -constexpr auto TypeArray::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(TypeArray), - alignof(TypeArray)); -} -constexpr auto TypeArray::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_TypeArray_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &TypeArray::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &TypeArray::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &TypeArray::ByteSizeLong, - &TypeArray::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(TypeArray, _impl_._cached_size_), - false, - }, - &TypeArray::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull TypeArray_class_data_ = - TypeArray::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -TypeArray::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&TypeArray_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(TypeArray_class_data_.tc_table); - return TypeArray_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<2, 2, 0, 0, 2> -TypeArray::_table_ = { - { - PROTOBUF_FIELD_OFFSET(TypeArray, _impl_._has_bits_), - 0, // no _extensions_ - 3, 24, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967290, // skipmap - offsetof(decltype(_table_), field_entries), - 2, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - TypeArray_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeArray>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - // uint32 element = 1; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(TypeArray, _impl_.element_), 0>(), - {8, 0, 0, PROTOBUF_FIELD_OFFSET(TypeArray, _impl_.element_)}}, - {::_pbi::TcParser::MiniParse, {}}, - // uint32 count = 3; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(TypeArray, _impl_.count_), 1>(), - {24, 1, 0, PROTOBUF_FIELD_OFFSET(TypeArray, _impl_.count_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // uint32 element = 1; - {PROTOBUF_FIELD_OFFSET(TypeArray, _impl_.element_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - // uint32 count = 3; - {PROTOBUF_FIELD_OFFSET(TypeArray, _impl_.count_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - }}, - // no aux_entries - {{ - }}, -}; -PROTOBUF_NOINLINE void TypeArray::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.TypeArray) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - ::memset(&_impl_.element_, 0, static_cast<::size_t>( - reinterpret_cast(&_impl_.count_) - - reinterpret_cast(&_impl_.element_)) + sizeof(_impl_.count_)); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL TypeArray::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const TypeArray& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL TypeArray::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const TypeArray& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.TypeArray) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // uint32 element = 1; - if ((this_._impl_._has_bits_[0] & 0x00000001U) != 0) { - if (this_._internal_element() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 1, this_._internal_element(), target); - } - } - - // uint32 count = 3; - if ((this_._impl_._has_bits_[0] & 0x00000002U) != 0) { - if (this_._internal_count() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 3, this_._internal_count(), target); - } - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.TypeArray) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t TypeArray::ByteSizeLong(const MessageLite& base) { - const TypeArray& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t TypeArray::ByteSizeLong() const { - const TypeArray& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.TypeArray) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - ::_pbi::Prefetch5LinesFrom7Lines(&this_); - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - // uint32 element = 1; - if ((cached_has_bits & 0x00000001U) != 0) { - if (this_._internal_element() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_element()); - } - } - // uint32 count = 3; - if ((cached_has_bits & 0x00000002U) != 0) { - if (this_._internal_count() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_count()); - } - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void TypeArray::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.TypeArray) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - if ((cached_has_bits & 0x00000001U) != 0) { - if (from._internal_element() != 0) { - _this->_impl_.element_ = from._impl_.element_; - } - } - if ((cached_has_bits & 0x00000002U) != 0) { - if (from._internal_count() != 0) { - _this->_impl_.count_ = from._impl_.count_; - } - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void TypeArray::CopyFrom(const TypeArray& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.TypeArray) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void TypeArray::InternalSwap(TypeArray* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::google::protobuf::internal::memswap< - PROTOBUF_FIELD_OFFSET(TypeArray, _impl_.count_) - + sizeof(TypeArray::_impl_.count_) - - PROTOBUF_FIELD_OFFSET(TypeArray, _impl_.element_)>( - reinterpret_cast(&_impl_.element_), - reinterpret_cast(&other->_impl_.element_)); -} - -::google::protobuf::Metadata TypeArray::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class TypeBindingArray::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(TypeBindingArray, _impl_._has_bits_); -}; - -TypeBindingArray::TypeBindingArray(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, TypeBindingArray_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.TypeBindingArray) -} -TypeBindingArray::TypeBindingArray( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TypeBindingArray& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, TypeBindingArray_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(from._impl_) { - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); -} -PROTOBUF_NDEBUG_INLINE TypeBindingArray::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0} {} - -inline void TypeBindingArray::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - ::memset(reinterpret_cast(&_impl_) + - offsetof(Impl_, element_), - 0, - offsetof(Impl_, count_) - - offsetof(Impl_, element_) + - sizeof(Impl_::count_)); -} -TypeBindingArray::~TypeBindingArray() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.TypeBindingArray) - SharedDtor(*this); -} -inline void TypeBindingArray::SharedDtor(MessageLite& self) { - TypeBindingArray& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL TypeBindingArray::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) TypeBindingArray(arena); -} -constexpr auto TypeBindingArray::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(TypeBindingArray), - alignof(TypeBindingArray)); -} -constexpr auto TypeBindingArray::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_TypeBindingArray_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &TypeBindingArray::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &TypeBindingArray::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &TypeBindingArray::ByteSizeLong, - &TypeBindingArray::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(TypeBindingArray, _impl_._cached_size_), - false, - }, - &TypeBindingArray::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull TypeBindingArray_class_data_ = - TypeBindingArray::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -TypeBindingArray::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&TypeBindingArray_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(TypeBindingArray_class_data_.tc_table); - return TypeBindingArray_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<1, 2, 0, 0, 2> -TypeBindingArray::_table_ = { - { - PROTOBUF_FIELD_OFFSET(TypeBindingArray, _impl_._has_bits_), - 0, // no _extensions_ - 2, 8, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967292, // skipmap - offsetof(decltype(_table_), field_entries), - 2, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - TypeBindingArray_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeBindingArray>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - // uint32 count = 2; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(TypeBindingArray, _impl_.count_), 1>(), - {16, 1, 0, PROTOBUF_FIELD_OFFSET(TypeBindingArray, _impl_.count_)}}, - // uint32 element = 1; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(TypeBindingArray, _impl_.element_), 0>(), - {8, 0, 0, PROTOBUF_FIELD_OFFSET(TypeBindingArray, _impl_.element_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // uint32 element = 1; - {PROTOBUF_FIELD_OFFSET(TypeBindingArray, _impl_.element_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - // uint32 count = 2; - {PROTOBUF_FIELD_OFFSET(TypeBindingArray, _impl_.count_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - }}, - // no aux_entries - {{ - }}, -}; -PROTOBUF_NOINLINE void TypeBindingArray::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.TypeBindingArray) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - ::memset(&_impl_.element_, 0, static_cast<::size_t>( - reinterpret_cast(&_impl_.count_) - - reinterpret_cast(&_impl_.element_)) + sizeof(_impl_.count_)); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL TypeBindingArray::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const TypeBindingArray& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL TypeBindingArray::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const TypeBindingArray& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.TypeBindingArray) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // uint32 element = 1; - if ((this_._impl_._has_bits_[0] & 0x00000001U) != 0) { - if (this_._internal_element() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 1, this_._internal_element(), target); - } - } - - // uint32 count = 2; - if ((this_._impl_._has_bits_[0] & 0x00000002U) != 0) { - if (this_._internal_count() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 2, this_._internal_count(), target); - } - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.TypeBindingArray) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t TypeBindingArray::ByteSizeLong(const MessageLite& base) { - const TypeBindingArray& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t TypeBindingArray::ByteSizeLong() const { - const TypeBindingArray& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.TypeBindingArray) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - ::_pbi::Prefetch5LinesFrom7Lines(&this_); - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - // uint32 element = 1; - if ((cached_has_bits & 0x00000001U) != 0) { - if (this_._internal_element() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_element()); - } - } - // uint32 count = 2; - if ((cached_has_bits & 0x00000002U) != 0) { - if (this_._internal_count() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_count()); - } - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void TypeBindingArray::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.TypeBindingArray) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - if ((cached_has_bits & 0x00000001U) != 0) { - if (from._internal_element() != 0) { - _this->_impl_.element_ = from._impl_.element_; - } - } - if ((cached_has_bits & 0x00000002U) != 0) { - if (from._internal_count() != 0) { - _this->_impl_.count_ = from._impl_.count_; - } - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void TypeBindingArray::CopyFrom(const TypeBindingArray& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.TypeBindingArray) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void TypeBindingArray::InternalSwap(TypeBindingArray* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::google::protobuf::internal::memswap< - PROTOBUF_FIELD_OFFSET(TypeBindingArray, _impl_.count_) - + sizeof(TypeBindingArray::_impl_.count_) - - PROTOBUF_FIELD_OFFSET(TypeBindingArray, _impl_.element_)>( - reinterpret_cast(&_impl_.element_), - reinterpret_cast(&other->_impl_.element_)); -} - -::google::protobuf::Metadata TypeBindingArray::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class TypePointer::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(TypePointer, _impl_._has_bits_); -}; - -TypePointer::TypePointer(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, TypePointer_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.TypePointer) -} -TypePointer::TypePointer( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TypePointer& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, TypePointer_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(from._impl_) { - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); -} -PROTOBUF_NDEBUG_INLINE TypePointer::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0} {} - -inline void TypePointer::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - ::memset(reinterpret_cast(&_impl_) + - offsetof(Impl_, address_space_), - 0, - offsetof(Impl_, access_) - - offsetof(Impl_, address_space_) + - sizeof(Impl_::access_)); -} -TypePointer::~TypePointer() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.TypePointer) - SharedDtor(*this); -} -inline void TypePointer::SharedDtor(MessageLite& self) { - TypePointer& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL TypePointer::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) TypePointer(arena); -} -constexpr auto TypePointer::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(TypePointer), - alignof(TypePointer)); -} -constexpr auto TypePointer::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_TypePointer_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &TypePointer::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &TypePointer::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &TypePointer::ByteSizeLong, - &TypePointer::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(TypePointer, _impl_._cached_size_), - false, - }, - &TypePointer::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull TypePointer_class_data_ = - TypePointer::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -TypePointer::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&TypePointer_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(TypePointer_class_data_.tc_table); - return TypePointer_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<2, 3, 0, 0, 2> -TypePointer::_table_ = { - { - PROTOBUF_FIELD_OFFSET(TypePointer, _impl_._has_bits_), - 0, // no _extensions_ - 3, 24, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967288, // skipmap - offsetof(decltype(_table_), field_entries), - 3, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - TypePointer_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypePointer>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - // .tint.core.ir.binary.pb.AddressSpace address_space = 1; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(TypePointer, _impl_.address_space_), 0>(), - {8, 0, 0, PROTOBUF_FIELD_OFFSET(TypePointer, _impl_.address_space_)}}, - // uint32 store_type = 2; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(TypePointer, _impl_.store_type_), 1>(), - {16, 1, 0, PROTOBUF_FIELD_OFFSET(TypePointer, _impl_.store_type_)}}, - // .tint.core.ir.binary.pb.AccessControl access = 3; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(TypePointer, _impl_.access_), 2>(), - {24, 2, 0, PROTOBUF_FIELD_OFFSET(TypePointer, _impl_.access_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // .tint.core.ir.binary.pb.AddressSpace address_space = 1; - {PROTOBUF_FIELD_OFFSET(TypePointer, _impl_.address_space_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)}, - // uint32 store_type = 2; - {PROTOBUF_FIELD_OFFSET(TypePointer, _impl_.store_type_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - // .tint.core.ir.binary.pb.AccessControl access = 3; - {PROTOBUF_FIELD_OFFSET(TypePointer, _impl_.access_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)}, - }}, - // no aux_entries - {{ - }}, -}; -PROTOBUF_NOINLINE void TypePointer::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.TypePointer) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000007U) != 0) { - ::memset(&_impl_.address_space_, 0, static_cast<::size_t>( - reinterpret_cast(&_impl_.access_) - - reinterpret_cast(&_impl_.address_space_)) + sizeof(_impl_.access_)); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL TypePointer::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const TypePointer& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL TypePointer::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const TypePointer& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.TypePointer) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // .tint.core.ir.binary.pb.AddressSpace address_space = 1; - if ((this_._impl_._has_bits_[0] & 0x00000001U) != 0) { - if (this_._internal_address_space() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 1, this_._internal_address_space(), target); - } - } - - // uint32 store_type = 2; - if ((this_._impl_._has_bits_[0] & 0x00000002U) != 0) { - if (this_._internal_store_type() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 2, this_._internal_store_type(), target); - } - } - - // .tint.core.ir.binary.pb.AccessControl access = 3; - if ((this_._impl_._has_bits_[0] & 0x00000004U) != 0) { - if (this_._internal_access() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 3, this_._internal_access(), target); - } - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.TypePointer) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t TypePointer::ByteSizeLong(const MessageLite& base) { - const TypePointer& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t TypePointer::ByteSizeLong() const { - const TypePointer& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.TypePointer) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - ::_pbi::Prefetch5LinesFrom7Lines(&this_); - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000007U) != 0) { - // .tint.core.ir.binary.pb.AddressSpace address_space = 1; - if ((cached_has_bits & 0x00000001U) != 0) { - if (this_._internal_address_space() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this_._internal_address_space()); - } - } - // uint32 store_type = 2; - if ((cached_has_bits & 0x00000002U) != 0) { - if (this_._internal_store_type() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_store_type()); - } - } - // .tint.core.ir.binary.pb.AccessControl access = 3; - if ((cached_has_bits & 0x00000004U) != 0) { - if (this_._internal_access() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this_._internal_access()); - } - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void TypePointer::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.TypePointer) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000007U) != 0) { - if ((cached_has_bits & 0x00000001U) != 0) { - if (from._internal_address_space() != 0) { - _this->_impl_.address_space_ = from._impl_.address_space_; - } - } - if ((cached_has_bits & 0x00000002U) != 0) { - if (from._internal_store_type() != 0) { - _this->_impl_.store_type_ = from._impl_.store_type_; - } - } - if ((cached_has_bits & 0x00000004U) != 0) { - if (from._internal_access() != 0) { - _this->_impl_.access_ = from._impl_.access_; - } - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void TypePointer::CopyFrom(const TypePointer& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.TypePointer) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void TypePointer::InternalSwap(TypePointer* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::google::protobuf::internal::memswap< - PROTOBUF_FIELD_OFFSET(TypePointer, _impl_.access_) - + sizeof(TypePointer::_impl_.access_) - - PROTOBUF_FIELD_OFFSET(TypePointer, _impl_.address_space_)>( - reinterpret_cast(&_impl_.address_space_), - reinterpret_cast(&other->_impl_.address_space_)); -} - -::google::protobuf::Metadata TypePointer::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class TypeStruct::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(TypeStruct, _impl_._has_bits_); -}; - -TypeStruct::TypeStruct(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, TypeStruct_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.TypeStruct) -} -PROTOBUF_NDEBUG_INLINE TypeStruct::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - [[maybe_unused]] const ::tint::core::ir::binary::pb::TypeStruct& from_msg) - : _has_bits_{from._has_bits_}, - _cached_size_{0}, - member_{visibility, arena, from.member_}, - name_(arena, from.name_) {} - -TypeStruct::TypeStruct( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const TypeStruct& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, TypeStruct_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - TypeStruct* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.TypeStruct) -} -PROTOBUF_NDEBUG_INLINE TypeStruct::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0}, - member_{visibility, arena}, - name_(arena) {} - -inline void TypeStruct::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); -} -TypeStruct::~TypeStruct() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.TypeStruct) - SharedDtor(*this); -} -inline void TypeStruct::SharedDtor(MessageLite& self) { - TypeStruct& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.name_.Destroy(); - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL TypeStruct::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) TypeStruct(arena); -} -constexpr auto TypeStruct::InternalNewImpl_() { - constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ - PROTOBUF_FIELD_OFFSET(TypeStruct, _impl_.member_) + - decltype(TypeStruct::_impl_.member_):: - InternalGetArenaOffset( - ::google::protobuf::Message::internal_visibility()), - }); - if constexpr (arena_bits.has_value()) { - return ::google::protobuf::internal::MessageCreator::CopyInit( - sizeof(TypeStruct), alignof(TypeStruct), *arena_bits); - } else { - return ::google::protobuf::internal::MessageCreator(&TypeStruct::PlacementNew_, - sizeof(TypeStruct), - alignof(TypeStruct)); - } -} -constexpr auto TypeStruct::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_TypeStruct_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &TypeStruct::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &TypeStruct::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &TypeStruct::ByteSizeLong, - &TypeStruct::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(TypeStruct, _impl_._cached_size_), - false, - }, - &TypeStruct::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull TypeStruct_class_data_ = - TypeStruct::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -TypeStruct::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&TypeStruct_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(TypeStruct_class_data_.tc_table); - return TypeStruct_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<1, 2, 1, 46, 2> -TypeStruct::_table_ = { - { - PROTOBUF_FIELD_OFFSET(TypeStruct, _impl_._has_bits_), - 0, // no _extensions_ - 2, 8, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967292, // skipmap - offsetof(decltype(_table_), field_entries), - 2, // num_field_entries - 1, // num_aux_entries - offsetof(decltype(_table_), aux_entries), - TypeStruct_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeStruct>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - // repeated .tint.core.ir.binary.pb.TypeStructMember member = 2; - {::_pbi::TcParser::FastMtR1, - {18, 63, 0, PROTOBUF_FIELD_OFFSET(TypeStruct, _impl_.member_)}}, - // string name = 1; - {::_pbi::TcParser::FastUS1, - {10, 0, 0, PROTOBUF_FIELD_OFFSET(TypeStruct, _impl_.name_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // string name = 1; - {PROTOBUF_FIELD_OFFSET(TypeStruct, _impl_.name_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, - // repeated .tint.core.ir.binary.pb.TypeStructMember member = 2; - {PROTOBUF_FIELD_OFFSET(TypeStruct, _impl_.member_), -1, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, - }}, - {{ - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeStructMember>()}, - }}, - {{ - "\41\4\0\0\0\0\0\0" - "tint.core.ir.binary.pb.TypeStruct" - "name" - }}, -}; -PROTOBUF_NOINLINE void TypeStruct::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.TypeStruct) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.member_.Clear(); - cached_has_bits = _impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000001U) != 0) { - _impl_.name_.ClearNonDefaultToEmpty(); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL TypeStruct::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const TypeStruct& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL TypeStruct::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const TypeStruct& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.TypeStruct) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // string name = 1; - if ((this_._impl_._has_bits_[0] & 0x00000001U) != 0) { - if (!this_._internal_name().empty()) { - const ::std::string& _s = this_._internal_name(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tint.core.ir.binary.pb.TypeStruct.name"); - target = stream->WriteStringMaybeAliased(1, _s, target); - } - } - - // repeated .tint.core.ir.binary.pb.TypeStructMember member = 2; - for (unsigned i = 0, n = static_cast( - this_._internal_member_size()); - i < n; i++) { - const auto& repfield = this_._internal_member().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 2, repfield, repfield.GetCachedSize(), - target, stream); - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.TypeStruct) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t TypeStruct::ByteSizeLong(const MessageLite& base) { - const TypeStruct& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t TypeStruct::ByteSizeLong() const { - const TypeStruct& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.TypeStruct) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - ::_pbi::Prefetch5LinesFrom7Lines(&this_); - { - // repeated .tint.core.ir.binary.pb.TypeStructMember member = 2; - { - total_size += 1UL * this_._internal_member_size(); - for (const auto& msg : this_._internal_member()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - } - { - // string name = 1; - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000001U) != 0) { - if (!this_._internal_name().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this_._internal_name()); - } - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void TypeStruct::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.TypeStruct) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - _this->_internal_mutable_member()->MergeFrom( - from._internal_member()); - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000001U) != 0) { - if (!from._internal_name().empty()) { - _this->_internal_set_name(from._internal_name()); - } else { - if (_this->_impl_.name_.IsDefault()) { - _this->_internal_set_name(""); - } - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void TypeStruct::CopyFrom(const TypeStruct& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.TypeStruct) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void TypeStruct::InternalSwap(TypeStruct* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - auto* arena = GetArena(); - ABSL_DCHECK_EQ(arena, other->GetArena()); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - _impl_.member_.InternalSwap(&other->_impl_.member_); - ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena); -} - -::google::protobuf::Metadata TypeStruct::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class TypeStructMember::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(TypeStructMember, _impl_._has_bits_); -}; - -TypeStructMember::TypeStructMember(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, TypeStructMember_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.TypeStructMember) -} -PROTOBUF_NDEBUG_INLINE TypeStructMember::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - [[maybe_unused]] const ::tint::core::ir::binary::pb::TypeStructMember& from_msg) - : _has_bits_{from._has_bits_}, - _cached_size_{0}, - name_(arena, from.name_) {} - -TypeStructMember::TypeStructMember( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const TypeStructMember& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, TypeStructMember_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - TypeStructMember* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); - ::uint32_t cached_has_bits = _impl_._has_bits_[0]; - _impl_.attributes_ = ((cached_has_bits & 0x00000002U) != 0) - ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.attributes_) - : nullptr; - ::memcpy(reinterpret_cast(&_impl_) + - offsetof(Impl_, type_), - reinterpret_cast(&from._impl_) + - offsetof(Impl_, type_), - offsetof(Impl_, align_) - - offsetof(Impl_, type_) + - sizeof(Impl_::align_)); - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.TypeStructMember) -} -PROTOBUF_NDEBUG_INLINE TypeStructMember::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0}, - name_(arena) {} - -inline void TypeStructMember::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - ::memset(reinterpret_cast(&_impl_) + - offsetof(Impl_, attributes_), - 0, - offsetof(Impl_, align_) - - offsetof(Impl_, attributes_) + - sizeof(Impl_::align_)); -} -TypeStructMember::~TypeStructMember() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.TypeStructMember) - SharedDtor(*this); -} -inline void TypeStructMember::SharedDtor(MessageLite& self) { - TypeStructMember& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.name_.Destroy(); - delete this_._impl_.attributes_; - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL TypeStructMember::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) TypeStructMember(arena); -} -constexpr auto TypeStructMember::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(TypeStructMember), - alignof(TypeStructMember)); -} -constexpr auto TypeStructMember::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_TypeStructMember_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &TypeStructMember::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &TypeStructMember::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &TypeStructMember::ByteSizeLong, - &TypeStructMember::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(TypeStructMember, _impl_._cached_size_), - false, - }, - &TypeStructMember::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull TypeStructMember_class_data_ = - TypeStructMember::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -TypeStructMember::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&TypeStructMember_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(TypeStructMember_class_data_.tc_table); - return TypeStructMember_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<3, 5, 1, 52, 2> -TypeStructMember::_table_ = { - { - PROTOBUF_FIELD_OFFSET(TypeStructMember, _impl_._has_bits_), - 0, // no _extensions_ - 5, 56, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967264, // skipmap - offsetof(decltype(_table_), field_entries), - 5, // num_field_entries - 1, // num_aux_entries - offsetof(decltype(_table_), aux_entries), - TypeStructMember_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeStructMember>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - // string name = 1; - {::_pbi::TcParser::FastUS1, - {10, 0, 0, PROTOBUF_FIELD_OFFSET(TypeStructMember, _impl_.name_)}}, - // uint32 type = 2; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(TypeStructMember, _impl_.type_), 2>(), - {16, 2, 0, PROTOBUF_FIELD_OFFSET(TypeStructMember, _impl_.type_)}}, - // uint32 size = 3; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(TypeStructMember, _impl_.size_), 3>(), - {24, 3, 0, PROTOBUF_FIELD_OFFSET(TypeStructMember, _impl_.size_)}}, - // uint32 align = 4; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(TypeStructMember, _impl_.align_), 4>(), - {32, 4, 0, PROTOBUF_FIELD_OFFSET(TypeStructMember, _impl_.align_)}}, - // optional .tint.core.ir.binary.pb.AttributesStructMember attributes = 5; - {::_pbi::TcParser::FastMtS1, - {42, 1, 0, PROTOBUF_FIELD_OFFSET(TypeStructMember, _impl_.attributes_)}}, - {::_pbi::TcParser::MiniParse, {}}, - {::_pbi::TcParser::MiniParse, {}}, - }}, {{ - 65535, 65535 - }}, {{ - // string name = 1; - {PROTOBUF_FIELD_OFFSET(TypeStructMember, _impl_.name_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, - // uint32 type = 2; - {PROTOBUF_FIELD_OFFSET(TypeStructMember, _impl_.type_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - // uint32 size = 3; - {PROTOBUF_FIELD_OFFSET(TypeStructMember, _impl_.size_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - // uint32 align = 4; - {PROTOBUF_FIELD_OFFSET(TypeStructMember, _impl_.align_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - // optional .tint.core.ir.binary.pb.AttributesStructMember attributes = 5; - {PROTOBUF_FIELD_OFFSET(TypeStructMember, _impl_.attributes_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, - }}, - {{ - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::AttributesStructMember>()}, - }}, - {{ - "\47\4\0\0\0\0\0\0" - "tint.core.ir.binary.pb.TypeStructMember" - "name" - }}, -}; -PROTOBUF_NOINLINE void TypeStructMember::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.TypeStructMember) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - if ((cached_has_bits & 0x00000001U) != 0) { - _impl_.name_.ClearNonDefaultToEmpty(); - } - if ((cached_has_bits & 0x00000002U) != 0) { - ABSL_DCHECK(_impl_.attributes_ != nullptr); - _impl_.attributes_->Clear(); - } - } - if ((cached_has_bits & 0x0000001cU) != 0) { - ::memset(&_impl_.type_, 0, static_cast<::size_t>( - reinterpret_cast(&_impl_.align_) - - reinterpret_cast(&_impl_.type_)) + sizeof(_impl_.align_)); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL TypeStructMember::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const TypeStructMember& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL TypeStructMember::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const TypeStructMember& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.TypeStructMember) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // string name = 1; - if ((this_._impl_._has_bits_[0] & 0x00000001U) != 0) { - if (!this_._internal_name().empty()) { - const ::std::string& _s = this_._internal_name(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tint.core.ir.binary.pb.TypeStructMember.name"); - target = stream->WriteStringMaybeAliased(1, _s, target); - } - } - - // uint32 type = 2; - if ((this_._impl_._has_bits_[0] & 0x00000004U) != 0) { - if (this_._internal_type() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 2, this_._internal_type(), target); - } - } - - // uint32 size = 3; - if ((this_._impl_._has_bits_[0] & 0x00000008U) != 0) { - if (this_._internal_size() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 3, this_._internal_size(), target); - } - } - - // uint32 align = 4; - if ((this_._impl_._has_bits_[0] & 0x00000010U) != 0) { - if (this_._internal_align() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 4, this_._internal_align(), target); - } - } - - cached_has_bits = this_._impl_._has_bits_[0]; - // optional .tint.core.ir.binary.pb.AttributesStructMember attributes = 5; - if ((cached_has_bits & 0x00000002U) != 0) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 5, *this_._impl_.attributes_, this_._impl_.attributes_->GetCachedSize(), target, - stream); - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.TypeStructMember) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t TypeStructMember::ByteSizeLong(const MessageLite& base) { - const TypeStructMember& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t TypeStructMember::ByteSizeLong() const { - const TypeStructMember& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.TypeStructMember) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - ::_pbi::Prefetch5LinesFrom7Lines(&this_); - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x0000001fU) != 0) { - // string name = 1; - if ((cached_has_bits & 0x00000001U) != 0) { - if (!this_._internal_name().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this_._internal_name()); - } - } - // optional .tint.core.ir.binary.pb.AttributesStructMember attributes = 5; - if ((cached_has_bits & 0x00000002U) != 0) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.attributes_); - } - // uint32 type = 2; - if ((cached_has_bits & 0x00000004U) != 0) { - if (this_._internal_type() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_type()); - } - } - // uint32 size = 3; - if ((cached_has_bits & 0x00000008U) != 0) { - if (this_._internal_size() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_size()); - } - } - // uint32 align = 4; - if ((cached_has_bits & 0x00000010U) != 0) { - if (this_._internal_align() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_align()); - } - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void TypeStructMember::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - ::google::protobuf::Arena* arena = _this->GetArena(); - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.TypeStructMember) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x0000001fU) != 0) { - if ((cached_has_bits & 0x00000001U) != 0) { - if (!from._internal_name().empty()) { - _this->_internal_set_name(from._internal_name()); - } else { - if (_this->_impl_.name_.IsDefault()) { - _this->_internal_set_name(""); - } - } - } - if ((cached_has_bits & 0x00000002U) != 0) { - ABSL_DCHECK(from._impl_.attributes_ != nullptr); - if (_this->_impl_.attributes_ == nullptr) { - _this->_impl_.attributes_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.attributes_); - } else { - _this->_impl_.attributes_->MergeFrom(*from._impl_.attributes_); - } - } - if ((cached_has_bits & 0x00000004U) != 0) { - if (from._internal_type() != 0) { - _this->_impl_.type_ = from._impl_.type_; - } - } - if ((cached_has_bits & 0x00000008U) != 0) { - if (from._internal_size() != 0) { - _this->_impl_.size_ = from._impl_.size_; - } - } - if ((cached_has_bits & 0x00000010U) != 0) { - if (from._internal_align() != 0) { - _this->_impl_.align_ = from._impl_.align_; - } - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void TypeStructMember::CopyFrom(const TypeStructMember& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.TypeStructMember) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void TypeStructMember::InternalSwap(TypeStructMember* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - auto* arena = GetArena(); - ABSL_DCHECK_EQ(arena, other->GetArena()); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena); - ::google::protobuf::internal::memswap< - PROTOBUF_FIELD_OFFSET(TypeStructMember, _impl_.align_) - + sizeof(TypeStructMember::_impl_.align_) - - PROTOBUF_FIELD_OFFSET(TypeStructMember, _impl_.attributes_)>( - reinterpret_cast(&_impl_.attributes_), - reinterpret_cast(&other->_impl_.attributes_)); -} - -::google::protobuf::Metadata TypeStructMember::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class TypeAtomic::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(TypeAtomic, _impl_._has_bits_); -}; - -TypeAtomic::TypeAtomic(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, TypeAtomic_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.TypeAtomic) -} -TypeAtomic::TypeAtomic( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TypeAtomic& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, TypeAtomic_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(from._impl_) { - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); -} -PROTOBUF_NDEBUG_INLINE TypeAtomic::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0} {} - -inline void TypeAtomic::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - _impl_.type_ = {}; -} -TypeAtomic::~TypeAtomic() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.TypeAtomic) - SharedDtor(*this); -} -inline void TypeAtomic::SharedDtor(MessageLite& self) { - TypeAtomic& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL TypeAtomic::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) TypeAtomic(arena); -} -constexpr auto TypeAtomic::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(TypeAtomic), - alignof(TypeAtomic)); -} -constexpr auto TypeAtomic::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_TypeAtomic_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &TypeAtomic::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &TypeAtomic::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &TypeAtomic::ByteSizeLong, - &TypeAtomic::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(TypeAtomic, _impl_._cached_size_), - false, - }, - &TypeAtomic::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull TypeAtomic_class_data_ = - TypeAtomic::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -TypeAtomic::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&TypeAtomic_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(TypeAtomic_class_data_.tc_table); - return TypeAtomic_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 1, 0, 0, 2> -TypeAtomic::_table_ = { - { - PROTOBUF_FIELD_OFFSET(TypeAtomic, _impl_._has_bits_), - 0, // no _extensions_ - 1, 0, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967294, // skipmap - offsetof(decltype(_table_), field_entries), - 1, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - TypeAtomic_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeAtomic>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - // uint32 type = 1; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(TypeAtomic, _impl_.type_), 0>(), - {8, 0, 0, PROTOBUF_FIELD_OFFSET(TypeAtomic, _impl_.type_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // uint32 type = 1; - {PROTOBUF_FIELD_OFFSET(TypeAtomic, _impl_.type_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - }}, - // no aux_entries - {{ - }}, -}; -PROTOBUF_NOINLINE void TypeAtomic::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.TypeAtomic) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.type_ = 0u; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL TypeAtomic::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const TypeAtomic& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL TypeAtomic::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const TypeAtomic& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.TypeAtomic) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // uint32 type = 1; - if ((this_._impl_._has_bits_[0] & 0x00000001U) != 0) { - if (this_._internal_type() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 1, this_._internal_type(), target); - } - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.TypeAtomic) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t TypeAtomic::ByteSizeLong(const MessageLite& base) { - const TypeAtomic& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t TypeAtomic::ByteSizeLong() const { - const TypeAtomic& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.TypeAtomic) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - { - // uint32 type = 1; - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000001U) != 0) { - if (this_._internal_type() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_type()); - } - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void TypeAtomic::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.TypeAtomic) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000001U) != 0) { - if (from._internal_type() != 0) { - _this->_impl_.type_ = from._impl_.type_; - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void TypeAtomic::CopyFrom(const TypeAtomic& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.TypeAtomic) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void TypeAtomic::InternalSwap(TypeAtomic* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - swap(_impl_.type_, other->_impl_.type_); -} - -::google::protobuf::Metadata TypeAtomic::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class TypeDepthTexture::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(TypeDepthTexture, _impl_._has_bits_); -}; - -TypeDepthTexture::TypeDepthTexture(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, TypeDepthTexture_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.TypeDepthTexture) -} -TypeDepthTexture::TypeDepthTexture( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TypeDepthTexture& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, TypeDepthTexture_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(from._impl_) { - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); -} -PROTOBUF_NDEBUG_INLINE TypeDepthTexture::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0} {} - -inline void TypeDepthTexture::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - _impl_.dimension_ = {}; -} -TypeDepthTexture::~TypeDepthTexture() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.TypeDepthTexture) - SharedDtor(*this); -} -inline void TypeDepthTexture::SharedDtor(MessageLite& self) { - TypeDepthTexture& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL TypeDepthTexture::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) TypeDepthTexture(arena); -} -constexpr auto TypeDepthTexture::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(TypeDepthTexture), - alignof(TypeDepthTexture)); -} -constexpr auto TypeDepthTexture::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_TypeDepthTexture_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &TypeDepthTexture::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &TypeDepthTexture::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &TypeDepthTexture::ByteSizeLong, - &TypeDepthTexture::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(TypeDepthTexture, _impl_._cached_size_), - false, - }, - &TypeDepthTexture::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull TypeDepthTexture_class_data_ = - TypeDepthTexture::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -TypeDepthTexture::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&TypeDepthTexture_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(TypeDepthTexture_class_data_.tc_table); - return TypeDepthTexture_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 1, 0, 0, 2> -TypeDepthTexture::_table_ = { - { - PROTOBUF_FIELD_OFFSET(TypeDepthTexture, _impl_._has_bits_), - 0, // no _extensions_ - 1, 0, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967294, // skipmap - offsetof(decltype(_table_), field_entries), - 1, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - TypeDepthTexture_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeDepthTexture>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - // .tint.core.ir.binary.pb.TextureDimension dimension = 1; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(TypeDepthTexture, _impl_.dimension_), 0>(), - {8, 0, 0, PROTOBUF_FIELD_OFFSET(TypeDepthTexture, _impl_.dimension_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // .tint.core.ir.binary.pb.TextureDimension dimension = 1; - {PROTOBUF_FIELD_OFFSET(TypeDepthTexture, _impl_.dimension_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)}, - }}, - // no aux_entries - {{ - }}, -}; -PROTOBUF_NOINLINE void TypeDepthTexture::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.TypeDepthTexture) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.dimension_ = 0; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL TypeDepthTexture::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const TypeDepthTexture& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL TypeDepthTexture::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const TypeDepthTexture& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.TypeDepthTexture) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // .tint.core.ir.binary.pb.TextureDimension dimension = 1; - if ((this_._impl_._has_bits_[0] & 0x00000001U) != 0) { - if (this_._internal_dimension() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 1, this_._internal_dimension(), target); - } - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.TypeDepthTexture) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t TypeDepthTexture::ByteSizeLong(const MessageLite& base) { - const TypeDepthTexture& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t TypeDepthTexture::ByteSizeLong() const { - const TypeDepthTexture& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.TypeDepthTexture) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - { - // .tint.core.ir.binary.pb.TextureDimension dimension = 1; - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000001U) != 0) { - if (this_._internal_dimension() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this_._internal_dimension()); - } - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void TypeDepthTexture::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.TypeDepthTexture) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000001U) != 0) { - if (from._internal_dimension() != 0) { - _this->_impl_.dimension_ = from._impl_.dimension_; - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void TypeDepthTexture::CopyFrom(const TypeDepthTexture& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.TypeDepthTexture) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void TypeDepthTexture::InternalSwap(TypeDepthTexture* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - swap(_impl_.dimension_, other->_impl_.dimension_); -} - -::google::protobuf::Metadata TypeDepthTexture::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class TypeSampledTexture::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(TypeSampledTexture, _impl_._has_bits_); -}; - -TypeSampledTexture::TypeSampledTexture(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, TypeSampledTexture_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.TypeSampledTexture) -} -TypeSampledTexture::TypeSampledTexture( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TypeSampledTexture& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, TypeSampledTexture_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(from._impl_) { - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); -} -PROTOBUF_NDEBUG_INLINE TypeSampledTexture::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0} {} - -inline void TypeSampledTexture::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - ::memset(reinterpret_cast(&_impl_) + - offsetof(Impl_, dimension_), - 0, - offsetof(Impl_, sub_type_) - - offsetof(Impl_, dimension_) + - sizeof(Impl_::sub_type_)); -} -TypeSampledTexture::~TypeSampledTexture() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.TypeSampledTexture) - SharedDtor(*this); -} -inline void TypeSampledTexture::SharedDtor(MessageLite& self) { - TypeSampledTexture& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL TypeSampledTexture::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) TypeSampledTexture(arena); -} -constexpr auto TypeSampledTexture::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(TypeSampledTexture), - alignof(TypeSampledTexture)); -} -constexpr auto TypeSampledTexture::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_TypeSampledTexture_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &TypeSampledTexture::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &TypeSampledTexture::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &TypeSampledTexture::ByteSizeLong, - &TypeSampledTexture::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(TypeSampledTexture, _impl_._cached_size_), - false, - }, - &TypeSampledTexture::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull TypeSampledTexture_class_data_ = - TypeSampledTexture::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -TypeSampledTexture::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&TypeSampledTexture_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(TypeSampledTexture_class_data_.tc_table); - return TypeSampledTexture_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<1, 2, 0, 0, 2> -TypeSampledTexture::_table_ = { - { - PROTOBUF_FIELD_OFFSET(TypeSampledTexture, _impl_._has_bits_), - 0, // no _extensions_ - 2, 8, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967292, // skipmap - offsetof(decltype(_table_), field_entries), - 2, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - TypeSampledTexture_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeSampledTexture>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - // uint32 sub_type = 2; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(TypeSampledTexture, _impl_.sub_type_), 1>(), - {16, 1, 0, PROTOBUF_FIELD_OFFSET(TypeSampledTexture, _impl_.sub_type_)}}, - // .tint.core.ir.binary.pb.TextureDimension dimension = 1; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(TypeSampledTexture, _impl_.dimension_), 0>(), - {8, 0, 0, PROTOBUF_FIELD_OFFSET(TypeSampledTexture, _impl_.dimension_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // .tint.core.ir.binary.pb.TextureDimension dimension = 1; - {PROTOBUF_FIELD_OFFSET(TypeSampledTexture, _impl_.dimension_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)}, - // uint32 sub_type = 2; - {PROTOBUF_FIELD_OFFSET(TypeSampledTexture, _impl_.sub_type_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - }}, - // no aux_entries - {{ - }}, -}; -PROTOBUF_NOINLINE void TypeSampledTexture::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.TypeSampledTexture) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - ::memset(&_impl_.dimension_, 0, static_cast<::size_t>( - reinterpret_cast(&_impl_.sub_type_) - - reinterpret_cast(&_impl_.dimension_)) + sizeof(_impl_.sub_type_)); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL TypeSampledTexture::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const TypeSampledTexture& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL TypeSampledTexture::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const TypeSampledTexture& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.TypeSampledTexture) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // .tint.core.ir.binary.pb.TextureDimension dimension = 1; - if ((this_._impl_._has_bits_[0] & 0x00000001U) != 0) { - if (this_._internal_dimension() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 1, this_._internal_dimension(), target); - } - } - - // uint32 sub_type = 2; - if ((this_._impl_._has_bits_[0] & 0x00000002U) != 0) { - if (this_._internal_sub_type() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 2, this_._internal_sub_type(), target); - } - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.TypeSampledTexture) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t TypeSampledTexture::ByteSizeLong(const MessageLite& base) { - const TypeSampledTexture& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t TypeSampledTexture::ByteSizeLong() const { - const TypeSampledTexture& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.TypeSampledTexture) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - ::_pbi::Prefetch5LinesFrom7Lines(&this_); - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - // .tint.core.ir.binary.pb.TextureDimension dimension = 1; - if ((cached_has_bits & 0x00000001U) != 0) { - if (this_._internal_dimension() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this_._internal_dimension()); - } - } - // uint32 sub_type = 2; - if ((cached_has_bits & 0x00000002U) != 0) { - if (this_._internal_sub_type() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_sub_type()); - } - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void TypeSampledTexture::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.TypeSampledTexture) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - if ((cached_has_bits & 0x00000001U) != 0) { - if (from._internal_dimension() != 0) { - _this->_impl_.dimension_ = from._impl_.dimension_; - } - } - if ((cached_has_bits & 0x00000002U) != 0) { - if (from._internal_sub_type() != 0) { - _this->_impl_.sub_type_ = from._impl_.sub_type_; - } - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void TypeSampledTexture::CopyFrom(const TypeSampledTexture& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.TypeSampledTexture) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void TypeSampledTexture::InternalSwap(TypeSampledTexture* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::google::protobuf::internal::memswap< - PROTOBUF_FIELD_OFFSET(TypeSampledTexture, _impl_.sub_type_) - + sizeof(TypeSampledTexture::_impl_.sub_type_) - - PROTOBUF_FIELD_OFFSET(TypeSampledTexture, _impl_.dimension_)>( - reinterpret_cast(&_impl_.dimension_), - reinterpret_cast(&other->_impl_.dimension_)); -} - -::google::protobuf::Metadata TypeSampledTexture::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class TypeMultisampledTexture::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(TypeMultisampledTexture, _impl_._has_bits_); -}; - -TypeMultisampledTexture::TypeMultisampledTexture(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, TypeMultisampledTexture_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.TypeMultisampledTexture) -} -TypeMultisampledTexture::TypeMultisampledTexture( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TypeMultisampledTexture& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, TypeMultisampledTexture_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(from._impl_) { - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); -} -PROTOBUF_NDEBUG_INLINE TypeMultisampledTexture::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0} {} - -inline void TypeMultisampledTexture::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - ::memset(reinterpret_cast(&_impl_) + - offsetof(Impl_, dimension_), - 0, - offsetof(Impl_, sub_type_) - - offsetof(Impl_, dimension_) + - sizeof(Impl_::sub_type_)); -} -TypeMultisampledTexture::~TypeMultisampledTexture() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.TypeMultisampledTexture) - SharedDtor(*this); -} -inline void TypeMultisampledTexture::SharedDtor(MessageLite& self) { - TypeMultisampledTexture& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL TypeMultisampledTexture::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) TypeMultisampledTexture(arena); -} -constexpr auto TypeMultisampledTexture::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(TypeMultisampledTexture), - alignof(TypeMultisampledTexture)); -} -constexpr auto TypeMultisampledTexture::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_TypeMultisampledTexture_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &TypeMultisampledTexture::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &TypeMultisampledTexture::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &TypeMultisampledTexture::ByteSizeLong, - &TypeMultisampledTexture::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(TypeMultisampledTexture, _impl_._cached_size_), - false, - }, - &TypeMultisampledTexture::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull TypeMultisampledTexture_class_data_ = - TypeMultisampledTexture::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -TypeMultisampledTexture::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&TypeMultisampledTexture_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(TypeMultisampledTexture_class_data_.tc_table); - return TypeMultisampledTexture_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<1, 2, 0, 0, 2> -TypeMultisampledTexture::_table_ = { - { - PROTOBUF_FIELD_OFFSET(TypeMultisampledTexture, _impl_._has_bits_), - 0, // no _extensions_ - 2, 8, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967292, // skipmap - offsetof(decltype(_table_), field_entries), - 2, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - TypeMultisampledTexture_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeMultisampledTexture>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - // uint32 sub_type = 2; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(TypeMultisampledTexture, _impl_.sub_type_), 1>(), - {16, 1, 0, PROTOBUF_FIELD_OFFSET(TypeMultisampledTexture, _impl_.sub_type_)}}, - // .tint.core.ir.binary.pb.TextureDimension dimension = 1; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(TypeMultisampledTexture, _impl_.dimension_), 0>(), - {8, 0, 0, PROTOBUF_FIELD_OFFSET(TypeMultisampledTexture, _impl_.dimension_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // .tint.core.ir.binary.pb.TextureDimension dimension = 1; - {PROTOBUF_FIELD_OFFSET(TypeMultisampledTexture, _impl_.dimension_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)}, - // uint32 sub_type = 2; - {PROTOBUF_FIELD_OFFSET(TypeMultisampledTexture, _impl_.sub_type_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - }}, - // no aux_entries - {{ - }}, -}; -PROTOBUF_NOINLINE void TypeMultisampledTexture::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.TypeMultisampledTexture) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - ::memset(&_impl_.dimension_, 0, static_cast<::size_t>( - reinterpret_cast(&_impl_.sub_type_) - - reinterpret_cast(&_impl_.dimension_)) + sizeof(_impl_.sub_type_)); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL TypeMultisampledTexture::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const TypeMultisampledTexture& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL TypeMultisampledTexture::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const TypeMultisampledTexture& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.TypeMultisampledTexture) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // .tint.core.ir.binary.pb.TextureDimension dimension = 1; - if ((this_._impl_._has_bits_[0] & 0x00000001U) != 0) { - if (this_._internal_dimension() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 1, this_._internal_dimension(), target); - } - } - - // uint32 sub_type = 2; - if ((this_._impl_._has_bits_[0] & 0x00000002U) != 0) { - if (this_._internal_sub_type() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 2, this_._internal_sub_type(), target); - } - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.TypeMultisampledTexture) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t TypeMultisampledTexture::ByteSizeLong(const MessageLite& base) { - const TypeMultisampledTexture& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t TypeMultisampledTexture::ByteSizeLong() const { - const TypeMultisampledTexture& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.TypeMultisampledTexture) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - ::_pbi::Prefetch5LinesFrom7Lines(&this_); - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - // .tint.core.ir.binary.pb.TextureDimension dimension = 1; - if ((cached_has_bits & 0x00000001U) != 0) { - if (this_._internal_dimension() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this_._internal_dimension()); - } - } - // uint32 sub_type = 2; - if ((cached_has_bits & 0x00000002U) != 0) { - if (this_._internal_sub_type() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_sub_type()); - } - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void TypeMultisampledTexture::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.TypeMultisampledTexture) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - if ((cached_has_bits & 0x00000001U) != 0) { - if (from._internal_dimension() != 0) { - _this->_impl_.dimension_ = from._impl_.dimension_; - } - } - if ((cached_has_bits & 0x00000002U) != 0) { - if (from._internal_sub_type() != 0) { - _this->_impl_.sub_type_ = from._impl_.sub_type_; - } - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void TypeMultisampledTexture::CopyFrom(const TypeMultisampledTexture& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.TypeMultisampledTexture) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void TypeMultisampledTexture::InternalSwap(TypeMultisampledTexture* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::google::protobuf::internal::memswap< - PROTOBUF_FIELD_OFFSET(TypeMultisampledTexture, _impl_.sub_type_) - + sizeof(TypeMultisampledTexture::_impl_.sub_type_) - - PROTOBUF_FIELD_OFFSET(TypeMultisampledTexture, _impl_.dimension_)>( - reinterpret_cast(&_impl_.dimension_), - reinterpret_cast(&other->_impl_.dimension_)); -} - -::google::protobuf::Metadata TypeMultisampledTexture::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class TypeDepthMultisampledTexture::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(TypeDepthMultisampledTexture, _impl_._has_bits_); -}; - -TypeDepthMultisampledTexture::TypeDepthMultisampledTexture(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, TypeDepthMultisampledTexture_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.TypeDepthMultisampledTexture) -} -TypeDepthMultisampledTexture::TypeDepthMultisampledTexture( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TypeDepthMultisampledTexture& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, TypeDepthMultisampledTexture_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(from._impl_) { - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); -} -PROTOBUF_NDEBUG_INLINE TypeDepthMultisampledTexture::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0} {} - -inline void TypeDepthMultisampledTexture::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - _impl_.dimension_ = {}; -} -TypeDepthMultisampledTexture::~TypeDepthMultisampledTexture() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.TypeDepthMultisampledTexture) - SharedDtor(*this); -} -inline void TypeDepthMultisampledTexture::SharedDtor(MessageLite& self) { - TypeDepthMultisampledTexture& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL TypeDepthMultisampledTexture::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) TypeDepthMultisampledTexture(arena); -} -constexpr auto TypeDepthMultisampledTexture::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(TypeDepthMultisampledTexture), - alignof(TypeDepthMultisampledTexture)); -} -constexpr auto TypeDepthMultisampledTexture::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_TypeDepthMultisampledTexture_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &TypeDepthMultisampledTexture::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &TypeDepthMultisampledTexture::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &TypeDepthMultisampledTexture::ByteSizeLong, - &TypeDepthMultisampledTexture::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(TypeDepthMultisampledTexture, _impl_._cached_size_), - false, - }, - &TypeDepthMultisampledTexture::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull TypeDepthMultisampledTexture_class_data_ = - TypeDepthMultisampledTexture::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -TypeDepthMultisampledTexture::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&TypeDepthMultisampledTexture_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(TypeDepthMultisampledTexture_class_data_.tc_table); - return TypeDepthMultisampledTexture_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 1, 0, 0, 2> -TypeDepthMultisampledTexture::_table_ = { - { - PROTOBUF_FIELD_OFFSET(TypeDepthMultisampledTexture, _impl_._has_bits_), - 0, // no _extensions_ - 1, 0, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967294, // skipmap - offsetof(decltype(_table_), field_entries), - 1, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - TypeDepthMultisampledTexture_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeDepthMultisampledTexture>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - // .tint.core.ir.binary.pb.TextureDimension dimension = 1; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(TypeDepthMultisampledTexture, _impl_.dimension_), 0>(), - {8, 0, 0, PROTOBUF_FIELD_OFFSET(TypeDepthMultisampledTexture, _impl_.dimension_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // .tint.core.ir.binary.pb.TextureDimension dimension = 1; - {PROTOBUF_FIELD_OFFSET(TypeDepthMultisampledTexture, _impl_.dimension_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)}, - }}, - // no aux_entries - {{ - }}, -}; -PROTOBUF_NOINLINE void TypeDepthMultisampledTexture::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.TypeDepthMultisampledTexture) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.dimension_ = 0; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL TypeDepthMultisampledTexture::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const TypeDepthMultisampledTexture& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL TypeDepthMultisampledTexture::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const TypeDepthMultisampledTexture& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.TypeDepthMultisampledTexture) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // .tint.core.ir.binary.pb.TextureDimension dimension = 1; - if ((this_._impl_._has_bits_[0] & 0x00000001U) != 0) { - if (this_._internal_dimension() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 1, this_._internal_dimension(), target); - } - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.TypeDepthMultisampledTexture) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t TypeDepthMultisampledTexture::ByteSizeLong(const MessageLite& base) { - const TypeDepthMultisampledTexture& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t TypeDepthMultisampledTexture::ByteSizeLong() const { - const TypeDepthMultisampledTexture& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.TypeDepthMultisampledTexture) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - { - // .tint.core.ir.binary.pb.TextureDimension dimension = 1; - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000001U) != 0) { - if (this_._internal_dimension() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this_._internal_dimension()); - } - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void TypeDepthMultisampledTexture::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.TypeDepthMultisampledTexture) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000001U) != 0) { - if (from._internal_dimension() != 0) { - _this->_impl_.dimension_ = from._impl_.dimension_; - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void TypeDepthMultisampledTexture::CopyFrom(const TypeDepthMultisampledTexture& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.TypeDepthMultisampledTexture) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void TypeDepthMultisampledTexture::InternalSwap(TypeDepthMultisampledTexture* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - swap(_impl_.dimension_, other->_impl_.dimension_); -} - -::google::protobuf::Metadata TypeDepthMultisampledTexture::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class TypeStorageTexture::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(TypeStorageTexture, _impl_._has_bits_); -}; - -TypeStorageTexture::TypeStorageTexture(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, TypeStorageTexture_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.TypeStorageTexture) -} -TypeStorageTexture::TypeStorageTexture( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TypeStorageTexture& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, TypeStorageTexture_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(from._impl_) { - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); -} -PROTOBUF_NDEBUG_INLINE TypeStorageTexture::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0} {} - -inline void TypeStorageTexture::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - ::memset(reinterpret_cast(&_impl_) + - offsetof(Impl_, dimension_), - 0, - offsetof(Impl_, access_) - - offsetof(Impl_, dimension_) + - sizeof(Impl_::access_)); -} -TypeStorageTexture::~TypeStorageTexture() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.TypeStorageTexture) - SharedDtor(*this); -} -inline void TypeStorageTexture::SharedDtor(MessageLite& self) { - TypeStorageTexture& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL TypeStorageTexture::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) TypeStorageTexture(arena); -} -constexpr auto TypeStorageTexture::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(TypeStorageTexture), - alignof(TypeStorageTexture)); -} -constexpr auto TypeStorageTexture::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_TypeStorageTexture_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &TypeStorageTexture::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &TypeStorageTexture::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &TypeStorageTexture::ByteSizeLong, - &TypeStorageTexture::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(TypeStorageTexture, _impl_._cached_size_), - false, - }, - &TypeStorageTexture::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull TypeStorageTexture_class_data_ = - TypeStorageTexture::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -TypeStorageTexture::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&TypeStorageTexture_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(TypeStorageTexture_class_data_.tc_table); - return TypeStorageTexture_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<2, 3, 0, 0, 2> -TypeStorageTexture::_table_ = { - { - PROTOBUF_FIELD_OFFSET(TypeStorageTexture, _impl_._has_bits_), - 0, // no _extensions_ - 3, 24, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967288, // skipmap - offsetof(decltype(_table_), field_entries), - 3, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - TypeStorageTexture_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeStorageTexture>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - // .tint.core.ir.binary.pb.TextureDimension dimension = 1; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(TypeStorageTexture, _impl_.dimension_), 0>(), - {8, 0, 0, PROTOBUF_FIELD_OFFSET(TypeStorageTexture, _impl_.dimension_)}}, - // .tint.core.ir.binary.pb.TexelFormat texel_format = 2; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(TypeStorageTexture, _impl_.texel_format_), 1>(), - {16, 1, 0, PROTOBUF_FIELD_OFFSET(TypeStorageTexture, _impl_.texel_format_)}}, - // .tint.core.ir.binary.pb.AccessControl access = 3; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(TypeStorageTexture, _impl_.access_), 2>(), - {24, 2, 0, PROTOBUF_FIELD_OFFSET(TypeStorageTexture, _impl_.access_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // .tint.core.ir.binary.pb.TextureDimension dimension = 1; - {PROTOBUF_FIELD_OFFSET(TypeStorageTexture, _impl_.dimension_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)}, - // .tint.core.ir.binary.pb.TexelFormat texel_format = 2; - {PROTOBUF_FIELD_OFFSET(TypeStorageTexture, _impl_.texel_format_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)}, - // .tint.core.ir.binary.pb.AccessControl access = 3; - {PROTOBUF_FIELD_OFFSET(TypeStorageTexture, _impl_.access_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)}, - }}, - // no aux_entries - {{ - }}, -}; -PROTOBUF_NOINLINE void TypeStorageTexture::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.TypeStorageTexture) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000007U) != 0) { - ::memset(&_impl_.dimension_, 0, static_cast<::size_t>( - reinterpret_cast(&_impl_.access_) - - reinterpret_cast(&_impl_.dimension_)) + sizeof(_impl_.access_)); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL TypeStorageTexture::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const TypeStorageTexture& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL TypeStorageTexture::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const TypeStorageTexture& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.TypeStorageTexture) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // .tint.core.ir.binary.pb.TextureDimension dimension = 1; - if ((this_._impl_._has_bits_[0] & 0x00000001U) != 0) { - if (this_._internal_dimension() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 1, this_._internal_dimension(), target); - } - } - - // .tint.core.ir.binary.pb.TexelFormat texel_format = 2; - if ((this_._impl_._has_bits_[0] & 0x00000002U) != 0) { - if (this_._internal_texel_format() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 2, this_._internal_texel_format(), target); - } - } - - // .tint.core.ir.binary.pb.AccessControl access = 3; - if ((this_._impl_._has_bits_[0] & 0x00000004U) != 0) { - if (this_._internal_access() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 3, this_._internal_access(), target); - } - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.TypeStorageTexture) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t TypeStorageTexture::ByteSizeLong(const MessageLite& base) { - const TypeStorageTexture& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t TypeStorageTexture::ByteSizeLong() const { - const TypeStorageTexture& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.TypeStorageTexture) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - ::_pbi::Prefetch5LinesFrom7Lines(&this_); - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000007U) != 0) { - // .tint.core.ir.binary.pb.TextureDimension dimension = 1; - if ((cached_has_bits & 0x00000001U) != 0) { - if (this_._internal_dimension() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this_._internal_dimension()); - } - } - // .tint.core.ir.binary.pb.TexelFormat texel_format = 2; - if ((cached_has_bits & 0x00000002U) != 0) { - if (this_._internal_texel_format() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this_._internal_texel_format()); - } - } - // .tint.core.ir.binary.pb.AccessControl access = 3; - if ((cached_has_bits & 0x00000004U) != 0) { - if (this_._internal_access() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this_._internal_access()); - } - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void TypeStorageTexture::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.TypeStorageTexture) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000007U) != 0) { - if ((cached_has_bits & 0x00000001U) != 0) { - if (from._internal_dimension() != 0) { - _this->_impl_.dimension_ = from._impl_.dimension_; - } - } - if ((cached_has_bits & 0x00000002U) != 0) { - if (from._internal_texel_format() != 0) { - _this->_impl_.texel_format_ = from._impl_.texel_format_; - } - } - if ((cached_has_bits & 0x00000004U) != 0) { - if (from._internal_access() != 0) { - _this->_impl_.access_ = from._impl_.access_; - } - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void TypeStorageTexture::CopyFrom(const TypeStorageTexture& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.TypeStorageTexture) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void TypeStorageTexture::InternalSwap(TypeStorageTexture* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::google::protobuf::internal::memswap< - PROTOBUF_FIELD_OFFSET(TypeStorageTexture, _impl_.access_) - + sizeof(TypeStorageTexture::_impl_.access_) - - PROTOBUF_FIELD_OFFSET(TypeStorageTexture, _impl_.dimension_)>( - reinterpret_cast(&_impl_.dimension_), - reinterpret_cast(&other->_impl_.dimension_)); -} - -::google::protobuf::Metadata TypeStorageTexture::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class TypeResourceBinding::_Internal { - public: -}; - -TypeResourceBinding::TypeResourceBinding(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, TypeResourceBinding_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.TypeResourceBinding) -} -TypeResourceBinding::TypeResourceBinding( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const TypeResourceBinding& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, TypeResourceBinding_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - TypeResourceBinding* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.TypeResourceBinding) -} - -inline void* PROTOBUF_NONNULL TypeResourceBinding::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) TypeResourceBinding(arena); -} -constexpr auto TypeResourceBinding::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(TypeResourceBinding), - alignof(TypeResourceBinding)); -} -constexpr auto TypeResourceBinding::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_TypeResourceBinding_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &TypeResourceBinding::MergeImpl, - ::google::protobuf::internal::ZeroFieldsBase::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &TypeResourceBinding::SharedDtor, - ::google::protobuf::internal::ZeroFieldsBase::GetClearImpl(), &TypeResourceBinding::ByteSizeLong, - &TypeResourceBinding::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(TypeResourceBinding, _impl_._cached_size_), - false, - }, - &TypeResourceBinding::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull TypeResourceBinding_class_data_ = - TypeResourceBinding::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -TypeResourceBinding::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&TypeResourceBinding_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(TypeResourceBinding_class_data_.tc_table); - return TypeResourceBinding_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 0, 0, 0, 2> -TypeResourceBinding::_table_ = { - { - 0, // no _has_bits_ - 0, // no _extensions_ - 0, 0, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967295, // skipmap - offsetof(decltype(_table_), field_names), // no field_entries - 0, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - TypeResourceBinding_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeResourceBinding>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - }}, {{ - 65535, 65535 - }}, // no field_entries, or aux_entries - {{ - }}, -}; - - - - - - - -::google::protobuf::Metadata TypeResourceBinding::GetMetadata() const { - return ::google::protobuf::internal::ZeroFieldsBase::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class TypeExternalTexture::_Internal { - public: -}; - -TypeExternalTexture::TypeExternalTexture(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, TypeExternalTexture_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.TypeExternalTexture) -} -TypeExternalTexture::TypeExternalTexture( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const TypeExternalTexture& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, TypeExternalTexture_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - TypeExternalTexture* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.TypeExternalTexture) -} - -inline void* PROTOBUF_NONNULL TypeExternalTexture::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) TypeExternalTexture(arena); -} -constexpr auto TypeExternalTexture::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(TypeExternalTexture), - alignof(TypeExternalTexture)); -} -constexpr auto TypeExternalTexture::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_TypeExternalTexture_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &TypeExternalTexture::MergeImpl, - ::google::protobuf::internal::ZeroFieldsBase::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &TypeExternalTexture::SharedDtor, - ::google::protobuf::internal::ZeroFieldsBase::GetClearImpl(), &TypeExternalTexture::ByteSizeLong, - &TypeExternalTexture::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(TypeExternalTexture, _impl_._cached_size_), - false, - }, - &TypeExternalTexture::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull TypeExternalTexture_class_data_ = - TypeExternalTexture::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -TypeExternalTexture::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&TypeExternalTexture_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(TypeExternalTexture_class_data_.tc_table); - return TypeExternalTexture_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 0, 0, 0, 2> -TypeExternalTexture::_table_ = { - { - 0, // no _has_bits_ - 0, // no _extensions_ - 0, 0, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967295, // skipmap - offsetof(decltype(_table_), field_names), // no field_entries - 0, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - TypeExternalTexture_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeExternalTexture>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - }}, {{ - 65535, 65535 - }}, // no field_entries, or aux_entries - {{ - }}, -}; - - - - - - - -::google::protobuf::Metadata TypeExternalTexture::GetMetadata() const { - return ::google::protobuf::internal::ZeroFieldsBase::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class TypeSampler::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(TypeSampler, _impl_._has_bits_); -}; - -TypeSampler::TypeSampler(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, TypeSampler_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.TypeSampler) -} -TypeSampler::TypeSampler( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TypeSampler& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, TypeSampler_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(from._impl_) { - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); -} -PROTOBUF_NDEBUG_INLINE TypeSampler::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0} {} - -inline void TypeSampler::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - _impl_.kind_ = {}; -} -TypeSampler::~TypeSampler() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.TypeSampler) - SharedDtor(*this); -} -inline void TypeSampler::SharedDtor(MessageLite& self) { - TypeSampler& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL TypeSampler::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) TypeSampler(arena); -} -constexpr auto TypeSampler::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(TypeSampler), - alignof(TypeSampler)); -} -constexpr auto TypeSampler::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_TypeSampler_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &TypeSampler::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &TypeSampler::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &TypeSampler::ByteSizeLong, - &TypeSampler::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(TypeSampler, _impl_._cached_size_), - false, - }, - &TypeSampler::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull TypeSampler_class_data_ = - TypeSampler::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -TypeSampler::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&TypeSampler_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(TypeSampler_class_data_.tc_table); - return TypeSampler_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 1, 0, 0, 2> -TypeSampler::_table_ = { - { - PROTOBUF_FIELD_OFFSET(TypeSampler, _impl_._has_bits_), - 0, // no _extensions_ - 1, 0, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967294, // skipmap - offsetof(decltype(_table_), field_entries), - 1, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - TypeSampler_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeSampler>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - // .tint.core.ir.binary.pb.SamplerKind kind = 1; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(TypeSampler, _impl_.kind_), 0>(), - {8, 0, 0, PROTOBUF_FIELD_OFFSET(TypeSampler, _impl_.kind_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // .tint.core.ir.binary.pb.SamplerKind kind = 1; - {PROTOBUF_FIELD_OFFSET(TypeSampler, _impl_.kind_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)}, - }}, - // no aux_entries - {{ - }}, -}; -PROTOBUF_NOINLINE void TypeSampler::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.TypeSampler) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.kind_ = 0; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL TypeSampler::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const TypeSampler& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL TypeSampler::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const TypeSampler& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.TypeSampler) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // .tint.core.ir.binary.pb.SamplerKind kind = 1; - if ((this_._impl_._has_bits_[0] & 0x00000001U) != 0) { - if (this_._internal_kind() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 1, this_._internal_kind(), target); - } - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.TypeSampler) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t TypeSampler::ByteSizeLong(const MessageLite& base) { - const TypeSampler& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t TypeSampler::ByteSizeLong() const { - const TypeSampler& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.TypeSampler) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - { - // .tint.core.ir.binary.pb.SamplerKind kind = 1; - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000001U) != 0) { - if (this_._internal_kind() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this_._internal_kind()); - } - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void TypeSampler::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.TypeSampler) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000001U) != 0) { - if (from._internal_kind() != 0) { - _this->_impl_.kind_ = from._impl_.kind_; - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void TypeSampler::CopyFrom(const TypeSampler& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.TypeSampler) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void TypeSampler::InternalSwap(TypeSampler* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - swap(_impl_.kind_, other->_impl_.kind_); -} - -::google::protobuf::Metadata TypeSampler::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class TypeInputAttachment::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(TypeInputAttachment, _impl_._has_bits_); -}; - -TypeInputAttachment::TypeInputAttachment(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, TypeInputAttachment_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.TypeInputAttachment) -} -TypeInputAttachment::TypeInputAttachment( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TypeInputAttachment& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, TypeInputAttachment_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(from._impl_) { - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); -} -PROTOBUF_NDEBUG_INLINE TypeInputAttachment::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0} {} - -inline void TypeInputAttachment::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - _impl_.sub_type_ = {}; -} -TypeInputAttachment::~TypeInputAttachment() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.TypeInputAttachment) - SharedDtor(*this); -} -inline void TypeInputAttachment::SharedDtor(MessageLite& self) { - TypeInputAttachment& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL TypeInputAttachment::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) TypeInputAttachment(arena); -} -constexpr auto TypeInputAttachment::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(TypeInputAttachment), - alignof(TypeInputAttachment)); -} -constexpr auto TypeInputAttachment::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_TypeInputAttachment_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &TypeInputAttachment::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &TypeInputAttachment::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &TypeInputAttachment::ByteSizeLong, - &TypeInputAttachment::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(TypeInputAttachment, _impl_._cached_size_), - false, - }, - &TypeInputAttachment::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull TypeInputAttachment_class_data_ = - TypeInputAttachment::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -TypeInputAttachment::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&TypeInputAttachment_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(TypeInputAttachment_class_data_.tc_table); - return TypeInputAttachment_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 1, 0, 0, 2> -TypeInputAttachment::_table_ = { - { - PROTOBUF_FIELD_OFFSET(TypeInputAttachment, _impl_._has_bits_), - 0, // no _extensions_ - 1, 0, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967294, // skipmap - offsetof(decltype(_table_), field_entries), - 1, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - TypeInputAttachment_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeInputAttachment>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - // uint32 sub_type = 1; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(TypeInputAttachment, _impl_.sub_type_), 0>(), - {8, 0, 0, PROTOBUF_FIELD_OFFSET(TypeInputAttachment, _impl_.sub_type_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // uint32 sub_type = 1; - {PROTOBUF_FIELD_OFFSET(TypeInputAttachment, _impl_.sub_type_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - }}, - // no aux_entries - {{ - }}, -}; -PROTOBUF_NOINLINE void TypeInputAttachment::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.TypeInputAttachment) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.sub_type_ = 0u; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL TypeInputAttachment::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const TypeInputAttachment& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL TypeInputAttachment::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const TypeInputAttachment& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.TypeInputAttachment) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // uint32 sub_type = 1; - if ((this_._impl_._has_bits_[0] & 0x00000001U) != 0) { - if (this_._internal_sub_type() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 1, this_._internal_sub_type(), target); - } - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.TypeInputAttachment) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t TypeInputAttachment::ByteSizeLong(const MessageLite& base) { - const TypeInputAttachment& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t TypeInputAttachment::ByteSizeLong() const { - const TypeInputAttachment& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.TypeInputAttachment) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - { - // uint32 sub_type = 1; - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000001U) != 0) { - if (this_._internal_sub_type() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_sub_type()); - } - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void TypeInputAttachment::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.TypeInputAttachment) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000001U) != 0) { - if (from._internal_sub_type() != 0) { - _this->_impl_.sub_type_ = from._impl_.sub_type_; - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void TypeInputAttachment::CopyFrom(const TypeInputAttachment& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.TypeInputAttachment) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void TypeInputAttachment::InternalSwap(TypeInputAttachment* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - swap(_impl_.sub_type_, other->_impl_.sub_type_); -} - -::google::protobuf::Metadata TypeInputAttachment::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class TypeSubgroupMatrix::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(TypeSubgroupMatrix, _impl_._has_bits_); -}; - -TypeSubgroupMatrix::TypeSubgroupMatrix(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, TypeSubgroupMatrix_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.TypeSubgroupMatrix) -} -TypeSubgroupMatrix::TypeSubgroupMatrix( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TypeSubgroupMatrix& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, TypeSubgroupMatrix_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(from._impl_) { - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); -} -PROTOBUF_NDEBUG_INLINE TypeSubgroupMatrix::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0} {} - -inline void TypeSubgroupMatrix::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - ::memset(reinterpret_cast(&_impl_) + - offsetof(Impl_, sub_type_), - 0, - offsetof(Impl_, columns_) - - offsetof(Impl_, sub_type_) + - sizeof(Impl_::columns_)); -} -TypeSubgroupMatrix::~TypeSubgroupMatrix() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.TypeSubgroupMatrix) - SharedDtor(*this); -} -inline void TypeSubgroupMatrix::SharedDtor(MessageLite& self) { - TypeSubgroupMatrix& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL TypeSubgroupMatrix::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) TypeSubgroupMatrix(arena); -} -constexpr auto TypeSubgroupMatrix::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(TypeSubgroupMatrix), - alignof(TypeSubgroupMatrix)); -} -constexpr auto TypeSubgroupMatrix::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_TypeSubgroupMatrix_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &TypeSubgroupMatrix::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &TypeSubgroupMatrix::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &TypeSubgroupMatrix::ByteSizeLong, - &TypeSubgroupMatrix::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(TypeSubgroupMatrix, _impl_._cached_size_), - false, - }, - &TypeSubgroupMatrix::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull TypeSubgroupMatrix_class_data_ = - TypeSubgroupMatrix::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -TypeSubgroupMatrix::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&TypeSubgroupMatrix_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(TypeSubgroupMatrix_class_data_.tc_table); - return TypeSubgroupMatrix_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<2, 3, 0, 0, 2> -TypeSubgroupMatrix::_table_ = { - { - PROTOBUF_FIELD_OFFSET(TypeSubgroupMatrix, _impl_._has_bits_), - 0, // no _extensions_ - 3, 24, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967288, // skipmap - offsetof(decltype(_table_), field_entries), - 3, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - TypeSubgroupMatrix_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeSubgroupMatrix>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - // uint32 sub_type = 1; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(TypeSubgroupMatrix, _impl_.sub_type_), 0>(), - {8, 0, 0, PROTOBUF_FIELD_OFFSET(TypeSubgroupMatrix, _impl_.sub_type_)}}, - // uint32 rows = 2; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(TypeSubgroupMatrix, _impl_.rows_), 1>(), - {16, 1, 0, PROTOBUF_FIELD_OFFSET(TypeSubgroupMatrix, _impl_.rows_)}}, - // uint32 columns = 3; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(TypeSubgroupMatrix, _impl_.columns_), 2>(), - {24, 2, 0, PROTOBUF_FIELD_OFFSET(TypeSubgroupMatrix, _impl_.columns_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // uint32 sub_type = 1; - {PROTOBUF_FIELD_OFFSET(TypeSubgroupMatrix, _impl_.sub_type_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - // uint32 rows = 2; - {PROTOBUF_FIELD_OFFSET(TypeSubgroupMatrix, _impl_.rows_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - // uint32 columns = 3; - {PROTOBUF_FIELD_OFFSET(TypeSubgroupMatrix, _impl_.columns_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - }}, - // no aux_entries - {{ - }}, -}; -PROTOBUF_NOINLINE void TypeSubgroupMatrix::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.TypeSubgroupMatrix) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000007U) != 0) { - ::memset(&_impl_.sub_type_, 0, static_cast<::size_t>( - reinterpret_cast(&_impl_.columns_) - - reinterpret_cast(&_impl_.sub_type_)) + sizeof(_impl_.columns_)); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL TypeSubgroupMatrix::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const TypeSubgroupMatrix& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL TypeSubgroupMatrix::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const TypeSubgroupMatrix& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.TypeSubgroupMatrix) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // uint32 sub_type = 1; - if ((this_._impl_._has_bits_[0] & 0x00000001U) != 0) { - if (this_._internal_sub_type() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 1, this_._internal_sub_type(), target); - } - } - - // uint32 rows = 2; - if ((this_._impl_._has_bits_[0] & 0x00000002U) != 0) { - if (this_._internal_rows() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 2, this_._internal_rows(), target); - } - } - - // uint32 columns = 3; - if ((this_._impl_._has_bits_[0] & 0x00000004U) != 0) { - if (this_._internal_columns() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 3, this_._internal_columns(), target); - } - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.TypeSubgroupMatrix) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t TypeSubgroupMatrix::ByteSizeLong(const MessageLite& base) { - const TypeSubgroupMatrix& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t TypeSubgroupMatrix::ByteSizeLong() const { - const TypeSubgroupMatrix& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.TypeSubgroupMatrix) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - ::_pbi::Prefetch5LinesFrom7Lines(&this_); - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000007U) != 0) { - // uint32 sub_type = 1; - if ((cached_has_bits & 0x00000001U) != 0) { - if (this_._internal_sub_type() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_sub_type()); - } - } - // uint32 rows = 2; - if ((cached_has_bits & 0x00000002U) != 0) { - if (this_._internal_rows() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_rows()); - } - } - // uint32 columns = 3; - if ((cached_has_bits & 0x00000004U) != 0) { - if (this_._internal_columns() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_columns()); - } - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void TypeSubgroupMatrix::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.TypeSubgroupMatrix) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000007U) != 0) { - if ((cached_has_bits & 0x00000001U) != 0) { - if (from._internal_sub_type() != 0) { - _this->_impl_.sub_type_ = from._impl_.sub_type_; - } - } - if ((cached_has_bits & 0x00000002U) != 0) { - if (from._internal_rows() != 0) { - _this->_impl_.rows_ = from._impl_.rows_; - } - } - if ((cached_has_bits & 0x00000004U) != 0) { - if (from._internal_columns() != 0) { - _this->_impl_.columns_ = from._impl_.columns_; - } - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void TypeSubgroupMatrix::CopyFrom(const TypeSubgroupMatrix& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.TypeSubgroupMatrix) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void TypeSubgroupMatrix::InternalSwap(TypeSubgroupMatrix* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::google::protobuf::internal::memswap< - PROTOBUF_FIELD_OFFSET(TypeSubgroupMatrix, _impl_.columns_) - + sizeof(TypeSubgroupMatrix::_impl_.columns_) - - PROTOBUF_FIELD_OFFSET(TypeSubgroupMatrix, _impl_.sub_type_)>( - reinterpret_cast(&_impl_.sub_type_), - reinterpret_cast(&other->_impl_.sub_type_)); -} - -::google::protobuf::Metadata TypeSubgroupMatrix::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class TypeBuffer::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(TypeBuffer, _impl_._has_bits_); -}; - -TypeBuffer::TypeBuffer(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, TypeBuffer_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.TypeBuffer) -} -TypeBuffer::TypeBuffer( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TypeBuffer& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, TypeBuffer_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(from._impl_) { - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); -} -PROTOBUF_NDEBUG_INLINE TypeBuffer::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0} {} - -inline void TypeBuffer::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - _impl_.count_ = {}; -} -TypeBuffer::~TypeBuffer() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.TypeBuffer) - SharedDtor(*this); -} -inline void TypeBuffer::SharedDtor(MessageLite& self) { - TypeBuffer& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL TypeBuffer::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) TypeBuffer(arena); -} -constexpr auto TypeBuffer::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(TypeBuffer), - alignof(TypeBuffer)); -} -constexpr auto TypeBuffer::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_TypeBuffer_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &TypeBuffer::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &TypeBuffer::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &TypeBuffer::ByteSizeLong, - &TypeBuffer::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(TypeBuffer, _impl_._cached_size_), - false, - }, - &TypeBuffer::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull TypeBuffer_class_data_ = - TypeBuffer::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -TypeBuffer::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&TypeBuffer_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(TypeBuffer_class_data_.tc_table); - return TypeBuffer_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 1, 0, 0, 2> -TypeBuffer::_table_ = { - { - PROTOBUF_FIELD_OFFSET(TypeBuffer, _impl_._has_bits_), - 0, // no _extensions_ - 1, 0, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967294, // skipmap - offsetof(decltype(_table_), field_entries), - 1, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - TypeBuffer_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeBuffer>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - // uint32 count = 1; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(TypeBuffer, _impl_.count_), 0>(), - {8, 0, 0, PROTOBUF_FIELD_OFFSET(TypeBuffer, _impl_.count_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // uint32 count = 1; - {PROTOBUF_FIELD_OFFSET(TypeBuffer, _impl_.count_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - }}, - // no aux_entries - {{ - }}, -}; -PROTOBUF_NOINLINE void TypeBuffer::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.TypeBuffer) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.count_ = 0u; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL TypeBuffer::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const TypeBuffer& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL TypeBuffer::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const TypeBuffer& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.TypeBuffer) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // uint32 count = 1; - if ((this_._impl_._has_bits_[0] & 0x00000001U) != 0) { - if (this_._internal_count() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 1, this_._internal_count(), target); - } - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.TypeBuffer) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t TypeBuffer::ByteSizeLong(const MessageLite& base) { - const TypeBuffer& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t TypeBuffer::ByteSizeLong() const { - const TypeBuffer& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.TypeBuffer) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - { - // uint32 count = 1; - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000001U) != 0) { - if (this_._internal_count() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_count()); - } - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void TypeBuffer::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.TypeBuffer) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000001U) != 0) { - if (from._internal_count() != 0) { - _this->_impl_.count_ = from._impl_.count_; - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void TypeBuffer::CopyFrom(const TypeBuffer& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.TypeBuffer) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void TypeBuffer::InternalSwap(TypeBuffer* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - swap(_impl_.count_, other->_impl_.count_); -} - -::google::protobuf::Metadata TypeBuffer::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class TypeTexelBuffer::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(TypeTexelBuffer, _impl_._has_bits_); -}; - -TypeTexelBuffer::TypeTexelBuffer(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, TypeTexelBuffer_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.TypeTexelBuffer) -} -TypeTexelBuffer::TypeTexelBuffer( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TypeTexelBuffer& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, TypeTexelBuffer_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(from._impl_) { - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); -} -PROTOBUF_NDEBUG_INLINE TypeTexelBuffer::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0} {} - -inline void TypeTexelBuffer::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - ::memset(reinterpret_cast(&_impl_) + - offsetof(Impl_, texel_format_), - 0, - offsetof(Impl_, access_) - - offsetof(Impl_, texel_format_) + - sizeof(Impl_::access_)); -} -TypeTexelBuffer::~TypeTexelBuffer() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.TypeTexelBuffer) - SharedDtor(*this); -} -inline void TypeTexelBuffer::SharedDtor(MessageLite& self) { - TypeTexelBuffer& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL TypeTexelBuffer::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) TypeTexelBuffer(arena); -} -constexpr auto TypeTexelBuffer::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(TypeTexelBuffer), - alignof(TypeTexelBuffer)); -} -constexpr auto TypeTexelBuffer::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_TypeTexelBuffer_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &TypeTexelBuffer::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &TypeTexelBuffer::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &TypeTexelBuffer::ByteSizeLong, - &TypeTexelBuffer::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(TypeTexelBuffer, _impl_._cached_size_), - false, - }, - &TypeTexelBuffer::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull TypeTexelBuffer_class_data_ = - TypeTexelBuffer::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -TypeTexelBuffer::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&TypeTexelBuffer_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(TypeTexelBuffer_class_data_.tc_table); - return TypeTexelBuffer_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<1, 2, 0, 0, 2> -TypeTexelBuffer::_table_ = { - { - PROTOBUF_FIELD_OFFSET(TypeTexelBuffer, _impl_._has_bits_), - 0, // no _extensions_ - 2, 8, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967292, // skipmap - offsetof(decltype(_table_), field_entries), - 2, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - TypeTexelBuffer_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::TypeTexelBuffer>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - // .tint.core.ir.binary.pb.AccessControl access = 2; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(TypeTexelBuffer, _impl_.access_), 1>(), - {16, 1, 0, PROTOBUF_FIELD_OFFSET(TypeTexelBuffer, _impl_.access_)}}, - // .tint.core.ir.binary.pb.TexelFormat texel_format = 1; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(TypeTexelBuffer, _impl_.texel_format_), 0>(), - {8, 0, 0, PROTOBUF_FIELD_OFFSET(TypeTexelBuffer, _impl_.texel_format_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // .tint.core.ir.binary.pb.TexelFormat texel_format = 1; - {PROTOBUF_FIELD_OFFSET(TypeTexelBuffer, _impl_.texel_format_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)}, - // .tint.core.ir.binary.pb.AccessControl access = 2; - {PROTOBUF_FIELD_OFFSET(TypeTexelBuffer, _impl_.access_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)}, - }}, - // no aux_entries - {{ - }}, -}; -PROTOBUF_NOINLINE void TypeTexelBuffer::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.TypeTexelBuffer) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - ::memset(&_impl_.texel_format_, 0, static_cast<::size_t>( - reinterpret_cast(&_impl_.access_) - - reinterpret_cast(&_impl_.texel_format_)) + sizeof(_impl_.access_)); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL TypeTexelBuffer::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const TypeTexelBuffer& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL TypeTexelBuffer::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const TypeTexelBuffer& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.TypeTexelBuffer) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // .tint.core.ir.binary.pb.TexelFormat texel_format = 1; - if ((this_._impl_._has_bits_[0] & 0x00000001U) != 0) { - if (this_._internal_texel_format() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 1, this_._internal_texel_format(), target); - } - } - - // .tint.core.ir.binary.pb.AccessControl access = 2; - if ((this_._impl_._has_bits_[0] & 0x00000002U) != 0) { - if (this_._internal_access() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 2, this_._internal_access(), target); - } - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.TypeTexelBuffer) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t TypeTexelBuffer::ByteSizeLong(const MessageLite& base) { - const TypeTexelBuffer& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t TypeTexelBuffer::ByteSizeLong() const { - const TypeTexelBuffer& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.TypeTexelBuffer) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - ::_pbi::Prefetch5LinesFrom7Lines(&this_); - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - // .tint.core.ir.binary.pb.TexelFormat texel_format = 1; - if ((cached_has_bits & 0x00000001U) != 0) { - if (this_._internal_texel_format() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this_._internal_texel_format()); - } - } - // .tint.core.ir.binary.pb.AccessControl access = 2; - if ((cached_has_bits & 0x00000002U) != 0) { - if (this_._internal_access() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this_._internal_access()); - } - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void TypeTexelBuffer::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.TypeTexelBuffer) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - if ((cached_has_bits & 0x00000001U) != 0) { - if (from._internal_texel_format() != 0) { - _this->_impl_.texel_format_ = from._impl_.texel_format_; - } - } - if ((cached_has_bits & 0x00000002U) != 0) { - if (from._internal_access() != 0) { - _this->_impl_.access_ = from._impl_.access_; - } - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void TypeTexelBuffer::CopyFrom(const TypeTexelBuffer& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.TypeTexelBuffer) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void TypeTexelBuffer::InternalSwap(TypeTexelBuffer* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::google::protobuf::internal::memswap< - PROTOBUF_FIELD_OFFSET(TypeTexelBuffer, _impl_.access_) - + sizeof(TypeTexelBuffer::_impl_.access_) - - PROTOBUF_FIELD_OFFSET(TypeTexelBuffer, _impl_.texel_format_)>( - reinterpret_cast(&_impl_.texel_format_), - reinterpret_cast(&other->_impl_.texel_format_)); -} - -::google::protobuf::Metadata TypeTexelBuffer::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class Value::_Internal { - public: - static constexpr ::int32_t kOneofCaseOffset = - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Value, _impl_._oneof_case_); -}; - -void Value::set_allocated_instruction_result(::tint::core::ir::binary::pb::InstructionResult* PROTOBUF_NULLABLE instruction_result) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (instruction_result) { - ::google::protobuf::Arena* submessage_arena = instruction_result->GetArena(); - if (message_arena != submessage_arena) { - instruction_result = ::google::protobuf::internal::GetOwnedMessage(message_arena, instruction_result, submessage_arena); - } - set_has_instruction_result(); - _impl_.kind_.instruction_result_ = instruction_result; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Value.instruction_result) -} -void Value::set_allocated_function_parameter(::tint::core::ir::binary::pb::FunctionParameter* PROTOBUF_NULLABLE function_parameter) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (function_parameter) { - ::google::protobuf::Arena* submessage_arena = function_parameter->GetArena(); - if (message_arena != submessage_arena) { - function_parameter = ::google::protobuf::internal::GetOwnedMessage(message_arena, function_parameter, submessage_arena); - } - set_has_function_parameter(); - _impl_.kind_.function_parameter_ = function_parameter; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Value.function_parameter) -} -void Value::set_allocated_block_parameter(::tint::core::ir::binary::pb::BlockParameter* PROTOBUF_NULLABLE block_parameter) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (block_parameter) { - ::google::protobuf::Arena* submessage_arena = block_parameter->GetArena(); - if (message_arena != submessage_arena) { - block_parameter = ::google::protobuf::internal::GetOwnedMessage(message_arena, block_parameter, submessage_arena); - } - set_has_block_parameter(); - _impl_.kind_.block_parameter_ = block_parameter; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Value.block_parameter) -} -Value::Value(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, Value_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.Value) -} -PROTOBUF_NDEBUG_INLINE Value::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - [[maybe_unused]] const ::tint::core::ir::binary::pb::Value& from_msg) - : kind_{}, - _cached_size_{0}, - _oneof_case_{from._oneof_case_[0]} {} - -Value::Value( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const Value& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, Value_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - Value* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); - switch (kind_case()) { - case KIND_NOT_SET: - break; - case kFunction: - _impl_.kind_.function_ = from._impl_.kind_.function_; - break; - case kInstructionResult: - _impl_.kind_.instruction_result_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.instruction_result_); - break; - case kFunctionParameter: - _impl_.kind_.function_parameter_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.function_parameter_); - break; - case kBlockParameter: - _impl_.kind_.block_parameter_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.block_parameter_); - break; - case kConstant: - _impl_.kind_.constant_ = from._impl_.kind_.constant_; - break; - } - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.Value) -} -PROTOBUF_NDEBUG_INLINE Value::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : kind_{}, - _cached_size_{0}, - _oneof_case_{} {} - -inline void Value::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); -} -Value::~Value() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.Value) - SharedDtor(*this); -} -inline void Value::SharedDtor(MessageLite& self) { - Value& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - if (this_.has_kind()) { - this_.clear_kind(); - } - this_._impl_.~Impl_(); -} - -void Value::clear_kind() { -// @@protoc_insertion_point(one_of_clear_start:tint.core.ir.binary.pb.Value) - ::google::protobuf::internal::TSanWrite(&_impl_); - switch (kind_case()) { - case kFunction: { - // No need to clear - break; - } - case kInstructionResult: { - if (GetArena() == nullptr) { - delete _impl_.kind_.instruction_result_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.instruction_result_); - } - break; - } - case kFunctionParameter: { - if (GetArena() == nullptr) { - delete _impl_.kind_.function_parameter_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.function_parameter_); - } - break; - } - case kBlockParameter: { - if (GetArena() == nullptr) { - delete _impl_.kind_.block_parameter_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.block_parameter_); - } - break; - } - case kConstant: { - // No need to clear - break; - } - case KIND_NOT_SET: { - break; - } - } - _impl_._oneof_case_[0] = KIND_NOT_SET; -} - - -inline void* PROTOBUF_NONNULL Value::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) Value(arena); -} -constexpr auto Value::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(Value), - alignof(Value)); -} -constexpr auto Value::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_Value_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &Value::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &Value::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &Value::ByteSizeLong, - &Value::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(Value, _impl_._cached_size_), - false, - }, - &Value::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull Value_class_data_ = - Value::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -Value::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&Value_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(Value_class_data_.tc_table); - return Value_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 5, 3, 0, 2> -Value::_table_ = { - { - 0, // no _has_bits_ - 0, // no _extensions_ - 5, 0, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967264, // skipmap - offsetof(decltype(_table_), field_entries), - 5, // num_field_entries - 3, // num_aux_entries - offsetof(decltype(_table_), aux_entries), - Value_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::Value>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - }}, {{ - 65535, 65535 - }}, {{ - // uint32 function = 1; - {PROTOBUF_FIELD_OFFSET(Value, _impl_.kind_.function_), _Internal::kOneofCaseOffset + 0, 0, (0 | ::_fl::kFcOneof | ::_fl::kUInt32)}, - // .tint.core.ir.binary.pb.InstructionResult instruction_result = 2; - {PROTOBUF_FIELD_OFFSET(Value, _impl_.kind_.instruction_result_), _Internal::kOneofCaseOffset + 0, 0, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.FunctionParameter function_parameter = 3; - {PROTOBUF_FIELD_OFFSET(Value, _impl_.kind_.function_parameter_), _Internal::kOneofCaseOffset + 0, 1, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.BlockParameter block_parameter = 4; - {PROTOBUF_FIELD_OFFSET(Value, _impl_.kind_.block_parameter_), _Internal::kOneofCaseOffset + 0, 2, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // uint32 constant = 5; - {PROTOBUF_FIELD_OFFSET(Value, _impl_.kind_.constant_), _Internal::kOneofCaseOffset + 0, 0, (0 | ::_fl::kFcOneof | ::_fl::kUInt32)}, - }}, - {{ - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionResult>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::FunctionParameter>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::BlockParameter>()}, - }}, - {{ - }}, -}; -PROTOBUF_NOINLINE void Value::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.Value) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - clear_kind(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL Value::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const Value& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL Value::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const Value& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.Value) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - switch (this_.kind_case()) { - case kFunction: { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 1, this_._internal_function(), target); - break; - } - case kInstructionResult: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 2, *this_._impl_.kind_.instruction_result_, this_._impl_.kind_.instruction_result_->GetCachedSize(), target, - stream); - break; - } - case kFunctionParameter: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 3, *this_._impl_.kind_.function_parameter_, this_._impl_.kind_.function_parameter_->GetCachedSize(), target, - stream); - break; - } - case kBlockParameter: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 4, *this_._impl_.kind_.block_parameter_, this_._impl_.kind_.block_parameter_->GetCachedSize(), target, - stream); - break; - } - case kConstant: { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 5, this_._internal_constant(), target); - break; - } - default: - break; - } - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.Value) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t Value::ByteSizeLong(const MessageLite& base) { - const Value& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t Value::ByteSizeLong() const { - const Value& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.Value) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - switch (this_.kind_case()) { - // uint32 function = 1; - case kFunction: { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_function()); - break; - } - // .tint.core.ir.binary.pb.InstructionResult instruction_result = 2; - case kInstructionResult: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.instruction_result_); - break; - } - // .tint.core.ir.binary.pb.FunctionParameter function_parameter = 3; - case kFunctionParameter: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.function_parameter_); - break; - } - // .tint.core.ir.binary.pb.BlockParameter block_parameter = 4; - case kBlockParameter: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.block_parameter_); - break; - } - // uint32 constant = 5; - case kConstant: { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_constant()); - break; - } - case KIND_NOT_SET: { - break; - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void Value::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - ::google::protobuf::Arena* arena = _this->GetArena(); - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.Value) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (const uint32_t oneof_from_case = from._impl_._oneof_case_[0]) { - const uint32_t oneof_to_case = _this->_impl_._oneof_case_[0]; - const bool oneof_needs_init = oneof_to_case != oneof_from_case; - if (oneof_needs_init) { - if (oneof_to_case != 0) { - _this->clear_kind(); - } - _this->_impl_._oneof_case_[0] = oneof_from_case; - } - - switch (oneof_from_case) { - case kFunction: { - _this->_impl_.kind_.function_ = from._impl_.kind_.function_; - break; - } - case kInstructionResult: { - if (oneof_needs_init) { - _this->_impl_.kind_.instruction_result_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.instruction_result_); - } else { - _this->_impl_.kind_.instruction_result_->MergeFrom(*from._impl_.kind_.instruction_result_); - } - break; - } - case kFunctionParameter: { - if (oneof_needs_init) { - _this->_impl_.kind_.function_parameter_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.function_parameter_); - } else { - _this->_impl_.kind_.function_parameter_->MergeFrom(*from._impl_.kind_.function_parameter_); - } - break; - } - case kBlockParameter: { - if (oneof_needs_init) { - _this->_impl_.kind_.block_parameter_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.block_parameter_); - } else { - _this->_impl_.kind_.block_parameter_->MergeFrom(*from._impl_.kind_.block_parameter_); - } - break; - } - case kConstant: { - _this->_impl_.kind_.constant_ = from._impl_.kind_.constant_; - break; - } - case KIND_NOT_SET: - break; - } - } - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void Value::CopyFrom(const Value& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.Value) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void Value::InternalSwap(Value* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_.kind_, other->_impl_.kind_); - swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); -} - -::google::protobuf::Metadata Value::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class InstructionResult::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(InstructionResult, _impl_._has_bits_); -}; - -InstructionResult::InstructionResult(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, InstructionResult_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.InstructionResult) -} -PROTOBUF_NDEBUG_INLINE InstructionResult::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - [[maybe_unused]] const ::tint::core::ir::binary::pb::InstructionResult& from_msg) - : _has_bits_{from._has_bits_}, - _cached_size_{0}, - name_(arena, from.name_) {} - -InstructionResult::InstructionResult( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const InstructionResult& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, InstructionResult_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - InstructionResult* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); - _impl_.type_ = from._impl_.type_; - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.InstructionResult) -} -PROTOBUF_NDEBUG_INLINE InstructionResult::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0}, - name_(arena) {} - -inline void InstructionResult::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - _impl_.type_ = {}; -} -InstructionResult::~InstructionResult() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.InstructionResult) - SharedDtor(*this); -} -inline void InstructionResult::SharedDtor(MessageLite& self) { - InstructionResult& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.name_.Destroy(); - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL InstructionResult::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) InstructionResult(arena); -} -constexpr auto InstructionResult::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(InstructionResult), - alignof(InstructionResult)); -} -constexpr auto InstructionResult::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_InstructionResult_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &InstructionResult::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &InstructionResult::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &InstructionResult::ByteSizeLong, - &InstructionResult::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(InstructionResult, _impl_._cached_size_), - false, - }, - &InstructionResult::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull InstructionResult_class_data_ = - InstructionResult::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -InstructionResult::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&InstructionResult_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(InstructionResult_class_data_.tc_table); - return InstructionResult_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<1, 2, 0, 53, 2> -InstructionResult::_table_ = { - { - PROTOBUF_FIELD_OFFSET(InstructionResult, _impl_._has_bits_), - 0, // no _extensions_ - 2, 8, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967292, // skipmap - offsetof(decltype(_table_), field_entries), - 2, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - InstructionResult_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionResult>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - // optional string name = 2; - {::_pbi::TcParser::FastUS1, - {18, 0, 0, PROTOBUF_FIELD_OFFSET(InstructionResult, _impl_.name_)}}, - // uint32 type = 1; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(InstructionResult, _impl_.type_), 1>(), - {8, 1, 0, PROTOBUF_FIELD_OFFSET(InstructionResult, _impl_.type_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // uint32 type = 1; - {PROTOBUF_FIELD_OFFSET(InstructionResult, _impl_.type_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - // optional string name = 2; - {PROTOBUF_FIELD_OFFSET(InstructionResult, _impl_.name_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, - }}, - // no aux_entries - {{ - "\50\0\4\0\0\0\0\0" - "tint.core.ir.binary.pb.InstructionResult" - "name" - }}, -}; -PROTOBUF_NOINLINE void InstructionResult::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.InstructionResult) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000001U) != 0) { - _impl_.name_.ClearNonDefaultToEmpty(); - } - _impl_.type_ = 0u; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL InstructionResult::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const InstructionResult& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL InstructionResult::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const InstructionResult& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.InstructionResult) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // uint32 type = 1; - if ((this_._impl_._has_bits_[0] & 0x00000002U) != 0) { - if (this_._internal_type() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 1, this_._internal_type(), target); - } - } - - cached_has_bits = this_._impl_._has_bits_[0]; - // optional string name = 2; - if ((cached_has_bits & 0x00000001U) != 0) { - const ::std::string& _s = this_._internal_name(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tint.core.ir.binary.pb.InstructionResult.name"); - target = stream->WriteStringMaybeAliased(2, _s, target); - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.InstructionResult) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t InstructionResult::ByteSizeLong(const MessageLite& base) { - const InstructionResult& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t InstructionResult::ByteSizeLong() const { - const InstructionResult& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.InstructionResult) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - ::_pbi::Prefetch5LinesFrom7Lines(&this_); - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - // optional string name = 2; - if ((cached_has_bits & 0x00000001U) != 0) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this_._internal_name()); - } - // uint32 type = 1; - if ((cached_has_bits & 0x00000002U) != 0) { - if (this_._internal_type() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_type()); - } - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void InstructionResult::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.InstructionResult) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - if ((cached_has_bits & 0x00000001U) != 0) { - _this->_internal_set_name(from._internal_name()); - } - if ((cached_has_bits & 0x00000002U) != 0) { - if (from._internal_type() != 0) { - _this->_impl_.type_ = from._impl_.type_; - } - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void InstructionResult::CopyFrom(const InstructionResult& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.InstructionResult) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void InstructionResult::InternalSwap(InstructionResult* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - auto* arena = GetArena(); - ABSL_DCHECK_EQ(arena, other->GetArena()); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena); - swap(_impl_.type_, other->_impl_.type_); -} - -::google::protobuf::Metadata InstructionResult::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class FunctionParameter::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(FunctionParameter, _impl_._has_bits_); -}; - -FunctionParameter::FunctionParameter(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, FunctionParameter_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.FunctionParameter) -} -PROTOBUF_NDEBUG_INLINE FunctionParameter::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - [[maybe_unused]] const ::tint::core::ir::binary::pb::FunctionParameter& from_msg) - : _has_bits_{from._has_bits_}, - _cached_size_{0}, - name_(arena, from.name_) {} - -FunctionParameter::FunctionParameter( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const FunctionParameter& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, FunctionParameter_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - FunctionParameter* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); - ::uint32_t cached_has_bits = _impl_._has_bits_[0]; - _impl_.attributes_ = ((cached_has_bits & 0x00000002U) != 0) - ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.attributes_) - : nullptr; - _impl_.type_ = from._impl_.type_; - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.FunctionParameter) -} -PROTOBUF_NDEBUG_INLINE FunctionParameter::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0}, - name_(arena) {} - -inline void FunctionParameter::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - ::memset(reinterpret_cast(&_impl_) + - offsetof(Impl_, attributes_), - 0, - offsetof(Impl_, type_) - - offsetof(Impl_, attributes_) + - sizeof(Impl_::type_)); -} -FunctionParameter::~FunctionParameter() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.FunctionParameter) - SharedDtor(*this); -} -inline void FunctionParameter::SharedDtor(MessageLite& self) { - FunctionParameter& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.name_.Destroy(); - delete this_._impl_.attributes_; - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL FunctionParameter::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) FunctionParameter(arena); -} -constexpr auto FunctionParameter::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(FunctionParameter), - alignof(FunctionParameter)); -} -constexpr auto FunctionParameter::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_FunctionParameter_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &FunctionParameter::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &FunctionParameter::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &FunctionParameter::ByteSizeLong, - &FunctionParameter::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(FunctionParameter, _impl_._cached_size_), - false, - }, - &FunctionParameter::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull FunctionParameter_class_data_ = - FunctionParameter::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -FunctionParameter::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&FunctionParameter_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(FunctionParameter_class_data_.tc_table); - return FunctionParameter_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<2, 3, 1, 53, 2> -FunctionParameter::_table_ = { - { - PROTOBUF_FIELD_OFFSET(FunctionParameter, _impl_._has_bits_), - 0, // no _extensions_ - 3, 24, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967288, // skipmap - offsetof(decltype(_table_), field_entries), - 3, // num_field_entries - 1, // num_aux_entries - offsetof(decltype(_table_), aux_entries), - FunctionParameter_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::FunctionParameter>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - // uint32 type = 1; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(FunctionParameter, _impl_.type_), 2>(), - {8, 2, 0, PROTOBUF_FIELD_OFFSET(FunctionParameter, _impl_.type_)}}, - // optional string name = 2; - {::_pbi::TcParser::FastUS1, - {18, 0, 0, PROTOBUF_FIELD_OFFSET(FunctionParameter, _impl_.name_)}}, - // optional .tint.core.ir.binary.pb.AttributesFunctionParameter attributes = 3; - {::_pbi::TcParser::FastMtS1, - {26, 1, 0, PROTOBUF_FIELD_OFFSET(FunctionParameter, _impl_.attributes_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // uint32 type = 1; - {PROTOBUF_FIELD_OFFSET(FunctionParameter, _impl_.type_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - // optional string name = 2; - {PROTOBUF_FIELD_OFFSET(FunctionParameter, _impl_.name_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, - // optional .tint.core.ir.binary.pb.AttributesFunctionParameter attributes = 3; - {PROTOBUF_FIELD_OFFSET(FunctionParameter, _impl_.attributes_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, - }}, - {{ - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::AttributesFunctionParameter>()}, - }}, - {{ - "\50\0\4\0\0\0\0\0" - "tint.core.ir.binary.pb.FunctionParameter" - "name" - }}, -}; -PROTOBUF_NOINLINE void FunctionParameter::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.FunctionParameter) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - if ((cached_has_bits & 0x00000001U) != 0) { - _impl_.name_.ClearNonDefaultToEmpty(); - } - if ((cached_has_bits & 0x00000002U) != 0) { - ABSL_DCHECK(_impl_.attributes_ != nullptr); - _impl_.attributes_->Clear(); - } - } - _impl_.type_ = 0u; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL FunctionParameter::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const FunctionParameter& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL FunctionParameter::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const FunctionParameter& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.FunctionParameter) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // uint32 type = 1; - if ((this_._impl_._has_bits_[0] & 0x00000004U) != 0) { - if (this_._internal_type() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 1, this_._internal_type(), target); - } - } - - cached_has_bits = this_._impl_._has_bits_[0]; - // optional string name = 2; - if ((cached_has_bits & 0x00000001U) != 0) { - const ::std::string& _s = this_._internal_name(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tint.core.ir.binary.pb.FunctionParameter.name"); - target = stream->WriteStringMaybeAliased(2, _s, target); - } - - // optional .tint.core.ir.binary.pb.AttributesFunctionParameter attributes = 3; - if ((cached_has_bits & 0x00000002U) != 0) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 3, *this_._impl_.attributes_, this_._impl_.attributes_->GetCachedSize(), target, - stream); - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.FunctionParameter) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t FunctionParameter::ByteSizeLong(const MessageLite& base) { - const FunctionParameter& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t FunctionParameter::ByteSizeLong() const { - const FunctionParameter& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.FunctionParameter) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - ::_pbi::Prefetch5LinesFrom7Lines(&this_); - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000007U) != 0) { - // optional string name = 2; - if ((cached_has_bits & 0x00000001U) != 0) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this_._internal_name()); - } - // optional .tint.core.ir.binary.pb.AttributesFunctionParameter attributes = 3; - if ((cached_has_bits & 0x00000002U) != 0) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.attributes_); - } - // uint32 type = 1; - if ((cached_has_bits & 0x00000004U) != 0) { - if (this_._internal_type() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_type()); - } - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void FunctionParameter::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - ::google::protobuf::Arena* arena = _this->GetArena(); - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.FunctionParameter) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000007U) != 0) { - if ((cached_has_bits & 0x00000001U) != 0) { - _this->_internal_set_name(from._internal_name()); - } - if ((cached_has_bits & 0x00000002U) != 0) { - ABSL_DCHECK(from._impl_.attributes_ != nullptr); - if (_this->_impl_.attributes_ == nullptr) { - _this->_impl_.attributes_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.attributes_); - } else { - _this->_impl_.attributes_->MergeFrom(*from._impl_.attributes_); - } - } - if ((cached_has_bits & 0x00000004U) != 0) { - if (from._internal_type() != 0) { - _this->_impl_.type_ = from._impl_.type_; - } - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void FunctionParameter::CopyFrom(const FunctionParameter& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.FunctionParameter) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void FunctionParameter::InternalSwap(FunctionParameter* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - auto* arena = GetArena(); - ABSL_DCHECK_EQ(arena, other->GetArena()); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena); - ::google::protobuf::internal::memswap< - PROTOBUF_FIELD_OFFSET(FunctionParameter, _impl_.type_) - + sizeof(FunctionParameter::_impl_.type_) - - PROTOBUF_FIELD_OFFSET(FunctionParameter, _impl_.attributes_)>( - reinterpret_cast(&_impl_.attributes_), - reinterpret_cast(&other->_impl_.attributes_)); -} - -::google::protobuf::Metadata FunctionParameter::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class BlockParameter::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(BlockParameter, _impl_._has_bits_); -}; - -BlockParameter::BlockParameter(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, BlockParameter_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.BlockParameter) -} -PROTOBUF_NDEBUG_INLINE BlockParameter::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - [[maybe_unused]] const ::tint::core::ir::binary::pb::BlockParameter& from_msg) - : _has_bits_{from._has_bits_}, - _cached_size_{0}, - name_(arena, from.name_) {} - -BlockParameter::BlockParameter( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const BlockParameter& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, BlockParameter_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - BlockParameter* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); - _impl_.type_ = from._impl_.type_; - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.BlockParameter) -} -PROTOBUF_NDEBUG_INLINE BlockParameter::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0}, - name_(arena) {} - -inline void BlockParameter::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - _impl_.type_ = {}; -} -BlockParameter::~BlockParameter() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.BlockParameter) - SharedDtor(*this); -} -inline void BlockParameter::SharedDtor(MessageLite& self) { - BlockParameter& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.name_.Destroy(); - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL BlockParameter::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) BlockParameter(arena); -} -constexpr auto BlockParameter::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(BlockParameter), - alignof(BlockParameter)); -} -constexpr auto BlockParameter::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_BlockParameter_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &BlockParameter::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &BlockParameter::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &BlockParameter::ByteSizeLong, - &BlockParameter::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(BlockParameter, _impl_._cached_size_), - false, - }, - &BlockParameter::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull BlockParameter_class_data_ = - BlockParameter::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -BlockParameter::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&BlockParameter_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(BlockParameter_class_data_.tc_table); - return BlockParameter_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<1, 2, 0, 50, 2> -BlockParameter::_table_ = { - { - PROTOBUF_FIELD_OFFSET(BlockParameter, _impl_._has_bits_), - 0, // no _extensions_ - 2, 8, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967292, // skipmap - offsetof(decltype(_table_), field_entries), - 2, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - BlockParameter_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::BlockParameter>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - // optional string name = 2; - {::_pbi::TcParser::FastUS1, - {18, 0, 0, PROTOBUF_FIELD_OFFSET(BlockParameter, _impl_.name_)}}, - // uint32 type = 1; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(BlockParameter, _impl_.type_), 1>(), - {8, 1, 0, PROTOBUF_FIELD_OFFSET(BlockParameter, _impl_.type_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // uint32 type = 1; - {PROTOBUF_FIELD_OFFSET(BlockParameter, _impl_.type_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - // optional string name = 2; - {PROTOBUF_FIELD_OFFSET(BlockParameter, _impl_.name_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, - }}, - // no aux_entries - {{ - "\45\0\4\0\0\0\0\0" - "tint.core.ir.binary.pb.BlockParameter" - "name" - }}, -}; -PROTOBUF_NOINLINE void BlockParameter::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.BlockParameter) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000001U) != 0) { - _impl_.name_.ClearNonDefaultToEmpty(); - } - _impl_.type_ = 0u; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL BlockParameter::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const BlockParameter& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL BlockParameter::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const BlockParameter& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.BlockParameter) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // uint32 type = 1; - if ((this_._impl_._has_bits_[0] & 0x00000002U) != 0) { - if (this_._internal_type() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 1, this_._internal_type(), target); - } - } - - cached_has_bits = this_._impl_._has_bits_[0]; - // optional string name = 2; - if ((cached_has_bits & 0x00000001U) != 0) { - const ::std::string& _s = this_._internal_name(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tint.core.ir.binary.pb.BlockParameter.name"); - target = stream->WriteStringMaybeAliased(2, _s, target); - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.BlockParameter) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t BlockParameter::ByteSizeLong(const MessageLite& base) { - const BlockParameter& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t BlockParameter::ByteSizeLong() const { - const BlockParameter& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.BlockParameter) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - ::_pbi::Prefetch5LinesFrom7Lines(&this_); - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - // optional string name = 2; - if ((cached_has_bits & 0x00000001U) != 0) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this_._internal_name()); - } - // uint32 type = 1; - if ((cached_has_bits & 0x00000002U) != 0) { - if (this_._internal_type() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_type()); - } - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void BlockParameter::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.BlockParameter) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - if ((cached_has_bits & 0x00000001U) != 0) { - _this->_internal_set_name(from._internal_name()); - } - if ((cached_has_bits & 0x00000002U) != 0) { - if (from._internal_type() != 0) { - _this->_impl_.type_ = from._impl_.type_; - } - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void BlockParameter::CopyFrom(const BlockParameter& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.BlockParameter) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void BlockParameter::InternalSwap(BlockParameter* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - auto* arena = GetArena(); - ABSL_DCHECK_EQ(arena, other->GetArena()); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena); - swap(_impl_.type_, other->_impl_.type_); -} - -::google::protobuf::Metadata BlockParameter::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class ConstantValue::_Internal { - public: - static constexpr ::int32_t kOneofCaseOffset = - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::ConstantValue, _impl_._oneof_case_); -}; - -void ConstantValue::set_allocated_scalar(::tint::core::ir::binary::pb::ConstantValueScalar* PROTOBUF_NULLABLE scalar) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (scalar) { - ::google::protobuf::Arena* submessage_arena = scalar->GetArena(); - if (message_arena != submessage_arena) { - scalar = ::google::protobuf::internal::GetOwnedMessage(message_arena, scalar, submessage_arena); - } - set_has_scalar(); - _impl_.kind_.scalar_ = scalar; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.ConstantValue.scalar) -} -void ConstantValue::set_allocated_composite(::tint::core::ir::binary::pb::ConstantValueComposite* PROTOBUF_NULLABLE composite) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (composite) { - ::google::protobuf::Arena* submessage_arena = composite->GetArena(); - if (message_arena != submessage_arena) { - composite = ::google::protobuf::internal::GetOwnedMessage(message_arena, composite, submessage_arena); - } - set_has_composite(); - _impl_.kind_.composite_ = composite; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.ConstantValue.composite) -} -void ConstantValue::set_allocated_splat(::tint::core::ir::binary::pb::ConstantValueSplat* PROTOBUF_NULLABLE splat) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (splat) { - ::google::protobuf::Arena* submessage_arena = splat->GetArena(); - if (message_arena != submessage_arena) { - splat = ::google::protobuf::internal::GetOwnedMessage(message_arena, splat, submessage_arena); - } - set_has_splat(); - _impl_.kind_.splat_ = splat; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.ConstantValue.splat) -} -ConstantValue::ConstantValue(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, ConstantValue_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.ConstantValue) -} -PROTOBUF_NDEBUG_INLINE ConstantValue::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - [[maybe_unused]] const ::tint::core::ir::binary::pb::ConstantValue& from_msg) - : kind_{}, - _cached_size_{0}, - _oneof_case_{from._oneof_case_[0]} {} - -ConstantValue::ConstantValue( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const ConstantValue& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, ConstantValue_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - ConstantValue* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); - switch (kind_case()) { - case KIND_NOT_SET: - break; - case kScalar: - _impl_.kind_.scalar_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.scalar_); - break; - case kComposite: - _impl_.kind_.composite_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.composite_); - break; - case kSplat: - _impl_.kind_.splat_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.splat_); - break; - } - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.ConstantValue) -} -PROTOBUF_NDEBUG_INLINE ConstantValue::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : kind_{}, - _cached_size_{0}, - _oneof_case_{} {} - -inline void ConstantValue::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); -} -ConstantValue::~ConstantValue() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.ConstantValue) - SharedDtor(*this); -} -inline void ConstantValue::SharedDtor(MessageLite& self) { - ConstantValue& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - if (this_.has_kind()) { - this_.clear_kind(); - } - this_._impl_.~Impl_(); -} - -void ConstantValue::clear_kind() { -// @@protoc_insertion_point(one_of_clear_start:tint.core.ir.binary.pb.ConstantValue) - ::google::protobuf::internal::TSanWrite(&_impl_); - switch (kind_case()) { - case kScalar: { - if (GetArena() == nullptr) { - delete _impl_.kind_.scalar_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.scalar_); - } - break; - } - case kComposite: { - if (GetArena() == nullptr) { - delete _impl_.kind_.composite_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.composite_); - } - break; - } - case kSplat: { - if (GetArena() == nullptr) { - delete _impl_.kind_.splat_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.splat_); - } - break; - } - case KIND_NOT_SET: { - break; - } - } - _impl_._oneof_case_[0] = KIND_NOT_SET; -} - - -inline void* PROTOBUF_NONNULL ConstantValue::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) ConstantValue(arena); -} -constexpr auto ConstantValue::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(ConstantValue), - alignof(ConstantValue)); -} -constexpr auto ConstantValue::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_ConstantValue_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &ConstantValue::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &ConstantValue::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &ConstantValue::ByteSizeLong, - &ConstantValue::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(ConstantValue, _impl_._cached_size_), - false, - }, - &ConstantValue::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull ConstantValue_class_data_ = - ConstantValue::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -ConstantValue::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&ConstantValue_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(ConstantValue_class_data_.tc_table); - return ConstantValue_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 3, 3, 0, 2> -ConstantValue::_table_ = { - { - 0, // no _has_bits_ - 0, // no _extensions_ - 3, 0, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967288, // skipmap - offsetof(decltype(_table_), field_entries), - 3, // num_field_entries - 3, // num_aux_entries - offsetof(decltype(_table_), aux_entries), - ConstantValue_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::ConstantValue>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - }}, {{ - 65535, 65535 - }}, {{ - // .tint.core.ir.binary.pb.ConstantValueScalar scalar = 1; - {PROTOBUF_FIELD_OFFSET(ConstantValue, _impl_.kind_.scalar_), _Internal::kOneofCaseOffset + 0, 0, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.ConstantValueComposite composite = 2; - {PROTOBUF_FIELD_OFFSET(ConstantValue, _impl_.kind_.composite_), _Internal::kOneofCaseOffset + 0, 1, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.ConstantValueSplat splat = 3; - {PROTOBUF_FIELD_OFFSET(ConstantValue, _impl_.kind_.splat_), _Internal::kOneofCaseOffset + 0, 2, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - }}, - {{ - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::ConstantValueScalar>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::ConstantValueComposite>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::ConstantValueSplat>()}, - }}, - {{ - }}, -}; -PROTOBUF_NOINLINE void ConstantValue::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.ConstantValue) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - clear_kind(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL ConstantValue::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const ConstantValue& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL ConstantValue::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const ConstantValue& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.ConstantValue) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - switch (this_.kind_case()) { - case kScalar: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 1, *this_._impl_.kind_.scalar_, this_._impl_.kind_.scalar_->GetCachedSize(), target, - stream); - break; - } - case kComposite: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 2, *this_._impl_.kind_.composite_, this_._impl_.kind_.composite_->GetCachedSize(), target, - stream); - break; - } - case kSplat: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 3, *this_._impl_.kind_.splat_, this_._impl_.kind_.splat_->GetCachedSize(), target, - stream); - break; - } - default: - break; - } - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.ConstantValue) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t ConstantValue::ByteSizeLong(const MessageLite& base) { - const ConstantValue& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t ConstantValue::ByteSizeLong() const { - const ConstantValue& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.ConstantValue) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - switch (this_.kind_case()) { - // .tint.core.ir.binary.pb.ConstantValueScalar scalar = 1; - case kScalar: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.scalar_); - break; - } - // .tint.core.ir.binary.pb.ConstantValueComposite composite = 2; - case kComposite: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.composite_); - break; - } - // .tint.core.ir.binary.pb.ConstantValueSplat splat = 3; - case kSplat: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.splat_); - break; - } - case KIND_NOT_SET: { - break; - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void ConstantValue::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - ::google::protobuf::Arena* arena = _this->GetArena(); - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.ConstantValue) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (const uint32_t oneof_from_case = from._impl_._oneof_case_[0]) { - const uint32_t oneof_to_case = _this->_impl_._oneof_case_[0]; - const bool oneof_needs_init = oneof_to_case != oneof_from_case; - if (oneof_needs_init) { - if (oneof_to_case != 0) { - _this->clear_kind(); - } - _this->_impl_._oneof_case_[0] = oneof_from_case; - } - - switch (oneof_from_case) { - case kScalar: { - if (oneof_needs_init) { - _this->_impl_.kind_.scalar_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.scalar_); - } else { - _this->_impl_.kind_.scalar_->MergeFrom(*from._impl_.kind_.scalar_); - } - break; - } - case kComposite: { - if (oneof_needs_init) { - _this->_impl_.kind_.composite_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.composite_); - } else { - _this->_impl_.kind_.composite_->MergeFrom(*from._impl_.kind_.composite_); - } - break; - } - case kSplat: { - if (oneof_needs_init) { - _this->_impl_.kind_.splat_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.splat_); - } else { - _this->_impl_.kind_.splat_->MergeFrom(*from._impl_.kind_.splat_); - } - break; - } - case KIND_NOT_SET: - break; - } - } - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void ConstantValue::CopyFrom(const ConstantValue& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.ConstantValue) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void ConstantValue::InternalSwap(ConstantValue* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_.kind_, other->_impl_.kind_); - swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); -} - -::google::protobuf::Metadata ConstantValue::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class ConstantValueScalar::_Internal { - public: - static constexpr ::int32_t kOneofCaseOffset = - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::ConstantValueScalar, _impl_._oneof_case_); -}; - -ConstantValueScalar::ConstantValueScalar(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, ConstantValueScalar_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.ConstantValueScalar) -} -ConstantValueScalar::ConstantValueScalar( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ConstantValueScalar& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, ConstantValueScalar_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(from._impl_) { - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); -} -PROTOBUF_NDEBUG_INLINE ConstantValueScalar::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : kind_{}, - _cached_size_{0}, - _oneof_case_{} {} - -inline void ConstantValueScalar::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); -} -ConstantValueScalar::~ConstantValueScalar() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.ConstantValueScalar) - SharedDtor(*this); -} -inline void ConstantValueScalar::SharedDtor(MessageLite& self) { - ConstantValueScalar& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - if (this_.has_kind()) { - this_.clear_kind(); - } - this_._impl_.~Impl_(); -} - -void ConstantValueScalar::clear_kind() { -// @@protoc_insertion_point(one_of_clear_start:tint.core.ir.binary.pb.ConstantValueScalar) - ::google::protobuf::internal::TSanWrite(&_impl_); - switch (kind_case()) { - case kBool: { - // No need to clear - break; - } - case kI32: { - // No need to clear - break; - } - case kU32: { - // No need to clear - break; - } - case kF32: { - // No need to clear - break; - } - case kF16: { - // No need to clear - break; - } - case KIND_NOT_SET: { - break; - } - } - _impl_._oneof_case_[0] = KIND_NOT_SET; -} - - -inline void* PROTOBUF_NONNULL ConstantValueScalar::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) ConstantValueScalar(arena); -} -constexpr auto ConstantValueScalar::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(ConstantValueScalar), - alignof(ConstantValueScalar)); -} -constexpr auto ConstantValueScalar::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_ConstantValueScalar_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &ConstantValueScalar::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &ConstantValueScalar::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &ConstantValueScalar::ByteSizeLong, - &ConstantValueScalar::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(ConstantValueScalar, _impl_._cached_size_), - false, - }, - &ConstantValueScalar::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull ConstantValueScalar_class_data_ = - ConstantValueScalar::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -ConstantValueScalar::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&ConstantValueScalar_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(ConstantValueScalar_class_data_.tc_table); - return ConstantValueScalar_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 5, 0, 0, 2> -ConstantValueScalar::_table_ = { - { - 0, // no _has_bits_ - 0, // no _extensions_ - 5, 0, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967264, // skipmap - offsetof(decltype(_table_), field_entries), - 5, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - ConstantValueScalar_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::ConstantValueScalar>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - }}, {{ - 65535, 65535 - }}, {{ - // bool bool = 1; - {PROTOBUF_FIELD_OFFSET(ConstantValueScalar, _impl_.kind_.bool__), _Internal::kOneofCaseOffset + 0, 0, (0 | ::_fl::kFcOneof | ::_fl::kBool)}, - // int32 i32 = 2; - {PROTOBUF_FIELD_OFFSET(ConstantValueScalar, _impl_.kind_.i32_), _Internal::kOneofCaseOffset + 0, 0, (0 | ::_fl::kFcOneof | ::_fl::kInt32)}, - // uint32 u32 = 3; - {PROTOBUF_FIELD_OFFSET(ConstantValueScalar, _impl_.kind_.u32_), _Internal::kOneofCaseOffset + 0, 0, (0 | ::_fl::kFcOneof | ::_fl::kUInt32)}, - // float f32 = 4; - {PROTOBUF_FIELD_OFFSET(ConstantValueScalar, _impl_.kind_.f32_), _Internal::kOneofCaseOffset + 0, 0, (0 | ::_fl::kFcOneof | ::_fl::kFloat)}, - // float f16 = 5; - {PROTOBUF_FIELD_OFFSET(ConstantValueScalar, _impl_.kind_.f16_), _Internal::kOneofCaseOffset + 0, 0, (0 | ::_fl::kFcOneof | ::_fl::kFloat)}, - }}, - // no aux_entries - {{ - }}, -}; -PROTOBUF_NOINLINE void ConstantValueScalar::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.ConstantValueScalar) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - clear_kind(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL ConstantValueScalar::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const ConstantValueScalar& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL ConstantValueScalar::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const ConstantValueScalar& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.ConstantValueScalar) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - switch (this_.kind_case()) { - case kBool: { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 1, this_._internal_bool_(), target); - break; - } - case kI32: { - target = - ::google::protobuf::internal::WireFormatLite::WriteInt32ToArrayWithField<2>( - stream, this_._internal_i32(), target); - break; - } - case kU32: { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 3, this_._internal_u32(), target); - break; - } - case kF32: { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteFloatToArray( - 4, this_._internal_f32(), target); - break; - } - case kF16: { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteFloatToArray( - 5, this_._internal_f16(), target); - break; - } - default: - break; - } - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.ConstantValueScalar) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t ConstantValueScalar::ByteSizeLong(const MessageLite& base) { - const ConstantValueScalar& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t ConstantValueScalar::ByteSizeLong() const { - const ConstantValueScalar& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.ConstantValueScalar) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - switch (this_.kind_case()) { - // bool bool = 1; - case kBool: { - total_size += 2; - break; - } - // int32 i32 = 2; - case kI32: { - total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( - this_._internal_i32()); - break; - } - // uint32 u32 = 3; - case kU32: { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_u32()); - break; - } - // float f32 = 4; - case kF32: { - total_size += 5; - break; - } - // float f16 = 5; - case kF16: { - total_size += 5; - break; - } - case KIND_NOT_SET: { - break; - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void ConstantValueScalar::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.ConstantValueScalar) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (const uint32_t oneof_from_case = from._impl_._oneof_case_[0]) { - const uint32_t oneof_to_case = _this->_impl_._oneof_case_[0]; - const bool oneof_needs_init = oneof_to_case != oneof_from_case; - if (oneof_needs_init) { - if (oneof_to_case != 0) { - _this->clear_kind(); - } - _this->_impl_._oneof_case_[0] = oneof_from_case; - } - - switch (oneof_from_case) { - case kBool: { - _this->_impl_.kind_.bool__ = from._impl_.kind_.bool__; - break; - } - case kI32: { - _this->_impl_.kind_.i32_ = from._impl_.kind_.i32_; - break; - } - case kU32: { - _this->_impl_.kind_.u32_ = from._impl_.kind_.u32_; - break; - } - case kF32: { - _this->_impl_.kind_.f32_ = from._impl_.kind_.f32_; - break; - } - case kF16: { - _this->_impl_.kind_.f16_ = from._impl_.kind_.f16_; - break; - } - case KIND_NOT_SET: - break; - } - } - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void ConstantValueScalar::CopyFrom(const ConstantValueScalar& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.ConstantValueScalar) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void ConstantValueScalar::InternalSwap(ConstantValueScalar* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_.kind_, other->_impl_.kind_); - swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); -} - -::google::protobuf::Metadata ConstantValueScalar::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class ConstantValueComposite::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(ConstantValueComposite, _impl_._has_bits_); -}; - -ConstantValueComposite::ConstantValueComposite(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, ConstantValueComposite_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.ConstantValueComposite) -} -PROTOBUF_NDEBUG_INLINE ConstantValueComposite::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - [[maybe_unused]] const ::tint::core::ir::binary::pb::ConstantValueComposite& from_msg) - : _has_bits_{from._has_bits_}, - _cached_size_{0}, - elements_{visibility, arena, from.elements_}, - _elements_cached_byte_size_{0} {} - -ConstantValueComposite::ConstantValueComposite( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const ConstantValueComposite& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, ConstantValueComposite_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - ConstantValueComposite* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); - _impl_.type_ = from._impl_.type_; - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.ConstantValueComposite) -} -PROTOBUF_NDEBUG_INLINE ConstantValueComposite::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0}, - elements_{visibility, arena}, - _elements_cached_byte_size_{0} {} - -inline void ConstantValueComposite::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - _impl_.type_ = {}; -} -ConstantValueComposite::~ConstantValueComposite() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.ConstantValueComposite) - SharedDtor(*this); -} -inline void ConstantValueComposite::SharedDtor(MessageLite& self) { - ConstantValueComposite& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL ConstantValueComposite::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) ConstantValueComposite(arena); -} -constexpr auto ConstantValueComposite::InternalNewImpl_() { - constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ - PROTOBUF_FIELD_OFFSET(ConstantValueComposite, _impl_.elements_) + - decltype(ConstantValueComposite::_impl_.elements_):: - InternalGetArenaOffset( - ::google::protobuf::Message::internal_visibility()), - }); - if constexpr (arena_bits.has_value()) { - return ::google::protobuf::internal::MessageCreator::ZeroInit( - sizeof(ConstantValueComposite), alignof(ConstantValueComposite), *arena_bits); - } else { - return ::google::protobuf::internal::MessageCreator(&ConstantValueComposite::PlacementNew_, - sizeof(ConstantValueComposite), - alignof(ConstantValueComposite)); - } -} -constexpr auto ConstantValueComposite::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_ConstantValueComposite_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &ConstantValueComposite::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &ConstantValueComposite::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &ConstantValueComposite::ByteSizeLong, - &ConstantValueComposite::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(ConstantValueComposite, _impl_._cached_size_), - false, - }, - &ConstantValueComposite::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull ConstantValueComposite_class_data_ = - ConstantValueComposite::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -ConstantValueComposite::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&ConstantValueComposite_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(ConstantValueComposite_class_data_.tc_table); - return ConstantValueComposite_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<1, 2, 0, 0, 2> -ConstantValueComposite::_table_ = { - { - PROTOBUF_FIELD_OFFSET(ConstantValueComposite, _impl_._has_bits_), - 0, // no _extensions_ - 2, 8, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967292, // skipmap - offsetof(decltype(_table_), field_entries), - 2, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - ConstantValueComposite_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::ConstantValueComposite>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - // repeated uint32 elements = 2; - {::_pbi::TcParser::FastV32P1, - {18, 63, 0, PROTOBUF_FIELD_OFFSET(ConstantValueComposite, _impl_.elements_)}}, - // uint32 type = 1; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(ConstantValueComposite, _impl_.type_), 0>(), - {8, 0, 0, PROTOBUF_FIELD_OFFSET(ConstantValueComposite, _impl_.type_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // uint32 type = 1; - {PROTOBUF_FIELD_OFFSET(ConstantValueComposite, _impl_.type_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - // repeated uint32 elements = 2; - {PROTOBUF_FIELD_OFFSET(ConstantValueComposite, _impl_.elements_), -1, 0, (0 | ::_fl::kFcRepeated | ::_fl::kPackedUInt32)}, - }}, - // no aux_entries - {{ - }}, -}; -PROTOBUF_NOINLINE void ConstantValueComposite::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.ConstantValueComposite) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.elements_.Clear(); - _impl_.type_ = 0u; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL ConstantValueComposite::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const ConstantValueComposite& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL ConstantValueComposite::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const ConstantValueComposite& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.ConstantValueComposite) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // uint32 type = 1; - if ((this_._impl_._has_bits_[0] & 0x00000001U) != 0) { - if (this_._internal_type() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 1, this_._internal_type(), target); - } - } - - // repeated uint32 elements = 2; - { - int byte_size = this_._impl_._elements_cached_byte_size_.Get(); - if (byte_size > 0) { - target = stream->WriteUInt32Packed( - 2, this_._internal_elements(), byte_size, target); - } - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.ConstantValueComposite) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t ConstantValueComposite::ByteSizeLong(const MessageLite& base) { - const ConstantValueComposite& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t ConstantValueComposite::ByteSizeLong() const { - const ConstantValueComposite& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.ConstantValueComposite) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - ::_pbi::Prefetch5LinesFrom7Lines(&this_); - { - // repeated uint32 elements = 2; - { - total_size += - ::_pbi::WireFormatLite::UInt32SizeWithPackedTagSize( - this_._internal_elements(), 1, - this_._impl_._elements_cached_byte_size_); - } - } - { - // uint32 type = 1; - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000001U) != 0) { - if (this_._internal_type() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_type()); - } - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void ConstantValueComposite::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.ConstantValueComposite) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - _this->_internal_mutable_elements()->MergeFrom(from._internal_elements()); - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000001U) != 0) { - if (from._internal_type() != 0) { - _this->_impl_.type_ = from._impl_.type_; - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void ConstantValueComposite::CopyFrom(const ConstantValueComposite& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.ConstantValueComposite) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void ConstantValueComposite::InternalSwap(ConstantValueComposite* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - _impl_.elements_.InternalSwap(&other->_impl_.elements_); - swap(_impl_.type_, other->_impl_.type_); -} - -::google::protobuf::Metadata ConstantValueComposite::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class ConstantValueSplat::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(ConstantValueSplat, _impl_._has_bits_); -}; - -ConstantValueSplat::ConstantValueSplat(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, ConstantValueSplat_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.ConstantValueSplat) -} -ConstantValueSplat::ConstantValueSplat( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ConstantValueSplat& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, ConstantValueSplat_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(from._impl_) { - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); -} -PROTOBUF_NDEBUG_INLINE ConstantValueSplat::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0} {} - -inline void ConstantValueSplat::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - ::memset(reinterpret_cast(&_impl_) + - offsetof(Impl_, type_), - 0, - offsetof(Impl_, count_) - - offsetof(Impl_, type_) + - sizeof(Impl_::count_)); -} -ConstantValueSplat::~ConstantValueSplat() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.ConstantValueSplat) - SharedDtor(*this); -} -inline void ConstantValueSplat::SharedDtor(MessageLite& self) { - ConstantValueSplat& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL ConstantValueSplat::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) ConstantValueSplat(arena); -} -constexpr auto ConstantValueSplat::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(ConstantValueSplat), - alignof(ConstantValueSplat)); -} -constexpr auto ConstantValueSplat::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_ConstantValueSplat_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &ConstantValueSplat::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &ConstantValueSplat::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &ConstantValueSplat::ByteSizeLong, - &ConstantValueSplat::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(ConstantValueSplat, _impl_._cached_size_), - false, - }, - &ConstantValueSplat::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull ConstantValueSplat_class_data_ = - ConstantValueSplat::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -ConstantValueSplat::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&ConstantValueSplat_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(ConstantValueSplat_class_data_.tc_table); - return ConstantValueSplat_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<2, 3, 0, 0, 2> -ConstantValueSplat::_table_ = { - { - PROTOBUF_FIELD_OFFSET(ConstantValueSplat, _impl_._has_bits_), - 0, // no _extensions_ - 3, 24, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967288, // skipmap - offsetof(decltype(_table_), field_entries), - 3, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - ConstantValueSplat_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::ConstantValueSplat>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - // uint32 type = 1; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(ConstantValueSplat, _impl_.type_), 0>(), - {8, 0, 0, PROTOBUF_FIELD_OFFSET(ConstantValueSplat, _impl_.type_)}}, - // uint32 elements = 2; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(ConstantValueSplat, _impl_.elements_), 1>(), - {16, 1, 0, PROTOBUF_FIELD_OFFSET(ConstantValueSplat, _impl_.elements_)}}, - // uint32 count = 3; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(ConstantValueSplat, _impl_.count_), 2>(), - {24, 2, 0, PROTOBUF_FIELD_OFFSET(ConstantValueSplat, _impl_.count_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // uint32 type = 1; - {PROTOBUF_FIELD_OFFSET(ConstantValueSplat, _impl_.type_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - // uint32 elements = 2; - {PROTOBUF_FIELD_OFFSET(ConstantValueSplat, _impl_.elements_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - // uint32 count = 3; - {PROTOBUF_FIELD_OFFSET(ConstantValueSplat, _impl_.count_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - }}, - // no aux_entries - {{ - }}, -}; -PROTOBUF_NOINLINE void ConstantValueSplat::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.ConstantValueSplat) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000007U) != 0) { - ::memset(&_impl_.type_, 0, static_cast<::size_t>( - reinterpret_cast(&_impl_.count_) - - reinterpret_cast(&_impl_.type_)) + sizeof(_impl_.count_)); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL ConstantValueSplat::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const ConstantValueSplat& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL ConstantValueSplat::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const ConstantValueSplat& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.ConstantValueSplat) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // uint32 type = 1; - if ((this_._impl_._has_bits_[0] & 0x00000001U) != 0) { - if (this_._internal_type() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 1, this_._internal_type(), target); - } - } - - // uint32 elements = 2; - if ((this_._impl_._has_bits_[0] & 0x00000002U) != 0) { - if (this_._internal_elements() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 2, this_._internal_elements(), target); - } - } - - // uint32 count = 3; - if ((this_._impl_._has_bits_[0] & 0x00000004U) != 0) { - if (this_._internal_count() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 3, this_._internal_count(), target); - } - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.ConstantValueSplat) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t ConstantValueSplat::ByteSizeLong(const MessageLite& base) { - const ConstantValueSplat& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t ConstantValueSplat::ByteSizeLong() const { - const ConstantValueSplat& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.ConstantValueSplat) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - ::_pbi::Prefetch5LinesFrom7Lines(&this_); - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000007U) != 0) { - // uint32 type = 1; - if ((cached_has_bits & 0x00000001U) != 0) { - if (this_._internal_type() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_type()); - } - } - // uint32 elements = 2; - if ((cached_has_bits & 0x00000002U) != 0) { - if (this_._internal_elements() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_elements()); - } - } - // uint32 count = 3; - if ((cached_has_bits & 0x00000004U) != 0) { - if (this_._internal_count() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_count()); - } - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void ConstantValueSplat::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.ConstantValueSplat) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000007U) != 0) { - if ((cached_has_bits & 0x00000001U) != 0) { - if (from._internal_type() != 0) { - _this->_impl_.type_ = from._impl_.type_; - } - } - if ((cached_has_bits & 0x00000002U) != 0) { - if (from._internal_elements() != 0) { - _this->_impl_.elements_ = from._impl_.elements_; - } - } - if ((cached_has_bits & 0x00000004U) != 0) { - if (from._internal_count() != 0) { - _this->_impl_.count_ = from._impl_.count_; - } - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void ConstantValueSplat::CopyFrom(const ConstantValueSplat& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.ConstantValueSplat) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void ConstantValueSplat::InternalSwap(ConstantValueSplat* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::google::protobuf::internal::memswap< - PROTOBUF_FIELD_OFFSET(ConstantValueSplat, _impl_.count_) - + sizeof(ConstantValueSplat::_impl_.count_) - - PROTOBUF_FIELD_OFFSET(ConstantValueSplat, _impl_.type_)>( - reinterpret_cast(&_impl_.type_), - reinterpret_cast(&other->_impl_.type_)); -} - -::google::protobuf::Metadata ConstantValueSplat::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class Function::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(Function, _impl_._has_bits_); -}; - -Function::Function(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, Function_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.Function) -} -PROTOBUF_NDEBUG_INLINE Function::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - [[maybe_unused]] const ::tint::core::ir::binary::pb::Function& from_msg) - : _has_bits_{from._has_bits_}, - _cached_size_{0}, - parameters_{visibility, arena, from.parameters_}, - _parameters_cached_byte_size_{0}, - name_(arena, from.name_) {} - -Function::Function( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const Function& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, Function_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - Function* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); - ::uint32_t cached_has_bits = _impl_._has_bits_[0]; - _impl_.workgroup_size_ = ((cached_has_bits & 0x00000002U) != 0) - ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.workgroup_size_) - : nullptr; - _impl_.return_interpolation_ = ((cached_has_bits & 0x00000004U) != 0) - ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.return_interpolation_) - : nullptr; - ::memcpy(reinterpret_cast(&_impl_) + - offsetof(Impl_, return_type_), - reinterpret_cast(&from._impl_) + - offsetof(Impl_, return_type_), - offsetof(Impl_, subgroup_size_) - - offsetof(Impl_, return_type_) + - sizeof(Impl_::subgroup_size_)); - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.Function) -} -PROTOBUF_NDEBUG_INLINE Function::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0}, - parameters_{visibility, arena}, - _parameters_cached_byte_size_{0}, - name_(arena) {} - -inline void Function::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - ::memset(reinterpret_cast(&_impl_) + - offsetof(Impl_, workgroup_size_), - 0, - offsetof(Impl_, subgroup_size_) - - offsetof(Impl_, workgroup_size_) + - sizeof(Impl_::subgroup_size_)); -} -Function::~Function() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.Function) - SharedDtor(*this); -} -inline void Function::SharedDtor(MessageLite& self) { - Function& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.name_.Destroy(); - delete this_._impl_.workgroup_size_; - delete this_._impl_.return_interpolation_; - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL Function::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) Function(arena); -} -constexpr auto Function::InternalNewImpl_() { - constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ - PROTOBUF_FIELD_OFFSET(Function, _impl_.parameters_) + - decltype(Function::_impl_.parameters_):: - InternalGetArenaOffset( - ::google::protobuf::Message::internal_visibility()), - }); - if constexpr (arena_bits.has_value()) { - return ::google::protobuf::internal::MessageCreator::CopyInit( - sizeof(Function), alignof(Function), *arena_bits); - } else { - return ::google::protobuf::internal::MessageCreator(&Function::PlacementNew_, - sizeof(Function), - alignof(Function)); - } -} -constexpr auto Function::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_Function_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &Function::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &Function::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &Function::ByteSizeLong, - &Function::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(Function, _impl_._cached_size_), - false, - }, - &Function::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull Function_class_data_ = - Function::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -Function::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&Function_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(Function_class_data_.tc_table); - return Function_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<4, 11, 2, 52, 2> -Function::_table_ = { - { - PROTOBUF_FIELD_OFFSET(Function, _impl_._has_bits_), - 0, // no _extensions_ - 11, 120, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294965248, // skipmap - offsetof(decltype(_table_), field_entries), - 11, // num_field_entries - 2, // num_aux_entries - offsetof(decltype(_table_), aux_entries), - Function_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::Function>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - // uint32 return_type = 1; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Function, _impl_.return_type_), 3>(), - {8, 3, 0, PROTOBUF_FIELD_OFFSET(Function, _impl_.return_type_)}}, - // uint32 block = 2; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Function, _impl_.block_), 4>(), - {16, 4, 0, PROTOBUF_FIELD_OFFSET(Function, _impl_.block_)}}, - // optional string name = 3; - {::_pbi::TcParser::FastUS1, - {26, 0, 0, PROTOBUF_FIELD_OFFSET(Function, _impl_.name_)}}, - // optional .tint.core.ir.binary.pb.PipelineStage pipeline_stage = 4; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Function, _impl_.pipeline_stage_), 5>(), - {32, 5, 0, PROTOBUF_FIELD_OFFSET(Function, _impl_.pipeline_stage_)}}, - // optional .tint.core.ir.binary.pb.WorkgroupSize workgroup_size = 5; - {::_pbi::TcParser::FastMtS1, - {42, 1, 0, PROTOBUF_FIELD_OFFSET(Function, _impl_.workgroup_size_)}}, - // repeated uint32 parameters = 6; - {::_pbi::TcParser::FastV32P1, - {50, 63, 0, PROTOBUF_FIELD_OFFSET(Function, _impl_.parameters_)}}, - // optional uint32 return_location = 7; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Function, _impl_.return_location_), 6>(), - {56, 6, 0, PROTOBUF_FIELD_OFFSET(Function, _impl_.return_location_)}}, - // optional .tint.core.ir.binary.pb.Interpolation return_interpolation = 8; - {::_pbi::TcParser::FastMtS1, - {66, 2, 1, PROTOBUF_FIELD_OFFSET(Function, _impl_.return_interpolation_)}}, - // optional .tint.core.ir.binary.pb.BuiltinValue return_builtin = 9; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Function, _impl_.return_builtin_), 7>(), - {72, 7, 0, PROTOBUF_FIELD_OFFSET(Function, _impl_.return_builtin_)}}, - // bool return_invariant = 10; - {::_pbi::TcParser::SingularVarintNoZag1(), - {80, 8, 0, PROTOBUF_FIELD_OFFSET(Function, _impl_.return_invariant_)}}, - // optional uint32 subgroup_size = 11; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Function, _impl_.subgroup_size_), 9>(), - {88, 9, 0, PROTOBUF_FIELD_OFFSET(Function, _impl_.subgroup_size_)}}, - {::_pbi::TcParser::MiniParse, {}}, - {::_pbi::TcParser::MiniParse, {}}, - {::_pbi::TcParser::MiniParse, {}}, - {::_pbi::TcParser::MiniParse, {}}, - }}, {{ - 65535, 65535 - }}, {{ - // uint32 return_type = 1; - {PROTOBUF_FIELD_OFFSET(Function, _impl_.return_type_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - // uint32 block = 2; - {PROTOBUF_FIELD_OFFSET(Function, _impl_.block_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - // optional string name = 3; - {PROTOBUF_FIELD_OFFSET(Function, _impl_.name_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, - // optional .tint.core.ir.binary.pb.PipelineStage pipeline_stage = 4; - {PROTOBUF_FIELD_OFFSET(Function, _impl_.pipeline_stage_), _Internal::kHasBitsOffset + 5, 0, (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)}, - // optional .tint.core.ir.binary.pb.WorkgroupSize workgroup_size = 5; - {PROTOBUF_FIELD_OFFSET(Function, _impl_.workgroup_size_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, - // repeated uint32 parameters = 6; - {PROTOBUF_FIELD_OFFSET(Function, _impl_.parameters_), -1, 0, (0 | ::_fl::kFcRepeated | ::_fl::kPackedUInt32)}, - // optional uint32 return_location = 7; - {PROTOBUF_FIELD_OFFSET(Function, _impl_.return_location_), _Internal::kHasBitsOffset + 6, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - // optional .tint.core.ir.binary.pb.Interpolation return_interpolation = 8; - {PROTOBUF_FIELD_OFFSET(Function, _impl_.return_interpolation_), _Internal::kHasBitsOffset + 2, 1, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, - // optional .tint.core.ir.binary.pb.BuiltinValue return_builtin = 9; - {PROTOBUF_FIELD_OFFSET(Function, _impl_.return_builtin_), _Internal::kHasBitsOffset + 7, 0, (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)}, - // bool return_invariant = 10; - {PROTOBUF_FIELD_OFFSET(Function, _impl_.return_invariant_), _Internal::kHasBitsOffset + 8, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, - // optional uint32 subgroup_size = 11; - {PROTOBUF_FIELD_OFFSET(Function, _impl_.subgroup_size_), _Internal::kHasBitsOffset + 9, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - }}, - {{ - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::WorkgroupSize>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::Interpolation>()}, - }}, - {{ - "\37\0\0\4\0\0\0\0\0\0\0\0\0\0\0\0" - "tint.core.ir.binary.pb.Function" - "name" - }}, -}; -PROTOBUF_NOINLINE void Function::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.Function) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.parameters_.Clear(); - cached_has_bits = _impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000007U) != 0) { - if ((cached_has_bits & 0x00000001U) != 0) { - _impl_.name_.ClearNonDefaultToEmpty(); - } - if ((cached_has_bits & 0x00000002U) != 0) { - ABSL_DCHECK(_impl_.workgroup_size_ != nullptr); - _impl_.workgroup_size_->Clear(); - } - if ((cached_has_bits & 0x00000004U) != 0) { - ABSL_DCHECK(_impl_.return_interpolation_ != nullptr); - _impl_.return_interpolation_->Clear(); - } - } - if ((cached_has_bits & 0x000000f8U) != 0) { - ::memset(&_impl_.return_type_, 0, static_cast<::size_t>( - reinterpret_cast(&_impl_.return_builtin_) - - reinterpret_cast(&_impl_.return_type_)) + sizeof(_impl_.return_builtin_)); - } - if ((cached_has_bits & 0x00000300U) != 0) { - ::memset(&_impl_.return_invariant_, 0, static_cast<::size_t>( - reinterpret_cast(&_impl_.subgroup_size_) - - reinterpret_cast(&_impl_.return_invariant_)) + sizeof(_impl_.subgroup_size_)); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL Function::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const Function& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL Function::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const Function& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.Function) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // uint32 return_type = 1; - if ((this_._impl_._has_bits_[0] & 0x00000008U) != 0) { - if (this_._internal_return_type() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 1, this_._internal_return_type(), target); - } - } - - // uint32 block = 2; - if ((this_._impl_._has_bits_[0] & 0x00000010U) != 0) { - if (this_._internal_block() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 2, this_._internal_block(), target); - } - } - - cached_has_bits = this_._impl_._has_bits_[0]; - // optional string name = 3; - if ((cached_has_bits & 0x00000001U) != 0) { - const ::std::string& _s = this_._internal_name(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tint.core.ir.binary.pb.Function.name"); - target = stream->WriteStringMaybeAliased(3, _s, target); - } - - // optional .tint.core.ir.binary.pb.PipelineStage pipeline_stage = 4; - if ((cached_has_bits & 0x00000020U) != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 4, this_._internal_pipeline_stage(), target); - } - - // optional .tint.core.ir.binary.pb.WorkgroupSize workgroup_size = 5; - if ((cached_has_bits & 0x00000002U) != 0) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 5, *this_._impl_.workgroup_size_, this_._impl_.workgroup_size_->GetCachedSize(), target, - stream); - } - - // repeated uint32 parameters = 6; - { - int byte_size = this_._impl_._parameters_cached_byte_size_.Get(); - if (byte_size > 0) { - target = stream->WriteUInt32Packed( - 6, this_._internal_parameters(), byte_size, target); - } - } - - // optional uint32 return_location = 7; - if ((cached_has_bits & 0x00000040U) != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 7, this_._internal_return_location(), target); - } - - // optional .tint.core.ir.binary.pb.Interpolation return_interpolation = 8; - if ((cached_has_bits & 0x00000004U) != 0) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 8, *this_._impl_.return_interpolation_, this_._impl_.return_interpolation_->GetCachedSize(), target, - stream); - } - - // optional .tint.core.ir.binary.pb.BuiltinValue return_builtin = 9; - if ((cached_has_bits & 0x00000080U) != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 9, this_._internal_return_builtin(), target); - } - - // bool return_invariant = 10; - if ((cached_has_bits & 0x00000100U) != 0) { - if (this_._internal_return_invariant() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 10, this_._internal_return_invariant(), target); - } - } - - // optional uint32 subgroup_size = 11; - if ((cached_has_bits & 0x00000200U) != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 11, this_._internal_subgroup_size(), target); - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.Function) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t Function::ByteSizeLong(const MessageLite& base) { - const Function& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t Function::ByteSizeLong() const { - const Function& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.Function) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - ::_pbi::Prefetch5LinesFrom7Lines(&this_); - { - // repeated uint32 parameters = 6; - { - total_size += - ::_pbi::WireFormatLite::UInt32SizeWithPackedTagSize( - this_._internal_parameters(), 1, - this_._impl_._parameters_cached_byte_size_); - } - } - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x000000ffU) != 0) { - // optional string name = 3; - if ((cached_has_bits & 0x00000001U) != 0) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this_._internal_name()); - } - // optional .tint.core.ir.binary.pb.WorkgroupSize workgroup_size = 5; - if ((cached_has_bits & 0x00000002U) != 0) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.workgroup_size_); - } - // optional .tint.core.ir.binary.pb.Interpolation return_interpolation = 8; - if ((cached_has_bits & 0x00000004U) != 0) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.return_interpolation_); - } - // uint32 return_type = 1; - if ((cached_has_bits & 0x00000008U) != 0) { - if (this_._internal_return_type() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_return_type()); - } - } - // uint32 block = 2; - if ((cached_has_bits & 0x00000010U) != 0) { - if (this_._internal_block() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_block()); - } - } - // optional .tint.core.ir.binary.pb.PipelineStage pipeline_stage = 4; - if ((cached_has_bits & 0x00000020U) != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this_._internal_pipeline_stage()); - } - // optional uint32 return_location = 7; - if ((cached_has_bits & 0x00000040U) != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_return_location()); - } - // optional .tint.core.ir.binary.pb.BuiltinValue return_builtin = 9; - if ((cached_has_bits & 0x00000080U) != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this_._internal_return_builtin()); - } - } - if ((cached_has_bits & 0x00000300U) != 0) { - // bool return_invariant = 10; - if ((cached_has_bits & 0x00000100U) != 0) { - if (this_._internal_return_invariant() != 0) { - total_size += 2; - } - } - // optional uint32 subgroup_size = 11; - if ((cached_has_bits & 0x00000200U) != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_subgroup_size()); - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void Function::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - ::google::protobuf::Arena* arena = _this->GetArena(); - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.Function) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - _this->_internal_mutable_parameters()->MergeFrom(from._internal_parameters()); - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x000000ffU) != 0) { - if ((cached_has_bits & 0x00000001U) != 0) { - _this->_internal_set_name(from._internal_name()); - } - if ((cached_has_bits & 0x00000002U) != 0) { - ABSL_DCHECK(from._impl_.workgroup_size_ != nullptr); - if (_this->_impl_.workgroup_size_ == nullptr) { - _this->_impl_.workgroup_size_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.workgroup_size_); - } else { - _this->_impl_.workgroup_size_->MergeFrom(*from._impl_.workgroup_size_); - } - } - if ((cached_has_bits & 0x00000004U) != 0) { - ABSL_DCHECK(from._impl_.return_interpolation_ != nullptr); - if (_this->_impl_.return_interpolation_ == nullptr) { - _this->_impl_.return_interpolation_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.return_interpolation_); - } else { - _this->_impl_.return_interpolation_->MergeFrom(*from._impl_.return_interpolation_); - } - } - if ((cached_has_bits & 0x00000008U) != 0) { - if (from._internal_return_type() != 0) { - _this->_impl_.return_type_ = from._impl_.return_type_; - } - } - if ((cached_has_bits & 0x00000010U) != 0) { - if (from._internal_block() != 0) { - _this->_impl_.block_ = from._impl_.block_; - } - } - if ((cached_has_bits & 0x00000020U) != 0) { - _this->_impl_.pipeline_stage_ = from._impl_.pipeline_stage_; - } - if ((cached_has_bits & 0x00000040U) != 0) { - _this->_impl_.return_location_ = from._impl_.return_location_; - } - if ((cached_has_bits & 0x00000080U) != 0) { - _this->_impl_.return_builtin_ = from._impl_.return_builtin_; - } - } - if ((cached_has_bits & 0x00000300U) != 0) { - if ((cached_has_bits & 0x00000100U) != 0) { - if (from._internal_return_invariant() != 0) { - _this->_impl_.return_invariant_ = from._impl_.return_invariant_; - } - } - if ((cached_has_bits & 0x00000200U) != 0) { - _this->_impl_.subgroup_size_ = from._impl_.subgroup_size_; - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void Function::CopyFrom(const Function& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.Function) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void Function::InternalSwap(Function* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - auto* arena = GetArena(); - ABSL_DCHECK_EQ(arena, other->GetArena()); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - _impl_.parameters_.InternalSwap(&other->_impl_.parameters_); - ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena); - ::google::protobuf::internal::memswap< - PROTOBUF_FIELD_OFFSET(Function, _impl_.subgroup_size_) - + sizeof(Function::_impl_.subgroup_size_) - - PROTOBUF_FIELD_OFFSET(Function, _impl_.workgroup_size_)>( - reinterpret_cast(&_impl_.workgroup_size_), - reinterpret_cast(&other->_impl_.workgroup_size_)); -} - -::google::protobuf::Metadata Function::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class WorkgroupSize::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(WorkgroupSize, _impl_._has_bits_); -}; - -WorkgroupSize::WorkgroupSize(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, WorkgroupSize_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.WorkgroupSize) -} -WorkgroupSize::WorkgroupSize( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const WorkgroupSize& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, WorkgroupSize_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(from._impl_) { - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); -} -PROTOBUF_NDEBUG_INLINE WorkgroupSize::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0} {} - -inline void WorkgroupSize::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - ::memset(reinterpret_cast(&_impl_) + - offsetof(Impl_, x_), - 0, - offsetof(Impl_, z_) - - offsetof(Impl_, x_) + - sizeof(Impl_::z_)); -} -WorkgroupSize::~WorkgroupSize() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.WorkgroupSize) - SharedDtor(*this); -} -inline void WorkgroupSize::SharedDtor(MessageLite& self) { - WorkgroupSize& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL WorkgroupSize::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) WorkgroupSize(arena); -} -constexpr auto WorkgroupSize::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(WorkgroupSize), - alignof(WorkgroupSize)); -} -constexpr auto WorkgroupSize::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_WorkgroupSize_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &WorkgroupSize::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &WorkgroupSize::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &WorkgroupSize::ByteSizeLong, - &WorkgroupSize::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(WorkgroupSize, _impl_._cached_size_), - false, - }, - &WorkgroupSize::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull WorkgroupSize_class_data_ = - WorkgroupSize::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -WorkgroupSize::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&WorkgroupSize_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(WorkgroupSize_class_data_.tc_table); - return WorkgroupSize_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<2, 3, 0, 0, 2> -WorkgroupSize::_table_ = { - { - PROTOBUF_FIELD_OFFSET(WorkgroupSize, _impl_._has_bits_), - 0, // no _extensions_ - 3, 24, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967288, // skipmap - offsetof(decltype(_table_), field_entries), - 3, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - WorkgroupSize_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::WorkgroupSize>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - // uint32 x = 1; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(WorkgroupSize, _impl_.x_), 0>(), - {8, 0, 0, PROTOBUF_FIELD_OFFSET(WorkgroupSize, _impl_.x_)}}, - // uint32 y = 2; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(WorkgroupSize, _impl_.y_), 1>(), - {16, 1, 0, PROTOBUF_FIELD_OFFSET(WorkgroupSize, _impl_.y_)}}, - // uint32 z = 3; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(WorkgroupSize, _impl_.z_), 2>(), - {24, 2, 0, PROTOBUF_FIELD_OFFSET(WorkgroupSize, _impl_.z_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // uint32 x = 1; - {PROTOBUF_FIELD_OFFSET(WorkgroupSize, _impl_.x_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - // uint32 y = 2; - {PROTOBUF_FIELD_OFFSET(WorkgroupSize, _impl_.y_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - // uint32 z = 3; - {PROTOBUF_FIELD_OFFSET(WorkgroupSize, _impl_.z_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - }}, - // no aux_entries - {{ - }}, -}; -PROTOBUF_NOINLINE void WorkgroupSize::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.WorkgroupSize) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000007U) != 0) { - ::memset(&_impl_.x_, 0, static_cast<::size_t>( - reinterpret_cast(&_impl_.z_) - - reinterpret_cast(&_impl_.x_)) + sizeof(_impl_.z_)); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL WorkgroupSize::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const WorkgroupSize& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL WorkgroupSize::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const WorkgroupSize& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.WorkgroupSize) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // uint32 x = 1; - if ((this_._impl_._has_bits_[0] & 0x00000001U) != 0) { - if (this_._internal_x() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 1, this_._internal_x(), target); - } - } - - // uint32 y = 2; - if ((this_._impl_._has_bits_[0] & 0x00000002U) != 0) { - if (this_._internal_y() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 2, this_._internal_y(), target); - } - } - - // uint32 z = 3; - if ((this_._impl_._has_bits_[0] & 0x00000004U) != 0) { - if (this_._internal_z() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 3, this_._internal_z(), target); - } - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.WorkgroupSize) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t WorkgroupSize::ByteSizeLong(const MessageLite& base) { - const WorkgroupSize& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t WorkgroupSize::ByteSizeLong() const { - const WorkgroupSize& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.WorkgroupSize) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - ::_pbi::Prefetch5LinesFrom7Lines(&this_); - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000007U) != 0) { - // uint32 x = 1; - if ((cached_has_bits & 0x00000001U) != 0) { - if (this_._internal_x() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_x()); - } - } - // uint32 y = 2; - if ((cached_has_bits & 0x00000002U) != 0) { - if (this_._internal_y() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_y()); - } - } - // uint32 z = 3; - if ((cached_has_bits & 0x00000004U) != 0) { - if (this_._internal_z() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_z()); - } - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void WorkgroupSize::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.WorkgroupSize) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000007U) != 0) { - if ((cached_has_bits & 0x00000001U) != 0) { - if (from._internal_x() != 0) { - _this->_impl_.x_ = from._impl_.x_; - } - } - if ((cached_has_bits & 0x00000002U) != 0) { - if (from._internal_y() != 0) { - _this->_impl_.y_ = from._impl_.y_; - } - } - if ((cached_has_bits & 0x00000004U) != 0) { - if (from._internal_z() != 0) { - _this->_impl_.z_ = from._impl_.z_; - } - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void WorkgroupSize::CopyFrom(const WorkgroupSize& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.WorkgroupSize) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void WorkgroupSize::InternalSwap(WorkgroupSize* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::google::protobuf::internal::memswap< - PROTOBUF_FIELD_OFFSET(WorkgroupSize, _impl_.z_) - + sizeof(WorkgroupSize::_impl_.z_) - - PROTOBUF_FIELD_OFFSET(WorkgroupSize, _impl_.x_)>( - reinterpret_cast(&_impl_.x_), - reinterpret_cast(&other->_impl_.x_)); -} - -::google::protobuf::Metadata WorkgroupSize::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class Block::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(Block, _impl_._has_bits_); -}; - -Block::Block(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, Block_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.Block) -} -PROTOBUF_NDEBUG_INLINE Block::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - [[maybe_unused]] const ::tint::core::ir::binary::pb::Block& from_msg) - : _has_bits_{from._has_bits_}, - _cached_size_{0}, - parameters_{visibility, arena, from.parameters_}, - _parameters_cached_byte_size_{0}, - instructions_{visibility, arena, from.instructions_} {} - -Block::Block( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const Block& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, Block_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - Block* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); - _impl_.is_multi_in_ = from._impl_.is_multi_in_; - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.Block) -} -PROTOBUF_NDEBUG_INLINE Block::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0}, - parameters_{visibility, arena}, - _parameters_cached_byte_size_{0}, - instructions_{visibility, arena} {} - -inline void Block::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - _impl_.is_multi_in_ = {}; -} -Block::~Block() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.Block) - SharedDtor(*this); -} -inline void Block::SharedDtor(MessageLite& self) { - Block& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL Block::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) Block(arena); -} -constexpr auto Block::InternalNewImpl_() { - constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ - PROTOBUF_FIELD_OFFSET(Block, _impl_.parameters_) + - decltype(Block::_impl_.parameters_):: - InternalGetArenaOffset( - ::google::protobuf::Message::internal_visibility()), - PROTOBUF_FIELD_OFFSET(Block, _impl_.instructions_) + - decltype(Block::_impl_.instructions_):: - InternalGetArenaOffset( - ::google::protobuf::Message::internal_visibility()), - }); - if constexpr (arena_bits.has_value()) { - return ::google::protobuf::internal::MessageCreator::ZeroInit( - sizeof(Block), alignof(Block), *arena_bits); - } else { - return ::google::protobuf::internal::MessageCreator(&Block::PlacementNew_, - sizeof(Block), - alignof(Block)); - } -} -constexpr auto Block::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_Block_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &Block::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &Block::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &Block::ByteSizeLong, - &Block::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(Block, _impl_._cached_size_), - false, - }, - &Block::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull Block_class_data_ = - Block::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -Block::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&Block_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(Block_class_data_.tc_table); - return Block_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<2, 3, 1, 0, 2> -Block::_table_ = { - { - PROTOBUF_FIELD_OFFSET(Block, _impl_._has_bits_), - 0, // no _extensions_ - 3, 24, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967288, // skipmap - offsetof(decltype(_table_), field_entries), - 3, // num_field_entries - 1, // num_aux_entries - offsetof(decltype(_table_), aux_entries), - Block_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::Block>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - // repeated uint32 parameters = 1; - {::_pbi::TcParser::FastV32P1, - {10, 63, 0, PROTOBUF_FIELD_OFFSET(Block, _impl_.parameters_)}}, - // repeated .tint.core.ir.binary.pb.Instruction instructions = 2; - {::_pbi::TcParser::FastMtR1, - {18, 63, 0, PROTOBUF_FIELD_OFFSET(Block, _impl_.instructions_)}}, - // bool is_multi_in = 3; - {::_pbi::TcParser::SingularVarintNoZag1(), - {24, 0, 0, PROTOBUF_FIELD_OFFSET(Block, _impl_.is_multi_in_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // repeated uint32 parameters = 1; - {PROTOBUF_FIELD_OFFSET(Block, _impl_.parameters_), -1, 0, (0 | ::_fl::kFcRepeated | ::_fl::kPackedUInt32)}, - // repeated .tint.core.ir.binary.pb.Instruction instructions = 2; - {PROTOBUF_FIELD_OFFSET(Block, _impl_.instructions_), -1, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, - // bool is_multi_in = 3; - {PROTOBUF_FIELD_OFFSET(Block, _impl_.is_multi_in_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, - }}, - {{ - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::Instruction>()}, - }}, - {{ - }}, -}; -PROTOBUF_NOINLINE void Block::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.Block) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.parameters_.Clear(); - _impl_.instructions_.Clear(); - _impl_.is_multi_in_ = false; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL Block::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const Block& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL Block::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const Block& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.Block) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // repeated uint32 parameters = 1; - { - int byte_size = this_._impl_._parameters_cached_byte_size_.Get(); - if (byte_size > 0) { - target = stream->WriteUInt32Packed( - 1, this_._internal_parameters(), byte_size, target); - } - } - - // repeated .tint.core.ir.binary.pb.Instruction instructions = 2; - for (unsigned i = 0, n = static_cast( - this_._internal_instructions_size()); - i < n; i++) { - const auto& repfield = this_._internal_instructions().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 2, repfield, repfield.GetCachedSize(), - target, stream); - } - - // bool is_multi_in = 3; - if ((this_._impl_._has_bits_[0] & 0x00000001U) != 0) { - if (this_._internal_is_multi_in() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 3, this_._internal_is_multi_in(), target); - } - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.Block) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t Block::ByteSizeLong(const MessageLite& base) { - const Block& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t Block::ByteSizeLong() const { - const Block& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.Block) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - ::_pbi::Prefetch5LinesFrom7Lines(&this_); - { - // repeated uint32 parameters = 1; - { - total_size += - ::_pbi::WireFormatLite::UInt32SizeWithPackedTagSize( - this_._internal_parameters(), 1, - this_._impl_._parameters_cached_byte_size_); - } - // repeated .tint.core.ir.binary.pb.Instruction instructions = 2; - { - total_size += 1UL * this_._internal_instructions_size(); - for (const auto& msg : this_._internal_instructions()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - } - { - // bool is_multi_in = 3; - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000001U) != 0) { - if (this_._internal_is_multi_in() != 0) { - total_size += 2; - } - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void Block::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.Block) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - _this->_internal_mutable_parameters()->MergeFrom(from._internal_parameters()); - _this->_internal_mutable_instructions()->MergeFrom( - from._internal_instructions()); - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000001U) != 0) { - if (from._internal_is_multi_in() != 0) { - _this->_impl_.is_multi_in_ = from._impl_.is_multi_in_; - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void Block::CopyFrom(const Block& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.Block) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void Block::InternalSwap(Block* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - _impl_.parameters_.InternalSwap(&other->_impl_.parameters_); - _impl_.instructions_.InternalSwap(&other->_impl_.instructions_); - swap(_impl_.is_multi_in_, other->_impl_.is_multi_in_); -} - -::google::protobuf::Metadata Block::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class Instruction::_Internal { - public: - static constexpr ::int32_t kOneofCaseOffset = - PROTOBUF_FIELD_OFFSET(::tint::core::ir::binary::pb::Instruction, _impl_._oneof_case_); -}; - -void Instruction::set_allocated_return_(::tint::core::ir::binary::pb::InstructionReturn* PROTOBUF_NULLABLE return_) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (return_) { - ::google::protobuf::Arena* submessage_arena = return_->GetArena(); - if (message_arena != submessage_arena) { - return_ = ::google::protobuf::internal::GetOwnedMessage(message_arena, return_, submessage_arena); - } - set_has_return_(); - _impl_.kind_.return__ = return_; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Instruction.return) -} -void Instruction::set_allocated_unary(::tint::core::ir::binary::pb::InstructionUnary* PROTOBUF_NULLABLE unary) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (unary) { - ::google::protobuf::Arena* submessage_arena = unary->GetArena(); - if (message_arena != submessage_arena) { - unary = ::google::protobuf::internal::GetOwnedMessage(message_arena, unary, submessage_arena); - } - set_has_unary(); - _impl_.kind_.unary_ = unary; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Instruction.unary) -} -void Instruction::set_allocated_binary(::tint::core::ir::binary::pb::InstructionBinary* PROTOBUF_NULLABLE binary) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (binary) { - ::google::protobuf::Arena* submessage_arena = binary->GetArena(); - if (message_arena != submessage_arena) { - binary = ::google::protobuf::internal::GetOwnedMessage(message_arena, binary, submessage_arena); - } - set_has_binary(); - _impl_.kind_.binary_ = binary; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Instruction.binary) -} -void Instruction::set_allocated_discard(::tint::core::ir::binary::pb::InstructionDiscard* PROTOBUF_NULLABLE discard) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (discard) { - ::google::protobuf::Arena* submessage_arena = discard->GetArena(); - if (message_arena != submessage_arena) { - discard = ::google::protobuf::internal::GetOwnedMessage(message_arena, discard, submessage_arena); - } - set_has_discard(); - _impl_.kind_.discard_ = discard; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Instruction.discard) -} -void Instruction::set_allocated_let(::tint::core::ir::binary::pb::InstructionLet* PROTOBUF_NULLABLE let) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (let) { - ::google::protobuf::Arena* submessage_arena = let->GetArena(); - if (message_arena != submessage_arena) { - let = ::google::protobuf::internal::GetOwnedMessage(message_arena, let, submessage_arena); - } - set_has_let(); - _impl_.kind_.let_ = let; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Instruction.let) -} -void Instruction::set_allocated_var(::tint::core::ir::binary::pb::InstructionVar* PROTOBUF_NULLABLE var) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (var) { - ::google::protobuf::Arena* submessage_arena = var->GetArena(); - if (message_arena != submessage_arena) { - var = ::google::protobuf::internal::GetOwnedMessage(message_arena, var, submessage_arena); - } - set_has_var(); - _impl_.kind_.var_ = var; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Instruction.var) -} -void Instruction::set_allocated_bitcast(::tint::core::ir::binary::pb::InstructionBitcast* PROTOBUF_NULLABLE bitcast) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (bitcast) { - ::google::protobuf::Arena* submessage_arena = bitcast->GetArena(); - if (message_arena != submessage_arena) { - bitcast = ::google::protobuf::internal::GetOwnedMessage(message_arena, bitcast, submessage_arena); - } - set_has_bitcast(); - _impl_.kind_.bitcast_ = bitcast; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Instruction.bitcast) -} -void Instruction::set_allocated_construct(::tint::core::ir::binary::pb::InstructionConstruct* PROTOBUF_NULLABLE construct) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (construct) { - ::google::protobuf::Arena* submessage_arena = construct->GetArena(); - if (message_arena != submessage_arena) { - construct = ::google::protobuf::internal::GetOwnedMessage(message_arena, construct, submessage_arena); - } - set_has_construct(); - _impl_.kind_.construct_ = construct; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Instruction.construct) -} -void Instruction::set_allocated_convert(::tint::core::ir::binary::pb::InstructionConvert* PROTOBUF_NULLABLE convert) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (convert) { - ::google::protobuf::Arena* submessage_arena = convert->GetArena(); - if (message_arena != submessage_arena) { - convert = ::google::protobuf::internal::GetOwnedMessage(message_arena, convert, submessage_arena); - } - set_has_convert(); - _impl_.kind_.convert_ = convert; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Instruction.convert) -} -void Instruction::set_allocated_access(::tint::core::ir::binary::pb::InstructionAccess* PROTOBUF_NULLABLE access) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (access) { - ::google::protobuf::Arena* submessage_arena = access->GetArena(); - if (message_arena != submessage_arena) { - access = ::google::protobuf::internal::GetOwnedMessage(message_arena, access, submessage_arena); - } - set_has_access(); - _impl_.kind_.access_ = access; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Instruction.access) -} -void Instruction::set_allocated_user_call(::tint::core::ir::binary::pb::InstructionUserCall* PROTOBUF_NULLABLE user_call) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (user_call) { - ::google::protobuf::Arena* submessage_arena = user_call->GetArena(); - if (message_arena != submessage_arena) { - user_call = ::google::protobuf::internal::GetOwnedMessage(message_arena, user_call, submessage_arena); - } - set_has_user_call(); - _impl_.kind_.user_call_ = user_call; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Instruction.user_call) -} -void Instruction::set_allocated_builtin_call(::tint::core::ir::binary::pb::InstructionBuiltinCall* PROTOBUF_NULLABLE builtin_call) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (builtin_call) { - ::google::protobuf::Arena* submessage_arena = builtin_call->GetArena(); - if (message_arena != submessage_arena) { - builtin_call = ::google::protobuf::internal::GetOwnedMessage(message_arena, builtin_call, submessage_arena); - } - set_has_builtin_call(); - _impl_.kind_.builtin_call_ = builtin_call; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Instruction.builtin_call) -} -void Instruction::set_allocated_load(::tint::core::ir::binary::pb::InstructionLoad* PROTOBUF_NULLABLE load) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (load) { - ::google::protobuf::Arena* submessage_arena = load->GetArena(); - if (message_arena != submessage_arena) { - load = ::google::protobuf::internal::GetOwnedMessage(message_arena, load, submessage_arena); - } - set_has_load(); - _impl_.kind_.load_ = load; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Instruction.load) -} -void Instruction::set_allocated_store(::tint::core::ir::binary::pb::InstructionStore* PROTOBUF_NULLABLE store) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (store) { - ::google::protobuf::Arena* submessage_arena = store->GetArena(); - if (message_arena != submessage_arena) { - store = ::google::protobuf::internal::GetOwnedMessage(message_arena, store, submessage_arena); - } - set_has_store(); - _impl_.kind_.store_ = store; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Instruction.store) -} -void Instruction::set_allocated_load_vector_element(::tint::core::ir::binary::pb::InstructionLoadVectorElement* PROTOBUF_NULLABLE load_vector_element) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (load_vector_element) { - ::google::protobuf::Arena* submessage_arena = load_vector_element->GetArena(); - if (message_arena != submessage_arena) { - load_vector_element = ::google::protobuf::internal::GetOwnedMessage(message_arena, load_vector_element, submessage_arena); - } - set_has_load_vector_element(); - _impl_.kind_.load_vector_element_ = load_vector_element; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Instruction.load_vector_element) -} -void Instruction::set_allocated_store_vector_element(::tint::core::ir::binary::pb::InstructionStoreVectorElement* PROTOBUF_NULLABLE store_vector_element) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (store_vector_element) { - ::google::protobuf::Arena* submessage_arena = store_vector_element->GetArena(); - if (message_arena != submessage_arena) { - store_vector_element = ::google::protobuf::internal::GetOwnedMessage(message_arena, store_vector_element, submessage_arena); - } - set_has_store_vector_element(); - _impl_.kind_.store_vector_element_ = store_vector_element; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Instruction.store_vector_element) -} -void Instruction::set_allocated_swizzle(::tint::core::ir::binary::pb::InstructionSwizzle* PROTOBUF_NULLABLE swizzle) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (swizzle) { - ::google::protobuf::Arena* submessage_arena = swizzle->GetArena(); - if (message_arena != submessage_arena) { - swizzle = ::google::protobuf::internal::GetOwnedMessage(message_arena, swizzle, submessage_arena); - } - set_has_swizzle(); - _impl_.kind_.swizzle_ = swizzle; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Instruction.swizzle) -} -void Instruction::set_allocated_if_(::tint::core::ir::binary::pb::InstructionIf* PROTOBUF_NULLABLE if_) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (if_) { - ::google::protobuf::Arena* submessage_arena = if_->GetArena(); - if (message_arena != submessage_arena) { - if_ = ::google::protobuf::internal::GetOwnedMessage(message_arena, if_, submessage_arena); - } - set_has_if_(); - _impl_.kind_.if__ = if_; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Instruction.if) -} -void Instruction::set_allocated_switch_(::tint::core::ir::binary::pb::InstructionSwitch* PROTOBUF_NULLABLE switch_) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (switch_) { - ::google::protobuf::Arena* submessage_arena = switch_->GetArena(); - if (message_arena != submessage_arena) { - switch_ = ::google::protobuf::internal::GetOwnedMessage(message_arena, switch_, submessage_arena); - } - set_has_switch_(); - _impl_.kind_.switch__ = switch_; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Instruction.switch) -} -void Instruction::set_allocated_loop(::tint::core::ir::binary::pb::InstructionLoop* PROTOBUF_NULLABLE loop) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (loop) { - ::google::protobuf::Arena* submessage_arena = loop->GetArena(); - if (message_arena != submessage_arena) { - loop = ::google::protobuf::internal::GetOwnedMessage(message_arena, loop, submessage_arena); - } - set_has_loop(); - _impl_.kind_.loop_ = loop; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Instruction.loop) -} -void Instruction::set_allocated_exit_if(::tint::core::ir::binary::pb::InstructionExitIf* PROTOBUF_NULLABLE exit_if) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (exit_if) { - ::google::protobuf::Arena* submessage_arena = exit_if->GetArena(); - if (message_arena != submessage_arena) { - exit_if = ::google::protobuf::internal::GetOwnedMessage(message_arena, exit_if, submessage_arena); - } - set_has_exit_if(); - _impl_.kind_.exit_if_ = exit_if; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Instruction.exit_if) -} -void Instruction::set_allocated_exit_switch(::tint::core::ir::binary::pb::InstructionExitSwitch* PROTOBUF_NULLABLE exit_switch) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (exit_switch) { - ::google::protobuf::Arena* submessage_arena = exit_switch->GetArena(); - if (message_arena != submessage_arena) { - exit_switch = ::google::protobuf::internal::GetOwnedMessage(message_arena, exit_switch, submessage_arena); - } - set_has_exit_switch(); - _impl_.kind_.exit_switch_ = exit_switch; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Instruction.exit_switch) -} -void Instruction::set_allocated_exit_loop(::tint::core::ir::binary::pb::InstructionExitLoop* PROTOBUF_NULLABLE exit_loop) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (exit_loop) { - ::google::protobuf::Arena* submessage_arena = exit_loop->GetArena(); - if (message_arena != submessage_arena) { - exit_loop = ::google::protobuf::internal::GetOwnedMessage(message_arena, exit_loop, submessage_arena); - } - set_has_exit_loop(); - _impl_.kind_.exit_loop_ = exit_loop; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Instruction.exit_loop) -} -void Instruction::set_allocated_next_iteration(::tint::core::ir::binary::pb::InstructionNextIteration* PROTOBUF_NULLABLE next_iteration) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (next_iteration) { - ::google::protobuf::Arena* submessage_arena = next_iteration->GetArena(); - if (message_arena != submessage_arena) { - next_iteration = ::google::protobuf::internal::GetOwnedMessage(message_arena, next_iteration, submessage_arena); - } - set_has_next_iteration(); - _impl_.kind_.next_iteration_ = next_iteration; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Instruction.next_iteration) -} -void Instruction::set_allocated_continue_(::tint::core::ir::binary::pb::InstructionContinue* PROTOBUF_NULLABLE continue_) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (continue_) { - ::google::protobuf::Arena* submessage_arena = continue_->GetArena(); - if (message_arena != submessage_arena) { - continue_ = ::google::protobuf::internal::GetOwnedMessage(message_arena, continue_, submessage_arena); - } - set_has_continue_(); - _impl_.kind_.continue__ = continue_; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Instruction.continue) -} -void Instruction::set_allocated_break_if(::tint::core::ir::binary::pb::InstructionBreakIf* PROTOBUF_NULLABLE break_if) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (break_if) { - ::google::protobuf::Arena* submessage_arena = break_if->GetArena(); - if (message_arena != submessage_arena) { - break_if = ::google::protobuf::internal::GetOwnedMessage(message_arena, break_if, submessage_arena); - } - set_has_break_if(); - _impl_.kind_.break_if_ = break_if; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Instruction.break_if) -} -void Instruction::set_allocated_unreachable(::tint::core::ir::binary::pb::InstructionUnreachable* PROTOBUF_NULLABLE unreachable) { - ::google::protobuf::Arena* message_arena = GetArena(); - clear_kind(); - if (unreachable) { - ::google::protobuf::Arena* submessage_arena = unreachable->GetArena(); - if (message_arena != submessage_arena) { - unreachable = ::google::protobuf::internal::GetOwnedMessage(message_arena, unreachable, submessage_arena); - } - set_has_unreachable(); - _impl_.kind_.unreachable_ = unreachable; - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Instruction.unreachable) -} -Instruction::Instruction(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, Instruction_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.Instruction) -} -PROTOBUF_NDEBUG_INLINE Instruction::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - [[maybe_unused]] const ::tint::core::ir::binary::pb::Instruction& from_msg) - : operands_{visibility, arena, from.operands_}, - _operands_cached_byte_size_{0}, - results_{visibility, arena, from.results_}, - _results_cached_byte_size_{0}, - kind_{}, - _cached_size_{0}, - _oneof_case_{from._oneof_case_[0]} {} - -Instruction::Instruction( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const Instruction& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, Instruction_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - Instruction* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); - switch (kind_case()) { - case KIND_NOT_SET: - break; - case kReturn: - _impl_.kind_.return__ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.return__); - break; - case kUnary: - _impl_.kind_.unary_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.unary_); - break; - case kBinary: - _impl_.kind_.binary_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.binary_); - break; - case kDiscard: - _impl_.kind_.discard_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.discard_); - break; - case kLet: - _impl_.kind_.let_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.let_); - break; - case kVar: - _impl_.kind_.var_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.var_); - break; - case kBitcast: - _impl_.kind_.bitcast_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.bitcast_); - break; - case kConstruct: - _impl_.kind_.construct_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.construct_); - break; - case kConvert: - _impl_.kind_.convert_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.convert_); - break; - case kAccess: - _impl_.kind_.access_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.access_); - break; - case kUserCall: - _impl_.kind_.user_call_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.user_call_); - break; - case kBuiltinCall: - _impl_.kind_.builtin_call_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.builtin_call_); - break; - case kLoad: - _impl_.kind_.load_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.load_); - break; - case kStore: - _impl_.kind_.store_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.store_); - break; - case kLoadVectorElement: - _impl_.kind_.load_vector_element_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.load_vector_element_); - break; - case kStoreVectorElement: - _impl_.kind_.store_vector_element_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.store_vector_element_); - break; - case kSwizzle: - _impl_.kind_.swizzle_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.swizzle_); - break; - case kIf: - _impl_.kind_.if__ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.if__); - break; - case kSwitch: - _impl_.kind_.switch__ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.switch__); - break; - case kLoop: - _impl_.kind_.loop_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.loop_); - break; - case kExitIf: - _impl_.kind_.exit_if_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.exit_if_); - break; - case kExitSwitch: - _impl_.kind_.exit_switch_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.exit_switch_); - break; - case kExitLoop: - _impl_.kind_.exit_loop_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.exit_loop_); - break; - case kNextIteration: - _impl_.kind_.next_iteration_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.next_iteration_); - break; - case kContinue: - _impl_.kind_.continue__ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.continue__); - break; - case kBreakIf: - _impl_.kind_.break_if_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.break_if_); - break; - case kUnreachable: - _impl_.kind_.unreachable_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.unreachable_); - break; - } - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.Instruction) -} -PROTOBUF_NDEBUG_INLINE Instruction::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : operands_{visibility, arena}, - _operands_cached_byte_size_{0}, - results_{visibility, arena}, - _results_cached_byte_size_{0}, - kind_{}, - _cached_size_{0}, - _oneof_case_{} {} - -inline void Instruction::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); -} -Instruction::~Instruction() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.Instruction) - SharedDtor(*this); -} -inline void Instruction::SharedDtor(MessageLite& self) { - Instruction& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - if (this_.has_kind()) { - this_.clear_kind(); - } - this_._impl_.~Impl_(); -} - -void Instruction::clear_kind() { -// @@protoc_insertion_point(one_of_clear_start:tint.core.ir.binary.pb.Instruction) - ::google::protobuf::internal::TSanWrite(&_impl_); - switch (kind_case()) { - case kReturn: { - if (GetArena() == nullptr) { - delete _impl_.kind_.return__; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.return__); - } - break; - } - case kUnary: { - if (GetArena() == nullptr) { - delete _impl_.kind_.unary_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.unary_); - } - break; - } - case kBinary: { - if (GetArena() == nullptr) { - delete _impl_.kind_.binary_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.binary_); - } - break; - } - case kDiscard: { - if (GetArena() == nullptr) { - delete _impl_.kind_.discard_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.discard_); - } - break; - } - case kLet: { - if (GetArena() == nullptr) { - delete _impl_.kind_.let_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.let_); - } - break; - } - case kVar: { - if (GetArena() == nullptr) { - delete _impl_.kind_.var_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.var_); - } - break; - } - case kBitcast: { - if (GetArena() == nullptr) { - delete _impl_.kind_.bitcast_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.bitcast_); - } - break; - } - case kConstruct: { - if (GetArena() == nullptr) { - delete _impl_.kind_.construct_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.construct_); - } - break; - } - case kConvert: { - if (GetArena() == nullptr) { - delete _impl_.kind_.convert_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.convert_); - } - break; - } - case kAccess: { - if (GetArena() == nullptr) { - delete _impl_.kind_.access_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.access_); - } - break; - } - case kUserCall: { - if (GetArena() == nullptr) { - delete _impl_.kind_.user_call_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.user_call_); - } - break; - } - case kBuiltinCall: { - if (GetArena() == nullptr) { - delete _impl_.kind_.builtin_call_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.builtin_call_); - } - break; - } - case kLoad: { - if (GetArena() == nullptr) { - delete _impl_.kind_.load_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.load_); - } - break; - } - case kStore: { - if (GetArena() == nullptr) { - delete _impl_.kind_.store_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.store_); - } - break; - } - case kLoadVectorElement: { - if (GetArena() == nullptr) { - delete _impl_.kind_.load_vector_element_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.load_vector_element_); - } - break; - } - case kStoreVectorElement: { - if (GetArena() == nullptr) { - delete _impl_.kind_.store_vector_element_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.store_vector_element_); - } - break; - } - case kSwizzle: { - if (GetArena() == nullptr) { - delete _impl_.kind_.swizzle_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.swizzle_); - } - break; - } - case kIf: { - if (GetArena() == nullptr) { - delete _impl_.kind_.if__; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.if__); - } - break; - } - case kSwitch: { - if (GetArena() == nullptr) { - delete _impl_.kind_.switch__; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.switch__); - } - break; - } - case kLoop: { - if (GetArena() == nullptr) { - delete _impl_.kind_.loop_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.loop_); - } - break; - } - case kExitIf: { - if (GetArena() == nullptr) { - delete _impl_.kind_.exit_if_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.exit_if_); - } - break; - } - case kExitSwitch: { - if (GetArena() == nullptr) { - delete _impl_.kind_.exit_switch_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.exit_switch_); - } - break; - } - case kExitLoop: { - if (GetArena() == nullptr) { - delete _impl_.kind_.exit_loop_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.exit_loop_); - } - break; - } - case kNextIteration: { - if (GetArena() == nullptr) { - delete _impl_.kind_.next_iteration_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.next_iteration_); - } - break; - } - case kContinue: { - if (GetArena() == nullptr) { - delete _impl_.kind_.continue__; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.continue__); - } - break; - } - case kBreakIf: { - if (GetArena() == nullptr) { - delete _impl_.kind_.break_if_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.break_if_); - } - break; - } - case kUnreachable: { - if (GetArena() == nullptr) { - delete _impl_.kind_.unreachable_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.unreachable_); - } - break; - } - case KIND_NOT_SET: { - break; - } - } - _impl_._oneof_case_[0] = KIND_NOT_SET; -} - - -inline void* PROTOBUF_NONNULL Instruction::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) Instruction(arena); -} -constexpr auto Instruction::InternalNewImpl_() { - constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ - PROTOBUF_FIELD_OFFSET(Instruction, _impl_.operands_) + - decltype(Instruction::_impl_.operands_):: - InternalGetArenaOffset( - ::google::protobuf::Message::internal_visibility()), - PROTOBUF_FIELD_OFFSET(Instruction, _impl_.results_) + - decltype(Instruction::_impl_.results_):: - InternalGetArenaOffset( - ::google::protobuf::Message::internal_visibility()), - }); - if constexpr (arena_bits.has_value()) { - return ::google::protobuf::internal::MessageCreator::ZeroInit( - sizeof(Instruction), alignof(Instruction), *arena_bits); - } else { - return ::google::protobuf::internal::MessageCreator(&Instruction::PlacementNew_, - sizeof(Instruction), - alignof(Instruction)); - } -} -constexpr auto Instruction::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_Instruction_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &Instruction::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &Instruction::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &Instruction::ByteSizeLong, - &Instruction::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(Instruction, _impl_._cached_size_), - false, - }, - &Instruction::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull Instruction_class_data_ = - Instruction::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -Instruction::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&Instruction_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(Instruction_class_data_.tc_table); - return Instruction_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<1, 29, 27, 0, 2> -Instruction::_table_ = { - { - 0, // no _has_bits_ - 0, // no _extensions_ - 29, 8, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 3758096384, // skipmap - offsetof(decltype(_table_), field_entries), - 29, // num_field_entries - 27, // num_aux_entries - offsetof(decltype(_table_), aux_entries), - Instruction_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::Instruction>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - // repeated uint32 results = 2; - {::_pbi::TcParser::FastV32P1, - {18, 63, 0, PROTOBUF_FIELD_OFFSET(Instruction, _impl_.results_)}}, - // repeated uint32 operands = 1; - {::_pbi::TcParser::FastV32P1, - {10, 63, 0, PROTOBUF_FIELD_OFFSET(Instruction, _impl_.operands_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // repeated uint32 operands = 1; - {PROTOBUF_FIELD_OFFSET(Instruction, _impl_.operands_), 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kPackedUInt32)}, - // repeated uint32 results = 2; - {PROTOBUF_FIELD_OFFSET(Instruction, _impl_.results_), 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kPackedUInt32)}, - // .tint.core.ir.binary.pb.InstructionReturn return = 3; - {PROTOBUF_FIELD_OFFSET(Instruction, _impl_.kind_.return__), _Internal::kOneofCaseOffset + 0, 0, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.InstructionUnary unary = 4; - {PROTOBUF_FIELD_OFFSET(Instruction, _impl_.kind_.unary_), _Internal::kOneofCaseOffset + 0, 1, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.InstructionBinary binary = 5; - {PROTOBUF_FIELD_OFFSET(Instruction, _impl_.kind_.binary_), _Internal::kOneofCaseOffset + 0, 2, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.InstructionDiscard discard = 6; - {PROTOBUF_FIELD_OFFSET(Instruction, _impl_.kind_.discard_), _Internal::kOneofCaseOffset + 0, 3, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.InstructionLet let = 7; - {PROTOBUF_FIELD_OFFSET(Instruction, _impl_.kind_.let_), _Internal::kOneofCaseOffset + 0, 4, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.InstructionVar var = 8; - {PROTOBUF_FIELD_OFFSET(Instruction, _impl_.kind_.var_), _Internal::kOneofCaseOffset + 0, 5, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.InstructionBitcast bitcast = 9; - {PROTOBUF_FIELD_OFFSET(Instruction, _impl_.kind_.bitcast_), _Internal::kOneofCaseOffset + 0, 6, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.InstructionConstruct construct = 10; - {PROTOBUF_FIELD_OFFSET(Instruction, _impl_.kind_.construct_), _Internal::kOneofCaseOffset + 0, 7, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.InstructionConvert convert = 11; - {PROTOBUF_FIELD_OFFSET(Instruction, _impl_.kind_.convert_), _Internal::kOneofCaseOffset + 0, 8, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.InstructionAccess access = 12; - {PROTOBUF_FIELD_OFFSET(Instruction, _impl_.kind_.access_), _Internal::kOneofCaseOffset + 0, 9, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.InstructionUserCall user_call = 13; - {PROTOBUF_FIELD_OFFSET(Instruction, _impl_.kind_.user_call_), _Internal::kOneofCaseOffset + 0, 10, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.InstructionBuiltinCall builtin_call = 14; - {PROTOBUF_FIELD_OFFSET(Instruction, _impl_.kind_.builtin_call_), _Internal::kOneofCaseOffset + 0, 11, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.InstructionLoad load = 15; - {PROTOBUF_FIELD_OFFSET(Instruction, _impl_.kind_.load_), _Internal::kOneofCaseOffset + 0, 12, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.InstructionStore store = 16; - {PROTOBUF_FIELD_OFFSET(Instruction, _impl_.kind_.store_), _Internal::kOneofCaseOffset + 0, 13, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.InstructionLoadVectorElement load_vector_element = 17; - {PROTOBUF_FIELD_OFFSET(Instruction, _impl_.kind_.load_vector_element_), _Internal::kOneofCaseOffset + 0, 14, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.InstructionStoreVectorElement store_vector_element = 18; - {PROTOBUF_FIELD_OFFSET(Instruction, _impl_.kind_.store_vector_element_), _Internal::kOneofCaseOffset + 0, 15, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.InstructionSwizzle swizzle = 19; - {PROTOBUF_FIELD_OFFSET(Instruction, _impl_.kind_.swizzle_), _Internal::kOneofCaseOffset + 0, 16, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.InstructionIf if = 20; - {PROTOBUF_FIELD_OFFSET(Instruction, _impl_.kind_.if__), _Internal::kOneofCaseOffset + 0, 17, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.InstructionSwitch switch = 21; - {PROTOBUF_FIELD_OFFSET(Instruction, _impl_.kind_.switch__), _Internal::kOneofCaseOffset + 0, 18, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.InstructionLoop loop = 22; - {PROTOBUF_FIELD_OFFSET(Instruction, _impl_.kind_.loop_), _Internal::kOneofCaseOffset + 0, 19, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.InstructionExitIf exit_if = 23; - {PROTOBUF_FIELD_OFFSET(Instruction, _impl_.kind_.exit_if_), _Internal::kOneofCaseOffset + 0, 20, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.InstructionExitSwitch exit_switch = 24; - {PROTOBUF_FIELD_OFFSET(Instruction, _impl_.kind_.exit_switch_), _Internal::kOneofCaseOffset + 0, 21, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.InstructionExitLoop exit_loop = 25; - {PROTOBUF_FIELD_OFFSET(Instruction, _impl_.kind_.exit_loop_), _Internal::kOneofCaseOffset + 0, 22, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.InstructionNextIteration next_iteration = 26; - {PROTOBUF_FIELD_OFFSET(Instruction, _impl_.kind_.next_iteration_), _Internal::kOneofCaseOffset + 0, 23, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.InstructionContinue continue = 27; - {PROTOBUF_FIELD_OFFSET(Instruction, _impl_.kind_.continue__), _Internal::kOneofCaseOffset + 0, 24, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.InstructionBreakIf break_if = 28; - {PROTOBUF_FIELD_OFFSET(Instruction, _impl_.kind_.break_if_), _Internal::kOneofCaseOffset + 0, 25, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .tint.core.ir.binary.pb.InstructionUnreachable unreachable = 29; - {PROTOBUF_FIELD_OFFSET(Instruction, _impl_.kind_.unreachable_), _Internal::kOneofCaseOffset + 0, 26, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - }}, - {{ - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionReturn>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionUnary>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionBinary>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionDiscard>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionLet>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionVar>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionBitcast>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionConstruct>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionConvert>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionAccess>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionUserCall>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionBuiltinCall>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionLoad>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionStore>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionLoadVectorElement>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionStoreVectorElement>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionSwizzle>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionIf>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionSwitch>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionLoop>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionExitIf>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionExitSwitch>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionExitLoop>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionNextIteration>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionContinue>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionBreakIf>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionUnreachable>()}, - }}, - {{ - }}, -}; -PROTOBUF_NOINLINE void Instruction::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.Instruction) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.operands_.Clear(); - _impl_.results_.Clear(); - clear_kind(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL Instruction::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const Instruction& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL Instruction::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const Instruction& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.Instruction) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // repeated uint32 operands = 1; - { - int byte_size = this_._impl_._operands_cached_byte_size_.Get(); - if (byte_size > 0) { - target = stream->WriteUInt32Packed( - 1, this_._internal_operands(), byte_size, target); - } - } - - // repeated uint32 results = 2; - { - int byte_size = this_._impl_._results_cached_byte_size_.Get(); - if (byte_size > 0) { - target = stream->WriteUInt32Packed( - 2, this_._internal_results(), byte_size, target); - } - } - - switch (this_.kind_case()) { - case kReturn: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 3, *this_._impl_.kind_.return__, this_._impl_.kind_.return__->GetCachedSize(), target, - stream); - break; - } - case kUnary: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 4, *this_._impl_.kind_.unary_, this_._impl_.kind_.unary_->GetCachedSize(), target, - stream); - break; - } - case kBinary: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 5, *this_._impl_.kind_.binary_, this_._impl_.kind_.binary_->GetCachedSize(), target, - stream); - break; - } - case kDiscard: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 6, *this_._impl_.kind_.discard_, this_._impl_.kind_.discard_->GetCachedSize(), target, - stream); - break; - } - case kLet: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 7, *this_._impl_.kind_.let_, this_._impl_.kind_.let_->GetCachedSize(), target, - stream); - break; - } - case kVar: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 8, *this_._impl_.kind_.var_, this_._impl_.kind_.var_->GetCachedSize(), target, - stream); - break; - } - case kBitcast: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 9, *this_._impl_.kind_.bitcast_, this_._impl_.kind_.bitcast_->GetCachedSize(), target, - stream); - break; - } - case kConstruct: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 10, *this_._impl_.kind_.construct_, this_._impl_.kind_.construct_->GetCachedSize(), target, - stream); - break; - } - case kConvert: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 11, *this_._impl_.kind_.convert_, this_._impl_.kind_.convert_->GetCachedSize(), target, - stream); - break; - } - case kAccess: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 12, *this_._impl_.kind_.access_, this_._impl_.kind_.access_->GetCachedSize(), target, - stream); - break; - } - case kUserCall: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 13, *this_._impl_.kind_.user_call_, this_._impl_.kind_.user_call_->GetCachedSize(), target, - stream); - break; - } - case kBuiltinCall: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 14, *this_._impl_.kind_.builtin_call_, this_._impl_.kind_.builtin_call_->GetCachedSize(), target, - stream); - break; - } - case kLoad: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 15, *this_._impl_.kind_.load_, this_._impl_.kind_.load_->GetCachedSize(), target, - stream); - break; - } - case kStore: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 16, *this_._impl_.kind_.store_, this_._impl_.kind_.store_->GetCachedSize(), target, - stream); - break; - } - case kLoadVectorElement: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 17, *this_._impl_.kind_.load_vector_element_, this_._impl_.kind_.load_vector_element_->GetCachedSize(), target, - stream); - break; - } - case kStoreVectorElement: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 18, *this_._impl_.kind_.store_vector_element_, this_._impl_.kind_.store_vector_element_->GetCachedSize(), target, - stream); - break; - } - case kSwizzle: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 19, *this_._impl_.kind_.swizzle_, this_._impl_.kind_.swizzle_->GetCachedSize(), target, - stream); - break; - } - case kIf: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 20, *this_._impl_.kind_.if__, this_._impl_.kind_.if__->GetCachedSize(), target, - stream); - break; - } - case kSwitch: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 21, *this_._impl_.kind_.switch__, this_._impl_.kind_.switch__->GetCachedSize(), target, - stream); - break; - } - case kLoop: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 22, *this_._impl_.kind_.loop_, this_._impl_.kind_.loop_->GetCachedSize(), target, - stream); - break; - } - case kExitIf: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 23, *this_._impl_.kind_.exit_if_, this_._impl_.kind_.exit_if_->GetCachedSize(), target, - stream); - break; - } - case kExitSwitch: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 24, *this_._impl_.kind_.exit_switch_, this_._impl_.kind_.exit_switch_->GetCachedSize(), target, - stream); - break; - } - case kExitLoop: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 25, *this_._impl_.kind_.exit_loop_, this_._impl_.kind_.exit_loop_->GetCachedSize(), target, - stream); - break; - } - case kNextIteration: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 26, *this_._impl_.kind_.next_iteration_, this_._impl_.kind_.next_iteration_->GetCachedSize(), target, - stream); - break; - } - case kContinue: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 27, *this_._impl_.kind_.continue__, this_._impl_.kind_.continue__->GetCachedSize(), target, - stream); - break; - } - case kBreakIf: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 28, *this_._impl_.kind_.break_if_, this_._impl_.kind_.break_if_->GetCachedSize(), target, - stream); - break; - } - case kUnreachable: { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 29, *this_._impl_.kind_.unreachable_, this_._impl_.kind_.unreachable_->GetCachedSize(), target, - stream); - break; - } - default: - break; - } - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.Instruction) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t Instruction::ByteSizeLong(const MessageLite& base) { - const Instruction& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t Instruction::ByteSizeLong() const { - const Instruction& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.Instruction) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - ::_pbi::Prefetch5LinesFrom7Lines(&this_); - { - // repeated uint32 operands = 1; - { - total_size += - ::_pbi::WireFormatLite::UInt32SizeWithPackedTagSize( - this_._internal_operands(), 1, - this_._impl_._operands_cached_byte_size_); - } - // repeated uint32 results = 2; - { - total_size += - ::_pbi::WireFormatLite::UInt32SizeWithPackedTagSize( - this_._internal_results(), 1, - this_._impl_._results_cached_byte_size_); - } - } - switch (this_.kind_case()) { - // .tint.core.ir.binary.pb.InstructionReturn return = 3; - case kReturn: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.return__); - break; - } - // .tint.core.ir.binary.pb.InstructionUnary unary = 4; - case kUnary: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.unary_); - break; - } - // .tint.core.ir.binary.pb.InstructionBinary binary = 5; - case kBinary: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.binary_); - break; - } - // .tint.core.ir.binary.pb.InstructionDiscard discard = 6; - case kDiscard: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.discard_); - break; - } - // .tint.core.ir.binary.pb.InstructionLet let = 7; - case kLet: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.let_); - break; - } - // .tint.core.ir.binary.pb.InstructionVar var = 8; - case kVar: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.var_); - break; - } - // .tint.core.ir.binary.pb.InstructionBitcast bitcast = 9; - case kBitcast: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.bitcast_); - break; - } - // .tint.core.ir.binary.pb.InstructionConstruct construct = 10; - case kConstruct: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.construct_); - break; - } - // .tint.core.ir.binary.pb.InstructionConvert convert = 11; - case kConvert: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.convert_); - break; - } - // .tint.core.ir.binary.pb.InstructionAccess access = 12; - case kAccess: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.access_); - break; - } - // .tint.core.ir.binary.pb.InstructionUserCall user_call = 13; - case kUserCall: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.user_call_); - break; - } - // .tint.core.ir.binary.pb.InstructionBuiltinCall builtin_call = 14; - case kBuiltinCall: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.builtin_call_); - break; - } - // .tint.core.ir.binary.pb.InstructionLoad load = 15; - case kLoad: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.load_); - break; - } - // .tint.core.ir.binary.pb.InstructionStore store = 16; - case kStore: { - total_size += 2 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.store_); - break; - } - // .tint.core.ir.binary.pb.InstructionLoadVectorElement load_vector_element = 17; - case kLoadVectorElement: { - total_size += 2 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.load_vector_element_); - break; - } - // .tint.core.ir.binary.pb.InstructionStoreVectorElement store_vector_element = 18; - case kStoreVectorElement: { - total_size += 2 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.store_vector_element_); - break; - } - // .tint.core.ir.binary.pb.InstructionSwizzle swizzle = 19; - case kSwizzle: { - total_size += 2 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.swizzle_); - break; - } - // .tint.core.ir.binary.pb.InstructionIf if = 20; - case kIf: { - total_size += 2 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.if__); - break; - } - // .tint.core.ir.binary.pb.InstructionSwitch switch = 21; - case kSwitch: { - total_size += 2 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.switch__); - break; - } - // .tint.core.ir.binary.pb.InstructionLoop loop = 22; - case kLoop: { - total_size += 2 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.loop_); - break; - } - // .tint.core.ir.binary.pb.InstructionExitIf exit_if = 23; - case kExitIf: { - total_size += 2 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.exit_if_); - break; - } - // .tint.core.ir.binary.pb.InstructionExitSwitch exit_switch = 24; - case kExitSwitch: { - total_size += 2 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.exit_switch_); - break; - } - // .tint.core.ir.binary.pb.InstructionExitLoop exit_loop = 25; - case kExitLoop: { - total_size += 2 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.exit_loop_); - break; - } - // .tint.core.ir.binary.pb.InstructionNextIteration next_iteration = 26; - case kNextIteration: { - total_size += 2 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.next_iteration_); - break; - } - // .tint.core.ir.binary.pb.InstructionContinue continue = 27; - case kContinue: { - total_size += 2 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.continue__); - break; - } - // .tint.core.ir.binary.pb.InstructionBreakIf break_if = 28; - case kBreakIf: { - total_size += 2 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.break_if_); - break; - } - // .tint.core.ir.binary.pb.InstructionUnreachable unreachable = 29; - case kUnreachable: { - total_size += 2 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kind_.unreachable_); - break; - } - case KIND_NOT_SET: { - break; - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void Instruction::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - ::google::protobuf::Arena* arena = _this->GetArena(); - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.Instruction) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - _this->_internal_mutable_operands()->MergeFrom(from._internal_operands()); - _this->_internal_mutable_results()->MergeFrom(from._internal_results()); - if (const uint32_t oneof_from_case = from._impl_._oneof_case_[0]) { - const uint32_t oneof_to_case = _this->_impl_._oneof_case_[0]; - const bool oneof_needs_init = oneof_to_case != oneof_from_case; - if (oneof_needs_init) { - if (oneof_to_case != 0) { - _this->clear_kind(); - } - _this->_impl_._oneof_case_[0] = oneof_from_case; - } - - switch (oneof_from_case) { - case kReturn: { - if (oneof_needs_init) { - _this->_impl_.kind_.return__ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.return__); - } else { - _this->_impl_.kind_.return__->MergeFrom(*from._impl_.kind_.return__); - } - break; - } - case kUnary: { - if (oneof_needs_init) { - _this->_impl_.kind_.unary_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.unary_); - } else { - _this->_impl_.kind_.unary_->MergeFrom(*from._impl_.kind_.unary_); - } - break; - } - case kBinary: { - if (oneof_needs_init) { - _this->_impl_.kind_.binary_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.binary_); - } else { - _this->_impl_.kind_.binary_->MergeFrom(*from._impl_.kind_.binary_); - } - break; - } - case kDiscard: { - if (oneof_needs_init) { - _this->_impl_.kind_.discard_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.discard_); - } else { - _this->_impl_.kind_.discard_->MergeFrom(*from._impl_.kind_.discard_); - } - break; - } - case kLet: { - if (oneof_needs_init) { - _this->_impl_.kind_.let_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.let_); - } else { - _this->_impl_.kind_.let_->MergeFrom(*from._impl_.kind_.let_); - } - break; - } - case kVar: { - if (oneof_needs_init) { - _this->_impl_.kind_.var_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.var_); - } else { - _this->_impl_.kind_.var_->MergeFrom(*from._impl_.kind_.var_); - } - break; - } - case kBitcast: { - if (oneof_needs_init) { - _this->_impl_.kind_.bitcast_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.bitcast_); - } else { - _this->_impl_.kind_.bitcast_->MergeFrom(*from._impl_.kind_.bitcast_); - } - break; - } - case kConstruct: { - if (oneof_needs_init) { - _this->_impl_.kind_.construct_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.construct_); - } else { - _this->_impl_.kind_.construct_->MergeFrom(*from._impl_.kind_.construct_); - } - break; - } - case kConvert: { - if (oneof_needs_init) { - _this->_impl_.kind_.convert_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.convert_); - } else { - _this->_impl_.kind_.convert_->MergeFrom(*from._impl_.kind_.convert_); - } - break; - } - case kAccess: { - if (oneof_needs_init) { - _this->_impl_.kind_.access_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.access_); - } else { - _this->_impl_.kind_.access_->MergeFrom(*from._impl_.kind_.access_); - } - break; - } - case kUserCall: { - if (oneof_needs_init) { - _this->_impl_.kind_.user_call_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.user_call_); - } else { - _this->_impl_.kind_.user_call_->MergeFrom(*from._impl_.kind_.user_call_); - } - break; - } - case kBuiltinCall: { - if (oneof_needs_init) { - _this->_impl_.kind_.builtin_call_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.builtin_call_); - } else { - _this->_impl_.kind_.builtin_call_->MergeFrom(*from._impl_.kind_.builtin_call_); - } - break; - } - case kLoad: { - if (oneof_needs_init) { - _this->_impl_.kind_.load_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.load_); - } else { - _this->_impl_.kind_.load_->MergeFrom(*from._impl_.kind_.load_); - } - break; - } - case kStore: { - if (oneof_needs_init) { - _this->_impl_.kind_.store_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.store_); - } else { - _this->_impl_.kind_.store_->MergeFrom(*from._impl_.kind_.store_); - } - break; - } - case kLoadVectorElement: { - if (oneof_needs_init) { - _this->_impl_.kind_.load_vector_element_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.load_vector_element_); - } else { - _this->_impl_.kind_.load_vector_element_->MergeFrom(*from._impl_.kind_.load_vector_element_); - } - break; - } - case kStoreVectorElement: { - if (oneof_needs_init) { - _this->_impl_.kind_.store_vector_element_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.store_vector_element_); - } else { - _this->_impl_.kind_.store_vector_element_->MergeFrom(*from._impl_.kind_.store_vector_element_); - } - break; - } - case kSwizzle: { - if (oneof_needs_init) { - _this->_impl_.kind_.swizzle_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.swizzle_); - } else { - _this->_impl_.kind_.swizzle_->MergeFrom(*from._impl_.kind_.swizzle_); - } - break; - } - case kIf: { - if (oneof_needs_init) { - _this->_impl_.kind_.if__ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.if__); - } else { - _this->_impl_.kind_.if__->MergeFrom(*from._impl_.kind_.if__); - } - break; - } - case kSwitch: { - if (oneof_needs_init) { - _this->_impl_.kind_.switch__ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.switch__); - } else { - _this->_impl_.kind_.switch__->MergeFrom(*from._impl_.kind_.switch__); - } - break; - } - case kLoop: { - if (oneof_needs_init) { - _this->_impl_.kind_.loop_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.loop_); - } else { - _this->_impl_.kind_.loop_->MergeFrom(*from._impl_.kind_.loop_); - } - break; - } - case kExitIf: { - if (oneof_needs_init) { - _this->_impl_.kind_.exit_if_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.exit_if_); - } else { - _this->_impl_.kind_.exit_if_->MergeFrom(*from._impl_.kind_.exit_if_); - } - break; - } - case kExitSwitch: { - if (oneof_needs_init) { - _this->_impl_.kind_.exit_switch_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.exit_switch_); - } else { - _this->_impl_.kind_.exit_switch_->MergeFrom(*from._impl_.kind_.exit_switch_); - } - break; - } - case kExitLoop: { - if (oneof_needs_init) { - _this->_impl_.kind_.exit_loop_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.exit_loop_); - } else { - _this->_impl_.kind_.exit_loop_->MergeFrom(*from._impl_.kind_.exit_loop_); - } - break; - } - case kNextIteration: { - if (oneof_needs_init) { - _this->_impl_.kind_.next_iteration_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.next_iteration_); - } else { - _this->_impl_.kind_.next_iteration_->MergeFrom(*from._impl_.kind_.next_iteration_); - } - break; - } - case kContinue: { - if (oneof_needs_init) { - _this->_impl_.kind_.continue__ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.continue__); - } else { - _this->_impl_.kind_.continue__->MergeFrom(*from._impl_.kind_.continue__); - } - break; - } - case kBreakIf: { - if (oneof_needs_init) { - _this->_impl_.kind_.break_if_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.break_if_); - } else { - _this->_impl_.kind_.break_if_->MergeFrom(*from._impl_.kind_.break_if_); - } - break; - } - case kUnreachable: { - if (oneof_needs_init) { - _this->_impl_.kind_.unreachable_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.kind_.unreachable_); - } else { - _this->_impl_.kind_.unreachable_->MergeFrom(*from._impl_.kind_.unreachable_); - } - break; - } - case KIND_NOT_SET: - break; - } - } - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void Instruction::CopyFrom(const Instruction& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.Instruction) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void Instruction::InternalSwap(Instruction* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - _impl_.operands_.InternalSwap(&other->_impl_.operands_); - _impl_.results_.InternalSwap(&other->_impl_.results_); - swap(_impl_.kind_, other->_impl_.kind_); - swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); -} - -::google::protobuf::Metadata Instruction::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class InstructionReturn::_Internal { - public: -}; - -InstructionReturn::InstructionReturn(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, InstructionReturn_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.InstructionReturn) -} -InstructionReturn::InstructionReturn( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const InstructionReturn& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, InstructionReturn_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - InstructionReturn* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.InstructionReturn) -} - -inline void* PROTOBUF_NONNULL InstructionReturn::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) InstructionReturn(arena); -} -constexpr auto InstructionReturn::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(InstructionReturn), - alignof(InstructionReturn)); -} -constexpr auto InstructionReturn::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_InstructionReturn_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &InstructionReturn::MergeImpl, - ::google::protobuf::internal::ZeroFieldsBase::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &InstructionReturn::SharedDtor, - ::google::protobuf::internal::ZeroFieldsBase::GetClearImpl(), &InstructionReturn::ByteSizeLong, - &InstructionReturn::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(InstructionReturn, _impl_._cached_size_), - false, - }, - &InstructionReturn::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull InstructionReturn_class_data_ = - InstructionReturn::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -InstructionReturn::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&InstructionReturn_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(InstructionReturn_class_data_.tc_table); - return InstructionReturn_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 0, 0, 0, 2> -InstructionReturn::_table_ = { - { - 0, // no _has_bits_ - 0, // no _extensions_ - 0, 0, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967295, // skipmap - offsetof(decltype(_table_), field_names), // no field_entries - 0, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - InstructionReturn_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionReturn>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - }}, {{ - 65535, 65535 - }}, // no field_entries, or aux_entries - {{ - }}, -}; - - - - - - - -::google::protobuf::Metadata InstructionReturn::GetMetadata() const { - return ::google::protobuf::internal::ZeroFieldsBase::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class InstructionUnary::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(InstructionUnary, _impl_._has_bits_); -}; - -InstructionUnary::InstructionUnary(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, InstructionUnary_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.InstructionUnary) -} -InstructionUnary::InstructionUnary( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const InstructionUnary& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, InstructionUnary_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(from._impl_) { - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); -} -PROTOBUF_NDEBUG_INLINE InstructionUnary::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0} {} - -inline void InstructionUnary::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - _impl_.op_ = {}; -} -InstructionUnary::~InstructionUnary() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.InstructionUnary) - SharedDtor(*this); -} -inline void InstructionUnary::SharedDtor(MessageLite& self) { - InstructionUnary& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL InstructionUnary::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) InstructionUnary(arena); -} -constexpr auto InstructionUnary::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(InstructionUnary), - alignof(InstructionUnary)); -} -constexpr auto InstructionUnary::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_InstructionUnary_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &InstructionUnary::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &InstructionUnary::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &InstructionUnary::ByteSizeLong, - &InstructionUnary::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(InstructionUnary, _impl_._cached_size_), - false, - }, - &InstructionUnary::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull InstructionUnary_class_data_ = - InstructionUnary::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -InstructionUnary::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&InstructionUnary_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(InstructionUnary_class_data_.tc_table); - return InstructionUnary_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 1, 0, 0, 2> -InstructionUnary::_table_ = { - { - PROTOBUF_FIELD_OFFSET(InstructionUnary, _impl_._has_bits_), - 0, // no _extensions_ - 1, 0, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967294, // skipmap - offsetof(decltype(_table_), field_entries), - 1, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - InstructionUnary_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionUnary>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - // .tint.core.ir.binary.pb.UnaryOp op = 1; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(InstructionUnary, _impl_.op_), 0>(), - {8, 0, 0, PROTOBUF_FIELD_OFFSET(InstructionUnary, _impl_.op_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // .tint.core.ir.binary.pb.UnaryOp op = 1; - {PROTOBUF_FIELD_OFFSET(InstructionUnary, _impl_.op_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)}, - }}, - // no aux_entries - {{ - }}, -}; -PROTOBUF_NOINLINE void InstructionUnary::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.InstructionUnary) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.op_ = 0; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL InstructionUnary::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const InstructionUnary& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL InstructionUnary::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const InstructionUnary& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.InstructionUnary) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // .tint.core.ir.binary.pb.UnaryOp op = 1; - if ((this_._impl_._has_bits_[0] & 0x00000001U) != 0) { - if (this_._internal_op() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 1, this_._internal_op(), target); - } - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.InstructionUnary) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t InstructionUnary::ByteSizeLong(const MessageLite& base) { - const InstructionUnary& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t InstructionUnary::ByteSizeLong() const { - const InstructionUnary& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.InstructionUnary) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - { - // .tint.core.ir.binary.pb.UnaryOp op = 1; - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000001U) != 0) { - if (this_._internal_op() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this_._internal_op()); - } - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void InstructionUnary::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.InstructionUnary) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000001U) != 0) { - if (from._internal_op() != 0) { - _this->_impl_.op_ = from._impl_.op_; - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void InstructionUnary::CopyFrom(const InstructionUnary& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.InstructionUnary) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void InstructionUnary::InternalSwap(InstructionUnary* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - swap(_impl_.op_, other->_impl_.op_); -} - -::google::protobuf::Metadata InstructionUnary::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class InstructionBinary::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(InstructionBinary, _impl_._has_bits_); -}; - -InstructionBinary::InstructionBinary(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, InstructionBinary_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.InstructionBinary) -} -InstructionBinary::InstructionBinary( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const InstructionBinary& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, InstructionBinary_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(from._impl_) { - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); -} -PROTOBUF_NDEBUG_INLINE InstructionBinary::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0} {} - -inline void InstructionBinary::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - _impl_.op_ = {}; -} -InstructionBinary::~InstructionBinary() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.InstructionBinary) - SharedDtor(*this); -} -inline void InstructionBinary::SharedDtor(MessageLite& self) { - InstructionBinary& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL InstructionBinary::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) InstructionBinary(arena); -} -constexpr auto InstructionBinary::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(InstructionBinary), - alignof(InstructionBinary)); -} -constexpr auto InstructionBinary::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_InstructionBinary_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &InstructionBinary::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &InstructionBinary::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &InstructionBinary::ByteSizeLong, - &InstructionBinary::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(InstructionBinary, _impl_._cached_size_), - false, - }, - &InstructionBinary::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull InstructionBinary_class_data_ = - InstructionBinary::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -InstructionBinary::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&InstructionBinary_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(InstructionBinary_class_data_.tc_table); - return InstructionBinary_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 1, 0, 0, 2> -InstructionBinary::_table_ = { - { - PROTOBUF_FIELD_OFFSET(InstructionBinary, _impl_._has_bits_), - 0, // no _extensions_ - 1, 0, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967294, // skipmap - offsetof(decltype(_table_), field_entries), - 1, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - InstructionBinary_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionBinary>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - // .tint.core.ir.binary.pb.BinaryOp op = 1; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(InstructionBinary, _impl_.op_), 0>(), - {8, 0, 0, PROTOBUF_FIELD_OFFSET(InstructionBinary, _impl_.op_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // .tint.core.ir.binary.pb.BinaryOp op = 1; - {PROTOBUF_FIELD_OFFSET(InstructionBinary, _impl_.op_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)}, - }}, - // no aux_entries - {{ - }}, -}; -PROTOBUF_NOINLINE void InstructionBinary::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.InstructionBinary) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.op_ = 0; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL InstructionBinary::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const InstructionBinary& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL InstructionBinary::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const InstructionBinary& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.InstructionBinary) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // .tint.core.ir.binary.pb.BinaryOp op = 1; - if ((this_._impl_._has_bits_[0] & 0x00000001U) != 0) { - if (this_._internal_op() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 1, this_._internal_op(), target); - } - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.InstructionBinary) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t InstructionBinary::ByteSizeLong(const MessageLite& base) { - const InstructionBinary& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t InstructionBinary::ByteSizeLong() const { - const InstructionBinary& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.InstructionBinary) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - { - // .tint.core.ir.binary.pb.BinaryOp op = 1; - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000001U) != 0) { - if (this_._internal_op() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this_._internal_op()); - } - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void InstructionBinary::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.InstructionBinary) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000001U) != 0) { - if (from._internal_op() != 0) { - _this->_impl_.op_ = from._impl_.op_; - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void InstructionBinary::CopyFrom(const InstructionBinary& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.InstructionBinary) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void InstructionBinary::InternalSwap(InstructionBinary* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - swap(_impl_.op_, other->_impl_.op_); -} - -::google::protobuf::Metadata InstructionBinary::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class InstructionBitcast::_Internal { - public: -}; - -InstructionBitcast::InstructionBitcast(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, InstructionBitcast_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.InstructionBitcast) -} -InstructionBitcast::InstructionBitcast( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const InstructionBitcast& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, InstructionBitcast_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - InstructionBitcast* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.InstructionBitcast) -} - -inline void* PROTOBUF_NONNULL InstructionBitcast::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) InstructionBitcast(arena); -} -constexpr auto InstructionBitcast::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(InstructionBitcast), - alignof(InstructionBitcast)); -} -constexpr auto InstructionBitcast::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_InstructionBitcast_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &InstructionBitcast::MergeImpl, - ::google::protobuf::internal::ZeroFieldsBase::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &InstructionBitcast::SharedDtor, - ::google::protobuf::internal::ZeroFieldsBase::GetClearImpl(), &InstructionBitcast::ByteSizeLong, - &InstructionBitcast::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(InstructionBitcast, _impl_._cached_size_), - false, - }, - &InstructionBitcast::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull InstructionBitcast_class_data_ = - InstructionBitcast::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -InstructionBitcast::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&InstructionBitcast_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(InstructionBitcast_class_data_.tc_table); - return InstructionBitcast_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 0, 0, 0, 2> -InstructionBitcast::_table_ = { - { - 0, // no _has_bits_ - 0, // no _extensions_ - 0, 0, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967295, // skipmap - offsetof(decltype(_table_), field_names), // no field_entries - 0, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - InstructionBitcast_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionBitcast>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - }}, {{ - 65535, 65535 - }}, // no field_entries, or aux_entries - {{ - }}, -}; - - - - - - - -::google::protobuf::Metadata InstructionBitcast::GetMetadata() const { - return ::google::protobuf::internal::ZeroFieldsBase::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class InstructionConstruct::_Internal { - public: -}; - -InstructionConstruct::InstructionConstruct(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, InstructionConstruct_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.InstructionConstruct) -} -InstructionConstruct::InstructionConstruct( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const InstructionConstruct& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, InstructionConstruct_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - InstructionConstruct* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.InstructionConstruct) -} - -inline void* PROTOBUF_NONNULL InstructionConstruct::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) InstructionConstruct(arena); -} -constexpr auto InstructionConstruct::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(InstructionConstruct), - alignof(InstructionConstruct)); -} -constexpr auto InstructionConstruct::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_InstructionConstruct_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &InstructionConstruct::MergeImpl, - ::google::protobuf::internal::ZeroFieldsBase::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &InstructionConstruct::SharedDtor, - ::google::protobuf::internal::ZeroFieldsBase::GetClearImpl(), &InstructionConstruct::ByteSizeLong, - &InstructionConstruct::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(InstructionConstruct, _impl_._cached_size_), - false, - }, - &InstructionConstruct::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull InstructionConstruct_class_data_ = - InstructionConstruct::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -InstructionConstruct::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&InstructionConstruct_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(InstructionConstruct_class_data_.tc_table); - return InstructionConstruct_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 0, 0, 0, 2> -InstructionConstruct::_table_ = { - { - 0, // no _has_bits_ - 0, // no _extensions_ - 0, 0, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967295, // skipmap - offsetof(decltype(_table_), field_names), // no field_entries - 0, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - InstructionConstruct_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionConstruct>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - }}, {{ - 65535, 65535 - }}, // no field_entries, or aux_entries - {{ - }}, -}; - - - - - - - -::google::protobuf::Metadata InstructionConstruct::GetMetadata() const { - return ::google::protobuf::internal::ZeroFieldsBase::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class InstructionDiscard::_Internal { - public: -}; - -InstructionDiscard::InstructionDiscard(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, InstructionDiscard_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.InstructionDiscard) -} -InstructionDiscard::InstructionDiscard( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const InstructionDiscard& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, InstructionDiscard_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - InstructionDiscard* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.InstructionDiscard) -} - -inline void* PROTOBUF_NONNULL InstructionDiscard::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) InstructionDiscard(arena); -} -constexpr auto InstructionDiscard::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(InstructionDiscard), - alignof(InstructionDiscard)); -} -constexpr auto InstructionDiscard::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_InstructionDiscard_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &InstructionDiscard::MergeImpl, - ::google::protobuf::internal::ZeroFieldsBase::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &InstructionDiscard::SharedDtor, - ::google::protobuf::internal::ZeroFieldsBase::GetClearImpl(), &InstructionDiscard::ByteSizeLong, - &InstructionDiscard::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(InstructionDiscard, _impl_._cached_size_), - false, - }, - &InstructionDiscard::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull InstructionDiscard_class_data_ = - InstructionDiscard::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -InstructionDiscard::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&InstructionDiscard_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(InstructionDiscard_class_data_.tc_table); - return InstructionDiscard_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 0, 0, 0, 2> -InstructionDiscard::_table_ = { - { - 0, // no _has_bits_ - 0, // no _extensions_ - 0, 0, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967295, // skipmap - offsetof(decltype(_table_), field_names), // no field_entries - 0, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - InstructionDiscard_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionDiscard>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - }}, {{ - 65535, 65535 - }}, // no field_entries, or aux_entries - {{ - }}, -}; - - - - - - - -::google::protobuf::Metadata InstructionDiscard::GetMetadata() const { - return ::google::protobuf::internal::ZeroFieldsBase::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class InstructionLet::_Internal { - public: -}; - -InstructionLet::InstructionLet(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, InstructionLet_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.InstructionLet) -} -InstructionLet::InstructionLet( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const InstructionLet& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, InstructionLet_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - InstructionLet* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.InstructionLet) -} - -inline void* PROTOBUF_NONNULL InstructionLet::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) InstructionLet(arena); -} -constexpr auto InstructionLet::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(InstructionLet), - alignof(InstructionLet)); -} -constexpr auto InstructionLet::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_InstructionLet_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &InstructionLet::MergeImpl, - ::google::protobuf::internal::ZeroFieldsBase::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &InstructionLet::SharedDtor, - ::google::protobuf::internal::ZeroFieldsBase::GetClearImpl(), &InstructionLet::ByteSizeLong, - &InstructionLet::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(InstructionLet, _impl_._cached_size_), - false, - }, - &InstructionLet::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull InstructionLet_class_data_ = - InstructionLet::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -InstructionLet::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&InstructionLet_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(InstructionLet_class_data_.tc_table); - return InstructionLet_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 0, 0, 0, 2> -InstructionLet::_table_ = { - { - 0, // no _has_bits_ - 0, // no _extensions_ - 0, 0, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967295, // skipmap - offsetof(decltype(_table_), field_names), // no field_entries - 0, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - InstructionLet_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionLet>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - }}, {{ - 65535, 65535 - }}, // no field_entries, or aux_entries - {{ - }}, -}; - - - - - - - -::google::protobuf::Metadata InstructionLet::GetMetadata() const { - return ::google::protobuf::internal::ZeroFieldsBase::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class InstructionVar::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(InstructionVar, _impl_._has_bits_); -}; - -InstructionVar::InstructionVar(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, InstructionVar_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.InstructionVar) -} -PROTOBUF_NDEBUG_INLINE InstructionVar::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - [[maybe_unused]] const ::tint::core::ir::binary::pb::InstructionVar& from_msg) - : _has_bits_{from._has_bits_}, - _cached_size_{0} {} - -InstructionVar::InstructionVar( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const InstructionVar& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, InstructionVar_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - InstructionVar* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); - ::uint32_t cached_has_bits = _impl_._has_bits_[0]; - _impl_.binding_point_ = ((cached_has_bits & 0x00000001U) != 0) - ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.binding_point_) - : nullptr; - _impl_.input_attachment_index_ = from._impl_.input_attachment_index_; - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.InstructionVar) -} -PROTOBUF_NDEBUG_INLINE InstructionVar::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0} {} - -inline void InstructionVar::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - ::memset(reinterpret_cast(&_impl_) + - offsetof(Impl_, binding_point_), - 0, - offsetof(Impl_, input_attachment_index_) - - offsetof(Impl_, binding_point_) + - sizeof(Impl_::input_attachment_index_)); -} -InstructionVar::~InstructionVar() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.InstructionVar) - SharedDtor(*this); -} -inline void InstructionVar::SharedDtor(MessageLite& self) { - InstructionVar& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - delete this_._impl_.binding_point_; - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL InstructionVar::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) InstructionVar(arena); -} -constexpr auto InstructionVar::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(InstructionVar), - alignof(InstructionVar)); -} -constexpr auto InstructionVar::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_InstructionVar_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &InstructionVar::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &InstructionVar::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &InstructionVar::ByteSizeLong, - &InstructionVar::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(InstructionVar, _impl_._cached_size_), - false, - }, - &InstructionVar::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull InstructionVar_class_data_ = - InstructionVar::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -InstructionVar::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&InstructionVar_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(InstructionVar_class_data_.tc_table); - return InstructionVar_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<1, 2, 1, 0, 2> -InstructionVar::_table_ = { - { - PROTOBUF_FIELD_OFFSET(InstructionVar, _impl_._has_bits_), - 0, // no _extensions_ - 2, 8, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967292, // skipmap - offsetof(decltype(_table_), field_entries), - 2, // num_field_entries - 1, // num_aux_entries - offsetof(decltype(_table_), aux_entries), - InstructionVar_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionVar>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - // optional uint32 input_attachment_index = 2; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(InstructionVar, _impl_.input_attachment_index_), 1>(), - {16, 1, 0, PROTOBUF_FIELD_OFFSET(InstructionVar, _impl_.input_attachment_index_)}}, - // optional .tint.core.ir.binary.pb.BindingPoint binding_point = 1; - {::_pbi::TcParser::FastMtS1, - {10, 0, 0, PROTOBUF_FIELD_OFFSET(InstructionVar, _impl_.binding_point_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // optional .tint.core.ir.binary.pb.BindingPoint binding_point = 1; - {PROTOBUF_FIELD_OFFSET(InstructionVar, _impl_.binding_point_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, - // optional uint32 input_attachment_index = 2; - {PROTOBUF_FIELD_OFFSET(InstructionVar, _impl_.input_attachment_index_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - }}, - {{ - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::BindingPoint>()}, - }}, - {{ - }}, -}; -PROTOBUF_NOINLINE void InstructionVar::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.InstructionVar) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000001U) != 0) { - ABSL_DCHECK(_impl_.binding_point_ != nullptr); - _impl_.binding_point_->Clear(); - } - _impl_.input_attachment_index_ = 0u; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL InstructionVar::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const InstructionVar& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL InstructionVar::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const InstructionVar& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.InstructionVar) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - cached_has_bits = this_._impl_._has_bits_[0]; - // optional .tint.core.ir.binary.pb.BindingPoint binding_point = 1; - if ((cached_has_bits & 0x00000001U) != 0) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 1, *this_._impl_.binding_point_, this_._impl_.binding_point_->GetCachedSize(), target, - stream); - } - - // optional uint32 input_attachment_index = 2; - if ((cached_has_bits & 0x00000002U) != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 2, this_._internal_input_attachment_index(), target); - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.InstructionVar) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t InstructionVar::ByteSizeLong(const MessageLite& base) { - const InstructionVar& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t InstructionVar::ByteSizeLong() const { - const InstructionVar& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.InstructionVar) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - ::_pbi::Prefetch5LinesFrom7Lines(&this_); - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - // optional .tint.core.ir.binary.pb.BindingPoint binding_point = 1; - if ((cached_has_bits & 0x00000001U) != 0) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.binding_point_); - } - // optional uint32 input_attachment_index = 2; - if ((cached_has_bits & 0x00000002U) != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_input_attachment_index()); - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void InstructionVar::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - ::google::protobuf::Arena* arena = _this->GetArena(); - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.InstructionVar) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - if ((cached_has_bits & 0x00000001U) != 0) { - ABSL_DCHECK(from._impl_.binding_point_ != nullptr); - if (_this->_impl_.binding_point_ == nullptr) { - _this->_impl_.binding_point_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.binding_point_); - } else { - _this->_impl_.binding_point_->MergeFrom(*from._impl_.binding_point_); - } - } - if ((cached_has_bits & 0x00000002U) != 0) { - _this->_impl_.input_attachment_index_ = from._impl_.input_attachment_index_; - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void InstructionVar::CopyFrom(const InstructionVar& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.InstructionVar) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void InstructionVar::InternalSwap(InstructionVar* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::google::protobuf::internal::memswap< - PROTOBUF_FIELD_OFFSET(InstructionVar, _impl_.input_attachment_index_) - + sizeof(InstructionVar::_impl_.input_attachment_index_) - - PROTOBUF_FIELD_OFFSET(InstructionVar, _impl_.binding_point_)>( - reinterpret_cast(&_impl_.binding_point_), - reinterpret_cast(&other->_impl_.binding_point_)); -} - -::google::protobuf::Metadata InstructionVar::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class InstructionConvert::_Internal { - public: -}; - -InstructionConvert::InstructionConvert(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, InstructionConvert_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.InstructionConvert) -} -InstructionConvert::InstructionConvert( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const InstructionConvert& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, InstructionConvert_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - InstructionConvert* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.InstructionConvert) -} - -inline void* PROTOBUF_NONNULL InstructionConvert::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) InstructionConvert(arena); -} -constexpr auto InstructionConvert::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(InstructionConvert), - alignof(InstructionConvert)); -} -constexpr auto InstructionConvert::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_InstructionConvert_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &InstructionConvert::MergeImpl, - ::google::protobuf::internal::ZeroFieldsBase::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &InstructionConvert::SharedDtor, - ::google::protobuf::internal::ZeroFieldsBase::GetClearImpl(), &InstructionConvert::ByteSizeLong, - &InstructionConvert::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(InstructionConvert, _impl_._cached_size_), - false, - }, - &InstructionConvert::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull InstructionConvert_class_data_ = - InstructionConvert::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -InstructionConvert::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&InstructionConvert_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(InstructionConvert_class_data_.tc_table); - return InstructionConvert_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 0, 0, 0, 2> -InstructionConvert::_table_ = { - { - 0, // no _has_bits_ - 0, // no _extensions_ - 0, 0, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967295, // skipmap - offsetof(decltype(_table_), field_names), // no field_entries - 0, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - InstructionConvert_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionConvert>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - }}, {{ - 65535, 65535 - }}, // no field_entries, or aux_entries - {{ - }}, -}; - - - - - - - -::google::protobuf::Metadata InstructionConvert::GetMetadata() const { - return ::google::protobuf::internal::ZeroFieldsBase::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class InstructionAccess::_Internal { - public: -}; - -InstructionAccess::InstructionAccess(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, InstructionAccess_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.InstructionAccess) -} -InstructionAccess::InstructionAccess( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const InstructionAccess& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, InstructionAccess_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - InstructionAccess* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.InstructionAccess) -} - -inline void* PROTOBUF_NONNULL InstructionAccess::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) InstructionAccess(arena); -} -constexpr auto InstructionAccess::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(InstructionAccess), - alignof(InstructionAccess)); -} -constexpr auto InstructionAccess::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_InstructionAccess_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &InstructionAccess::MergeImpl, - ::google::protobuf::internal::ZeroFieldsBase::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &InstructionAccess::SharedDtor, - ::google::protobuf::internal::ZeroFieldsBase::GetClearImpl(), &InstructionAccess::ByteSizeLong, - &InstructionAccess::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(InstructionAccess, _impl_._cached_size_), - false, - }, - &InstructionAccess::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull InstructionAccess_class_data_ = - InstructionAccess::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -InstructionAccess::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&InstructionAccess_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(InstructionAccess_class_data_.tc_table); - return InstructionAccess_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 0, 0, 0, 2> -InstructionAccess::_table_ = { - { - 0, // no _has_bits_ - 0, // no _extensions_ - 0, 0, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967295, // skipmap - offsetof(decltype(_table_), field_names), // no field_entries - 0, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - InstructionAccess_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionAccess>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - }}, {{ - 65535, 65535 - }}, // no field_entries, or aux_entries - {{ - }}, -}; - - - - - - - -::google::protobuf::Metadata InstructionAccess::GetMetadata() const { - return ::google::protobuf::internal::ZeroFieldsBase::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class InstructionUserCall::_Internal { - public: -}; - -InstructionUserCall::InstructionUserCall(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, InstructionUserCall_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.InstructionUserCall) -} -InstructionUserCall::InstructionUserCall( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const InstructionUserCall& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, InstructionUserCall_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - InstructionUserCall* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.InstructionUserCall) -} - -inline void* PROTOBUF_NONNULL InstructionUserCall::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) InstructionUserCall(arena); -} -constexpr auto InstructionUserCall::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(InstructionUserCall), - alignof(InstructionUserCall)); -} -constexpr auto InstructionUserCall::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_InstructionUserCall_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &InstructionUserCall::MergeImpl, - ::google::protobuf::internal::ZeroFieldsBase::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &InstructionUserCall::SharedDtor, - ::google::protobuf::internal::ZeroFieldsBase::GetClearImpl(), &InstructionUserCall::ByteSizeLong, - &InstructionUserCall::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(InstructionUserCall, _impl_._cached_size_), - false, - }, - &InstructionUserCall::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull InstructionUserCall_class_data_ = - InstructionUserCall::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -InstructionUserCall::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&InstructionUserCall_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(InstructionUserCall_class_data_.tc_table); - return InstructionUserCall_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 0, 0, 0, 2> -InstructionUserCall::_table_ = { - { - 0, // no _has_bits_ - 0, // no _extensions_ - 0, 0, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967295, // skipmap - offsetof(decltype(_table_), field_names), // no field_entries - 0, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - InstructionUserCall_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionUserCall>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - }}, {{ - 65535, 65535 - }}, // no field_entries, or aux_entries - {{ - }}, -}; - - - - - - - -::google::protobuf::Metadata InstructionUserCall::GetMetadata() const { - return ::google::protobuf::internal::ZeroFieldsBase::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class InstructionBuiltinCall::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(InstructionBuiltinCall, _impl_._has_bits_); -}; - -InstructionBuiltinCall::InstructionBuiltinCall(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, InstructionBuiltinCall_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.InstructionBuiltinCall) -} -PROTOBUF_NDEBUG_INLINE InstructionBuiltinCall::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - [[maybe_unused]] const ::tint::core::ir::binary::pb::InstructionBuiltinCall& from_msg) - : _has_bits_{from._has_bits_}, - _cached_size_{0}, - explicit_template_params_{visibility, arena, from.explicit_template_params_}, - _explicit_template_params_cached_byte_size_{0} {} - -InstructionBuiltinCall::InstructionBuiltinCall( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const InstructionBuiltinCall& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, InstructionBuiltinCall_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - InstructionBuiltinCall* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); - _impl_.builtin_ = from._impl_.builtin_; - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.InstructionBuiltinCall) -} -PROTOBUF_NDEBUG_INLINE InstructionBuiltinCall::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0}, - explicit_template_params_{visibility, arena}, - _explicit_template_params_cached_byte_size_{0} {} - -inline void InstructionBuiltinCall::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - _impl_.builtin_ = {}; -} -InstructionBuiltinCall::~InstructionBuiltinCall() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.InstructionBuiltinCall) - SharedDtor(*this); -} -inline void InstructionBuiltinCall::SharedDtor(MessageLite& self) { - InstructionBuiltinCall& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL InstructionBuiltinCall::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) InstructionBuiltinCall(arena); -} -constexpr auto InstructionBuiltinCall::InternalNewImpl_() { - constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ - PROTOBUF_FIELD_OFFSET(InstructionBuiltinCall, _impl_.explicit_template_params_) + - decltype(InstructionBuiltinCall::_impl_.explicit_template_params_):: - InternalGetArenaOffset( - ::google::protobuf::Message::internal_visibility()), - }); - if constexpr (arena_bits.has_value()) { - return ::google::protobuf::internal::MessageCreator::ZeroInit( - sizeof(InstructionBuiltinCall), alignof(InstructionBuiltinCall), *arena_bits); - } else { - return ::google::protobuf::internal::MessageCreator(&InstructionBuiltinCall::PlacementNew_, - sizeof(InstructionBuiltinCall), - alignof(InstructionBuiltinCall)); - } -} -constexpr auto InstructionBuiltinCall::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_InstructionBuiltinCall_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &InstructionBuiltinCall::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &InstructionBuiltinCall::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &InstructionBuiltinCall::ByteSizeLong, - &InstructionBuiltinCall::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(InstructionBuiltinCall, _impl_._cached_size_), - false, - }, - &InstructionBuiltinCall::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull InstructionBuiltinCall_class_data_ = - InstructionBuiltinCall::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -InstructionBuiltinCall::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&InstructionBuiltinCall_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(InstructionBuiltinCall_class_data_.tc_table); - return InstructionBuiltinCall_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<1, 2, 0, 0, 2> -InstructionBuiltinCall::_table_ = { - { - PROTOBUF_FIELD_OFFSET(InstructionBuiltinCall, _impl_._has_bits_), - 0, // no _extensions_ - 2, 8, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967292, // skipmap - offsetof(decltype(_table_), field_entries), - 2, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - InstructionBuiltinCall_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionBuiltinCall>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - // repeated uint32 explicit_template_params = 2; - {::_pbi::TcParser::FastV32P1, - {18, 63, 0, PROTOBUF_FIELD_OFFSET(InstructionBuiltinCall, _impl_.explicit_template_params_)}}, - // .tint.core.ir.binary.pb.BuiltinFn builtin = 1; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(InstructionBuiltinCall, _impl_.builtin_), 0>(), - {8, 0, 0, PROTOBUF_FIELD_OFFSET(InstructionBuiltinCall, _impl_.builtin_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // .tint.core.ir.binary.pb.BuiltinFn builtin = 1; - {PROTOBUF_FIELD_OFFSET(InstructionBuiltinCall, _impl_.builtin_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)}, - // repeated uint32 explicit_template_params = 2; - {PROTOBUF_FIELD_OFFSET(InstructionBuiltinCall, _impl_.explicit_template_params_), -1, 0, (0 | ::_fl::kFcRepeated | ::_fl::kPackedUInt32)}, - }}, - // no aux_entries - {{ - }}, -}; -PROTOBUF_NOINLINE void InstructionBuiltinCall::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.InstructionBuiltinCall) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.explicit_template_params_.Clear(); - _impl_.builtin_ = 0; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL InstructionBuiltinCall::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const InstructionBuiltinCall& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL InstructionBuiltinCall::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const InstructionBuiltinCall& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.InstructionBuiltinCall) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // .tint.core.ir.binary.pb.BuiltinFn builtin = 1; - if ((this_._impl_._has_bits_[0] & 0x00000001U) != 0) { - if (this_._internal_builtin() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 1, this_._internal_builtin(), target); - } - } - - // repeated uint32 explicit_template_params = 2; - { - int byte_size = this_._impl_._explicit_template_params_cached_byte_size_.Get(); - if (byte_size > 0) { - target = stream->WriteUInt32Packed( - 2, this_._internal_explicit_template_params(), byte_size, target); - } - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.InstructionBuiltinCall) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t InstructionBuiltinCall::ByteSizeLong(const MessageLite& base) { - const InstructionBuiltinCall& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t InstructionBuiltinCall::ByteSizeLong() const { - const InstructionBuiltinCall& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.InstructionBuiltinCall) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - ::_pbi::Prefetch5LinesFrom7Lines(&this_); - { - // repeated uint32 explicit_template_params = 2; - { - total_size += - ::_pbi::WireFormatLite::UInt32SizeWithPackedTagSize( - this_._internal_explicit_template_params(), 1, - this_._impl_._explicit_template_params_cached_byte_size_); - } - } - { - // .tint.core.ir.binary.pb.BuiltinFn builtin = 1; - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000001U) != 0) { - if (this_._internal_builtin() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this_._internal_builtin()); - } - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void InstructionBuiltinCall::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.InstructionBuiltinCall) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - _this->_internal_mutable_explicit_template_params()->MergeFrom(from._internal_explicit_template_params()); - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000001U) != 0) { - if (from._internal_builtin() != 0) { - _this->_impl_.builtin_ = from._impl_.builtin_; - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void InstructionBuiltinCall::CopyFrom(const InstructionBuiltinCall& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.InstructionBuiltinCall) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void InstructionBuiltinCall::InternalSwap(InstructionBuiltinCall* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - _impl_.explicit_template_params_.InternalSwap(&other->_impl_.explicit_template_params_); - swap(_impl_.builtin_, other->_impl_.builtin_); -} - -::google::protobuf::Metadata InstructionBuiltinCall::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class InstructionLoad::_Internal { - public: -}; - -InstructionLoad::InstructionLoad(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, InstructionLoad_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.InstructionLoad) -} -InstructionLoad::InstructionLoad( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const InstructionLoad& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, InstructionLoad_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - InstructionLoad* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.InstructionLoad) -} - -inline void* PROTOBUF_NONNULL InstructionLoad::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) InstructionLoad(arena); -} -constexpr auto InstructionLoad::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(InstructionLoad), - alignof(InstructionLoad)); -} -constexpr auto InstructionLoad::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_InstructionLoad_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &InstructionLoad::MergeImpl, - ::google::protobuf::internal::ZeroFieldsBase::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &InstructionLoad::SharedDtor, - ::google::protobuf::internal::ZeroFieldsBase::GetClearImpl(), &InstructionLoad::ByteSizeLong, - &InstructionLoad::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(InstructionLoad, _impl_._cached_size_), - false, - }, - &InstructionLoad::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull InstructionLoad_class_data_ = - InstructionLoad::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -InstructionLoad::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&InstructionLoad_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(InstructionLoad_class_data_.tc_table); - return InstructionLoad_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 0, 0, 0, 2> -InstructionLoad::_table_ = { - { - 0, // no _has_bits_ - 0, // no _extensions_ - 0, 0, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967295, // skipmap - offsetof(decltype(_table_), field_names), // no field_entries - 0, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - InstructionLoad_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionLoad>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - }}, {{ - 65535, 65535 - }}, // no field_entries, or aux_entries - {{ - }}, -}; - - - - - - - -::google::protobuf::Metadata InstructionLoad::GetMetadata() const { - return ::google::protobuf::internal::ZeroFieldsBase::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class InstructionStore::_Internal { - public: -}; - -InstructionStore::InstructionStore(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, InstructionStore_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.InstructionStore) -} -InstructionStore::InstructionStore( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const InstructionStore& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, InstructionStore_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - InstructionStore* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.InstructionStore) -} - -inline void* PROTOBUF_NONNULL InstructionStore::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) InstructionStore(arena); -} -constexpr auto InstructionStore::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(InstructionStore), - alignof(InstructionStore)); -} -constexpr auto InstructionStore::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_InstructionStore_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &InstructionStore::MergeImpl, - ::google::protobuf::internal::ZeroFieldsBase::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &InstructionStore::SharedDtor, - ::google::protobuf::internal::ZeroFieldsBase::GetClearImpl(), &InstructionStore::ByteSizeLong, - &InstructionStore::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(InstructionStore, _impl_._cached_size_), - false, - }, - &InstructionStore::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull InstructionStore_class_data_ = - InstructionStore::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -InstructionStore::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&InstructionStore_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(InstructionStore_class_data_.tc_table); - return InstructionStore_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 0, 0, 0, 2> -InstructionStore::_table_ = { - { - 0, // no _has_bits_ - 0, // no _extensions_ - 0, 0, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967295, // skipmap - offsetof(decltype(_table_), field_names), // no field_entries - 0, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - InstructionStore_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionStore>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - }}, {{ - 65535, 65535 - }}, // no field_entries, or aux_entries - {{ - }}, -}; - - - - - - - -::google::protobuf::Metadata InstructionStore::GetMetadata() const { - return ::google::protobuf::internal::ZeroFieldsBase::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class InstructionLoadVectorElement::_Internal { - public: -}; - -InstructionLoadVectorElement::InstructionLoadVectorElement(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, InstructionLoadVectorElement_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.InstructionLoadVectorElement) -} -InstructionLoadVectorElement::InstructionLoadVectorElement( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const InstructionLoadVectorElement& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, InstructionLoadVectorElement_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - InstructionLoadVectorElement* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.InstructionLoadVectorElement) -} - -inline void* PROTOBUF_NONNULL InstructionLoadVectorElement::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) InstructionLoadVectorElement(arena); -} -constexpr auto InstructionLoadVectorElement::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(InstructionLoadVectorElement), - alignof(InstructionLoadVectorElement)); -} -constexpr auto InstructionLoadVectorElement::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_InstructionLoadVectorElement_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &InstructionLoadVectorElement::MergeImpl, - ::google::protobuf::internal::ZeroFieldsBase::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &InstructionLoadVectorElement::SharedDtor, - ::google::protobuf::internal::ZeroFieldsBase::GetClearImpl(), &InstructionLoadVectorElement::ByteSizeLong, - &InstructionLoadVectorElement::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(InstructionLoadVectorElement, _impl_._cached_size_), - false, - }, - &InstructionLoadVectorElement::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull InstructionLoadVectorElement_class_data_ = - InstructionLoadVectorElement::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -InstructionLoadVectorElement::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&InstructionLoadVectorElement_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(InstructionLoadVectorElement_class_data_.tc_table); - return InstructionLoadVectorElement_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 0, 0, 0, 2> -InstructionLoadVectorElement::_table_ = { - { - 0, // no _has_bits_ - 0, // no _extensions_ - 0, 0, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967295, // skipmap - offsetof(decltype(_table_), field_names), // no field_entries - 0, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - InstructionLoadVectorElement_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionLoadVectorElement>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - }}, {{ - 65535, 65535 - }}, // no field_entries, or aux_entries - {{ - }}, -}; - - - - - - - -::google::protobuf::Metadata InstructionLoadVectorElement::GetMetadata() const { - return ::google::protobuf::internal::ZeroFieldsBase::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class InstructionStoreVectorElement::_Internal { - public: -}; - -InstructionStoreVectorElement::InstructionStoreVectorElement(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, InstructionStoreVectorElement_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.InstructionStoreVectorElement) -} -InstructionStoreVectorElement::InstructionStoreVectorElement( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const InstructionStoreVectorElement& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, InstructionStoreVectorElement_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - InstructionStoreVectorElement* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.InstructionStoreVectorElement) -} - -inline void* PROTOBUF_NONNULL InstructionStoreVectorElement::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) InstructionStoreVectorElement(arena); -} -constexpr auto InstructionStoreVectorElement::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(InstructionStoreVectorElement), - alignof(InstructionStoreVectorElement)); -} -constexpr auto InstructionStoreVectorElement::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_InstructionStoreVectorElement_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &InstructionStoreVectorElement::MergeImpl, - ::google::protobuf::internal::ZeroFieldsBase::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &InstructionStoreVectorElement::SharedDtor, - ::google::protobuf::internal::ZeroFieldsBase::GetClearImpl(), &InstructionStoreVectorElement::ByteSizeLong, - &InstructionStoreVectorElement::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(InstructionStoreVectorElement, _impl_._cached_size_), - false, - }, - &InstructionStoreVectorElement::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull InstructionStoreVectorElement_class_data_ = - InstructionStoreVectorElement::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -InstructionStoreVectorElement::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&InstructionStoreVectorElement_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(InstructionStoreVectorElement_class_data_.tc_table); - return InstructionStoreVectorElement_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 0, 0, 0, 2> -InstructionStoreVectorElement::_table_ = { - { - 0, // no _has_bits_ - 0, // no _extensions_ - 0, 0, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967295, // skipmap - offsetof(decltype(_table_), field_names), // no field_entries - 0, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - InstructionStoreVectorElement_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionStoreVectorElement>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - }}, {{ - 65535, 65535 - }}, // no field_entries, or aux_entries - {{ - }}, -}; - - - - - - - -::google::protobuf::Metadata InstructionStoreVectorElement::GetMetadata() const { - return ::google::protobuf::internal::ZeroFieldsBase::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class InstructionSwizzle::_Internal { - public: -}; - -InstructionSwizzle::InstructionSwizzle(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, InstructionSwizzle_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.InstructionSwizzle) -} -PROTOBUF_NDEBUG_INLINE InstructionSwizzle::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - [[maybe_unused]] const ::tint::core::ir::binary::pb::InstructionSwizzle& from_msg) - : indices_{visibility, arena, from.indices_}, - _indices_cached_byte_size_{0}, - _cached_size_{0} {} - -InstructionSwizzle::InstructionSwizzle( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const InstructionSwizzle& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, InstructionSwizzle_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - InstructionSwizzle* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.InstructionSwizzle) -} -PROTOBUF_NDEBUG_INLINE InstructionSwizzle::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : indices_{visibility, arena}, - _indices_cached_byte_size_{0}, - _cached_size_{0} {} - -inline void InstructionSwizzle::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); -} -InstructionSwizzle::~InstructionSwizzle() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.InstructionSwizzle) - SharedDtor(*this); -} -inline void InstructionSwizzle::SharedDtor(MessageLite& self) { - InstructionSwizzle& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL InstructionSwizzle::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) InstructionSwizzle(arena); -} -constexpr auto InstructionSwizzle::InternalNewImpl_() { - constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ - PROTOBUF_FIELD_OFFSET(InstructionSwizzle, _impl_.indices_) + - decltype(InstructionSwizzle::_impl_.indices_):: - InternalGetArenaOffset( - ::google::protobuf::Message::internal_visibility()), - }); - if constexpr (arena_bits.has_value()) { - return ::google::protobuf::internal::MessageCreator::ZeroInit( - sizeof(InstructionSwizzle), alignof(InstructionSwizzle), *arena_bits); - } else { - return ::google::protobuf::internal::MessageCreator(&InstructionSwizzle::PlacementNew_, - sizeof(InstructionSwizzle), - alignof(InstructionSwizzle)); - } -} -constexpr auto InstructionSwizzle::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_InstructionSwizzle_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &InstructionSwizzle::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &InstructionSwizzle::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &InstructionSwizzle::ByteSizeLong, - &InstructionSwizzle::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(InstructionSwizzle, _impl_._cached_size_), - false, - }, - &InstructionSwizzle::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull InstructionSwizzle_class_data_ = - InstructionSwizzle::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -InstructionSwizzle::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&InstructionSwizzle_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(InstructionSwizzle_class_data_.tc_table); - return InstructionSwizzle_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 1, 0, 0, 2> -InstructionSwizzle::_table_ = { - { - 0, // no _has_bits_ - 0, // no _extensions_ - 1, 0, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967294, // skipmap - offsetof(decltype(_table_), field_entries), - 1, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - InstructionSwizzle_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionSwizzle>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - // repeated uint32 indices = 1; - {::_pbi::TcParser::FastV32P1, - {10, 63, 0, PROTOBUF_FIELD_OFFSET(InstructionSwizzle, _impl_.indices_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // repeated uint32 indices = 1; - {PROTOBUF_FIELD_OFFSET(InstructionSwizzle, _impl_.indices_), 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kPackedUInt32)}, - }}, - // no aux_entries - {{ - }}, -}; -PROTOBUF_NOINLINE void InstructionSwizzle::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.InstructionSwizzle) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.indices_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL InstructionSwizzle::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const InstructionSwizzle& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL InstructionSwizzle::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const InstructionSwizzle& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.InstructionSwizzle) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // repeated uint32 indices = 1; - { - int byte_size = this_._impl_._indices_cached_byte_size_.Get(); - if (byte_size > 0) { - target = stream->WriteUInt32Packed( - 1, this_._internal_indices(), byte_size, target); - } - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.InstructionSwizzle) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t InstructionSwizzle::ByteSizeLong(const MessageLite& base) { - const InstructionSwizzle& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t InstructionSwizzle::ByteSizeLong() const { - const InstructionSwizzle& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.InstructionSwizzle) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - ::_pbi::Prefetch5LinesFrom7Lines(&this_); - { - // repeated uint32 indices = 1; - { - total_size += - ::_pbi::WireFormatLite::UInt32SizeWithPackedTagSize( - this_._internal_indices(), 1, - this_._impl_._indices_cached_byte_size_); - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void InstructionSwizzle::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.InstructionSwizzle) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - _this->_internal_mutable_indices()->MergeFrom(from._internal_indices()); - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void InstructionSwizzle::CopyFrom(const InstructionSwizzle& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.InstructionSwizzle) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void InstructionSwizzle::InternalSwap(InstructionSwizzle* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - _impl_.indices_.InternalSwap(&other->_impl_.indices_); -} - -::google::protobuf::Metadata InstructionSwizzle::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class InstructionIf::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(InstructionIf, _impl_._has_bits_); -}; - -InstructionIf::InstructionIf(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, InstructionIf_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.InstructionIf) -} -InstructionIf::InstructionIf( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const InstructionIf& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, InstructionIf_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(from._impl_) { - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); -} -PROTOBUF_NDEBUG_INLINE InstructionIf::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0} {} - -inline void InstructionIf::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - ::memset(reinterpret_cast(&_impl_) + - offsetof(Impl_, true__), - 0, - offsetof(Impl_, false__) - - offsetof(Impl_, true__) + - sizeof(Impl_::false__)); -} -InstructionIf::~InstructionIf() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.InstructionIf) - SharedDtor(*this); -} -inline void InstructionIf::SharedDtor(MessageLite& self) { - InstructionIf& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL InstructionIf::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) InstructionIf(arena); -} -constexpr auto InstructionIf::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(InstructionIf), - alignof(InstructionIf)); -} -constexpr auto InstructionIf::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_InstructionIf_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &InstructionIf::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &InstructionIf::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &InstructionIf::ByteSizeLong, - &InstructionIf::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(InstructionIf, _impl_._cached_size_), - false, - }, - &InstructionIf::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull InstructionIf_class_data_ = - InstructionIf::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -InstructionIf::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&InstructionIf_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(InstructionIf_class_data_.tc_table); - return InstructionIf_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<1, 2, 0, 0, 2> -InstructionIf::_table_ = { - { - PROTOBUF_FIELD_OFFSET(InstructionIf, _impl_._has_bits_), - 0, // no _extensions_ - 2, 8, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967292, // skipmap - offsetof(decltype(_table_), field_entries), - 2, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - InstructionIf_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionIf>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - // optional uint32 false = 2; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(InstructionIf, _impl_.false__), 1>(), - {16, 1, 0, PROTOBUF_FIELD_OFFSET(InstructionIf, _impl_.false__)}}, - // optional uint32 true = 1; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(InstructionIf, _impl_.true__), 0>(), - {8, 0, 0, PROTOBUF_FIELD_OFFSET(InstructionIf, _impl_.true__)}}, - }}, {{ - 65535, 65535 - }}, {{ - // optional uint32 true = 1; - {PROTOBUF_FIELD_OFFSET(InstructionIf, _impl_.true__), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - // optional uint32 false = 2; - {PROTOBUF_FIELD_OFFSET(InstructionIf, _impl_.false__), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - }}, - // no aux_entries - {{ - }}, -}; -PROTOBUF_NOINLINE void InstructionIf::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.InstructionIf) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - ::memset(&_impl_.true__, 0, static_cast<::size_t>( - reinterpret_cast(&_impl_.false__) - - reinterpret_cast(&_impl_.true__)) + sizeof(_impl_.false__)); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL InstructionIf::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const InstructionIf& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL InstructionIf::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const InstructionIf& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.InstructionIf) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - cached_has_bits = this_._impl_._has_bits_[0]; - // optional uint32 true = 1; - if ((cached_has_bits & 0x00000001U) != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 1, this_._internal_true_(), target); - } - - // optional uint32 false = 2; - if ((cached_has_bits & 0x00000002U) != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 2, this_._internal_false_(), target); - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.InstructionIf) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t InstructionIf::ByteSizeLong(const MessageLite& base) { - const InstructionIf& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t InstructionIf::ByteSizeLong() const { - const InstructionIf& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.InstructionIf) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - ::_pbi::Prefetch5LinesFrom7Lines(&this_); - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - // optional uint32 true = 1; - if ((cached_has_bits & 0x00000001U) != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_true_()); - } - // optional uint32 false = 2; - if ((cached_has_bits & 0x00000002U) != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_false_()); - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void InstructionIf::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.InstructionIf) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - if ((cached_has_bits & 0x00000001U) != 0) { - _this->_impl_.true__ = from._impl_.true__; - } - if ((cached_has_bits & 0x00000002U) != 0) { - _this->_impl_.false__ = from._impl_.false__; - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void InstructionIf::CopyFrom(const InstructionIf& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.InstructionIf) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void InstructionIf::InternalSwap(InstructionIf* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::google::protobuf::internal::memswap< - PROTOBUF_FIELD_OFFSET(InstructionIf, _impl_.false__) - + sizeof(InstructionIf::_impl_.false__) - - PROTOBUF_FIELD_OFFSET(InstructionIf, _impl_.true__)>( - reinterpret_cast(&_impl_.true__), - reinterpret_cast(&other->_impl_.true__)); -} - -::google::protobuf::Metadata InstructionIf::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class InstructionSwitch::_Internal { - public: -}; - -InstructionSwitch::InstructionSwitch(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, InstructionSwitch_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.InstructionSwitch) -} -PROTOBUF_NDEBUG_INLINE InstructionSwitch::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - [[maybe_unused]] const ::tint::core::ir::binary::pb::InstructionSwitch& from_msg) - : cases_{visibility, arena, from.cases_}, - _cached_size_{0} {} - -InstructionSwitch::InstructionSwitch( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const InstructionSwitch& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, InstructionSwitch_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - InstructionSwitch* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.InstructionSwitch) -} -PROTOBUF_NDEBUG_INLINE InstructionSwitch::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : cases_{visibility, arena}, - _cached_size_{0} {} - -inline void InstructionSwitch::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); -} -InstructionSwitch::~InstructionSwitch() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.InstructionSwitch) - SharedDtor(*this); -} -inline void InstructionSwitch::SharedDtor(MessageLite& self) { - InstructionSwitch& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL InstructionSwitch::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) InstructionSwitch(arena); -} -constexpr auto InstructionSwitch::InternalNewImpl_() { - constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ - PROTOBUF_FIELD_OFFSET(InstructionSwitch, _impl_.cases_) + - decltype(InstructionSwitch::_impl_.cases_):: - InternalGetArenaOffset( - ::google::protobuf::Message::internal_visibility()), - }); - if constexpr (arena_bits.has_value()) { - return ::google::protobuf::internal::MessageCreator::ZeroInit( - sizeof(InstructionSwitch), alignof(InstructionSwitch), *arena_bits); - } else { - return ::google::protobuf::internal::MessageCreator(&InstructionSwitch::PlacementNew_, - sizeof(InstructionSwitch), - alignof(InstructionSwitch)); - } -} -constexpr auto InstructionSwitch::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_InstructionSwitch_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &InstructionSwitch::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &InstructionSwitch::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &InstructionSwitch::ByteSizeLong, - &InstructionSwitch::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(InstructionSwitch, _impl_._cached_size_), - false, - }, - &InstructionSwitch::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull InstructionSwitch_class_data_ = - InstructionSwitch::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -InstructionSwitch::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&InstructionSwitch_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(InstructionSwitch_class_data_.tc_table); - return InstructionSwitch_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 1, 1, 0, 2> -InstructionSwitch::_table_ = { - { - 0, // no _has_bits_ - 0, // no _extensions_ - 1, 0, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967294, // skipmap - offsetof(decltype(_table_), field_entries), - 1, // num_field_entries - 1, // num_aux_entries - offsetof(decltype(_table_), aux_entries), - InstructionSwitch_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionSwitch>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - // repeated .tint.core.ir.binary.pb.SwitchCase cases = 1; - {::_pbi::TcParser::FastMtR1, - {10, 63, 0, PROTOBUF_FIELD_OFFSET(InstructionSwitch, _impl_.cases_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // repeated .tint.core.ir.binary.pb.SwitchCase cases = 1; - {PROTOBUF_FIELD_OFFSET(InstructionSwitch, _impl_.cases_), 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, - }}, - {{ - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::SwitchCase>()}, - }}, - {{ - }}, -}; -PROTOBUF_NOINLINE void InstructionSwitch::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.InstructionSwitch) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.cases_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL InstructionSwitch::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const InstructionSwitch& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL InstructionSwitch::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const InstructionSwitch& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.InstructionSwitch) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // repeated .tint.core.ir.binary.pb.SwitchCase cases = 1; - for (unsigned i = 0, n = static_cast( - this_._internal_cases_size()); - i < n; i++) { - const auto& repfield = this_._internal_cases().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 1, repfield, repfield.GetCachedSize(), - target, stream); - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.InstructionSwitch) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t InstructionSwitch::ByteSizeLong(const MessageLite& base) { - const InstructionSwitch& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t InstructionSwitch::ByteSizeLong() const { - const InstructionSwitch& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.InstructionSwitch) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - ::_pbi::Prefetch5LinesFrom7Lines(&this_); - { - // repeated .tint.core.ir.binary.pb.SwitchCase cases = 1; - { - total_size += 1UL * this_._internal_cases_size(); - for (const auto& msg : this_._internal_cases()) { - total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); - } - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void InstructionSwitch::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.InstructionSwitch) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - _this->_internal_mutable_cases()->MergeFrom( - from._internal_cases()); - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void InstructionSwitch::CopyFrom(const InstructionSwitch& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.InstructionSwitch) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void InstructionSwitch::InternalSwap(InstructionSwitch* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - _impl_.cases_.InternalSwap(&other->_impl_.cases_); -} - -::google::protobuf::Metadata InstructionSwitch::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class InstructionLoop::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(InstructionLoop, _impl_._has_bits_); -}; - -InstructionLoop::InstructionLoop(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, InstructionLoop_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.InstructionLoop) -} -InstructionLoop::InstructionLoop( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const InstructionLoop& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, InstructionLoop_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(from._impl_) { - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); -} -PROTOBUF_NDEBUG_INLINE InstructionLoop::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0} {} - -inline void InstructionLoop::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - ::memset(reinterpret_cast(&_impl_) + - offsetof(Impl_, initializer_), - 0, - offsetof(Impl_, continuing_) - - offsetof(Impl_, initializer_) + - sizeof(Impl_::continuing_)); -} -InstructionLoop::~InstructionLoop() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.InstructionLoop) - SharedDtor(*this); -} -inline void InstructionLoop::SharedDtor(MessageLite& self) { - InstructionLoop& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL InstructionLoop::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) InstructionLoop(arena); -} -constexpr auto InstructionLoop::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(InstructionLoop), - alignof(InstructionLoop)); -} -constexpr auto InstructionLoop::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_InstructionLoop_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &InstructionLoop::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &InstructionLoop::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &InstructionLoop::ByteSizeLong, - &InstructionLoop::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(InstructionLoop, _impl_._cached_size_), - false, - }, - &InstructionLoop::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull InstructionLoop_class_data_ = - InstructionLoop::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -InstructionLoop::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&InstructionLoop_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(InstructionLoop_class_data_.tc_table); - return InstructionLoop_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<2, 3, 0, 0, 2> -InstructionLoop::_table_ = { - { - PROTOBUF_FIELD_OFFSET(InstructionLoop, _impl_._has_bits_), - 0, // no _extensions_ - 3, 24, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967288, // skipmap - offsetof(decltype(_table_), field_entries), - 3, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - InstructionLoop_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionLoop>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - // optional uint32 initializer = 1; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(InstructionLoop, _impl_.initializer_), 0>(), - {8, 0, 0, PROTOBUF_FIELD_OFFSET(InstructionLoop, _impl_.initializer_)}}, - // optional uint32 body = 2; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(InstructionLoop, _impl_.body_), 1>(), - {16, 1, 0, PROTOBUF_FIELD_OFFSET(InstructionLoop, _impl_.body_)}}, - // optional uint32 continuing = 3; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(InstructionLoop, _impl_.continuing_), 2>(), - {24, 2, 0, PROTOBUF_FIELD_OFFSET(InstructionLoop, _impl_.continuing_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // optional uint32 initializer = 1; - {PROTOBUF_FIELD_OFFSET(InstructionLoop, _impl_.initializer_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - // optional uint32 body = 2; - {PROTOBUF_FIELD_OFFSET(InstructionLoop, _impl_.body_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - // optional uint32 continuing = 3; - {PROTOBUF_FIELD_OFFSET(InstructionLoop, _impl_.continuing_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - }}, - // no aux_entries - {{ - }}, -}; -PROTOBUF_NOINLINE void InstructionLoop::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.InstructionLoop) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000007U) != 0) { - ::memset(&_impl_.initializer_, 0, static_cast<::size_t>( - reinterpret_cast(&_impl_.continuing_) - - reinterpret_cast(&_impl_.initializer_)) + sizeof(_impl_.continuing_)); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL InstructionLoop::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const InstructionLoop& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL InstructionLoop::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const InstructionLoop& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.InstructionLoop) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - cached_has_bits = this_._impl_._has_bits_[0]; - // optional uint32 initializer = 1; - if ((cached_has_bits & 0x00000001U) != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 1, this_._internal_initializer(), target); - } - - // optional uint32 body = 2; - if ((cached_has_bits & 0x00000002U) != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 2, this_._internal_body(), target); - } - - // optional uint32 continuing = 3; - if ((cached_has_bits & 0x00000004U) != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 3, this_._internal_continuing(), target); - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.InstructionLoop) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t InstructionLoop::ByteSizeLong(const MessageLite& base) { - const InstructionLoop& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t InstructionLoop::ByteSizeLong() const { - const InstructionLoop& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.InstructionLoop) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - ::_pbi::Prefetch5LinesFrom7Lines(&this_); - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000007U) != 0) { - // optional uint32 initializer = 1; - if ((cached_has_bits & 0x00000001U) != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_initializer()); - } - // optional uint32 body = 2; - if ((cached_has_bits & 0x00000002U) != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_body()); - } - // optional uint32 continuing = 3; - if ((cached_has_bits & 0x00000004U) != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_continuing()); - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void InstructionLoop::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.InstructionLoop) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000007U) != 0) { - if ((cached_has_bits & 0x00000001U) != 0) { - _this->_impl_.initializer_ = from._impl_.initializer_; - } - if ((cached_has_bits & 0x00000002U) != 0) { - _this->_impl_.body_ = from._impl_.body_; - } - if ((cached_has_bits & 0x00000004U) != 0) { - _this->_impl_.continuing_ = from._impl_.continuing_; - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void InstructionLoop::CopyFrom(const InstructionLoop& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.InstructionLoop) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void InstructionLoop::InternalSwap(InstructionLoop* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::google::protobuf::internal::memswap< - PROTOBUF_FIELD_OFFSET(InstructionLoop, _impl_.continuing_) - + sizeof(InstructionLoop::_impl_.continuing_) - - PROTOBUF_FIELD_OFFSET(InstructionLoop, _impl_.initializer_)>( - reinterpret_cast(&_impl_.initializer_), - reinterpret_cast(&other->_impl_.initializer_)); -} - -::google::protobuf::Metadata InstructionLoop::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class InstructionExitIf::_Internal { - public: -}; - -InstructionExitIf::InstructionExitIf(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, InstructionExitIf_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.InstructionExitIf) -} -InstructionExitIf::InstructionExitIf( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const InstructionExitIf& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, InstructionExitIf_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - InstructionExitIf* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.InstructionExitIf) -} - -inline void* PROTOBUF_NONNULL InstructionExitIf::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) InstructionExitIf(arena); -} -constexpr auto InstructionExitIf::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(InstructionExitIf), - alignof(InstructionExitIf)); -} -constexpr auto InstructionExitIf::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_InstructionExitIf_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &InstructionExitIf::MergeImpl, - ::google::protobuf::internal::ZeroFieldsBase::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &InstructionExitIf::SharedDtor, - ::google::protobuf::internal::ZeroFieldsBase::GetClearImpl(), &InstructionExitIf::ByteSizeLong, - &InstructionExitIf::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(InstructionExitIf, _impl_._cached_size_), - false, - }, - &InstructionExitIf::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull InstructionExitIf_class_data_ = - InstructionExitIf::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -InstructionExitIf::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&InstructionExitIf_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(InstructionExitIf_class_data_.tc_table); - return InstructionExitIf_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 0, 0, 0, 2> -InstructionExitIf::_table_ = { - { - 0, // no _has_bits_ - 0, // no _extensions_ - 0, 0, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967295, // skipmap - offsetof(decltype(_table_), field_names), // no field_entries - 0, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - InstructionExitIf_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionExitIf>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - }}, {{ - 65535, 65535 - }}, // no field_entries, or aux_entries - {{ - }}, -}; - - - - - - - -::google::protobuf::Metadata InstructionExitIf::GetMetadata() const { - return ::google::protobuf::internal::ZeroFieldsBase::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class InstructionExitSwitch::_Internal { - public: -}; - -InstructionExitSwitch::InstructionExitSwitch(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, InstructionExitSwitch_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.InstructionExitSwitch) -} -InstructionExitSwitch::InstructionExitSwitch( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const InstructionExitSwitch& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, InstructionExitSwitch_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - InstructionExitSwitch* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.InstructionExitSwitch) -} - -inline void* PROTOBUF_NONNULL InstructionExitSwitch::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) InstructionExitSwitch(arena); -} -constexpr auto InstructionExitSwitch::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(InstructionExitSwitch), - alignof(InstructionExitSwitch)); -} -constexpr auto InstructionExitSwitch::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_InstructionExitSwitch_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &InstructionExitSwitch::MergeImpl, - ::google::protobuf::internal::ZeroFieldsBase::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &InstructionExitSwitch::SharedDtor, - ::google::protobuf::internal::ZeroFieldsBase::GetClearImpl(), &InstructionExitSwitch::ByteSizeLong, - &InstructionExitSwitch::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(InstructionExitSwitch, _impl_._cached_size_), - false, - }, - &InstructionExitSwitch::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull InstructionExitSwitch_class_data_ = - InstructionExitSwitch::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -InstructionExitSwitch::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&InstructionExitSwitch_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(InstructionExitSwitch_class_data_.tc_table); - return InstructionExitSwitch_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 0, 0, 0, 2> -InstructionExitSwitch::_table_ = { - { - 0, // no _has_bits_ - 0, // no _extensions_ - 0, 0, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967295, // skipmap - offsetof(decltype(_table_), field_names), // no field_entries - 0, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - InstructionExitSwitch_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionExitSwitch>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - }}, {{ - 65535, 65535 - }}, // no field_entries, or aux_entries - {{ - }}, -}; - - - - - - - -::google::protobuf::Metadata InstructionExitSwitch::GetMetadata() const { - return ::google::protobuf::internal::ZeroFieldsBase::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class InstructionExitLoop::_Internal { - public: -}; - -InstructionExitLoop::InstructionExitLoop(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, InstructionExitLoop_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.InstructionExitLoop) -} -InstructionExitLoop::InstructionExitLoop( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const InstructionExitLoop& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, InstructionExitLoop_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - InstructionExitLoop* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.InstructionExitLoop) -} - -inline void* PROTOBUF_NONNULL InstructionExitLoop::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) InstructionExitLoop(arena); -} -constexpr auto InstructionExitLoop::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(InstructionExitLoop), - alignof(InstructionExitLoop)); -} -constexpr auto InstructionExitLoop::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_InstructionExitLoop_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &InstructionExitLoop::MergeImpl, - ::google::protobuf::internal::ZeroFieldsBase::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &InstructionExitLoop::SharedDtor, - ::google::protobuf::internal::ZeroFieldsBase::GetClearImpl(), &InstructionExitLoop::ByteSizeLong, - &InstructionExitLoop::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(InstructionExitLoop, _impl_._cached_size_), - false, - }, - &InstructionExitLoop::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull InstructionExitLoop_class_data_ = - InstructionExitLoop::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -InstructionExitLoop::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&InstructionExitLoop_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(InstructionExitLoop_class_data_.tc_table); - return InstructionExitLoop_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 0, 0, 0, 2> -InstructionExitLoop::_table_ = { - { - 0, // no _has_bits_ - 0, // no _extensions_ - 0, 0, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967295, // skipmap - offsetof(decltype(_table_), field_names), // no field_entries - 0, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - InstructionExitLoop_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionExitLoop>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - }}, {{ - 65535, 65535 - }}, // no field_entries, or aux_entries - {{ - }}, -}; - - - - - - - -::google::protobuf::Metadata InstructionExitLoop::GetMetadata() const { - return ::google::protobuf::internal::ZeroFieldsBase::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class SwitchCase::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(SwitchCase, _impl_._has_bits_); -}; - -SwitchCase::SwitchCase(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, SwitchCase_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.SwitchCase) -} -PROTOBUF_NDEBUG_INLINE SwitchCase::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - [[maybe_unused]] const ::tint::core::ir::binary::pb::SwitchCase& from_msg) - : _has_bits_{from._has_bits_}, - _cached_size_{0}, - selectors_{visibility, arena, from.selectors_}, - _selectors_cached_byte_size_{0} {} - -SwitchCase::SwitchCase( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const SwitchCase& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, SwitchCase_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SwitchCase* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); - ::memcpy(reinterpret_cast(&_impl_) + - offsetof(Impl_, block_), - reinterpret_cast(&from._impl_) + - offsetof(Impl_, block_), - offsetof(Impl_, is_default_) - - offsetof(Impl_, block_) + - sizeof(Impl_::is_default_)); - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.SwitchCase) -} -PROTOBUF_NDEBUG_INLINE SwitchCase::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0}, - selectors_{visibility, arena}, - _selectors_cached_byte_size_{0} {} - -inline void SwitchCase::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - ::memset(reinterpret_cast(&_impl_) + - offsetof(Impl_, block_), - 0, - offsetof(Impl_, is_default_) - - offsetof(Impl_, block_) + - sizeof(Impl_::is_default_)); -} -SwitchCase::~SwitchCase() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.SwitchCase) - SharedDtor(*this); -} -inline void SwitchCase::SharedDtor(MessageLite& self) { - SwitchCase& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL SwitchCase::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) SwitchCase(arena); -} -constexpr auto SwitchCase::InternalNewImpl_() { - constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ - PROTOBUF_FIELD_OFFSET(SwitchCase, _impl_.selectors_) + - decltype(SwitchCase::_impl_.selectors_):: - InternalGetArenaOffset( - ::google::protobuf::Message::internal_visibility()), - }); - if constexpr (arena_bits.has_value()) { - return ::google::protobuf::internal::MessageCreator::ZeroInit( - sizeof(SwitchCase), alignof(SwitchCase), *arena_bits); - } else { - return ::google::protobuf::internal::MessageCreator(&SwitchCase::PlacementNew_, - sizeof(SwitchCase), - alignof(SwitchCase)); - } -} -constexpr auto SwitchCase::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_SwitchCase_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &SwitchCase::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &SwitchCase::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &SwitchCase::ByteSizeLong, - &SwitchCase::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(SwitchCase, _impl_._cached_size_), - false, - }, - &SwitchCase::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull SwitchCase_class_data_ = - SwitchCase::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -SwitchCase::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&SwitchCase_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(SwitchCase_class_data_.tc_table); - return SwitchCase_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<2, 3, 0, 0, 2> -SwitchCase::_table_ = { - { - PROTOBUF_FIELD_OFFSET(SwitchCase, _impl_._has_bits_), - 0, // no _extensions_ - 3, 24, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967288, // skipmap - offsetof(decltype(_table_), field_entries), - 3, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - SwitchCase_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::SwitchCase>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - // uint32 block = 1; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(SwitchCase, _impl_.block_), 0>(), - {8, 0, 0, PROTOBUF_FIELD_OFFSET(SwitchCase, _impl_.block_)}}, - // repeated uint32 selectors = 2; - {::_pbi::TcParser::FastV32P1, - {18, 63, 0, PROTOBUF_FIELD_OFFSET(SwitchCase, _impl_.selectors_)}}, - // bool is_default = 3; - {::_pbi::TcParser::SingularVarintNoZag1(), - {24, 1, 0, PROTOBUF_FIELD_OFFSET(SwitchCase, _impl_.is_default_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // uint32 block = 1; - {PROTOBUF_FIELD_OFFSET(SwitchCase, _impl_.block_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - // repeated uint32 selectors = 2; - {PROTOBUF_FIELD_OFFSET(SwitchCase, _impl_.selectors_), -1, 0, (0 | ::_fl::kFcRepeated | ::_fl::kPackedUInt32)}, - // bool is_default = 3; - {PROTOBUF_FIELD_OFFSET(SwitchCase, _impl_.is_default_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, - }}, - // no aux_entries - {{ - }}, -}; -PROTOBUF_NOINLINE void SwitchCase::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.SwitchCase) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.selectors_.Clear(); - cached_has_bits = _impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - ::memset(&_impl_.block_, 0, static_cast<::size_t>( - reinterpret_cast(&_impl_.is_default_) - - reinterpret_cast(&_impl_.block_)) + sizeof(_impl_.is_default_)); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL SwitchCase::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const SwitchCase& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL SwitchCase::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const SwitchCase& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.SwitchCase) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // uint32 block = 1; - if ((this_._impl_._has_bits_[0] & 0x00000001U) != 0) { - if (this_._internal_block() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 1, this_._internal_block(), target); - } - } - - // repeated uint32 selectors = 2; - { - int byte_size = this_._impl_._selectors_cached_byte_size_.Get(); - if (byte_size > 0) { - target = stream->WriteUInt32Packed( - 2, this_._internal_selectors(), byte_size, target); - } - } - - // bool is_default = 3; - if ((this_._impl_._has_bits_[0] & 0x00000002U) != 0) { - if (this_._internal_is_default() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 3, this_._internal_is_default(), target); - } - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.SwitchCase) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t SwitchCase::ByteSizeLong(const MessageLite& base) { - const SwitchCase& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t SwitchCase::ByteSizeLong() const { - const SwitchCase& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.SwitchCase) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - ::_pbi::Prefetch5LinesFrom7Lines(&this_); - { - // repeated uint32 selectors = 2; - { - total_size += - ::_pbi::WireFormatLite::UInt32SizeWithPackedTagSize( - this_._internal_selectors(), 1, - this_._impl_._selectors_cached_byte_size_); - } - } - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - // uint32 block = 1; - if ((cached_has_bits & 0x00000001U) != 0) { - if (this_._internal_block() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_block()); - } - } - // bool is_default = 3; - if ((cached_has_bits & 0x00000002U) != 0) { - if (this_._internal_is_default() != 0) { - total_size += 2; - } - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void SwitchCase::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.SwitchCase) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - _this->_internal_mutable_selectors()->MergeFrom(from._internal_selectors()); - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - if ((cached_has_bits & 0x00000001U) != 0) { - if (from._internal_block() != 0) { - _this->_impl_.block_ = from._impl_.block_; - } - } - if ((cached_has_bits & 0x00000002U) != 0) { - if (from._internal_is_default() != 0) { - _this->_impl_.is_default_ = from._impl_.is_default_; - } - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void SwitchCase::CopyFrom(const SwitchCase& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.SwitchCase) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void SwitchCase::InternalSwap(SwitchCase* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - _impl_.selectors_.InternalSwap(&other->_impl_.selectors_); - ::google::protobuf::internal::memswap< - PROTOBUF_FIELD_OFFSET(SwitchCase, _impl_.is_default_) - + sizeof(SwitchCase::_impl_.is_default_) - - PROTOBUF_FIELD_OFFSET(SwitchCase, _impl_.block_)>( - reinterpret_cast(&_impl_.block_), - reinterpret_cast(&other->_impl_.block_)); -} - -::google::protobuf::Metadata SwitchCase::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class BindingPoint::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(BindingPoint, _impl_._has_bits_); -}; - -BindingPoint::BindingPoint(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, BindingPoint_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.BindingPoint) -} -BindingPoint::BindingPoint( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const BindingPoint& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, BindingPoint_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(from._impl_) { - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); -} -PROTOBUF_NDEBUG_INLINE BindingPoint::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0} {} - -inline void BindingPoint::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - ::memset(reinterpret_cast(&_impl_) + - offsetof(Impl_, group_), - 0, - offsetof(Impl_, binding_) - - offsetof(Impl_, group_) + - sizeof(Impl_::binding_)); -} -BindingPoint::~BindingPoint() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.BindingPoint) - SharedDtor(*this); -} -inline void BindingPoint::SharedDtor(MessageLite& self) { - BindingPoint& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL BindingPoint::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) BindingPoint(arena); -} -constexpr auto BindingPoint::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(BindingPoint), - alignof(BindingPoint)); -} -constexpr auto BindingPoint::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_BindingPoint_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &BindingPoint::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &BindingPoint::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &BindingPoint::ByteSizeLong, - &BindingPoint::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(BindingPoint, _impl_._cached_size_), - false, - }, - &BindingPoint::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull BindingPoint_class_data_ = - BindingPoint::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -BindingPoint::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&BindingPoint_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(BindingPoint_class_data_.tc_table); - return BindingPoint_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<1, 2, 0, 0, 2> -BindingPoint::_table_ = { - { - PROTOBUF_FIELD_OFFSET(BindingPoint, _impl_._has_bits_), - 0, // no _extensions_ - 2, 8, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967292, // skipmap - offsetof(decltype(_table_), field_entries), - 2, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - BindingPoint_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::BindingPoint>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - // uint32 binding = 2; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(BindingPoint, _impl_.binding_), 1>(), - {16, 1, 0, PROTOBUF_FIELD_OFFSET(BindingPoint, _impl_.binding_)}}, - // uint32 group = 1; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(BindingPoint, _impl_.group_), 0>(), - {8, 0, 0, PROTOBUF_FIELD_OFFSET(BindingPoint, _impl_.group_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // uint32 group = 1; - {PROTOBUF_FIELD_OFFSET(BindingPoint, _impl_.group_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - // uint32 binding = 2; - {PROTOBUF_FIELD_OFFSET(BindingPoint, _impl_.binding_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - }}, - // no aux_entries - {{ - }}, -}; -PROTOBUF_NOINLINE void BindingPoint::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.BindingPoint) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - ::memset(&_impl_.group_, 0, static_cast<::size_t>( - reinterpret_cast(&_impl_.binding_) - - reinterpret_cast(&_impl_.group_)) + sizeof(_impl_.binding_)); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL BindingPoint::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const BindingPoint& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL BindingPoint::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const BindingPoint& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.BindingPoint) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // uint32 group = 1; - if ((this_._impl_._has_bits_[0] & 0x00000001U) != 0) { - if (this_._internal_group() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 1, this_._internal_group(), target); - } - } - - // uint32 binding = 2; - if ((this_._impl_._has_bits_[0] & 0x00000002U) != 0) { - if (this_._internal_binding() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 2, this_._internal_binding(), target); - } - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.BindingPoint) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t BindingPoint::ByteSizeLong(const MessageLite& base) { - const BindingPoint& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t BindingPoint::ByteSizeLong() const { - const BindingPoint& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.BindingPoint) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - ::_pbi::Prefetch5LinesFrom7Lines(&this_); - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - // uint32 group = 1; - if ((cached_has_bits & 0x00000001U) != 0) { - if (this_._internal_group() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_group()); - } - } - // uint32 binding = 2; - if ((cached_has_bits & 0x00000002U) != 0) { - if (this_._internal_binding() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_binding()); - } - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void BindingPoint::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.BindingPoint) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - if ((cached_has_bits & 0x00000001U) != 0) { - if (from._internal_group() != 0) { - _this->_impl_.group_ = from._impl_.group_; - } - } - if ((cached_has_bits & 0x00000002U) != 0) { - if (from._internal_binding() != 0) { - _this->_impl_.binding_ = from._impl_.binding_; - } - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void BindingPoint::CopyFrom(const BindingPoint& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.BindingPoint) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void BindingPoint::InternalSwap(BindingPoint* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::google::protobuf::internal::memswap< - PROTOBUF_FIELD_OFFSET(BindingPoint, _impl_.binding_) - + sizeof(BindingPoint::_impl_.binding_) - - PROTOBUF_FIELD_OFFSET(BindingPoint, _impl_.group_)>( - reinterpret_cast(&_impl_.group_), - reinterpret_cast(&other->_impl_.group_)); -} - -::google::protobuf::Metadata BindingPoint::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class InstructionNextIteration::_Internal { - public: -}; - -InstructionNextIteration::InstructionNextIteration(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, InstructionNextIteration_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.InstructionNextIteration) -} -InstructionNextIteration::InstructionNextIteration( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const InstructionNextIteration& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, InstructionNextIteration_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - InstructionNextIteration* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.InstructionNextIteration) -} - -inline void* PROTOBUF_NONNULL InstructionNextIteration::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) InstructionNextIteration(arena); -} -constexpr auto InstructionNextIteration::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(InstructionNextIteration), - alignof(InstructionNextIteration)); -} -constexpr auto InstructionNextIteration::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_InstructionNextIteration_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &InstructionNextIteration::MergeImpl, - ::google::protobuf::internal::ZeroFieldsBase::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &InstructionNextIteration::SharedDtor, - ::google::protobuf::internal::ZeroFieldsBase::GetClearImpl(), &InstructionNextIteration::ByteSizeLong, - &InstructionNextIteration::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(InstructionNextIteration, _impl_._cached_size_), - false, - }, - &InstructionNextIteration::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull InstructionNextIteration_class_data_ = - InstructionNextIteration::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -InstructionNextIteration::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&InstructionNextIteration_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(InstructionNextIteration_class_data_.tc_table); - return InstructionNextIteration_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 0, 0, 0, 2> -InstructionNextIteration::_table_ = { - { - 0, // no _has_bits_ - 0, // no _extensions_ - 0, 0, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967295, // skipmap - offsetof(decltype(_table_), field_names), // no field_entries - 0, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - InstructionNextIteration_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionNextIteration>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - }}, {{ - 65535, 65535 - }}, // no field_entries, or aux_entries - {{ - }}, -}; - - - - - - - -::google::protobuf::Metadata InstructionNextIteration::GetMetadata() const { - return ::google::protobuf::internal::ZeroFieldsBase::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class InstructionContinue::_Internal { - public: -}; - -InstructionContinue::InstructionContinue(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, InstructionContinue_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.InstructionContinue) -} -InstructionContinue::InstructionContinue( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const InstructionContinue& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, InstructionContinue_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - InstructionContinue* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.InstructionContinue) -} - -inline void* PROTOBUF_NONNULL InstructionContinue::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) InstructionContinue(arena); -} -constexpr auto InstructionContinue::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(InstructionContinue), - alignof(InstructionContinue)); -} -constexpr auto InstructionContinue::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_InstructionContinue_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &InstructionContinue::MergeImpl, - ::google::protobuf::internal::ZeroFieldsBase::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &InstructionContinue::SharedDtor, - ::google::protobuf::internal::ZeroFieldsBase::GetClearImpl(), &InstructionContinue::ByteSizeLong, - &InstructionContinue::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(InstructionContinue, _impl_._cached_size_), - false, - }, - &InstructionContinue::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull InstructionContinue_class_data_ = - InstructionContinue::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -InstructionContinue::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&InstructionContinue_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(InstructionContinue_class_data_.tc_table); - return InstructionContinue_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 0, 0, 0, 2> -InstructionContinue::_table_ = { - { - 0, // no _has_bits_ - 0, // no _extensions_ - 0, 0, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967295, // skipmap - offsetof(decltype(_table_), field_names), // no field_entries - 0, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - InstructionContinue_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionContinue>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - }}, {{ - 65535, 65535 - }}, // no field_entries, or aux_entries - {{ - }}, -}; - - - - - - - -::google::protobuf::Metadata InstructionContinue::GetMetadata() const { - return ::google::protobuf::internal::ZeroFieldsBase::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class InstructionBreakIf::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(InstructionBreakIf, _impl_._has_bits_); -}; - -InstructionBreakIf::InstructionBreakIf(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, InstructionBreakIf_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.InstructionBreakIf) -} -InstructionBreakIf::InstructionBreakIf( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const InstructionBreakIf& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, InstructionBreakIf_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(from._impl_) { - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); -} -PROTOBUF_NDEBUG_INLINE InstructionBreakIf::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0} {} - -inline void InstructionBreakIf::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - _impl_.num_next_iter_values_ = {}; -} -InstructionBreakIf::~InstructionBreakIf() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.InstructionBreakIf) - SharedDtor(*this); -} -inline void InstructionBreakIf::SharedDtor(MessageLite& self) { - InstructionBreakIf& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL InstructionBreakIf::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) InstructionBreakIf(arena); -} -constexpr auto InstructionBreakIf::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(InstructionBreakIf), - alignof(InstructionBreakIf)); -} -constexpr auto InstructionBreakIf::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_InstructionBreakIf_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &InstructionBreakIf::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &InstructionBreakIf::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &InstructionBreakIf::ByteSizeLong, - &InstructionBreakIf::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(InstructionBreakIf, _impl_._cached_size_), - false, - }, - &InstructionBreakIf::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull InstructionBreakIf_class_data_ = - InstructionBreakIf::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -InstructionBreakIf::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&InstructionBreakIf_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(InstructionBreakIf_class_data_.tc_table); - return InstructionBreakIf_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 1, 0, 0, 2> -InstructionBreakIf::_table_ = { - { - PROTOBUF_FIELD_OFFSET(InstructionBreakIf, _impl_._has_bits_), - 0, // no _extensions_ - 1, 0, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967294, // skipmap - offsetof(decltype(_table_), field_entries), - 1, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - InstructionBreakIf_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionBreakIf>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - // uint32 num_next_iter_values = 1; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(InstructionBreakIf, _impl_.num_next_iter_values_), 0>(), - {8, 0, 0, PROTOBUF_FIELD_OFFSET(InstructionBreakIf, _impl_.num_next_iter_values_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // uint32 num_next_iter_values = 1; - {PROTOBUF_FIELD_OFFSET(InstructionBreakIf, _impl_.num_next_iter_values_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - }}, - // no aux_entries - {{ - }}, -}; -PROTOBUF_NOINLINE void InstructionBreakIf::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.InstructionBreakIf) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.num_next_iter_values_ = 0u; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL InstructionBreakIf::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const InstructionBreakIf& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL InstructionBreakIf::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const InstructionBreakIf& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.InstructionBreakIf) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // uint32 num_next_iter_values = 1; - if ((this_._impl_._has_bits_[0] & 0x00000001U) != 0) { - if (this_._internal_num_next_iter_values() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 1, this_._internal_num_next_iter_values(), target); - } - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.InstructionBreakIf) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t InstructionBreakIf::ByteSizeLong(const MessageLite& base) { - const InstructionBreakIf& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t InstructionBreakIf::ByteSizeLong() const { - const InstructionBreakIf& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.InstructionBreakIf) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - { - // uint32 num_next_iter_values = 1; - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000001U) != 0) { - if (this_._internal_num_next_iter_values() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_num_next_iter_values()); - } - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void InstructionBreakIf::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.InstructionBreakIf) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000001U) != 0) { - if (from._internal_num_next_iter_values() != 0) { - _this->_impl_.num_next_iter_values_ = from._impl_.num_next_iter_values_; - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void InstructionBreakIf::CopyFrom(const InstructionBreakIf& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.InstructionBreakIf) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void InstructionBreakIf::InternalSwap(InstructionBreakIf* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - swap(_impl_.num_next_iter_values_, other->_impl_.num_next_iter_values_); -} - -::google::protobuf::Metadata InstructionBreakIf::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class InstructionUnreachable::_Internal { - public: -}; - -InstructionUnreachable::InstructionUnreachable(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, InstructionUnreachable_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.InstructionUnreachable) -} -InstructionUnreachable::InstructionUnreachable( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const InstructionUnreachable& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::internal::ZeroFieldsBase(arena, InstructionUnreachable_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::internal::ZeroFieldsBase(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - InstructionUnreachable* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.InstructionUnreachable) -} - -inline void* PROTOBUF_NONNULL InstructionUnreachable::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) InstructionUnreachable(arena); -} -constexpr auto InstructionUnreachable::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(InstructionUnreachable), - alignof(InstructionUnreachable)); -} -constexpr auto InstructionUnreachable::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_InstructionUnreachable_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &InstructionUnreachable::MergeImpl, - ::google::protobuf::internal::ZeroFieldsBase::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &InstructionUnreachable::SharedDtor, - ::google::protobuf::internal::ZeroFieldsBase::GetClearImpl(), &InstructionUnreachable::ByteSizeLong, - &InstructionUnreachable::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(InstructionUnreachable, _impl_._cached_size_), - false, - }, - &InstructionUnreachable::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull InstructionUnreachable_class_data_ = - InstructionUnreachable::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -InstructionUnreachable::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&InstructionUnreachable_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(InstructionUnreachable_class_data_.tc_table); - return InstructionUnreachable_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 0, 0, 0, 2> -InstructionUnreachable::_table_ = { - { - 0, // no _has_bits_ - 0, // no _extensions_ - 0, 0, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967295, // skipmap - offsetof(decltype(_table_), field_names), // no field_entries - 0, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - InstructionUnreachable_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::InstructionUnreachable>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - }}, {{ - 65535, 65535 - }}, // no field_entries, or aux_entries - {{ - }}, -}; - - - - - - - -::google::protobuf::Metadata InstructionUnreachable::GetMetadata() const { - return ::google::protobuf::internal::ZeroFieldsBase::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class AttributesStructMember::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(AttributesStructMember, _impl_._has_bits_); -}; - -AttributesStructMember::AttributesStructMember(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, AttributesStructMember_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.AttributesStructMember) -} -PROTOBUF_NDEBUG_INLINE AttributesStructMember::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - [[maybe_unused]] const ::tint::core::ir::binary::pb::AttributesStructMember& from_msg) - : _has_bits_{from._has_bits_}, - _cached_size_{0} {} - -AttributesStructMember::AttributesStructMember( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const AttributesStructMember& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, AttributesStructMember_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - AttributesStructMember* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); - ::uint32_t cached_has_bits = _impl_._has_bits_[0]; - _impl_.interpolation_ = ((cached_has_bits & 0x00000001U) != 0) - ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.interpolation_) - : nullptr; - ::memcpy(reinterpret_cast(&_impl_) + - offsetof(Impl_, location_), - reinterpret_cast(&from._impl_) + - offsetof(Impl_, location_), - offsetof(Impl_, invariant_) - - offsetof(Impl_, location_) + - sizeof(Impl_::invariant_)); - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.AttributesStructMember) -} -PROTOBUF_NDEBUG_INLINE AttributesStructMember::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0} {} - -inline void AttributesStructMember::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - ::memset(reinterpret_cast(&_impl_) + - offsetof(Impl_, interpolation_), - 0, - offsetof(Impl_, invariant_) - - offsetof(Impl_, interpolation_) + - sizeof(Impl_::invariant_)); -} -AttributesStructMember::~AttributesStructMember() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.AttributesStructMember) - SharedDtor(*this); -} -inline void AttributesStructMember::SharedDtor(MessageLite& self) { - AttributesStructMember& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - delete this_._impl_.interpolation_; - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL AttributesStructMember::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) AttributesStructMember(arena); -} -constexpr auto AttributesStructMember::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(AttributesStructMember), - alignof(AttributesStructMember)); -} -constexpr auto AttributesStructMember::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_AttributesStructMember_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &AttributesStructMember::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &AttributesStructMember::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &AttributesStructMember::ByteSizeLong, - &AttributesStructMember::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(AttributesStructMember, _impl_._cached_size_), - false, - }, - &AttributesStructMember::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull AttributesStructMember_class_data_ = - AttributesStructMember::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -AttributesStructMember::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&AttributesStructMember_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(AttributesStructMember_class_data_.tc_table); - return AttributesStructMember_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<3, 6, 1, 0, 2> -AttributesStructMember::_table_ = { - { - PROTOBUF_FIELD_OFFSET(AttributesStructMember, _impl_._has_bits_), - 0, // no _extensions_ - 6, 56, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967232, // skipmap - offsetof(decltype(_table_), field_entries), - 6, // num_field_entries - 1, // num_aux_entries - offsetof(decltype(_table_), aux_entries), - AttributesStructMember_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::AttributesStructMember>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - // optional uint32 location = 1; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(AttributesStructMember, _impl_.location_), 1>(), - {8, 1, 0, PROTOBUF_FIELD_OFFSET(AttributesStructMember, _impl_.location_)}}, - // optional uint32 blend_src = 2; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(AttributesStructMember, _impl_.blend_src_), 2>(), - {16, 2, 0, PROTOBUF_FIELD_OFFSET(AttributesStructMember, _impl_.blend_src_)}}, - // optional uint32 color = 3; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(AttributesStructMember, _impl_.color_), 3>(), - {24, 3, 0, PROTOBUF_FIELD_OFFSET(AttributesStructMember, _impl_.color_)}}, - // optional .tint.core.ir.binary.pb.BuiltinValue builtin = 4; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(AttributesStructMember, _impl_.builtin_), 4>(), - {32, 4, 0, PROTOBUF_FIELD_OFFSET(AttributesStructMember, _impl_.builtin_)}}, - // optional .tint.core.ir.binary.pb.Interpolation interpolation = 5; - {::_pbi::TcParser::FastMtS1, - {42, 0, 0, PROTOBUF_FIELD_OFFSET(AttributesStructMember, _impl_.interpolation_)}}, - // bool invariant = 6; - {::_pbi::TcParser::SingularVarintNoZag1(), - {48, 5, 0, PROTOBUF_FIELD_OFFSET(AttributesStructMember, _impl_.invariant_)}}, - {::_pbi::TcParser::MiniParse, {}}, - }}, {{ - 65535, 65535 - }}, {{ - // optional uint32 location = 1; - {PROTOBUF_FIELD_OFFSET(AttributesStructMember, _impl_.location_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - // optional uint32 blend_src = 2; - {PROTOBUF_FIELD_OFFSET(AttributesStructMember, _impl_.blend_src_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - // optional uint32 color = 3; - {PROTOBUF_FIELD_OFFSET(AttributesStructMember, _impl_.color_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - // optional .tint.core.ir.binary.pb.BuiltinValue builtin = 4; - {PROTOBUF_FIELD_OFFSET(AttributesStructMember, _impl_.builtin_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)}, - // optional .tint.core.ir.binary.pb.Interpolation interpolation = 5; - {PROTOBUF_FIELD_OFFSET(AttributesStructMember, _impl_.interpolation_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, - // bool invariant = 6; - {PROTOBUF_FIELD_OFFSET(AttributesStructMember, _impl_.invariant_), _Internal::kHasBitsOffset + 5, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, - }}, - {{ - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::Interpolation>()}, - }}, - {{ - }}, -}; -PROTOBUF_NOINLINE void AttributesStructMember::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.AttributesStructMember) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000001U) != 0) { - ABSL_DCHECK(_impl_.interpolation_ != nullptr); - _impl_.interpolation_->Clear(); - } - if ((cached_has_bits & 0x0000003eU) != 0) { - ::memset(&_impl_.location_, 0, static_cast<::size_t>( - reinterpret_cast(&_impl_.invariant_) - - reinterpret_cast(&_impl_.location_)) + sizeof(_impl_.invariant_)); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL AttributesStructMember::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const AttributesStructMember& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL AttributesStructMember::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const AttributesStructMember& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.AttributesStructMember) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - cached_has_bits = this_._impl_._has_bits_[0]; - // optional uint32 location = 1; - if ((cached_has_bits & 0x00000002U) != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 1, this_._internal_location(), target); - } - - // optional uint32 blend_src = 2; - if ((cached_has_bits & 0x00000004U) != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 2, this_._internal_blend_src(), target); - } - - // optional uint32 color = 3; - if ((cached_has_bits & 0x00000008U) != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 3, this_._internal_color(), target); - } - - // optional .tint.core.ir.binary.pb.BuiltinValue builtin = 4; - if ((cached_has_bits & 0x00000010U) != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 4, this_._internal_builtin(), target); - } - - // optional .tint.core.ir.binary.pb.Interpolation interpolation = 5; - if ((cached_has_bits & 0x00000001U) != 0) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 5, *this_._impl_.interpolation_, this_._impl_.interpolation_->GetCachedSize(), target, - stream); - } - - // bool invariant = 6; - if ((cached_has_bits & 0x00000020U) != 0) { - if (this_._internal_invariant() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 6, this_._internal_invariant(), target); - } - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.AttributesStructMember) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t AttributesStructMember::ByteSizeLong(const MessageLite& base) { - const AttributesStructMember& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t AttributesStructMember::ByteSizeLong() const { - const AttributesStructMember& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.AttributesStructMember) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - ::_pbi::Prefetch5LinesFrom7Lines(&this_); - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x0000003fU) != 0) { - // optional .tint.core.ir.binary.pb.Interpolation interpolation = 5; - if ((cached_has_bits & 0x00000001U) != 0) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.interpolation_); - } - // optional uint32 location = 1; - if ((cached_has_bits & 0x00000002U) != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_location()); - } - // optional uint32 blend_src = 2; - if ((cached_has_bits & 0x00000004U) != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_blend_src()); - } - // optional uint32 color = 3; - if ((cached_has_bits & 0x00000008U) != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_color()); - } - // optional .tint.core.ir.binary.pb.BuiltinValue builtin = 4; - if ((cached_has_bits & 0x00000010U) != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this_._internal_builtin()); - } - // bool invariant = 6; - if ((cached_has_bits & 0x00000020U) != 0) { - if (this_._internal_invariant() != 0) { - total_size += 2; - } - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void AttributesStructMember::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - ::google::protobuf::Arena* arena = _this->GetArena(); - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.AttributesStructMember) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x0000003fU) != 0) { - if ((cached_has_bits & 0x00000001U) != 0) { - ABSL_DCHECK(from._impl_.interpolation_ != nullptr); - if (_this->_impl_.interpolation_ == nullptr) { - _this->_impl_.interpolation_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.interpolation_); - } else { - _this->_impl_.interpolation_->MergeFrom(*from._impl_.interpolation_); - } - } - if ((cached_has_bits & 0x00000002U) != 0) { - _this->_impl_.location_ = from._impl_.location_; - } - if ((cached_has_bits & 0x00000004U) != 0) { - _this->_impl_.blend_src_ = from._impl_.blend_src_; - } - if ((cached_has_bits & 0x00000008U) != 0) { - _this->_impl_.color_ = from._impl_.color_; - } - if ((cached_has_bits & 0x00000010U) != 0) { - _this->_impl_.builtin_ = from._impl_.builtin_; - } - if ((cached_has_bits & 0x00000020U) != 0) { - if (from._internal_invariant() != 0) { - _this->_impl_.invariant_ = from._impl_.invariant_; - } - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void AttributesStructMember::CopyFrom(const AttributesStructMember& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.AttributesStructMember) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void AttributesStructMember::InternalSwap(AttributesStructMember* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::google::protobuf::internal::memswap< - PROTOBUF_FIELD_OFFSET(AttributesStructMember, _impl_.invariant_) - + sizeof(AttributesStructMember::_impl_.invariant_) - - PROTOBUF_FIELD_OFFSET(AttributesStructMember, _impl_.interpolation_)>( - reinterpret_cast(&_impl_.interpolation_), - reinterpret_cast(&other->_impl_.interpolation_)); -} - -::google::protobuf::Metadata AttributesStructMember::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class AttributesFunctionParameter::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(AttributesFunctionParameter, _impl_._has_bits_); -}; - -AttributesFunctionParameter::AttributesFunctionParameter(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, AttributesFunctionParameter_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.AttributesFunctionParameter) -} -PROTOBUF_NDEBUG_INLINE AttributesFunctionParameter::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - [[maybe_unused]] const ::tint::core::ir::binary::pb::AttributesFunctionParameter& from_msg) - : _has_bits_{from._has_bits_}, - _cached_size_{0} {} - -AttributesFunctionParameter::AttributesFunctionParameter( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, - const AttributesFunctionParameter& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, AttributesFunctionParameter_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - AttributesFunctionParameter* const _this = this; - (void)_this; - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); - new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); - ::uint32_t cached_has_bits = _impl_._has_bits_[0]; - _impl_.interpolation_ = ((cached_has_bits & 0x00000001U) != 0) - ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.interpolation_) - : nullptr; - _impl_.binding_point_ = ((cached_has_bits & 0x00000002U) != 0) - ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.binding_point_) - : nullptr; - ::memcpy(reinterpret_cast(&_impl_) + - offsetof(Impl_, builtin_), - reinterpret_cast(&from._impl_) + - offsetof(Impl_, builtin_), - offsetof(Impl_, invariant_) - - offsetof(Impl_, builtin_) + - sizeof(Impl_::invariant_)); - - // @@protoc_insertion_point(copy_constructor:tint.core.ir.binary.pb.AttributesFunctionParameter) -} -PROTOBUF_NDEBUG_INLINE AttributesFunctionParameter::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0} {} - -inline void AttributesFunctionParameter::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - ::memset(reinterpret_cast(&_impl_) + - offsetof(Impl_, interpolation_), - 0, - offsetof(Impl_, invariant_) - - offsetof(Impl_, interpolation_) + - sizeof(Impl_::invariant_)); -} -AttributesFunctionParameter::~AttributesFunctionParameter() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.AttributesFunctionParameter) - SharedDtor(*this); -} -inline void AttributesFunctionParameter::SharedDtor(MessageLite& self) { - AttributesFunctionParameter& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - delete this_._impl_.interpolation_; - delete this_._impl_.binding_point_; - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL AttributesFunctionParameter::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) AttributesFunctionParameter(arena); -} -constexpr auto AttributesFunctionParameter::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(AttributesFunctionParameter), - alignof(AttributesFunctionParameter)); -} -constexpr auto AttributesFunctionParameter::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_AttributesFunctionParameter_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &AttributesFunctionParameter::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &AttributesFunctionParameter::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &AttributesFunctionParameter::ByteSizeLong, - &AttributesFunctionParameter::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(AttributesFunctionParameter, _impl_._cached_size_), - false, - }, - &AttributesFunctionParameter::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull AttributesFunctionParameter_class_data_ = - AttributesFunctionParameter::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -AttributesFunctionParameter::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&AttributesFunctionParameter_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(AttributesFunctionParameter_class_data_.tc_table); - return AttributesFunctionParameter_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<3, 6, 2, 0, 2> -AttributesFunctionParameter::_table_ = { - { - PROTOBUF_FIELD_OFFSET(AttributesFunctionParameter, _impl_._has_bits_), - 0, // no _extensions_ - 6, 56, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967232, // skipmap - offsetof(decltype(_table_), field_entries), - 6, // num_field_entries - 2, // num_aux_entries - offsetof(decltype(_table_), aux_entries), - AttributesFunctionParameter_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::AttributesFunctionParameter>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - // optional .tint.core.ir.binary.pb.BuiltinValue builtin = 1; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(AttributesFunctionParameter, _impl_.builtin_), 2>(), - {8, 2, 0, PROTOBUF_FIELD_OFFSET(AttributesFunctionParameter, _impl_.builtin_)}}, - // optional uint32 location = 2; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(AttributesFunctionParameter, _impl_.location_), 3>(), - {16, 3, 0, PROTOBUF_FIELD_OFFSET(AttributesFunctionParameter, _impl_.location_)}}, - // optional uint32 color = 3; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(AttributesFunctionParameter, _impl_.color_), 4>(), - {24, 4, 0, PROTOBUF_FIELD_OFFSET(AttributesFunctionParameter, _impl_.color_)}}, - // optional .tint.core.ir.binary.pb.Interpolation interpolation = 4; - {::_pbi::TcParser::FastMtS1, - {34, 0, 0, PROTOBUF_FIELD_OFFSET(AttributesFunctionParameter, _impl_.interpolation_)}}, - // optional .tint.core.ir.binary.pb.BindingPoint binding_point = 5; - {::_pbi::TcParser::FastMtS1, - {42, 1, 1, PROTOBUF_FIELD_OFFSET(AttributesFunctionParameter, _impl_.binding_point_)}}, - // bool invariant = 6; - {::_pbi::TcParser::SingularVarintNoZag1(), - {48, 5, 0, PROTOBUF_FIELD_OFFSET(AttributesFunctionParameter, _impl_.invariant_)}}, - {::_pbi::TcParser::MiniParse, {}}, - }}, {{ - 65535, 65535 - }}, {{ - // optional .tint.core.ir.binary.pb.BuiltinValue builtin = 1; - {PROTOBUF_FIELD_OFFSET(AttributesFunctionParameter, _impl_.builtin_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)}, - // optional uint32 location = 2; - {PROTOBUF_FIELD_OFFSET(AttributesFunctionParameter, _impl_.location_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - // optional uint32 color = 3; - {PROTOBUF_FIELD_OFFSET(AttributesFunctionParameter, _impl_.color_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, - // optional .tint.core.ir.binary.pb.Interpolation interpolation = 4; - {PROTOBUF_FIELD_OFFSET(AttributesFunctionParameter, _impl_.interpolation_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, - // optional .tint.core.ir.binary.pb.BindingPoint binding_point = 5; - {PROTOBUF_FIELD_OFFSET(AttributesFunctionParameter, _impl_.binding_point_), _Internal::kHasBitsOffset + 1, 1, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, - // bool invariant = 6; - {PROTOBUF_FIELD_OFFSET(AttributesFunctionParameter, _impl_.invariant_), _Internal::kHasBitsOffset + 5, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, - }}, - {{ - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::Interpolation>()}, - {::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::BindingPoint>()}, - }}, - {{ - }}, -}; -PROTOBUF_NOINLINE void AttributesFunctionParameter::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.AttributesFunctionParameter) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - if ((cached_has_bits & 0x00000001U) != 0) { - ABSL_DCHECK(_impl_.interpolation_ != nullptr); - _impl_.interpolation_->Clear(); - } - if ((cached_has_bits & 0x00000002U) != 0) { - ABSL_DCHECK(_impl_.binding_point_ != nullptr); - _impl_.binding_point_->Clear(); - } - } - if ((cached_has_bits & 0x0000003cU) != 0) { - ::memset(&_impl_.builtin_, 0, static_cast<::size_t>( - reinterpret_cast(&_impl_.invariant_) - - reinterpret_cast(&_impl_.builtin_)) + sizeof(_impl_.invariant_)); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL AttributesFunctionParameter::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const AttributesFunctionParameter& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL AttributesFunctionParameter::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const AttributesFunctionParameter& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.AttributesFunctionParameter) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - cached_has_bits = this_._impl_._has_bits_[0]; - // optional .tint.core.ir.binary.pb.BuiltinValue builtin = 1; - if ((cached_has_bits & 0x00000004U) != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 1, this_._internal_builtin(), target); - } - - // optional uint32 location = 2; - if ((cached_has_bits & 0x00000008U) != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 2, this_._internal_location(), target); - } - - // optional uint32 color = 3; - if ((cached_has_bits & 0x00000010U) != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray( - 3, this_._internal_color(), target); - } - - // optional .tint.core.ir.binary.pb.Interpolation interpolation = 4; - if ((cached_has_bits & 0x00000001U) != 0) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 4, *this_._impl_.interpolation_, this_._impl_.interpolation_->GetCachedSize(), target, - stream); - } - - // optional .tint.core.ir.binary.pb.BindingPoint binding_point = 5; - if ((cached_has_bits & 0x00000002U) != 0) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 5, *this_._impl_.binding_point_, this_._impl_.binding_point_->GetCachedSize(), target, - stream); - } - - // bool invariant = 6; - if ((cached_has_bits & 0x00000020U) != 0) { - if (this_._internal_invariant() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray( - 6, this_._internal_invariant(), target); - } - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.AttributesFunctionParameter) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t AttributesFunctionParameter::ByteSizeLong(const MessageLite& base) { - const AttributesFunctionParameter& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t AttributesFunctionParameter::ByteSizeLong() const { - const AttributesFunctionParameter& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.AttributesFunctionParameter) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - ::_pbi::Prefetch5LinesFrom7Lines(&this_); - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x0000003fU) != 0) { - // optional .tint.core.ir.binary.pb.Interpolation interpolation = 4; - if ((cached_has_bits & 0x00000001U) != 0) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.interpolation_); - } - // optional .tint.core.ir.binary.pb.BindingPoint binding_point = 5; - if ((cached_has_bits & 0x00000002U) != 0) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.binding_point_); - } - // optional .tint.core.ir.binary.pb.BuiltinValue builtin = 1; - if ((cached_has_bits & 0x00000004U) != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this_._internal_builtin()); - } - // optional uint32 location = 2; - if ((cached_has_bits & 0x00000008U) != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_location()); - } - // optional uint32 color = 3; - if ((cached_has_bits & 0x00000010U) != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( - this_._internal_color()); - } - // bool invariant = 6; - if ((cached_has_bits & 0x00000020U) != 0) { - if (this_._internal_invariant() != 0) { - total_size += 2; - } - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void AttributesFunctionParameter::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - ::google::protobuf::Arena* arena = _this->GetArena(); - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.AttributesFunctionParameter) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x0000003fU) != 0) { - if ((cached_has_bits & 0x00000001U) != 0) { - ABSL_DCHECK(from._impl_.interpolation_ != nullptr); - if (_this->_impl_.interpolation_ == nullptr) { - _this->_impl_.interpolation_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.interpolation_); - } else { - _this->_impl_.interpolation_->MergeFrom(*from._impl_.interpolation_); - } - } - if ((cached_has_bits & 0x00000002U) != 0) { - ABSL_DCHECK(from._impl_.binding_point_ != nullptr); - if (_this->_impl_.binding_point_ == nullptr) { - _this->_impl_.binding_point_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.binding_point_); - } else { - _this->_impl_.binding_point_->MergeFrom(*from._impl_.binding_point_); - } - } - if ((cached_has_bits & 0x00000004U) != 0) { - _this->_impl_.builtin_ = from._impl_.builtin_; - } - if ((cached_has_bits & 0x00000008U) != 0) { - _this->_impl_.location_ = from._impl_.location_; - } - if ((cached_has_bits & 0x00000010U) != 0) { - _this->_impl_.color_ = from._impl_.color_; - } - if ((cached_has_bits & 0x00000020U) != 0) { - if (from._internal_invariant() != 0) { - _this->_impl_.invariant_ = from._impl_.invariant_; - } - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void AttributesFunctionParameter::CopyFrom(const AttributesFunctionParameter& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.AttributesFunctionParameter) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void AttributesFunctionParameter::InternalSwap(AttributesFunctionParameter* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::google::protobuf::internal::memswap< - PROTOBUF_FIELD_OFFSET(AttributesFunctionParameter, _impl_.invariant_) - + sizeof(AttributesFunctionParameter::_impl_.invariant_) - - PROTOBUF_FIELD_OFFSET(AttributesFunctionParameter, _impl_.interpolation_)>( - reinterpret_cast(&_impl_.interpolation_), - reinterpret_cast(&other->_impl_.interpolation_)); -} - -::google::protobuf::Metadata AttributesFunctionParameter::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// =================================================================== - -class Interpolation::_Internal { - public: - using HasBits = - decltype(::std::declval()._impl_._has_bits_); - static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(Interpolation, _impl_._has_bits_); -}; - -Interpolation::Interpolation(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, Interpolation_class_data_.base()) { -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena) { -#endif // PROTOBUF_CUSTOM_VTABLE - SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:tint.core.ir.binary.pb.Interpolation) -} -Interpolation::Interpolation( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Interpolation& from) -#if defined(PROTOBUF_CUSTOM_VTABLE) - : ::google::protobuf::Message(arena, Interpolation_class_data_.base()), -#else // PROTOBUF_CUSTOM_VTABLE - : ::google::protobuf::Message(arena), -#endif // PROTOBUF_CUSTOM_VTABLE - _impl_(from._impl_) { - _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( - from._internal_metadata_); -} -PROTOBUF_NDEBUG_INLINE Interpolation::Impl_::Impl_( - [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, - [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : _cached_size_{0} {} - -inline void Interpolation::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { - new (&_impl_) Impl_(internal_visibility(), arena); - ::memset(reinterpret_cast(&_impl_) + - offsetof(Impl_, type_), - 0, - offsetof(Impl_, sampling_) - - offsetof(Impl_, type_) + - sizeof(Impl_::sampling_)); -} -Interpolation::~Interpolation() { - // @@protoc_insertion_point(destructor:tint.core.ir.binary.pb.Interpolation) - SharedDtor(*this); -} -inline void Interpolation::SharedDtor(MessageLite& self) { - Interpolation& this_ = static_cast(self); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); - ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.~Impl_(); -} - -inline void* PROTOBUF_NONNULL Interpolation::PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { - return ::new (mem) Interpolation(arena); -} -constexpr auto Interpolation::InternalNewImpl_() { - return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(Interpolation), - alignof(Interpolation)); -} -constexpr auto Interpolation::InternalGenerateClassData_() { - return ::google::protobuf::internal::ClassDataFull{ - ::google::protobuf::internal::ClassData{ - &_Interpolation_default_instance_._instance, - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - &Interpolation::MergeImpl, - ::google::protobuf::Message::GetNewImpl(), -#if defined(PROTOBUF_CUSTOM_VTABLE) - &Interpolation::SharedDtor, - ::google::protobuf::Message::GetClearImpl(), &Interpolation::ByteSizeLong, - &Interpolation::_InternalSerialize, -#endif // PROTOBUF_CUSTOM_VTABLE - PROTOBUF_FIELD_OFFSET(Interpolation, _impl_._cached_size_), - false, - }, - &Interpolation::kDescriptorMethods, - &descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto, - nullptr, // tracker - }; -} - -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const - ::google::protobuf::internal::ClassDataFull Interpolation_class_data_ = - Interpolation::InternalGenerateClassData_(); - -PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL -Interpolation::GetClassData() const { - ::google::protobuf::internal::PrefetchToLocalCache(&Interpolation_class_data_); - ::google::protobuf::internal::PrefetchToLocalCache(Interpolation_class_data_.tc_table); - return Interpolation_class_data_.base(); -} -PROTOBUF_CONSTINIT_WITH_PTR PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<1, 2, 0, 0, 2> -Interpolation::_table_ = { - { - PROTOBUF_FIELD_OFFSET(Interpolation, _impl_._has_bits_), - 0, // no _extensions_ - 2, 8, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967292, // skipmap - offsetof(decltype(_table_), field_entries), - 2, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - Interpolation_class_data_.base(), - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::tint::core::ir::binary::pb::Interpolation>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - // optional .tint.core.ir.binary.pb.InterpolationSampling sampling = 2; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Interpolation, _impl_.sampling_), 1>(), - {16, 1, 0, PROTOBUF_FIELD_OFFSET(Interpolation, _impl_.sampling_)}}, - // .tint.core.ir.binary.pb.InterpolationType type = 1; - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Interpolation, _impl_.type_), 0>(), - {8, 0, 0, PROTOBUF_FIELD_OFFSET(Interpolation, _impl_.type_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // .tint.core.ir.binary.pb.InterpolationType type = 1; - {PROTOBUF_FIELD_OFFSET(Interpolation, _impl_.type_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)}, - // optional .tint.core.ir.binary.pb.InterpolationSampling sampling = 2; - {PROTOBUF_FIELD_OFFSET(Interpolation, _impl_.sampling_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)}, - }}, - // no aux_entries - {{ - }}, -}; -PROTOBUF_NOINLINE void Interpolation::Clear() { -// @@protoc_insertion_point(message_clear_start:tint.core.ir.binary.pb.Interpolation) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - cached_has_bits = _impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - ::memset(&_impl_.type_, 0, static_cast<::size_t>( - reinterpret_cast(&_impl_.sampling_) - - reinterpret_cast(&_impl_.type_)) + sizeof(_impl_.sampling_)); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::uint8_t* PROTOBUF_NONNULL Interpolation::_InternalSerialize( - const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { - const Interpolation& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::uint8_t* PROTOBUF_NONNULL Interpolation::_InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - const Interpolation& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - this_.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(serialize_to_array_start:tint.core.ir.binary.pb.Interpolation) - ::uint32_t cached_has_bits = 0; - (void)cached_has_bits; - - // .tint.core.ir.binary.pb.InterpolationType type = 1; - if ((this_._impl_._has_bits_[0] & 0x00000001U) != 0) { - if (this_._internal_type() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 1, this_._internal_type(), target); - } - } - - cached_has_bits = this_._impl_._has_bits_[0]; - // optional .tint.core.ir.binary.pb.InterpolationSampling sampling = 2; - if ((cached_has_bits & 0x00000002U) != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 2, this_._internal_sampling(), target); - } - - if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { - target = - ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:tint.core.ir.binary.pb.Interpolation) - return target; -} - -#if defined(PROTOBUF_CUSTOM_VTABLE) -::size_t Interpolation::ByteSizeLong(const MessageLite& base) { - const Interpolation& this_ = static_cast(base); -#else // PROTOBUF_CUSTOM_VTABLE -::size_t Interpolation::ByteSizeLong() const { - const Interpolation& this_ = *this; -#endif // PROTOBUF_CUSTOM_VTABLE - // @@protoc_insertion_point(message_byte_size_start:tint.core.ir.binary.pb.Interpolation) - ::size_t total_size = 0; - - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - ::_pbi::Prefetch5LinesFrom7Lines(&this_); - cached_has_bits = this_._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - // .tint.core.ir.binary.pb.InterpolationType type = 1; - if ((cached_has_bits & 0x00000001U) != 0) { - if (this_._internal_type() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this_._internal_type()); - } - } - // optional .tint.core.ir.binary.pb.InterpolationSampling sampling = 2; - if ((cached_has_bits & 0x00000002U) != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this_._internal_sampling()); - } - } - return this_.MaybeComputeUnknownFieldsSize(total_size, - &this_._impl_._cached_size_); -} - -void Interpolation::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - if constexpr (::_pbi::DebugHardenVerifyHasBitConsistency()) { - from.VerifyHasBitConsistency(); - } - // @@protoc_insertion_point(class_specific_merge_from_start:tint.core.ir.binary.pb.Interpolation) - ABSL_DCHECK_NE(&from, _this); - ::uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - cached_has_bits = from._impl_._has_bits_[0]; - if ((cached_has_bits & 0x00000003U) != 0) { - if ((cached_has_bits & 0x00000001U) != 0) { - if (from._internal_type() != 0) { - _this->_impl_.type_ = from._impl_.type_; - } - } - if ((cached_has_bits & 0x00000002U) != 0) { - _this->_impl_.sampling_ = from._impl_.sampling_; - } - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); -} - -void Interpolation::CopyFrom(const Interpolation& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tint.core.ir.binary.pb.Interpolation) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - - -void Interpolation::InternalSwap(Interpolation* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { - using ::std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::google::protobuf::internal::memswap< - PROTOBUF_FIELD_OFFSET(Interpolation, _impl_.sampling_) - + sizeof(Interpolation::_impl_.sampling_) - - PROTOBUF_FIELD_OFFSET(Interpolation, _impl_.type_)>( - reinterpret_cast(&_impl_.type_), - reinterpret_cast(&other->_impl_.type_)); -} - -::google::protobuf::Metadata Interpolation::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); -} -// @@protoc_insertion_point(namespace_scope) -} // namespace pb -} // namespace binary -} // namespace ir -} // namespace core -} // namespace tint -namespace google { -namespace protobuf { -} // namespace protobuf -} // namespace google -// @@protoc_insertion_point(global_scope) -PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::std::false_type - _static_init2_ [[maybe_unused]] = - (::_pbi::AddDescriptors(&descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto), - ::std::false_type{}); -#include "google/protobuf/port_undef.inc" diff --git a/3rdparty/dawn/src/tint/utils/protos/ir/ir.pb.h b/3rdparty/dawn/src/tint/utils/protos/ir/ir.pb.h deleted file mode 100644 index 111ab2044..000000000 --- a/3rdparty/dawn/src/tint/utils/protos/ir/ir.pb.h +++ /dev/null @@ -1,23930 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: src/tint/utils/protos/ir/ir.proto -// Protobuf C++ Version: 6.32.0 - -#ifndef src_2ftint_2futils_2fprotos_2fir_2fir_2eproto_2epb_2eh -#define src_2ftint_2futils_2fprotos_2fir_2fir_2eproto_2epb_2eh - -#include -#include -#include -#include - -#include "google/protobuf/runtime_version.h" -#if PROTOBUF_VERSION != 6032000 -#error "Protobuf C++ gencode is built with an incompatible version of" -#error "Protobuf C++ headers/runtime. See" -#error "https://protobuf.dev/support/cross-version-runtime-guarantee/#cpp" -#endif -#include "google/protobuf/io/coded_stream.h" -#include "google/protobuf/arena.h" -#include "google/protobuf/arenastring.h" -#include "google/protobuf/generated_message_bases.h" -#include "google/protobuf/generated_message_tctable_decl.h" -#include "google/protobuf/generated_message_util.h" -#include "google/protobuf/metadata_lite.h" -#include "google/protobuf/generated_message_reflection.h" -#include "google/protobuf/message.h" -#include "google/protobuf/message_lite.h" -#include "google/protobuf/repeated_field.h" // IWYU pragma: export -#include "google/protobuf/extension_set.h" // IWYU pragma: export -#include "google/protobuf/generated_enum_reflection.h" -#include "google/protobuf/unknown_field_set.h" -// @@protoc_insertion_point(includes) - -// Must be included last. -#include "google/protobuf/port_def.inc" - -#define PROTOBUF_INTERNAL_EXPORT_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto - -namespace google { -namespace protobuf { -namespace internal { -template -::absl::string_view GetAnyMessageName(); -} // namespace internal -} // namespace protobuf -} // namespace google - -// Internal implementation detail -- do not use these members. -struct TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto { - static const ::uint32_t offsets[]; -}; -extern "C" { -extern const ::google::protobuf::internal::DescriptorTable descriptor_table_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -} // extern "C" -namespace tint { -namespace core { -namespace ir { -namespace binary { -namespace pb { -enum AccessControl : int; -extern const uint32_t AccessControl_internal_data_[]; -enum AddressSpace : int; -extern const uint32_t AddressSpace_internal_data_[]; -enum BinaryOp : int; -extern const uint32_t BinaryOp_internal_data_[]; -enum BuiltinFn : int; -extern const uint32_t BuiltinFn_internal_data_[]; -enum BuiltinValue : int; -extern const uint32_t BuiltinValue_internal_data_[]; -enum InterpolationSampling : int; -extern const uint32_t InterpolationSampling_internal_data_[]; -enum InterpolationType : int; -extern const uint32_t InterpolationType_internal_data_[]; -enum PipelineStage : int; -extern const uint32_t PipelineStage_internal_data_[]; -enum SamplerKind : int; -extern const uint32_t SamplerKind_internal_data_[]; -enum TexelFormat : int; -extern const uint32_t TexelFormat_internal_data_[]; -enum TextureDimension : int; -extern const uint32_t TextureDimension_internal_data_[]; -enum TypeBasic : int; -extern const uint32_t TypeBasic_internal_data_[]; -enum TypeBuiltinStruct : int; -extern const uint32_t TypeBuiltinStruct_internal_data_[]; -enum UnaryOp : int; -extern const uint32_t UnaryOp_internal_data_[]; -class AttributesFunctionParameter; -struct AttributesFunctionParameterDefaultTypeInternal; -extern AttributesFunctionParameterDefaultTypeInternal _AttributesFunctionParameter_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull AttributesFunctionParameter_class_data_; -class AttributesStructMember; -struct AttributesStructMemberDefaultTypeInternal; -extern AttributesStructMemberDefaultTypeInternal _AttributesStructMember_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull AttributesStructMember_class_data_; -class BindingPoint; -struct BindingPointDefaultTypeInternal; -extern BindingPointDefaultTypeInternal _BindingPoint_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull BindingPoint_class_data_; -class Block; -struct BlockDefaultTypeInternal; -extern BlockDefaultTypeInternal _Block_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull Block_class_data_; -class BlockParameter; -struct BlockParameterDefaultTypeInternal; -extern BlockParameterDefaultTypeInternal _BlockParameter_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull BlockParameter_class_data_; -class ConstantValue; -struct ConstantValueDefaultTypeInternal; -extern ConstantValueDefaultTypeInternal _ConstantValue_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull ConstantValue_class_data_; -class ConstantValueComposite; -struct ConstantValueCompositeDefaultTypeInternal; -extern ConstantValueCompositeDefaultTypeInternal _ConstantValueComposite_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull ConstantValueComposite_class_data_; -class ConstantValueScalar; -struct ConstantValueScalarDefaultTypeInternal; -extern ConstantValueScalarDefaultTypeInternal _ConstantValueScalar_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull ConstantValueScalar_class_data_; -class ConstantValueSplat; -struct ConstantValueSplatDefaultTypeInternal; -extern ConstantValueSplatDefaultTypeInternal _ConstantValueSplat_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull ConstantValueSplat_class_data_; -class Function; -struct FunctionDefaultTypeInternal; -extern FunctionDefaultTypeInternal _Function_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull Function_class_data_; -class FunctionParameter; -struct FunctionParameterDefaultTypeInternal; -extern FunctionParameterDefaultTypeInternal _FunctionParameter_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull FunctionParameter_class_data_; -class Instruction; -struct InstructionDefaultTypeInternal; -extern InstructionDefaultTypeInternal _Instruction_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull Instruction_class_data_; -class InstructionAccess; -struct InstructionAccessDefaultTypeInternal; -extern InstructionAccessDefaultTypeInternal _InstructionAccess_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull InstructionAccess_class_data_; -class InstructionBinary; -struct InstructionBinaryDefaultTypeInternal; -extern InstructionBinaryDefaultTypeInternal _InstructionBinary_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull InstructionBinary_class_data_; -class InstructionBitcast; -struct InstructionBitcastDefaultTypeInternal; -extern InstructionBitcastDefaultTypeInternal _InstructionBitcast_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull InstructionBitcast_class_data_; -class InstructionBreakIf; -struct InstructionBreakIfDefaultTypeInternal; -extern InstructionBreakIfDefaultTypeInternal _InstructionBreakIf_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull InstructionBreakIf_class_data_; -class InstructionBuiltinCall; -struct InstructionBuiltinCallDefaultTypeInternal; -extern InstructionBuiltinCallDefaultTypeInternal _InstructionBuiltinCall_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull InstructionBuiltinCall_class_data_; -class InstructionConstruct; -struct InstructionConstructDefaultTypeInternal; -extern InstructionConstructDefaultTypeInternal _InstructionConstruct_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull InstructionConstruct_class_data_; -class InstructionContinue; -struct InstructionContinueDefaultTypeInternal; -extern InstructionContinueDefaultTypeInternal _InstructionContinue_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull InstructionContinue_class_data_; -class InstructionConvert; -struct InstructionConvertDefaultTypeInternal; -extern InstructionConvertDefaultTypeInternal _InstructionConvert_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull InstructionConvert_class_data_; -class InstructionDiscard; -struct InstructionDiscardDefaultTypeInternal; -extern InstructionDiscardDefaultTypeInternal _InstructionDiscard_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull InstructionDiscard_class_data_; -class InstructionExitIf; -struct InstructionExitIfDefaultTypeInternal; -extern InstructionExitIfDefaultTypeInternal _InstructionExitIf_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull InstructionExitIf_class_data_; -class InstructionExitLoop; -struct InstructionExitLoopDefaultTypeInternal; -extern InstructionExitLoopDefaultTypeInternal _InstructionExitLoop_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull InstructionExitLoop_class_data_; -class InstructionExitSwitch; -struct InstructionExitSwitchDefaultTypeInternal; -extern InstructionExitSwitchDefaultTypeInternal _InstructionExitSwitch_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull InstructionExitSwitch_class_data_; -class InstructionIf; -struct InstructionIfDefaultTypeInternal; -extern InstructionIfDefaultTypeInternal _InstructionIf_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull InstructionIf_class_data_; -class InstructionLet; -struct InstructionLetDefaultTypeInternal; -extern InstructionLetDefaultTypeInternal _InstructionLet_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull InstructionLet_class_data_; -class InstructionLoad; -struct InstructionLoadDefaultTypeInternal; -extern InstructionLoadDefaultTypeInternal _InstructionLoad_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull InstructionLoad_class_data_; -class InstructionLoadVectorElement; -struct InstructionLoadVectorElementDefaultTypeInternal; -extern InstructionLoadVectorElementDefaultTypeInternal _InstructionLoadVectorElement_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull InstructionLoadVectorElement_class_data_; -class InstructionLoop; -struct InstructionLoopDefaultTypeInternal; -extern InstructionLoopDefaultTypeInternal _InstructionLoop_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull InstructionLoop_class_data_; -class InstructionNextIteration; -struct InstructionNextIterationDefaultTypeInternal; -extern InstructionNextIterationDefaultTypeInternal _InstructionNextIteration_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull InstructionNextIteration_class_data_; -class InstructionResult; -struct InstructionResultDefaultTypeInternal; -extern InstructionResultDefaultTypeInternal _InstructionResult_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull InstructionResult_class_data_; -class InstructionReturn; -struct InstructionReturnDefaultTypeInternal; -extern InstructionReturnDefaultTypeInternal _InstructionReturn_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull InstructionReturn_class_data_; -class InstructionStore; -struct InstructionStoreDefaultTypeInternal; -extern InstructionStoreDefaultTypeInternal _InstructionStore_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull InstructionStore_class_data_; -class InstructionStoreVectorElement; -struct InstructionStoreVectorElementDefaultTypeInternal; -extern InstructionStoreVectorElementDefaultTypeInternal _InstructionStoreVectorElement_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull InstructionStoreVectorElement_class_data_; -class InstructionSwitch; -struct InstructionSwitchDefaultTypeInternal; -extern InstructionSwitchDefaultTypeInternal _InstructionSwitch_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull InstructionSwitch_class_data_; -class InstructionSwizzle; -struct InstructionSwizzleDefaultTypeInternal; -extern InstructionSwizzleDefaultTypeInternal _InstructionSwizzle_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull InstructionSwizzle_class_data_; -class InstructionUnary; -struct InstructionUnaryDefaultTypeInternal; -extern InstructionUnaryDefaultTypeInternal _InstructionUnary_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull InstructionUnary_class_data_; -class InstructionUnreachable; -struct InstructionUnreachableDefaultTypeInternal; -extern InstructionUnreachableDefaultTypeInternal _InstructionUnreachable_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull InstructionUnreachable_class_data_; -class InstructionUserCall; -struct InstructionUserCallDefaultTypeInternal; -extern InstructionUserCallDefaultTypeInternal _InstructionUserCall_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull InstructionUserCall_class_data_; -class InstructionVar; -struct InstructionVarDefaultTypeInternal; -extern InstructionVarDefaultTypeInternal _InstructionVar_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull InstructionVar_class_data_; -class Interpolation; -struct InterpolationDefaultTypeInternal; -extern InterpolationDefaultTypeInternal _Interpolation_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull Interpolation_class_data_; -class Module; -struct ModuleDefaultTypeInternal; -extern ModuleDefaultTypeInternal _Module_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull Module_class_data_; -class SwitchCase; -struct SwitchCaseDefaultTypeInternal; -extern SwitchCaseDefaultTypeInternal _SwitchCase_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull SwitchCase_class_data_; -class Type; -struct TypeDefaultTypeInternal; -extern TypeDefaultTypeInternal _Type_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull Type_class_data_; -class TypeArray; -struct TypeArrayDefaultTypeInternal; -extern TypeArrayDefaultTypeInternal _TypeArray_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull TypeArray_class_data_; -class TypeAtomic; -struct TypeAtomicDefaultTypeInternal; -extern TypeAtomicDefaultTypeInternal _TypeAtomic_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull TypeAtomic_class_data_; -class TypeBindingArray; -struct TypeBindingArrayDefaultTypeInternal; -extern TypeBindingArrayDefaultTypeInternal _TypeBindingArray_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull TypeBindingArray_class_data_; -class TypeBuffer; -struct TypeBufferDefaultTypeInternal; -extern TypeBufferDefaultTypeInternal _TypeBuffer_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull TypeBuffer_class_data_; -class TypeDepthMultisampledTexture; -struct TypeDepthMultisampledTextureDefaultTypeInternal; -extern TypeDepthMultisampledTextureDefaultTypeInternal _TypeDepthMultisampledTexture_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull TypeDepthMultisampledTexture_class_data_; -class TypeDepthTexture; -struct TypeDepthTextureDefaultTypeInternal; -extern TypeDepthTextureDefaultTypeInternal _TypeDepthTexture_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull TypeDepthTexture_class_data_; -class TypeExternalTexture; -struct TypeExternalTextureDefaultTypeInternal; -extern TypeExternalTextureDefaultTypeInternal _TypeExternalTexture_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull TypeExternalTexture_class_data_; -class TypeInputAttachment; -struct TypeInputAttachmentDefaultTypeInternal; -extern TypeInputAttachmentDefaultTypeInternal _TypeInputAttachment_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull TypeInputAttachment_class_data_; -class TypeMatrix; -struct TypeMatrixDefaultTypeInternal; -extern TypeMatrixDefaultTypeInternal _TypeMatrix_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull TypeMatrix_class_data_; -class TypeMultisampledTexture; -struct TypeMultisampledTextureDefaultTypeInternal; -extern TypeMultisampledTextureDefaultTypeInternal _TypeMultisampledTexture_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull TypeMultisampledTexture_class_data_; -class TypePointer; -struct TypePointerDefaultTypeInternal; -extern TypePointerDefaultTypeInternal _TypePointer_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull TypePointer_class_data_; -class TypeResourceBinding; -struct TypeResourceBindingDefaultTypeInternal; -extern TypeResourceBindingDefaultTypeInternal _TypeResourceBinding_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull TypeResourceBinding_class_data_; -class TypeSampledTexture; -struct TypeSampledTextureDefaultTypeInternal; -extern TypeSampledTextureDefaultTypeInternal _TypeSampledTexture_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull TypeSampledTexture_class_data_; -class TypeSampler; -struct TypeSamplerDefaultTypeInternal; -extern TypeSamplerDefaultTypeInternal _TypeSampler_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull TypeSampler_class_data_; -class TypeStorageTexture; -struct TypeStorageTextureDefaultTypeInternal; -extern TypeStorageTextureDefaultTypeInternal _TypeStorageTexture_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull TypeStorageTexture_class_data_; -class TypeStruct; -struct TypeStructDefaultTypeInternal; -extern TypeStructDefaultTypeInternal _TypeStruct_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull TypeStruct_class_data_; -class TypeStructMember; -struct TypeStructMemberDefaultTypeInternal; -extern TypeStructMemberDefaultTypeInternal _TypeStructMember_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull TypeStructMember_class_data_; -class TypeSubgroupMatrix; -struct TypeSubgroupMatrixDefaultTypeInternal; -extern TypeSubgroupMatrixDefaultTypeInternal _TypeSubgroupMatrix_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull TypeSubgroupMatrix_class_data_; -class TypeTexelBuffer; -struct TypeTexelBufferDefaultTypeInternal; -extern TypeTexelBufferDefaultTypeInternal _TypeTexelBuffer_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull TypeTexelBuffer_class_data_; -class TypeVector; -struct TypeVectorDefaultTypeInternal; -extern TypeVectorDefaultTypeInternal _TypeVector_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull TypeVector_class_data_; -class Value; -struct ValueDefaultTypeInternal; -extern ValueDefaultTypeInternal _Value_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull Value_class_data_; -class WorkgroupSize; -struct WorkgroupSizeDefaultTypeInternal; -extern WorkgroupSizeDefaultTypeInternal _WorkgroupSize_default_instance_; -extern const ::google::protobuf::internal::ClassDataFull WorkgroupSize_class_data_; -} // namespace pb -} // namespace binary -} // namespace ir -} // namespace core -} // namespace tint -namespace google { -namespace protobuf { -template <> -internal::EnumTraitsT<::tint::core::ir::binary::pb::AccessControl_internal_data_> - internal::EnumTraitsImpl::value<::tint::core::ir::binary::pb::AccessControl>; -template <> -internal::EnumTraitsT<::tint::core::ir::binary::pb::AddressSpace_internal_data_> - internal::EnumTraitsImpl::value<::tint::core::ir::binary::pb::AddressSpace>; -template <> -internal::EnumTraitsT<::tint::core::ir::binary::pb::BinaryOp_internal_data_> - internal::EnumTraitsImpl::value<::tint::core::ir::binary::pb::BinaryOp>; -template <> -internal::EnumTraitsT<::tint::core::ir::binary::pb::BuiltinFn_internal_data_> - internal::EnumTraitsImpl::value<::tint::core::ir::binary::pb::BuiltinFn>; -template <> -internal::EnumTraitsT<::tint::core::ir::binary::pb::BuiltinValue_internal_data_> - internal::EnumTraitsImpl::value<::tint::core::ir::binary::pb::BuiltinValue>; -template <> -internal::EnumTraitsT<::tint::core::ir::binary::pb::InterpolationSampling_internal_data_> - internal::EnumTraitsImpl::value<::tint::core::ir::binary::pb::InterpolationSampling>; -template <> -internal::EnumTraitsT<::tint::core::ir::binary::pb::InterpolationType_internal_data_> - internal::EnumTraitsImpl::value<::tint::core::ir::binary::pb::InterpolationType>; -template <> -internal::EnumTraitsT<::tint::core::ir::binary::pb::PipelineStage_internal_data_> - internal::EnumTraitsImpl::value<::tint::core::ir::binary::pb::PipelineStage>; -template <> -internal::EnumTraitsT<::tint::core::ir::binary::pb::SamplerKind_internal_data_> - internal::EnumTraitsImpl::value<::tint::core::ir::binary::pb::SamplerKind>; -template <> -internal::EnumTraitsT<::tint::core::ir::binary::pb::TexelFormat_internal_data_> - internal::EnumTraitsImpl::value<::tint::core::ir::binary::pb::TexelFormat>; -template <> -internal::EnumTraitsT<::tint::core::ir::binary::pb::TextureDimension_internal_data_> - internal::EnumTraitsImpl::value<::tint::core::ir::binary::pb::TextureDimension>; -template <> -internal::EnumTraitsT<::tint::core::ir::binary::pb::TypeBasic_internal_data_> - internal::EnumTraitsImpl::value<::tint::core::ir::binary::pb::TypeBasic>; -template <> -internal::EnumTraitsT<::tint::core::ir::binary::pb::TypeBuiltinStruct_internal_data_> - internal::EnumTraitsImpl::value<::tint::core::ir::binary::pb::TypeBuiltinStruct>; -template <> -internal::EnumTraitsT<::tint::core::ir::binary::pb::UnaryOp_internal_data_> - internal::EnumTraitsImpl::value<::tint::core::ir::binary::pb::UnaryOp>; -} // namespace protobuf -} // namespace google - -namespace tint { -namespace core { -namespace ir { -namespace binary { -namespace pb { -enum TypeBasic : int { - void_ = 0, - bool_ = 1, - i32 = 2, - u32 = 3, - f32 = 4, - f16 = 5, - i8 = 6, - u8 = 7, - TypeBasic_INT_MIN_SENTINEL_DO_NOT_USE_ = - ::std::numeric_limits<::int32_t>::min(), - TypeBasic_INT_MAX_SENTINEL_DO_NOT_USE_ = - ::std::numeric_limits<::int32_t>::max(), -}; - -extern const uint32_t TypeBasic_internal_data_[]; -inline constexpr TypeBasic TypeBasic_MIN = - static_cast(0); -inline constexpr TypeBasic TypeBasic_MAX = - static_cast(7); -inline bool TypeBasic_IsValid(int value) { - return 0 <= value && value <= 7; -} -inline constexpr int TypeBasic_ARRAYSIZE = 7 + 1; -const ::google::protobuf::EnumDescriptor* PROTOBUF_NONNULL TypeBasic_descriptor(); -template -const ::std::string& TypeBasic_Name(T value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to TypeBasic_Name()."); - return TypeBasic_Name(static_cast(value)); -} -template <> -inline const ::std::string& TypeBasic_Name(TypeBasic value) { - return ::google::protobuf::internal::NameOfDenseEnum( - static_cast(value)); -} -inline bool TypeBasic_Parse( - ::absl::string_view name, TypeBasic* PROTOBUF_NONNULL value) { - return ::google::protobuf::internal::ParseNamedEnum(TypeBasic_descriptor(), name, - value); -} -enum TypeBuiltinStruct : int { - AtomicCompareExchangeResultI32 = 0, - AtomicCompareExchangeResultU32 = 1, - FrexpResultF16 = 2, - FrexpResultF32 = 3, - FrexpResultVec2F16 = 4, - FrexpResultVec2F32 = 5, - FrexpResultVec3F16 = 6, - FrexpResultVec3F32 = 7, - FrexpResultVec4F16 = 8, - FrexpResultVec4F32 = 9, - ModfResultF16 = 10, - ModfResultF32 = 11, - ModfResultVec2F16 = 12, - ModfResultVec2F32 = 13, - ModfResultVec3F16 = 14, - ModfResultVec3F32 = 15, - ModfResultVec4F16 = 16, - ModfResultVec4F32 = 17, - TypeBuiltinStruct_INT_MIN_SENTINEL_DO_NOT_USE_ = - ::std::numeric_limits<::int32_t>::min(), - TypeBuiltinStruct_INT_MAX_SENTINEL_DO_NOT_USE_ = - ::std::numeric_limits<::int32_t>::max(), -}; - -extern const uint32_t TypeBuiltinStruct_internal_data_[]; -inline constexpr TypeBuiltinStruct TypeBuiltinStruct_MIN = - static_cast(0); -inline constexpr TypeBuiltinStruct TypeBuiltinStruct_MAX = - static_cast(17); -inline bool TypeBuiltinStruct_IsValid(int value) { - return 0 <= value && value <= 17; -} -inline constexpr int TypeBuiltinStruct_ARRAYSIZE = 17 + 1; -const ::google::protobuf::EnumDescriptor* PROTOBUF_NONNULL TypeBuiltinStruct_descriptor(); -template -const ::std::string& TypeBuiltinStruct_Name(T value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to TypeBuiltinStruct_Name()."); - return TypeBuiltinStruct_Name(static_cast(value)); -} -template <> -inline const ::std::string& TypeBuiltinStruct_Name(TypeBuiltinStruct value) { - return ::google::protobuf::internal::NameOfDenseEnum( - static_cast(value)); -} -inline bool TypeBuiltinStruct_Parse( - ::absl::string_view name, TypeBuiltinStruct* PROTOBUF_NONNULL value) { - return ::google::protobuf::internal::ParseNamedEnum(TypeBuiltinStruct_descriptor(), name, - value); -} -enum PipelineStage : int { - Compute = 0, - Fragment = 1, - Vertex = 2, - PipelineStage_INT_MIN_SENTINEL_DO_NOT_USE_ = - ::std::numeric_limits<::int32_t>::min(), - PipelineStage_INT_MAX_SENTINEL_DO_NOT_USE_ = - ::std::numeric_limits<::int32_t>::max(), -}; - -extern const uint32_t PipelineStage_internal_data_[]; -inline constexpr PipelineStage PipelineStage_MIN = - static_cast(0); -inline constexpr PipelineStage PipelineStage_MAX = - static_cast(2); -inline bool PipelineStage_IsValid(int value) { - return 0 <= value && value <= 2; -} -inline constexpr int PipelineStage_ARRAYSIZE = 2 + 1; -const ::google::protobuf::EnumDescriptor* PROTOBUF_NONNULL PipelineStage_descriptor(); -template -const ::std::string& PipelineStage_Name(T value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to PipelineStage_Name()."); - return PipelineStage_Name(static_cast(value)); -} -template <> -inline const ::std::string& PipelineStage_Name(PipelineStage value) { - return ::google::protobuf::internal::NameOfDenseEnum( - static_cast(value)); -} -inline bool PipelineStage_Parse( - ::absl::string_view name, PipelineStage* PROTOBUF_NONNULL value) { - return ::google::protobuf::internal::ParseNamedEnum(PipelineStage_descriptor(), name, - value); -} -enum AddressSpace : int { - function = 0, - handle = 1, - pixel_local = 2, - private_ = 3, - immediate = 4, - storage = 5, - uniform = 6, - workgroup = 7, - AddressSpace_INT_MIN_SENTINEL_DO_NOT_USE_ = - ::std::numeric_limits<::int32_t>::min(), - AddressSpace_INT_MAX_SENTINEL_DO_NOT_USE_ = - ::std::numeric_limits<::int32_t>::max(), -}; - -extern const uint32_t AddressSpace_internal_data_[]; -inline constexpr AddressSpace AddressSpace_MIN = - static_cast(0); -inline constexpr AddressSpace AddressSpace_MAX = - static_cast(7); -inline bool AddressSpace_IsValid(int value) { - return 0 <= value && value <= 7; -} -inline constexpr int AddressSpace_ARRAYSIZE = 7 + 1; -const ::google::protobuf::EnumDescriptor* PROTOBUF_NONNULL AddressSpace_descriptor(); -template -const ::std::string& AddressSpace_Name(T value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to AddressSpace_Name()."); - return AddressSpace_Name(static_cast(value)); -} -template <> -inline const ::std::string& AddressSpace_Name(AddressSpace value) { - return ::google::protobuf::internal::NameOfDenseEnum( - static_cast(value)); -} -inline bool AddressSpace_Parse( - ::absl::string_view name, AddressSpace* PROTOBUF_NONNULL value) { - return ::google::protobuf::internal::ParseNamedEnum(AddressSpace_descriptor(), name, - value); -} -enum AccessControl : int { - read = 0, - write = 1, - read_write = 2, - AccessControl_INT_MIN_SENTINEL_DO_NOT_USE_ = - ::std::numeric_limits<::int32_t>::min(), - AccessControl_INT_MAX_SENTINEL_DO_NOT_USE_ = - ::std::numeric_limits<::int32_t>::max(), -}; - -extern const uint32_t AccessControl_internal_data_[]; -inline constexpr AccessControl AccessControl_MIN = - static_cast(0); -inline constexpr AccessControl AccessControl_MAX = - static_cast(2); -inline bool AccessControl_IsValid(int value) { - return 0 <= value && value <= 2; -} -inline constexpr int AccessControl_ARRAYSIZE = 2 + 1; -const ::google::protobuf::EnumDescriptor* PROTOBUF_NONNULL AccessControl_descriptor(); -template -const ::std::string& AccessControl_Name(T value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to AccessControl_Name()."); - return AccessControl_Name(static_cast(value)); -} -template <> -inline const ::std::string& AccessControl_Name(AccessControl value) { - return ::google::protobuf::internal::NameOfDenseEnum( - static_cast(value)); -} -inline bool AccessControl_Parse( - ::absl::string_view name, AccessControl* PROTOBUF_NONNULL value) { - return ::google::protobuf::internal::ParseNamedEnum(AccessControl_descriptor(), name, - value); -} -enum UnaryOp : int { - complement = 0, - negation = 1, - address_of = 2, - indirection = 3, - not_ = 4, - UnaryOp_INT_MIN_SENTINEL_DO_NOT_USE_ = - ::std::numeric_limits<::int32_t>::min(), - UnaryOp_INT_MAX_SENTINEL_DO_NOT_USE_ = - ::std::numeric_limits<::int32_t>::max(), -}; - -extern const uint32_t UnaryOp_internal_data_[]; -inline constexpr UnaryOp UnaryOp_MIN = - static_cast(0); -inline constexpr UnaryOp UnaryOp_MAX = - static_cast(4); -inline bool UnaryOp_IsValid(int value) { - return 0 <= value && value <= 4; -} -inline constexpr int UnaryOp_ARRAYSIZE = 4 + 1; -const ::google::protobuf::EnumDescriptor* PROTOBUF_NONNULL UnaryOp_descriptor(); -template -const ::std::string& UnaryOp_Name(T value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to UnaryOp_Name()."); - return UnaryOp_Name(static_cast(value)); -} -template <> -inline const ::std::string& UnaryOp_Name(UnaryOp value) { - return ::google::protobuf::internal::NameOfDenseEnum( - static_cast(value)); -} -inline bool UnaryOp_Parse( - ::absl::string_view name, UnaryOp* PROTOBUF_NONNULL value) { - return ::google::protobuf::internal::ParseNamedEnum(UnaryOp_descriptor(), name, - value); -} -enum BinaryOp : int { - add_ = 0, - subtract = 1, - multiply = 2, - divide = 3, - modulo = 4, - and_ = 5, - or_ = 6, - xor_ = 7, - equal = 8, - not_equal = 9, - less_than = 10, - greater_than = 11, - less_than_equal = 12, - greater_than_equal = 13, - shift_left = 14, - shift_right = 15, - logical_and = 16, - logical_or = 17, - BinaryOp_INT_MIN_SENTINEL_DO_NOT_USE_ = - ::std::numeric_limits<::int32_t>::min(), - BinaryOp_INT_MAX_SENTINEL_DO_NOT_USE_ = - ::std::numeric_limits<::int32_t>::max(), -}; - -extern const uint32_t BinaryOp_internal_data_[]; -inline constexpr BinaryOp BinaryOp_MIN = - static_cast(0); -inline constexpr BinaryOp BinaryOp_MAX = - static_cast(17); -inline bool BinaryOp_IsValid(int value) { - return 0 <= value && value <= 17; -} -inline constexpr int BinaryOp_ARRAYSIZE = 17 + 1; -const ::google::protobuf::EnumDescriptor* PROTOBUF_NONNULL BinaryOp_descriptor(); -template -const ::std::string& BinaryOp_Name(T value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to BinaryOp_Name()."); - return BinaryOp_Name(static_cast(value)); -} -template <> -inline const ::std::string& BinaryOp_Name(BinaryOp value) { - return ::google::protobuf::internal::NameOfDenseEnum( - static_cast(value)); -} -inline bool BinaryOp_Parse( - ::absl::string_view name, BinaryOp* PROTOBUF_NONNULL value) { - return ::google::protobuf::internal::ParseNamedEnum(BinaryOp_descriptor(), name, - value); -} -enum TextureDimension : int { - _1d = 0, - _2d = 1, - _2d_array = 2, - _3d = 3, - cube = 4, - cube_array = 5, - TextureDimension_INT_MIN_SENTINEL_DO_NOT_USE_ = - ::std::numeric_limits<::int32_t>::min(), - TextureDimension_INT_MAX_SENTINEL_DO_NOT_USE_ = - ::std::numeric_limits<::int32_t>::max(), -}; - -extern const uint32_t TextureDimension_internal_data_[]; -inline constexpr TextureDimension TextureDimension_MIN = - static_cast(0); -inline constexpr TextureDimension TextureDimension_MAX = - static_cast(5); -inline bool TextureDimension_IsValid(int value) { - return 0 <= value && value <= 5; -} -inline constexpr int TextureDimension_ARRAYSIZE = 5 + 1; -const ::google::protobuf::EnumDescriptor* PROTOBUF_NONNULL TextureDimension_descriptor(); -template -const ::std::string& TextureDimension_Name(T value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to TextureDimension_Name()."); - return TextureDimension_Name(static_cast(value)); -} -template <> -inline const ::std::string& TextureDimension_Name(TextureDimension value) { - return ::google::protobuf::internal::NameOfDenseEnum( - static_cast(value)); -} -inline bool TextureDimension_Parse( - ::absl::string_view name, TextureDimension* PROTOBUF_NONNULL value) { - return ::google::protobuf::internal::ParseNamedEnum(TextureDimension_descriptor(), name, - value); -} -enum TexelFormat : int { - bgra8_unorm = 0, - r8_unorm = 1, - r32_float = 2, - r32_sint = 3, - r32_uint = 4, - rg32_float = 5, - rg32_sint = 6, - rg32_uint = 7, - rgba16_float = 8, - rgba16_sint = 9, - rgba16_uint = 10, - rgba32_float = 11, - rgba32_sint = 12, - rgba32_uint = 13, - rgba8_sint = 14, - rgba8_snorm = 15, - rgba8_uint = 16, - rgba8_unorm = 17, - r8_snorm = 18, - r8_uint = 19, - r8_sint = 20, - rg8_unorm = 21, - rg8_snorm = 22, - rg8_uint = 23, - rg8_sint = 24, - r16_uint = 25, - r16_sint = 26, - r16_float = 27, - rg16_uint = 28, - rg16_sint = 29, - rg16_float = 30, - rgb10a2_uint = 31, - rgb10a2_unorm = 32, - rg11b10_ufloat = 33, - r16_unorm = 34, - r16_snorm = 35, - rg16_unorm = 36, - rg16_snorm = 37, - rgba16_unorm = 38, - rgba16_snorm = 39, - TexelFormat_INT_MIN_SENTINEL_DO_NOT_USE_ = - ::std::numeric_limits<::int32_t>::min(), - TexelFormat_INT_MAX_SENTINEL_DO_NOT_USE_ = - ::std::numeric_limits<::int32_t>::max(), -}; - -extern const uint32_t TexelFormat_internal_data_[]; -inline constexpr TexelFormat TexelFormat_MIN = - static_cast(0); -inline constexpr TexelFormat TexelFormat_MAX = - static_cast(39); -inline bool TexelFormat_IsValid(int value) { - return 0 <= value && value <= 39; -} -inline constexpr int TexelFormat_ARRAYSIZE = 39 + 1; -const ::google::protobuf::EnumDescriptor* PROTOBUF_NONNULL TexelFormat_descriptor(); -template -const ::std::string& TexelFormat_Name(T value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to TexelFormat_Name()."); - return TexelFormat_Name(static_cast(value)); -} -template <> -inline const ::std::string& TexelFormat_Name(TexelFormat value) { - return ::google::protobuf::internal::NameOfDenseEnum( - static_cast(value)); -} -inline bool TexelFormat_Parse( - ::absl::string_view name, TexelFormat* PROTOBUF_NONNULL value) { - return ::google::protobuf::internal::ParseNamedEnum(TexelFormat_descriptor(), name, - value); -} -enum SamplerKind : int { - sampler = 0, - comparison = 1, - SamplerKind_INT_MIN_SENTINEL_DO_NOT_USE_ = - ::std::numeric_limits<::int32_t>::min(), - SamplerKind_INT_MAX_SENTINEL_DO_NOT_USE_ = - ::std::numeric_limits<::int32_t>::max(), -}; - -extern const uint32_t SamplerKind_internal_data_[]; -inline constexpr SamplerKind SamplerKind_MIN = - static_cast(0); -inline constexpr SamplerKind SamplerKind_MAX = - static_cast(1); -inline bool SamplerKind_IsValid(int value) { - return 0 <= value && value <= 1; -} -inline constexpr int SamplerKind_ARRAYSIZE = 1 + 1; -const ::google::protobuf::EnumDescriptor* PROTOBUF_NONNULL SamplerKind_descriptor(); -template -const ::std::string& SamplerKind_Name(T value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to SamplerKind_Name()."); - return SamplerKind_Name(static_cast(value)); -} -template <> -inline const ::std::string& SamplerKind_Name(SamplerKind value) { - return ::google::protobuf::internal::NameOfDenseEnum( - static_cast(value)); -} -inline bool SamplerKind_Parse( - ::absl::string_view name, SamplerKind* PROTOBUF_NONNULL value) { - return ::google::protobuf::internal::ParseNamedEnum(SamplerKind_descriptor(), name, - value); -} -enum InterpolationType : int { - flat = 0, - linear = 1, - perspective = 2, - InterpolationType_INT_MIN_SENTINEL_DO_NOT_USE_ = - ::std::numeric_limits<::int32_t>::min(), - InterpolationType_INT_MAX_SENTINEL_DO_NOT_USE_ = - ::std::numeric_limits<::int32_t>::max(), -}; - -extern const uint32_t InterpolationType_internal_data_[]; -inline constexpr InterpolationType InterpolationType_MIN = - static_cast(0); -inline constexpr InterpolationType InterpolationType_MAX = - static_cast(2); -inline bool InterpolationType_IsValid(int value) { - return 0 <= value && value <= 2; -} -inline constexpr int InterpolationType_ARRAYSIZE = 2 + 1; -const ::google::protobuf::EnumDescriptor* PROTOBUF_NONNULL InterpolationType_descriptor(); -template -const ::std::string& InterpolationType_Name(T value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to InterpolationType_Name()."); - return InterpolationType_Name(static_cast(value)); -} -template <> -inline const ::std::string& InterpolationType_Name(InterpolationType value) { - return ::google::protobuf::internal::NameOfDenseEnum( - static_cast(value)); -} -inline bool InterpolationType_Parse( - ::absl::string_view name, InterpolationType* PROTOBUF_NONNULL value) { - return ::google::protobuf::internal::ParseNamedEnum(InterpolationType_descriptor(), name, - value); -} -enum InterpolationSampling : int { - center = 0, - centroid = 1, - sample = 2, - first = 3, - either = 4, - InterpolationSampling_INT_MIN_SENTINEL_DO_NOT_USE_ = - ::std::numeric_limits<::int32_t>::min(), - InterpolationSampling_INT_MAX_SENTINEL_DO_NOT_USE_ = - ::std::numeric_limits<::int32_t>::max(), -}; - -extern const uint32_t InterpolationSampling_internal_data_[]; -inline constexpr InterpolationSampling InterpolationSampling_MIN = - static_cast(0); -inline constexpr InterpolationSampling InterpolationSampling_MAX = - static_cast(4); -inline bool InterpolationSampling_IsValid(int value) { - return 0 <= value && value <= 4; -} -inline constexpr int InterpolationSampling_ARRAYSIZE = 4 + 1; -const ::google::protobuf::EnumDescriptor* PROTOBUF_NONNULL InterpolationSampling_descriptor(); -template -const ::std::string& InterpolationSampling_Name(T value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to InterpolationSampling_Name()."); - return InterpolationSampling_Name(static_cast(value)); -} -template <> -inline const ::std::string& InterpolationSampling_Name(InterpolationSampling value) { - return ::google::protobuf::internal::NameOfDenseEnum( - static_cast(value)); -} -inline bool InterpolationSampling_Parse( - ::absl::string_view name, InterpolationSampling* PROTOBUF_NONNULL value) { - return ::google::protobuf::internal::ParseNamedEnum(InterpolationSampling_descriptor(), name, - value); -} -enum BuiltinValue : int { - point_size = 0, - frag_depth = 1, - front_facing = 2, - global_invocation_id = 3, - instance_index = 4, - local_invocation_id = 5, - local_invocation_index = 6, - num_workgroups = 7, - position = 8, - sample_index = 9, - sample_mask = 10, - subgroup_invocation_id = 11, - subgroup_size = 12, - vertex_index = 13, - workgroup_id = 14, - clip_distances = 15, - cull_distance = 16, - subgroup_id = 17, - primitive_index = 18, - barycentric_coord = 19, - num_subgroups = 20, - BuiltinValue_INT_MIN_SENTINEL_DO_NOT_USE_ = - ::std::numeric_limits<::int32_t>::min(), - BuiltinValue_INT_MAX_SENTINEL_DO_NOT_USE_ = - ::std::numeric_limits<::int32_t>::max(), -}; - -extern const uint32_t BuiltinValue_internal_data_[]; -inline constexpr BuiltinValue BuiltinValue_MIN = - static_cast(0); -inline constexpr BuiltinValue BuiltinValue_MAX = - static_cast(20); -inline bool BuiltinValue_IsValid(int value) { - return 0 <= value && value <= 20; -} -inline constexpr int BuiltinValue_ARRAYSIZE = 20 + 1; -const ::google::protobuf::EnumDescriptor* PROTOBUF_NONNULL BuiltinValue_descriptor(); -template -const ::std::string& BuiltinValue_Name(T value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to BuiltinValue_Name()."); - return BuiltinValue_Name(static_cast(value)); -} -template <> -inline const ::std::string& BuiltinValue_Name(BuiltinValue value) { - return ::google::protobuf::internal::NameOfDenseEnum( - static_cast(value)); -} -inline bool BuiltinValue_Parse( - ::absl::string_view name, BuiltinValue* PROTOBUF_NONNULL value) { - return ::google::protobuf::internal::ParseNamedEnum(BuiltinValue_descriptor(), name, - value); -} -enum BuiltinFn : int { - abs = 0, - acos = 1, - acosh = 2, - all = 3, - any = 4, - array_length = 5, - asin = 6, - asinh = 7, - atan = 8, - atan2 = 9, - atanh = 10, - ceil = 11, - clamp = 12, - cos = 13, - cosh = 14, - count_leading_zeros = 15, - count_one_bits = 16, - count_trailing_zeros = 17, - cross = 18, - degrees = 19, - determinant = 20, - distance = 21, - dot = 22, - dot4i8_packed = 23, - dot4u8_packed = 24, - dpdx = 25, - dpdx_coarse = 26, - dpdx_fine = 27, - dpdy = 28, - dpdy_coarse = 29, - dpdy_fine = 30, - exp = 31, - exp2 = 32, - extract_bits = 33, - face_forward = 34, - first_leading_bit = 35, - first_trailing_bit = 36, - floor = 37, - fma = 38, - fract = 39, - frexp = 40, - fwidth = 41, - fwidth_coarse = 42, - fwidth_fine = 43, - insert_bits = 44, - inverse_sqrt = 45, - ldexp = 46, - length = 47, - log = 48, - log2 = 49, - max = 50, - min = 51, - mix = 52, - modf = 53, - normalize = 54, - pack2x16_float = 55, - pack2x16_snorm = 56, - pack2x16_unorm = 57, - pack4x8_snorm = 58, - pack4x8_unorm = 59, - pack4xi8 = 60, - pack4xu8 = 61, - pack4xi8_clamp = 62, - pack4xu8_clamp = 63, - pow = 64, - quantize_to_f16 = 65, - radians = 66, - reflect = 67, - refract = 68, - reverse_bits = 69, - round = 70, - saturate = 71, - select = 72, - sign = 73, - sin = 74, - sinh = 75, - smoothstep = 76, - sqrt = 77, - step = 78, - storage_barrier = 79, - tan = 80, - tanh = 81, - transpose = 82, - trunc = 83, - unpack2x16_float = 84, - unpack2x16_snorm = 85, - unpack2x16_unorm = 86, - unpack4x8_snorm = 87, - unpack4x8_unorm = 88, - unpack4xi8 = 89, - unpack4xu8 = 90, - workgroup_barrier = 91, - texture_barrier = 92, - texture_dimensions = 93, - texture_gather = 94, - texture_gather_compare = 95, - texture_num_layers = 96, - texture_num_levels = 97, - texture_num_samples = 98, - texture_sample = 99, - texture_sample_bias = 100, - texture_sample_compare = 101, - texture_sample_compare_level = 102, - texture_sample_grad = 103, - texture_sample_level = 104, - texture_sample_base_clamp_to_edge = 105, - texture_store = 106, - texture_load = 107, - atomic_load = 108, - atomic_store = 109, - atomic_add = 110, - atomic_sub = 111, - atomic_max = 112, - atomic_min = 113, - atomic_and = 114, - atomic_or = 115, - atomic_xor = 116, - atomic_exchange = 117, - atomic_compare_exchange_weak = 118, - subgroup_ballot = 119, - subgroup_broadcast = 120, - input_attachment_load = 121, - subgroup_add = 122, - subgroup_exclusive_add = 123, - subgroup_mul = 124, - subgroup_exclusive_mul = 125, - subgroup_and = 126, - subgroup_or = 127, - subgroup_xor = 128, - subgroup_min = 129, - subgroup_max = 130, - subgroup_any = 131, - subgroup_all = 132, - subgroup_elect = 133, - subgroup_broadcast_first = 134, - subgroup_shuffle = 135, - subgroup_shuffle_xor = 136, - subgroup_shuffle_up = 137, - subgroup_shuffle_down = 138, - quad_broadcast = 139, - quad_swap_x = 140, - quad_swap_y = 141, - quad_swap_diagonal = 142, - subgroup_inclusive_add = 143, - subgroup_inclusive_mul = 144, - subgroup_matrix_load = 145, - subgroup_matrix_store = 146, - subgroup_matrix_multiply = 147, - subgroup_matrix_multiply_accumulate = 148, - print = 149, - subgroup_matrix_scalar_add = 152, - subgroup_matrix_scalar_multiply = 153, - subgroup_matrix_scalar_subtract = 154, - has_resource = 155, - get_resource = 156, - buffer_view = 157, - buffer_length = 158, - BuiltinFn_INT_MIN_SENTINEL_DO_NOT_USE_ = - ::std::numeric_limits<::int32_t>::min(), - BuiltinFn_INT_MAX_SENTINEL_DO_NOT_USE_ = - ::std::numeric_limits<::int32_t>::max(), -}; - -extern const uint32_t BuiltinFn_internal_data_[]; -inline constexpr BuiltinFn BuiltinFn_MIN = - static_cast(0); -inline constexpr BuiltinFn BuiltinFn_MAX = - static_cast(158); -inline bool BuiltinFn_IsValid(int value) { - return ::google::protobuf::internal::ValidateEnum(value, BuiltinFn_internal_data_); -} -inline constexpr int BuiltinFn_ARRAYSIZE = 158 + 1; -const ::google::protobuf::EnumDescriptor* PROTOBUF_NONNULL BuiltinFn_descriptor(); -template -const ::std::string& BuiltinFn_Name(T value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to BuiltinFn_Name()."); - return BuiltinFn_Name(static_cast(value)); -} -template <> -inline const ::std::string& BuiltinFn_Name(BuiltinFn value) { - return ::google::protobuf::internal::NameOfDenseEnum( - static_cast(value)); -} -inline bool BuiltinFn_Parse( - ::absl::string_view name, BuiltinFn* PROTOBUF_NONNULL value) { - return ::google::protobuf::internal::ParseNamedEnum(BuiltinFn_descriptor(), name, - value); -} - -// =================================================================== - - -// ------------------------------------------------------------------- - -class WorkgroupSize final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.WorkgroupSize) */ { - public: - inline WorkgroupSize() : WorkgroupSize(nullptr) {} - ~WorkgroupSize() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(WorkgroupSize* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(WorkgroupSize)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR WorkgroupSize(::google::protobuf::internal::ConstantInitialized); - - inline WorkgroupSize(const WorkgroupSize& from) : WorkgroupSize(nullptr, from) {} - inline WorkgroupSize(WorkgroupSize&& from) noexcept - : WorkgroupSize(nullptr, ::std::move(from)) {} - inline WorkgroupSize& operator=(const WorkgroupSize& from) { - CopyFrom(from); - return *this; - } - inline WorkgroupSize& operator=(WorkgroupSize&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const WorkgroupSize& default_instance() { - return *reinterpret_cast( - &_WorkgroupSize_default_instance_); - } - static constexpr int kIndexInFileMessages = 31; - friend void swap(WorkgroupSize& a, WorkgroupSize& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(WorkgroupSize* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(WorkgroupSize* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - WorkgroupSize* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const WorkgroupSize& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const WorkgroupSize& from) { WorkgroupSize::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(WorkgroupSize* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.WorkgroupSize"; } - - protected: - explicit WorkgroupSize(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - WorkgroupSize(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const WorkgroupSize& from); - WorkgroupSize( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, WorkgroupSize&& from) noexcept - : WorkgroupSize(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kXFieldNumber = 1, - kYFieldNumber = 2, - kZFieldNumber = 3, - }; - // uint32 x = 1; - void clear_x() ; - ::uint32_t x() const; - void set_x(::uint32_t value); - - private: - ::uint32_t _internal_x() const; - void _internal_set_x(::uint32_t value); - - public: - // uint32 y = 2; - void clear_y() ; - ::uint32_t y() const; - void set_y(::uint32_t value); - - private: - ::uint32_t _internal_y() const; - void _internal_set_y(::uint32_t value); - - public: - // uint32 z = 3; - void clear_z() ; - ::uint32_t z() const; - void set_z(::uint32_t value); - - private: - ::uint32_t _internal_z() const; - void _internal_set_z(::uint32_t value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.WorkgroupSize) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<2, 3, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const WorkgroupSize& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - ::uint32_t x_; - ::uint32_t y_; - ::uint32_t z_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull WorkgroupSize_class_data_; -// ------------------------------------------------------------------- - -class TypeVector final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.TypeVector) */ { - public: - inline TypeVector() : TypeVector(nullptr) {} - ~TypeVector() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(TypeVector* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(TypeVector)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR TypeVector(::google::protobuf::internal::ConstantInitialized); - - inline TypeVector(const TypeVector& from) : TypeVector(nullptr, from) {} - inline TypeVector(TypeVector&& from) noexcept - : TypeVector(nullptr, ::std::move(from)) {} - inline TypeVector& operator=(const TypeVector& from) { - CopyFrom(from); - return *this; - } - inline TypeVector& operator=(TypeVector&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const TypeVector& default_instance() { - return *reinterpret_cast( - &_TypeVector_default_instance_); - } - static constexpr int kIndexInFileMessages = 2; - friend void swap(TypeVector& a, TypeVector& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(TypeVector* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(TypeVector* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - TypeVector* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const TypeVector& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const TypeVector& from) { TypeVector::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(TypeVector* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.TypeVector"; } - - protected: - explicit TypeVector(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - TypeVector(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TypeVector& from); - TypeVector( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TypeVector&& from) noexcept - : TypeVector(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kWidthFieldNumber = 1, - kElementTypeFieldNumber = 2, - }; - // uint32 width = 1; - void clear_width() ; - ::uint32_t width() const; - void set_width(::uint32_t value); - - private: - ::uint32_t _internal_width() const; - void _internal_set_width(::uint32_t value); - - public: - // uint32 element_type = 2; - void clear_element_type() ; - ::uint32_t element_type() const; - void set_element_type(::uint32_t value); - - private: - ::uint32_t _internal_element_type() const; - void _internal_set_element_type(::uint32_t value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.TypeVector) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<1, 2, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const TypeVector& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - ::uint32_t width_; - ::uint32_t element_type_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull TypeVector_class_data_; -// ------------------------------------------------------------------- - -class TypeTexelBuffer final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.TypeTexelBuffer) */ { - public: - inline TypeTexelBuffer() : TypeTexelBuffer(nullptr) {} - ~TypeTexelBuffer() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(TypeTexelBuffer* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(TypeTexelBuffer)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR TypeTexelBuffer(::google::protobuf::internal::ConstantInitialized); - - inline TypeTexelBuffer(const TypeTexelBuffer& from) : TypeTexelBuffer(nullptr, from) {} - inline TypeTexelBuffer(TypeTexelBuffer&& from) noexcept - : TypeTexelBuffer(nullptr, ::std::move(from)) {} - inline TypeTexelBuffer& operator=(const TypeTexelBuffer& from) { - CopyFrom(from); - return *this; - } - inline TypeTexelBuffer& operator=(TypeTexelBuffer&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const TypeTexelBuffer& default_instance() { - return *reinterpret_cast( - &_TypeTexelBuffer_default_instance_); - } - static constexpr int kIndexInFileMessages = 21; - friend void swap(TypeTexelBuffer& a, TypeTexelBuffer& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(TypeTexelBuffer* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(TypeTexelBuffer* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - TypeTexelBuffer* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const TypeTexelBuffer& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const TypeTexelBuffer& from) { TypeTexelBuffer::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(TypeTexelBuffer* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.TypeTexelBuffer"; } - - protected: - explicit TypeTexelBuffer(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - TypeTexelBuffer(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TypeTexelBuffer& from); - TypeTexelBuffer( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TypeTexelBuffer&& from) noexcept - : TypeTexelBuffer(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kTexelFormatFieldNumber = 1, - kAccessFieldNumber = 2, - }; - // .tint.core.ir.binary.pb.TexelFormat texel_format = 1; - void clear_texel_format() ; - ::tint::core::ir::binary::pb::TexelFormat texel_format() const; - void set_texel_format(::tint::core::ir::binary::pb::TexelFormat value); - - private: - ::tint::core::ir::binary::pb::TexelFormat _internal_texel_format() const; - void _internal_set_texel_format(::tint::core::ir::binary::pb::TexelFormat value); - - public: - // .tint.core.ir.binary.pb.AccessControl access = 2; - void clear_access() ; - ::tint::core::ir::binary::pb::AccessControl access() const; - void set_access(::tint::core::ir::binary::pb::AccessControl value); - - private: - ::tint::core::ir::binary::pb::AccessControl _internal_access() const; - void _internal_set_access(::tint::core::ir::binary::pb::AccessControl value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.TypeTexelBuffer) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<1, 2, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const TypeTexelBuffer& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - int texel_format_; - int access_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull TypeTexelBuffer_class_data_; -// ------------------------------------------------------------------- - -class TypeSubgroupMatrix final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.TypeSubgroupMatrix) */ { - public: - inline TypeSubgroupMatrix() : TypeSubgroupMatrix(nullptr) {} - ~TypeSubgroupMatrix() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(TypeSubgroupMatrix* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(TypeSubgroupMatrix)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR TypeSubgroupMatrix(::google::protobuf::internal::ConstantInitialized); - - inline TypeSubgroupMatrix(const TypeSubgroupMatrix& from) : TypeSubgroupMatrix(nullptr, from) {} - inline TypeSubgroupMatrix(TypeSubgroupMatrix&& from) noexcept - : TypeSubgroupMatrix(nullptr, ::std::move(from)) {} - inline TypeSubgroupMatrix& operator=(const TypeSubgroupMatrix& from) { - CopyFrom(from); - return *this; - } - inline TypeSubgroupMatrix& operator=(TypeSubgroupMatrix&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const TypeSubgroupMatrix& default_instance() { - return *reinterpret_cast( - &_TypeSubgroupMatrix_default_instance_); - } - static constexpr int kIndexInFileMessages = 19; - friend void swap(TypeSubgroupMatrix& a, TypeSubgroupMatrix& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(TypeSubgroupMatrix* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(TypeSubgroupMatrix* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - TypeSubgroupMatrix* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const TypeSubgroupMatrix& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const TypeSubgroupMatrix& from) { TypeSubgroupMatrix::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(TypeSubgroupMatrix* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.TypeSubgroupMatrix"; } - - protected: - explicit TypeSubgroupMatrix(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - TypeSubgroupMatrix(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TypeSubgroupMatrix& from); - TypeSubgroupMatrix( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TypeSubgroupMatrix&& from) noexcept - : TypeSubgroupMatrix(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kSubTypeFieldNumber = 1, - kRowsFieldNumber = 2, - kColumnsFieldNumber = 3, - }; - // uint32 sub_type = 1; - void clear_sub_type() ; - ::uint32_t sub_type() const; - void set_sub_type(::uint32_t value); - - private: - ::uint32_t _internal_sub_type() const; - void _internal_set_sub_type(::uint32_t value); - - public: - // uint32 rows = 2; - void clear_rows() ; - ::uint32_t rows() const; - void set_rows(::uint32_t value); - - private: - ::uint32_t _internal_rows() const; - void _internal_set_rows(::uint32_t value); - - public: - // uint32 columns = 3; - void clear_columns() ; - ::uint32_t columns() const; - void set_columns(::uint32_t value); - - private: - ::uint32_t _internal_columns() const; - void _internal_set_columns(::uint32_t value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.TypeSubgroupMatrix) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<2, 3, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const TypeSubgroupMatrix& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - ::uint32_t sub_type_; - ::uint32_t rows_; - ::uint32_t columns_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull TypeSubgroupMatrix_class_data_; -// ------------------------------------------------------------------- - -class TypeStorageTexture final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.TypeStorageTexture) */ { - public: - inline TypeStorageTexture() : TypeStorageTexture(nullptr) {} - ~TypeStorageTexture() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(TypeStorageTexture* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(TypeStorageTexture)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR TypeStorageTexture(::google::protobuf::internal::ConstantInitialized); - - inline TypeStorageTexture(const TypeStorageTexture& from) : TypeStorageTexture(nullptr, from) {} - inline TypeStorageTexture(TypeStorageTexture&& from) noexcept - : TypeStorageTexture(nullptr, ::std::move(from)) {} - inline TypeStorageTexture& operator=(const TypeStorageTexture& from) { - CopyFrom(from); - return *this; - } - inline TypeStorageTexture& operator=(TypeStorageTexture&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const TypeStorageTexture& default_instance() { - return *reinterpret_cast( - &_TypeStorageTexture_default_instance_); - } - static constexpr int kIndexInFileMessages = 14; - friend void swap(TypeStorageTexture& a, TypeStorageTexture& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(TypeStorageTexture* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(TypeStorageTexture* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - TypeStorageTexture* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const TypeStorageTexture& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const TypeStorageTexture& from) { TypeStorageTexture::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(TypeStorageTexture* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.TypeStorageTexture"; } - - protected: - explicit TypeStorageTexture(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - TypeStorageTexture(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TypeStorageTexture& from); - TypeStorageTexture( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TypeStorageTexture&& from) noexcept - : TypeStorageTexture(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kDimensionFieldNumber = 1, - kTexelFormatFieldNumber = 2, - kAccessFieldNumber = 3, - }; - // .tint.core.ir.binary.pb.TextureDimension dimension = 1; - void clear_dimension() ; - ::tint::core::ir::binary::pb::TextureDimension dimension() const; - void set_dimension(::tint::core::ir::binary::pb::TextureDimension value); - - private: - ::tint::core::ir::binary::pb::TextureDimension _internal_dimension() const; - void _internal_set_dimension(::tint::core::ir::binary::pb::TextureDimension value); - - public: - // .tint.core.ir.binary.pb.TexelFormat texel_format = 2; - void clear_texel_format() ; - ::tint::core::ir::binary::pb::TexelFormat texel_format() const; - void set_texel_format(::tint::core::ir::binary::pb::TexelFormat value); - - private: - ::tint::core::ir::binary::pb::TexelFormat _internal_texel_format() const; - void _internal_set_texel_format(::tint::core::ir::binary::pb::TexelFormat value); - - public: - // .tint.core.ir.binary.pb.AccessControl access = 3; - void clear_access() ; - ::tint::core::ir::binary::pb::AccessControl access() const; - void set_access(::tint::core::ir::binary::pb::AccessControl value); - - private: - ::tint::core::ir::binary::pb::AccessControl _internal_access() const; - void _internal_set_access(::tint::core::ir::binary::pb::AccessControl value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.TypeStorageTexture) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<2, 3, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const TypeStorageTexture& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - int dimension_; - int texel_format_; - int access_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull TypeStorageTexture_class_data_; -// ------------------------------------------------------------------- - -class TypeSampler final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.TypeSampler) */ { - public: - inline TypeSampler() : TypeSampler(nullptr) {} - ~TypeSampler() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(TypeSampler* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(TypeSampler)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR TypeSampler(::google::protobuf::internal::ConstantInitialized); - - inline TypeSampler(const TypeSampler& from) : TypeSampler(nullptr, from) {} - inline TypeSampler(TypeSampler&& from) noexcept - : TypeSampler(nullptr, ::std::move(from)) {} - inline TypeSampler& operator=(const TypeSampler& from) { - CopyFrom(from); - return *this; - } - inline TypeSampler& operator=(TypeSampler&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const TypeSampler& default_instance() { - return *reinterpret_cast( - &_TypeSampler_default_instance_); - } - static constexpr int kIndexInFileMessages = 17; - friend void swap(TypeSampler& a, TypeSampler& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(TypeSampler* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(TypeSampler* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - TypeSampler* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const TypeSampler& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const TypeSampler& from) { TypeSampler::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(TypeSampler* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.TypeSampler"; } - - protected: - explicit TypeSampler(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - TypeSampler(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TypeSampler& from); - TypeSampler( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TypeSampler&& from) noexcept - : TypeSampler(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kKindFieldNumber = 1, - }; - // .tint.core.ir.binary.pb.SamplerKind kind = 1; - void clear_kind() ; - ::tint::core::ir::binary::pb::SamplerKind kind() const; - void set_kind(::tint::core::ir::binary::pb::SamplerKind value); - - private: - ::tint::core::ir::binary::pb::SamplerKind _internal_kind() const; - void _internal_set_kind(::tint::core::ir::binary::pb::SamplerKind value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.TypeSampler) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 1, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const TypeSampler& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - int kind_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull TypeSampler_class_data_; -// ------------------------------------------------------------------- - -class TypeSampledTexture final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.TypeSampledTexture) */ { - public: - inline TypeSampledTexture() : TypeSampledTexture(nullptr) {} - ~TypeSampledTexture() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(TypeSampledTexture* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(TypeSampledTexture)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR TypeSampledTexture(::google::protobuf::internal::ConstantInitialized); - - inline TypeSampledTexture(const TypeSampledTexture& from) : TypeSampledTexture(nullptr, from) {} - inline TypeSampledTexture(TypeSampledTexture&& from) noexcept - : TypeSampledTexture(nullptr, ::std::move(from)) {} - inline TypeSampledTexture& operator=(const TypeSampledTexture& from) { - CopyFrom(from); - return *this; - } - inline TypeSampledTexture& operator=(TypeSampledTexture&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const TypeSampledTexture& default_instance() { - return *reinterpret_cast( - &_TypeSampledTexture_default_instance_); - } - static constexpr int kIndexInFileMessages = 11; - friend void swap(TypeSampledTexture& a, TypeSampledTexture& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(TypeSampledTexture* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(TypeSampledTexture* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - TypeSampledTexture* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const TypeSampledTexture& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const TypeSampledTexture& from) { TypeSampledTexture::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(TypeSampledTexture* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.TypeSampledTexture"; } - - protected: - explicit TypeSampledTexture(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - TypeSampledTexture(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TypeSampledTexture& from); - TypeSampledTexture( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TypeSampledTexture&& from) noexcept - : TypeSampledTexture(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kDimensionFieldNumber = 1, - kSubTypeFieldNumber = 2, - }; - // .tint.core.ir.binary.pb.TextureDimension dimension = 1; - void clear_dimension() ; - ::tint::core::ir::binary::pb::TextureDimension dimension() const; - void set_dimension(::tint::core::ir::binary::pb::TextureDimension value); - - private: - ::tint::core::ir::binary::pb::TextureDimension _internal_dimension() const; - void _internal_set_dimension(::tint::core::ir::binary::pb::TextureDimension value); - - public: - // uint32 sub_type = 2; - void clear_sub_type() ; - ::uint32_t sub_type() const; - void set_sub_type(::uint32_t value); - - private: - ::uint32_t _internal_sub_type() const; - void _internal_set_sub_type(::uint32_t value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.TypeSampledTexture) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<1, 2, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const TypeSampledTexture& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - int dimension_; - ::uint32_t sub_type_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull TypeSampledTexture_class_data_; -// ------------------------------------------------------------------- - -class TypeResourceBinding final : public ::google::protobuf::internal::ZeroFieldsBase -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.TypeResourceBinding) */ { - public: - inline TypeResourceBinding() : TypeResourceBinding(nullptr) {} - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(TypeResourceBinding* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(TypeResourceBinding)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR TypeResourceBinding(::google::protobuf::internal::ConstantInitialized); - - inline TypeResourceBinding(const TypeResourceBinding& from) : TypeResourceBinding(nullptr, from) {} - inline TypeResourceBinding(TypeResourceBinding&& from) noexcept - : TypeResourceBinding(nullptr, ::std::move(from)) {} - inline TypeResourceBinding& operator=(const TypeResourceBinding& from) { - CopyFrom(from); - return *this; - } - inline TypeResourceBinding& operator=(TypeResourceBinding&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const TypeResourceBinding& default_instance() { - return *reinterpret_cast( - &_TypeResourceBinding_default_instance_); - } - static constexpr int kIndexInFileMessages = 15; - friend void swap(TypeResourceBinding& a, TypeResourceBinding& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(TypeResourceBinding* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(TypeResourceBinding* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - TypeResourceBinding* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::internal::ZeroFieldsBase::DefaultConstruct(arena); - } - using ::google::protobuf::internal::ZeroFieldsBase::CopyFrom; - inline void CopyFrom(const TypeResourceBinding& from) { - ::google::protobuf::internal::ZeroFieldsBase::CopyImpl(*this, from); - } - using ::google::protobuf::internal::ZeroFieldsBase::MergeFrom; - void MergeFrom(const TypeResourceBinding& from) { - ::google::protobuf::internal::ZeroFieldsBase::MergeImpl(*this, from); - } - - public: - bool IsInitialized() const { - return true; - } - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.TypeResourceBinding"; } - - protected: - explicit TypeResourceBinding(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - TypeResourceBinding(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TypeResourceBinding& from); - TypeResourceBinding( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TypeResourceBinding&& from) noexcept - : TypeResourceBinding(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.TypeResourceBinding) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 0, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull TypeResourceBinding_class_data_; -// ------------------------------------------------------------------- - -class TypePointer final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.TypePointer) */ { - public: - inline TypePointer() : TypePointer(nullptr) {} - ~TypePointer() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(TypePointer* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(TypePointer)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR TypePointer(::google::protobuf::internal::ConstantInitialized); - - inline TypePointer(const TypePointer& from) : TypePointer(nullptr, from) {} - inline TypePointer(TypePointer&& from) noexcept - : TypePointer(nullptr, ::std::move(from)) {} - inline TypePointer& operator=(const TypePointer& from) { - CopyFrom(from); - return *this; - } - inline TypePointer& operator=(TypePointer&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const TypePointer& default_instance() { - return *reinterpret_cast( - &_TypePointer_default_instance_); - } - static constexpr int kIndexInFileMessages = 6; - friend void swap(TypePointer& a, TypePointer& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(TypePointer* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(TypePointer* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - TypePointer* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const TypePointer& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const TypePointer& from) { TypePointer::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(TypePointer* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.TypePointer"; } - - protected: - explicit TypePointer(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - TypePointer(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TypePointer& from); - TypePointer( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TypePointer&& from) noexcept - : TypePointer(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kAddressSpaceFieldNumber = 1, - kStoreTypeFieldNumber = 2, - kAccessFieldNumber = 3, - }; - // .tint.core.ir.binary.pb.AddressSpace address_space = 1; - void clear_address_space() ; - ::tint::core::ir::binary::pb::AddressSpace address_space() const; - void set_address_space(::tint::core::ir::binary::pb::AddressSpace value); - - private: - ::tint::core::ir::binary::pb::AddressSpace _internal_address_space() const; - void _internal_set_address_space(::tint::core::ir::binary::pb::AddressSpace value); - - public: - // uint32 store_type = 2; - void clear_store_type() ; - ::uint32_t store_type() const; - void set_store_type(::uint32_t value); - - private: - ::uint32_t _internal_store_type() const; - void _internal_set_store_type(::uint32_t value); - - public: - // .tint.core.ir.binary.pb.AccessControl access = 3; - void clear_access() ; - ::tint::core::ir::binary::pb::AccessControl access() const; - void set_access(::tint::core::ir::binary::pb::AccessControl value); - - private: - ::tint::core::ir::binary::pb::AccessControl _internal_access() const; - void _internal_set_access(::tint::core::ir::binary::pb::AccessControl value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.TypePointer) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<2, 3, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const TypePointer& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - int address_space_; - ::uint32_t store_type_; - int access_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull TypePointer_class_data_; -// ------------------------------------------------------------------- - -class TypeMultisampledTexture final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.TypeMultisampledTexture) */ { - public: - inline TypeMultisampledTexture() : TypeMultisampledTexture(nullptr) {} - ~TypeMultisampledTexture() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(TypeMultisampledTexture* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(TypeMultisampledTexture)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR TypeMultisampledTexture(::google::protobuf::internal::ConstantInitialized); - - inline TypeMultisampledTexture(const TypeMultisampledTexture& from) : TypeMultisampledTexture(nullptr, from) {} - inline TypeMultisampledTexture(TypeMultisampledTexture&& from) noexcept - : TypeMultisampledTexture(nullptr, ::std::move(from)) {} - inline TypeMultisampledTexture& operator=(const TypeMultisampledTexture& from) { - CopyFrom(from); - return *this; - } - inline TypeMultisampledTexture& operator=(TypeMultisampledTexture&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const TypeMultisampledTexture& default_instance() { - return *reinterpret_cast( - &_TypeMultisampledTexture_default_instance_); - } - static constexpr int kIndexInFileMessages = 12; - friend void swap(TypeMultisampledTexture& a, TypeMultisampledTexture& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(TypeMultisampledTexture* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(TypeMultisampledTexture* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - TypeMultisampledTexture* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const TypeMultisampledTexture& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const TypeMultisampledTexture& from) { TypeMultisampledTexture::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(TypeMultisampledTexture* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.TypeMultisampledTexture"; } - - protected: - explicit TypeMultisampledTexture(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - TypeMultisampledTexture(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TypeMultisampledTexture& from); - TypeMultisampledTexture( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TypeMultisampledTexture&& from) noexcept - : TypeMultisampledTexture(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kDimensionFieldNumber = 1, - kSubTypeFieldNumber = 2, - }; - // .tint.core.ir.binary.pb.TextureDimension dimension = 1; - void clear_dimension() ; - ::tint::core::ir::binary::pb::TextureDimension dimension() const; - void set_dimension(::tint::core::ir::binary::pb::TextureDimension value); - - private: - ::tint::core::ir::binary::pb::TextureDimension _internal_dimension() const; - void _internal_set_dimension(::tint::core::ir::binary::pb::TextureDimension value); - - public: - // uint32 sub_type = 2; - void clear_sub_type() ; - ::uint32_t sub_type() const; - void set_sub_type(::uint32_t value); - - private: - ::uint32_t _internal_sub_type() const; - void _internal_set_sub_type(::uint32_t value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.TypeMultisampledTexture) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<1, 2, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const TypeMultisampledTexture& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - int dimension_; - ::uint32_t sub_type_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull TypeMultisampledTexture_class_data_; -// ------------------------------------------------------------------- - -class TypeMatrix final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.TypeMatrix) */ { - public: - inline TypeMatrix() : TypeMatrix(nullptr) {} - ~TypeMatrix() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(TypeMatrix* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(TypeMatrix)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR TypeMatrix(::google::protobuf::internal::ConstantInitialized); - - inline TypeMatrix(const TypeMatrix& from) : TypeMatrix(nullptr, from) {} - inline TypeMatrix(TypeMatrix&& from) noexcept - : TypeMatrix(nullptr, ::std::move(from)) {} - inline TypeMatrix& operator=(const TypeMatrix& from) { - CopyFrom(from); - return *this; - } - inline TypeMatrix& operator=(TypeMatrix&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const TypeMatrix& default_instance() { - return *reinterpret_cast( - &_TypeMatrix_default_instance_); - } - static constexpr int kIndexInFileMessages = 3; - friend void swap(TypeMatrix& a, TypeMatrix& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(TypeMatrix* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(TypeMatrix* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - TypeMatrix* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const TypeMatrix& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const TypeMatrix& from) { TypeMatrix::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(TypeMatrix* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.TypeMatrix"; } - - protected: - explicit TypeMatrix(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - TypeMatrix(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TypeMatrix& from); - TypeMatrix( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TypeMatrix&& from) noexcept - : TypeMatrix(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kNumColumnsFieldNumber = 1, - kNumRowsFieldNumber = 2, - kElementTypeFieldNumber = 3, - }; - // uint32 num_columns = 1; - void clear_num_columns() ; - ::uint32_t num_columns() const; - void set_num_columns(::uint32_t value); - - private: - ::uint32_t _internal_num_columns() const; - void _internal_set_num_columns(::uint32_t value); - - public: - // uint32 num_rows = 2; - void clear_num_rows() ; - ::uint32_t num_rows() const; - void set_num_rows(::uint32_t value); - - private: - ::uint32_t _internal_num_rows() const; - void _internal_set_num_rows(::uint32_t value); - - public: - // uint32 element_type = 3; - void clear_element_type() ; - ::uint32_t element_type() const; - void set_element_type(::uint32_t value); - - private: - ::uint32_t _internal_element_type() const; - void _internal_set_element_type(::uint32_t value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.TypeMatrix) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<2, 3, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const TypeMatrix& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - ::uint32_t num_columns_; - ::uint32_t num_rows_; - ::uint32_t element_type_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull TypeMatrix_class_data_; -// ------------------------------------------------------------------- - -class TypeInputAttachment final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.TypeInputAttachment) */ { - public: - inline TypeInputAttachment() : TypeInputAttachment(nullptr) {} - ~TypeInputAttachment() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(TypeInputAttachment* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(TypeInputAttachment)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR TypeInputAttachment(::google::protobuf::internal::ConstantInitialized); - - inline TypeInputAttachment(const TypeInputAttachment& from) : TypeInputAttachment(nullptr, from) {} - inline TypeInputAttachment(TypeInputAttachment&& from) noexcept - : TypeInputAttachment(nullptr, ::std::move(from)) {} - inline TypeInputAttachment& operator=(const TypeInputAttachment& from) { - CopyFrom(from); - return *this; - } - inline TypeInputAttachment& operator=(TypeInputAttachment&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const TypeInputAttachment& default_instance() { - return *reinterpret_cast( - &_TypeInputAttachment_default_instance_); - } - static constexpr int kIndexInFileMessages = 18; - friend void swap(TypeInputAttachment& a, TypeInputAttachment& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(TypeInputAttachment* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(TypeInputAttachment* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - TypeInputAttachment* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const TypeInputAttachment& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const TypeInputAttachment& from) { TypeInputAttachment::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(TypeInputAttachment* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.TypeInputAttachment"; } - - protected: - explicit TypeInputAttachment(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - TypeInputAttachment(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TypeInputAttachment& from); - TypeInputAttachment( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TypeInputAttachment&& from) noexcept - : TypeInputAttachment(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kSubTypeFieldNumber = 1, - }; - // uint32 sub_type = 1; - void clear_sub_type() ; - ::uint32_t sub_type() const; - void set_sub_type(::uint32_t value); - - private: - ::uint32_t _internal_sub_type() const; - void _internal_set_sub_type(::uint32_t value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.TypeInputAttachment) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 1, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const TypeInputAttachment& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - ::uint32_t sub_type_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull TypeInputAttachment_class_data_; -// ------------------------------------------------------------------- - -class TypeExternalTexture final : public ::google::protobuf::internal::ZeroFieldsBase -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.TypeExternalTexture) */ { - public: - inline TypeExternalTexture() : TypeExternalTexture(nullptr) {} - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(TypeExternalTexture* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(TypeExternalTexture)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR TypeExternalTexture(::google::protobuf::internal::ConstantInitialized); - - inline TypeExternalTexture(const TypeExternalTexture& from) : TypeExternalTexture(nullptr, from) {} - inline TypeExternalTexture(TypeExternalTexture&& from) noexcept - : TypeExternalTexture(nullptr, ::std::move(from)) {} - inline TypeExternalTexture& operator=(const TypeExternalTexture& from) { - CopyFrom(from); - return *this; - } - inline TypeExternalTexture& operator=(TypeExternalTexture&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const TypeExternalTexture& default_instance() { - return *reinterpret_cast( - &_TypeExternalTexture_default_instance_); - } - static constexpr int kIndexInFileMessages = 16; - friend void swap(TypeExternalTexture& a, TypeExternalTexture& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(TypeExternalTexture* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(TypeExternalTexture* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - TypeExternalTexture* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::internal::ZeroFieldsBase::DefaultConstruct(arena); - } - using ::google::protobuf::internal::ZeroFieldsBase::CopyFrom; - inline void CopyFrom(const TypeExternalTexture& from) { - ::google::protobuf::internal::ZeroFieldsBase::CopyImpl(*this, from); - } - using ::google::protobuf::internal::ZeroFieldsBase::MergeFrom; - void MergeFrom(const TypeExternalTexture& from) { - ::google::protobuf::internal::ZeroFieldsBase::MergeImpl(*this, from); - } - - public: - bool IsInitialized() const { - return true; - } - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.TypeExternalTexture"; } - - protected: - explicit TypeExternalTexture(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - TypeExternalTexture(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TypeExternalTexture& from); - TypeExternalTexture( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TypeExternalTexture&& from) noexcept - : TypeExternalTexture(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.TypeExternalTexture) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 0, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull TypeExternalTexture_class_data_; -// ------------------------------------------------------------------- - -class TypeDepthTexture final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.TypeDepthTexture) */ { - public: - inline TypeDepthTexture() : TypeDepthTexture(nullptr) {} - ~TypeDepthTexture() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(TypeDepthTexture* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(TypeDepthTexture)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR TypeDepthTexture(::google::protobuf::internal::ConstantInitialized); - - inline TypeDepthTexture(const TypeDepthTexture& from) : TypeDepthTexture(nullptr, from) {} - inline TypeDepthTexture(TypeDepthTexture&& from) noexcept - : TypeDepthTexture(nullptr, ::std::move(from)) {} - inline TypeDepthTexture& operator=(const TypeDepthTexture& from) { - CopyFrom(from); - return *this; - } - inline TypeDepthTexture& operator=(TypeDepthTexture&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const TypeDepthTexture& default_instance() { - return *reinterpret_cast( - &_TypeDepthTexture_default_instance_); - } - static constexpr int kIndexInFileMessages = 10; - friend void swap(TypeDepthTexture& a, TypeDepthTexture& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(TypeDepthTexture* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(TypeDepthTexture* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - TypeDepthTexture* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const TypeDepthTexture& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const TypeDepthTexture& from) { TypeDepthTexture::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(TypeDepthTexture* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.TypeDepthTexture"; } - - protected: - explicit TypeDepthTexture(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - TypeDepthTexture(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TypeDepthTexture& from); - TypeDepthTexture( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TypeDepthTexture&& from) noexcept - : TypeDepthTexture(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kDimensionFieldNumber = 1, - }; - // .tint.core.ir.binary.pb.TextureDimension dimension = 1; - void clear_dimension() ; - ::tint::core::ir::binary::pb::TextureDimension dimension() const; - void set_dimension(::tint::core::ir::binary::pb::TextureDimension value); - - private: - ::tint::core::ir::binary::pb::TextureDimension _internal_dimension() const; - void _internal_set_dimension(::tint::core::ir::binary::pb::TextureDimension value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.TypeDepthTexture) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 1, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const TypeDepthTexture& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - int dimension_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull TypeDepthTexture_class_data_; -// ------------------------------------------------------------------- - -class TypeDepthMultisampledTexture final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.TypeDepthMultisampledTexture) */ { - public: - inline TypeDepthMultisampledTexture() : TypeDepthMultisampledTexture(nullptr) {} - ~TypeDepthMultisampledTexture() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(TypeDepthMultisampledTexture* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(TypeDepthMultisampledTexture)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR TypeDepthMultisampledTexture(::google::protobuf::internal::ConstantInitialized); - - inline TypeDepthMultisampledTexture(const TypeDepthMultisampledTexture& from) : TypeDepthMultisampledTexture(nullptr, from) {} - inline TypeDepthMultisampledTexture(TypeDepthMultisampledTexture&& from) noexcept - : TypeDepthMultisampledTexture(nullptr, ::std::move(from)) {} - inline TypeDepthMultisampledTexture& operator=(const TypeDepthMultisampledTexture& from) { - CopyFrom(from); - return *this; - } - inline TypeDepthMultisampledTexture& operator=(TypeDepthMultisampledTexture&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const TypeDepthMultisampledTexture& default_instance() { - return *reinterpret_cast( - &_TypeDepthMultisampledTexture_default_instance_); - } - static constexpr int kIndexInFileMessages = 13; - friend void swap(TypeDepthMultisampledTexture& a, TypeDepthMultisampledTexture& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(TypeDepthMultisampledTexture* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(TypeDepthMultisampledTexture* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - TypeDepthMultisampledTexture* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const TypeDepthMultisampledTexture& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const TypeDepthMultisampledTexture& from) { TypeDepthMultisampledTexture::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(TypeDepthMultisampledTexture* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.TypeDepthMultisampledTexture"; } - - protected: - explicit TypeDepthMultisampledTexture(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - TypeDepthMultisampledTexture(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TypeDepthMultisampledTexture& from); - TypeDepthMultisampledTexture( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TypeDepthMultisampledTexture&& from) noexcept - : TypeDepthMultisampledTexture(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kDimensionFieldNumber = 1, - }; - // .tint.core.ir.binary.pb.TextureDimension dimension = 1; - void clear_dimension() ; - ::tint::core::ir::binary::pb::TextureDimension dimension() const; - void set_dimension(::tint::core::ir::binary::pb::TextureDimension value); - - private: - ::tint::core::ir::binary::pb::TextureDimension _internal_dimension() const; - void _internal_set_dimension(::tint::core::ir::binary::pb::TextureDimension value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.TypeDepthMultisampledTexture) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 1, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const TypeDepthMultisampledTexture& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - int dimension_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull TypeDepthMultisampledTexture_class_data_; -// ------------------------------------------------------------------- - -class TypeBuffer final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.TypeBuffer) */ { - public: - inline TypeBuffer() : TypeBuffer(nullptr) {} - ~TypeBuffer() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(TypeBuffer* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(TypeBuffer)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR TypeBuffer(::google::protobuf::internal::ConstantInitialized); - - inline TypeBuffer(const TypeBuffer& from) : TypeBuffer(nullptr, from) {} - inline TypeBuffer(TypeBuffer&& from) noexcept - : TypeBuffer(nullptr, ::std::move(from)) {} - inline TypeBuffer& operator=(const TypeBuffer& from) { - CopyFrom(from); - return *this; - } - inline TypeBuffer& operator=(TypeBuffer&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const TypeBuffer& default_instance() { - return *reinterpret_cast( - &_TypeBuffer_default_instance_); - } - static constexpr int kIndexInFileMessages = 20; - friend void swap(TypeBuffer& a, TypeBuffer& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(TypeBuffer* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(TypeBuffer* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - TypeBuffer* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const TypeBuffer& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const TypeBuffer& from) { TypeBuffer::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(TypeBuffer* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.TypeBuffer"; } - - protected: - explicit TypeBuffer(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - TypeBuffer(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TypeBuffer& from); - TypeBuffer( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TypeBuffer&& from) noexcept - : TypeBuffer(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kCountFieldNumber = 1, - }; - // uint32 count = 1; - void clear_count() ; - ::uint32_t count() const; - void set_count(::uint32_t value); - - private: - ::uint32_t _internal_count() const; - void _internal_set_count(::uint32_t value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.TypeBuffer) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 1, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const TypeBuffer& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - ::uint32_t count_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull TypeBuffer_class_data_; -// ------------------------------------------------------------------- - -class TypeBindingArray final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.TypeBindingArray) */ { - public: - inline TypeBindingArray() : TypeBindingArray(nullptr) {} - ~TypeBindingArray() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(TypeBindingArray* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(TypeBindingArray)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR TypeBindingArray(::google::protobuf::internal::ConstantInitialized); - - inline TypeBindingArray(const TypeBindingArray& from) : TypeBindingArray(nullptr, from) {} - inline TypeBindingArray(TypeBindingArray&& from) noexcept - : TypeBindingArray(nullptr, ::std::move(from)) {} - inline TypeBindingArray& operator=(const TypeBindingArray& from) { - CopyFrom(from); - return *this; - } - inline TypeBindingArray& operator=(TypeBindingArray&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const TypeBindingArray& default_instance() { - return *reinterpret_cast( - &_TypeBindingArray_default_instance_); - } - static constexpr int kIndexInFileMessages = 5; - friend void swap(TypeBindingArray& a, TypeBindingArray& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(TypeBindingArray* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(TypeBindingArray* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - TypeBindingArray* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const TypeBindingArray& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const TypeBindingArray& from) { TypeBindingArray::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(TypeBindingArray* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.TypeBindingArray"; } - - protected: - explicit TypeBindingArray(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - TypeBindingArray(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TypeBindingArray& from); - TypeBindingArray( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TypeBindingArray&& from) noexcept - : TypeBindingArray(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kElementFieldNumber = 1, - kCountFieldNumber = 2, - }; - // uint32 element = 1; - void clear_element() ; - ::uint32_t element() const; - void set_element(::uint32_t value); - - private: - ::uint32_t _internal_element() const; - void _internal_set_element(::uint32_t value); - - public: - // uint32 count = 2; - void clear_count() ; - ::uint32_t count() const; - void set_count(::uint32_t value); - - private: - ::uint32_t _internal_count() const; - void _internal_set_count(::uint32_t value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.TypeBindingArray) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<1, 2, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const TypeBindingArray& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - ::uint32_t element_; - ::uint32_t count_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull TypeBindingArray_class_data_; -// ------------------------------------------------------------------- - -class TypeAtomic final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.TypeAtomic) */ { - public: - inline TypeAtomic() : TypeAtomic(nullptr) {} - ~TypeAtomic() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(TypeAtomic* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(TypeAtomic)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR TypeAtomic(::google::protobuf::internal::ConstantInitialized); - - inline TypeAtomic(const TypeAtomic& from) : TypeAtomic(nullptr, from) {} - inline TypeAtomic(TypeAtomic&& from) noexcept - : TypeAtomic(nullptr, ::std::move(from)) {} - inline TypeAtomic& operator=(const TypeAtomic& from) { - CopyFrom(from); - return *this; - } - inline TypeAtomic& operator=(TypeAtomic&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const TypeAtomic& default_instance() { - return *reinterpret_cast( - &_TypeAtomic_default_instance_); - } - static constexpr int kIndexInFileMessages = 9; - friend void swap(TypeAtomic& a, TypeAtomic& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(TypeAtomic* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(TypeAtomic* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - TypeAtomic* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const TypeAtomic& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const TypeAtomic& from) { TypeAtomic::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(TypeAtomic* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.TypeAtomic"; } - - protected: - explicit TypeAtomic(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - TypeAtomic(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TypeAtomic& from); - TypeAtomic( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TypeAtomic&& from) noexcept - : TypeAtomic(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kTypeFieldNumber = 1, - }; - // uint32 type = 1; - void clear_type() ; - ::uint32_t type() const; - void set_type(::uint32_t value); - - private: - ::uint32_t _internal_type() const; - void _internal_set_type(::uint32_t value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.TypeAtomic) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 1, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const TypeAtomic& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - ::uint32_t type_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull TypeAtomic_class_data_; -// ------------------------------------------------------------------- - -class TypeArray final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.TypeArray) */ { - public: - inline TypeArray() : TypeArray(nullptr) {} - ~TypeArray() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(TypeArray* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(TypeArray)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR TypeArray(::google::protobuf::internal::ConstantInitialized); - - inline TypeArray(const TypeArray& from) : TypeArray(nullptr, from) {} - inline TypeArray(TypeArray&& from) noexcept - : TypeArray(nullptr, ::std::move(from)) {} - inline TypeArray& operator=(const TypeArray& from) { - CopyFrom(from); - return *this; - } - inline TypeArray& operator=(TypeArray&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const TypeArray& default_instance() { - return *reinterpret_cast( - &_TypeArray_default_instance_); - } - static constexpr int kIndexInFileMessages = 4; - friend void swap(TypeArray& a, TypeArray& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(TypeArray* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(TypeArray* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - TypeArray* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const TypeArray& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const TypeArray& from) { TypeArray::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(TypeArray* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.TypeArray"; } - - protected: - explicit TypeArray(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - TypeArray(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TypeArray& from); - TypeArray( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TypeArray&& from) noexcept - : TypeArray(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kElementFieldNumber = 1, - kCountFieldNumber = 3, - }; - // uint32 element = 1; - void clear_element() ; - ::uint32_t element() const; - void set_element(::uint32_t value); - - private: - ::uint32_t _internal_element() const; - void _internal_set_element(::uint32_t value); - - public: - // uint32 count = 3; - void clear_count() ; - ::uint32_t count() const; - void set_count(::uint32_t value); - - private: - ::uint32_t _internal_count() const; - void _internal_set_count(::uint32_t value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.TypeArray) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<2, 2, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const TypeArray& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - ::uint32_t element_; - ::uint32_t count_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull TypeArray_class_data_; -// ------------------------------------------------------------------- - -class SwitchCase final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.SwitchCase) */ { - public: - inline SwitchCase() : SwitchCase(nullptr) {} - ~SwitchCase() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(SwitchCase* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(SwitchCase)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR SwitchCase(::google::protobuf::internal::ConstantInitialized); - - inline SwitchCase(const SwitchCase& from) : SwitchCase(nullptr, from) {} - inline SwitchCase(SwitchCase&& from) noexcept - : SwitchCase(nullptr, ::std::move(from)) {} - inline SwitchCase& operator=(const SwitchCase& from) { - CopyFrom(from); - return *this; - } - inline SwitchCase& operator=(SwitchCase&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const SwitchCase& default_instance() { - return *reinterpret_cast( - &_SwitchCase_default_instance_); - } - static constexpr int kIndexInFileMessages = 57; - friend void swap(SwitchCase& a, SwitchCase& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(SwitchCase* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(SwitchCase* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - SwitchCase* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const SwitchCase& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const SwitchCase& from) { SwitchCase::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(SwitchCase* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.SwitchCase"; } - - protected: - explicit SwitchCase(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - SwitchCase(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const SwitchCase& from); - SwitchCase( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, SwitchCase&& from) noexcept - : SwitchCase(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kSelectorsFieldNumber = 2, - kBlockFieldNumber = 1, - kIsDefaultFieldNumber = 3, - }; - // repeated uint32 selectors = 2; - int selectors_size() const; - private: - int _internal_selectors_size() const; - - public: - void clear_selectors() ; - ::uint32_t selectors(int index) const; - void set_selectors(int index, ::uint32_t value); - void add_selectors(::uint32_t value); - const ::google::protobuf::RepeatedField<::uint32_t>& selectors() const; - ::google::protobuf::RepeatedField<::uint32_t>* PROTOBUF_NONNULL mutable_selectors(); - - private: - const ::google::protobuf::RepeatedField<::uint32_t>& _internal_selectors() const; - ::google::protobuf::RepeatedField<::uint32_t>* PROTOBUF_NONNULL _internal_mutable_selectors(); - - public: - // uint32 block = 1; - void clear_block() ; - ::uint32_t block() const; - void set_block(::uint32_t value); - - private: - ::uint32_t _internal_block() const; - void _internal_set_block(::uint32_t value); - - public: - // bool is_default = 3; - void clear_is_default() ; - bool is_default() const; - void set_is_default(bool value); - - private: - bool _internal_is_default() const; - void _internal_set_is_default(bool value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.SwitchCase) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<2, 3, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const SwitchCase& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::RepeatedField<::uint32_t> selectors_; - ::google::protobuf::internal::CachedSize _selectors_cached_byte_size_; - ::uint32_t block_; - bool is_default_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull SwitchCase_class_data_; -// ------------------------------------------------------------------- - -class Interpolation final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.Interpolation) */ { - public: - inline Interpolation() : Interpolation(nullptr) {} - ~Interpolation() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(Interpolation* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(Interpolation)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR Interpolation(::google::protobuf::internal::ConstantInitialized); - - inline Interpolation(const Interpolation& from) : Interpolation(nullptr, from) {} - inline Interpolation(Interpolation&& from) noexcept - : Interpolation(nullptr, ::std::move(from)) {} - inline Interpolation& operator=(const Interpolation& from) { - CopyFrom(from); - return *this; - } - inline Interpolation& operator=(Interpolation&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const Interpolation& default_instance() { - return *reinterpret_cast( - &_Interpolation_default_instance_); - } - static constexpr int kIndexInFileMessages = 65; - friend void swap(Interpolation& a, Interpolation& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(Interpolation* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(Interpolation* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - Interpolation* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const Interpolation& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const Interpolation& from) { Interpolation::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(Interpolation* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.Interpolation"; } - - protected: - explicit Interpolation(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - Interpolation(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Interpolation& from); - Interpolation( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, Interpolation&& from) noexcept - : Interpolation(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kTypeFieldNumber = 1, - kSamplingFieldNumber = 2, - }; - // .tint.core.ir.binary.pb.InterpolationType type = 1; - void clear_type() ; - ::tint::core::ir::binary::pb::InterpolationType type() const; - void set_type(::tint::core::ir::binary::pb::InterpolationType value); - - private: - ::tint::core::ir::binary::pb::InterpolationType _internal_type() const; - void _internal_set_type(::tint::core::ir::binary::pb::InterpolationType value); - - public: - // optional .tint.core.ir.binary.pb.InterpolationSampling sampling = 2; - bool has_sampling() const; - void clear_sampling() ; - ::tint::core::ir::binary::pb::InterpolationSampling sampling() const; - void set_sampling(::tint::core::ir::binary::pb::InterpolationSampling value); - - private: - ::tint::core::ir::binary::pb::InterpolationSampling _internal_sampling() const; - void _internal_set_sampling(::tint::core::ir::binary::pb::InterpolationSampling value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.Interpolation) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<1, 2, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const Interpolation& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - int type_; - int sampling_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull Interpolation_class_data_; -// ------------------------------------------------------------------- - -class InstructionUserCall final : public ::google::protobuf::internal::ZeroFieldsBase -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.InstructionUserCall) */ { - public: - inline InstructionUserCall() : InstructionUserCall(nullptr) {} - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(InstructionUserCall* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(InstructionUserCall)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR InstructionUserCall(::google::protobuf::internal::ConstantInitialized); - - inline InstructionUserCall(const InstructionUserCall& from) : InstructionUserCall(nullptr, from) {} - inline InstructionUserCall(InstructionUserCall&& from) noexcept - : InstructionUserCall(nullptr, ::std::move(from)) {} - inline InstructionUserCall& operator=(const InstructionUserCall& from) { - CopyFrom(from); - return *this; - } - inline InstructionUserCall& operator=(InstructionUserCall&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const InstructionUserCall& default_instance() { - return *reinterpret_cast( - &_InstructionUserCall_default_instance_); - } - static constexpr int kIndexInFileMessages = 44; - friend void swap(InstructionUserCall& a, InstructionUserCall& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(InstructionUserCall* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(InstructionUserCall* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - InstructionUserCall* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::internal::ZeroFieldsBase::DefaultConstruct(arena); - } - using ::google::protobuf::internal::ZeroFieldsBase::CopyFrom; - inline void CopyFrom(const InstructionUserCall& from) { - ::google::protobuf::internal::ZeroFieldsBase::CopyImpl(*this, from); - } - using ::google::protobuf::internal::ZeroFieldsBase::MergeFrom; - void MergeFrom(const InstructionUserCall& from) { - ::google::protobuf::internal::ZeroFieldsBase::MergeImpl(*this, from); - } - - public: - bool IsInitialized() const { - return true; - } - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.InstructionUserCall"; } - - protected: - explicit InstructionUserCall(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - InstructionUserCall(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const InstructionUserCall& from); - InstructionUserCall( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, InstructionUserCall&& from) noexcept - : InstructionUserCall(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.InstructionUserCall) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 0, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull InstructionUserCall_class_data_; -// ------------------------------------------------------------------- - -class InstructionUnreachable final : public ::google::protobuf::internal::ZeroFieldsBase -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.InstructionUnreachable) */ { - public: - inline InstructionUnreachable() : InstructionUnreachable(nullptr) {} - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(InstructionUnreachable* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(InstructionUnreachable)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR InstructionUnreachable(::google::protobuf::internal::ConstantInitialized); - - inline InstructionUnreachable(const InstructionUnreachable& from) : InstructionUnreachable(nullptr, from) {} - inline InstructionUnreachable(InstructionUnreachable&& from) noexcept - : InstructionUnreachable(nullptr, ::std::move(from)) {} - inline InstructionUnreachable& operator=(const InstructionUnreachable& from) { - CopyFrom(from); - return *this; - } - inline InstructionUnreachable& operator=(InstructionUnreachable&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const InstructionUnreachable& default_instance() { - return *reinterpret_cast( - &_InstructionUnreachable_default_instance_); - } - static constexpr int kIndexInFileMessages = 62; - friend void swap(InstructionUnreachable& a, InstructionUnreachable& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(InstructionUnreachable* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(InstructionUnreachable* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - InstructionUnreachable* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::internal::ZeroFieldsBase::DefaultConstruct(arena); - } - using ::google::protobuf::internal::ZeroFieldsBase::CopyFrom; - inline void CopyFrom(const InstructionUnreachable& from) { - ::google::protobuf::internal::ZeroFieldsBase::CopyImpl(*this, from); - } - using ::google::protobuf::internal::ZeroFieldsBase::MergeFrom; - void MergeFrom(const InstructionUnreachable& from) { - ::google::protobuf::internal::ZeroFieldsBase::MergeImpl(*this, from); - } - - public: - bool IsInitialized() const { - return true; - } - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.InstructionUnreachable"; } - - protected: - explicit InstructionUnreachable(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - InstructionUnreachable(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const InstructionUnreachable& from); - InstructionUnreachable( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, InstructionUnreachable&& from) noexcept - : InstructionUnreachable(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.InstructionUnreachable) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 0, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull InstructionUnreachable_class_data_; -// ------------------------------------------------------------------- - -class InstructionUnary final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.InstructionUnary) */ { - public: - inline InstructionUnary() : InstructionUnary(nullptr) {} - ~InstructionUnary() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(InstructionUnary* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(InstructionUnary)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR InstructionUnary(::google::protobuf::internal::ConstantInitialized); - - inline InstructionUnary(const InstructionUnary& from) : InstructionUnary(nullptr, from) {} - inline InstructionUnary(InstructionUnary&& from) noexcept - : InstructionUnary(nullptr, ::std::move(from)) {} - inline InstructionUnary& operator=(const InstructionUnary& from) { - CopyFrom(from); - return *this; - } - inline InstructionUnary& operator=(InstructionUnary&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const InstructionUnary& default_instance() { - return *reinterpret_cast( - &_InstructionUnary_default_instance_); - } - static constexpr int kIndexInFileMessages = 35; - friend void swap(InstructionUnary& a, InstructionUnary& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(InstructionUnary* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(InstructionUnary* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - InstructionUnary* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const InstructionUnary& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const InstructionUnary& from) { InstructionUnary::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(InstructionUnary* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.InstructionUnary"; } - - protected: - explicit InstructionUnary(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - InstructionUnary(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const InstructionUnary& from); - InstructionUnary( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, InstructionUnary&& from) noexcept - : InstructionUnary(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kOpFieldNumber = 1, - }; - // .tint.core.ir.binary.pb.UnaryOp op = 1; - void clear_op() ; - ::tint::core::ir::binary::pb::UnaryOp op() const; - void set_op(::tint::core::ir::binary::pb::UnaryOp value); - - private: - ::tint::core::ir::binary::pb::UnaryOp _internal_op() const; - void _internal_set_op(::tint::core::ir::binary::pb::UnaryOp value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.InstructionUnary) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 1, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const InstructionUnary& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - int op_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull InstructionUnary_class_data_; -// ------------------------------------------------------------------- - -class InstructionSwizzle final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.InstructionSwizzle) */ { - public: - inline InstructionSwizzle() : InstructionSwizzle(nullptr) {} - ~InstructionSwizzle() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(InstructionSwizzle* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(InstructionSwizzle)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR InstructionSwizzle(::google::protobuf::internal::ConstantInitialized); - - inline InstructionSwizzle(const InstructionSwizzle& from) : InstructionSwizzle(nullptr, from) {} - inline InstructionSwizzle(InstructionSwizzle&& from) noexcept - : InstructionSwizzle(nullptr, ::std::move(from)) {} - inline InstructionSwizzle& operator=(const InstructionSwizzle& from) { - CopyFrom(from); - return *this; - } - inline InstructionSwizzle& operator=(InstructionSwizzle&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const InstructionSwizzle& default_instance() { - return *reinterpret_cast( - &_InstructionSwizzle_default_instance_); - } - static constexpr int kIndexInFileMessages = 50; - friend void swap(InstructionSwizzle& a, InstructionSwizzle& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(InstructionSwizzle* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(InstructionSwizzle* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - InstructionSwizzle* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const InstructionSwizzle& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const InstructionSwizzle& from) { InstructionSwizzle::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(InstructionSwizzle* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.InstructionSwizzle"; } - - protected: - explicit InstructionSwizzle(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - InstructionSwizzle(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const InstructionSwizzle& from); - InstructionSwizzle( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, InstructionSwizzle&& from) noexcept - : InstructionSwizzle(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kIndicesFieldNumber = 1, - }; - // repeated uint32 indices = 1; - int indices_size() const; - private: - int _internal_indices_size() const; - - public: - void clear_indices() ; - ::uint32_t indices(int index) const; - void set_indices(int index, ::uint32_t value); - void add_indices(::uint32_t value); - const ::google::protobuf::RepeatedField<::uint32_t>& indices() const; - ::google::protobuf::RepeatedField<::uint32_t>* PROTOBUF_NONNULL mutable_indices(); - - private: - const ::google::protobuf::RepeatedField<::uint32_t>& _internal_indices() const; - ::google::protobuf::RepeatedField<::uint32_t>* PROTOBUF_NONNULL _internal_mutable_indices(); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.InstructionSwizzle) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 1, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const InstructionSwizzle& from_msg); - ::google::protobuf::RepeatedField<::uint32_t> indices_; - ::google::protobuf::internal::CachedSize _indices_cached_byte_size_; - ::google::protobuf::internal::CachedSize _cached_size_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull InstructionSwizzle_class_data_; -// ------------------------------------------------------------------- - -class InstructionStoreVectorElement final : public ::google::protobuf::internal::ZeroFieldsBase -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.InstructionStoreVectorElement) */ { - public: - inline InstructionStoreVectorElement() : InstructionStoreVectorElement(nullptr) {} - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(InstructionStoreVectorElement* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(InstructionStoreVectorElement)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR InstructionStoreVectorElement(::google::protobuf::internal::ConstantInitialized); - - inline InstructionStoreVectorElement(const InstructionStoreVectorElement& from) : InstructionStoreVectorElement(nullptr, from) {} - inline InstructionStoreVectorElement(InstructionStoreVectorElement&& from) noexcept - : InstructionStoreVectorElement(nullptr, ::std::move(from)) {} - inline InstructionStoreVectorElement& operator=(const InstructionStoreVectorElement& from) { - CopyFrom(from); - return *this; - } - inline InstructionStoreVectorElement& operator=(InstructionStoreVectorElement&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const InstructionStoreVectorElement& default_instance() { - return *reinterpret_cast( - &_InstructionStoreVectorElement_default_instance_); - } - static constexpr int kIndexInFileMessages = 49; - friend void swap(InstructionStoreVectorElement& a, InstructionStoreVectorElement& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(InstructionStoreVectorElement* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(InstructionStoreVectorElement* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - InstructionStoreVectorElement* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::internal::ZeroFieldsBase::DefaultConstruct(arena); - } - using ::google::protobuf::internal::ZeroFieldsBase::CopyFrom; - inline void CopyFrom(const InstructionStoreVectorElement& from) { - ::google::protobuf::internal::ZeroFieldsBase::CopyImpl(*this, from); - } - using ::google::protobuf::internal::ZeroFieldsBase::MergeFrom; - void MergeFrom(const InstructionStoreVectorElement& from) { - ::google::protobuf::internal::ZeroFieldsBase::MergeImpl(*this, from); - } - - public: - bool IsInitialized() const { - return true; - } - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.InstructionStoreVectorElement"; } - - protected: - explicit InstructionStoreVectorElement(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - InstructionStoreVectorElement(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const InstructionStoreVectorElement& from); - InstructionStoreVectorElement( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, InstructionStoreVectorElement&& from) noexcept - : InstructionStoreVectorElement(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.InstructionStoreVectorElement) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 0, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull InstructionStoreVectorElement_class_data_; -// ------------------------------------------------------------------- - -class InstructionStore final : public ::google::protobuf::internal::ZeroFieldsBase -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.InstructionStore) */ { - public: - inline InstructionStore() : InstructionStore(nullptr) {} - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(InstructionStore* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(InstructionStore)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR InstructionStore(::google::protobuf::internal::ConstantInitialized); - - inline InstructionStore(const InstructionStore& from) : InstructionStore(nullptr, from) {} - inline InstructionStore(InstructionStore&& from) noexcept - : InstructionStore(nullptr, ::std::move(from)) {} - inline InstructionStore& operator=(const InstructionStore& from) { - CopyFrom(from); - return *this; - } - inline InstructionStore& operator=(InstructionStore&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const InstructionStore& default_instance() { - return *reinterpret_cast( - &_InstructionStore_default_instance_); - } - static constexpr int kIndexInFileMessages = 47; - friend void swap(InstructionStore& a, InstructionStore& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(InstructionStore* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(InstructionStore* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - InstructionStore* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::internal::ZeroFieldsBase::DefaultConstruct(arena); - } - using ::google::protobuf::internal::ZeroFieldsBase::CopyFrom; - inline void CopyFrom(const InstructionStore& from) { - ::google::protobuf::internal::ZeroFieldsBase::CopyImpl(*this, from); - } - using ::google::protobuf::internal::ZeroFieldsBase::MergeFrom; - void MergeFrom(const InstructionStore& from) { - ::google::protobuf::internal::ZeroFieldsBase::MergeImpl(*this, from); - } - - public: - bool IsInitialized() const { - return true; - } - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.InstructionStore"; } - - protected: - explicit InstructionStore(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - InstructionStore(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const InstructionStore& from); - InstructionStore( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, InstructionStore&& from) noexcept - : InstructionStore(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.InstructionStore) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 0, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull InstructionStore_class_data_; -// ------------------------------------------------------------------- - -class InstructionReturn final : public ::google::protobuf::internal::ZeroFieldsBase -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.InstructionReturn) */ { - public: - inline InstructionReturn() : InstructionReturn(nullptr) {} - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(InstructionReturn* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(InstructionReturn)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR InstructionReturn(::google::protobuf::internal::ConstantInitialized); - - inline InstructionReturn(const InstructionReturn& from) : InstructionReturn(nullptr, from) {} - inline InstructionReturn(InstructionReturn&& from) noexcept - : InstructionReturn(nullptr, ::std::move(from)) {} - inline InstructionReturn& operator=(const InstructionReturn& from) { - CopyFrom(from); - return *this; - } - inline InstructionReturn& operator=(InstructionReturn&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const InstructionReturn& default_instance() { - return *reinterpret_cast( - &_InstructionReturn_default_instance_); - } - static constexpr int kIndexInFileMessages = 34; - friend void swap(InstructionReturn& a, InstructionReturn& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(InstructionReturn* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(InstructionReturn* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - InstructionReturn* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::internal::ZeroFieldsBase::DefaultConstruct(arena); - } - using ::google::protobuf::internal::ZeroFieldsBase::CopyFrom; - inline void CopyFrom(const InstructionReturn& from) { - ::google::protobuf::internal::ZeroFieldsBase::CopyImpl(*this, from); - } - using ::google::protobuf::internal::ZeroFieldsBase::MergeFrom; - void MergeFrom(const InstructionReturn& from) { - ::google::protobuf::internal::ZeroFieldsBase::MergeImpl(*this, from); - } - - public: - bool IsInitialized() const { - return true; - } - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.InstructionReturn"; } - - protected: - explicit InstructionReturn(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - InstructionReturn(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const InstructionReturn& from); - InstructionReturn( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, InstructionReturn&& from) noexcept - : InstructionReturn(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.InstructionReturn) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 0, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull InstructionReturn_class_data_; -// ------------------------------------------------------------------- - -class InstructionResult final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.InstructionResult) */ { - public: - inline InstructionResult() : InstructionResult(nullptr) {} - ~InstructionResult() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(InstructionResult* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(InstructionResult)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR InstructionResult(::google::protobuf::internal::ConstantInitialized); - - inline InstructionResult(const InstructionResult& from) : InstructionResult(nullptr, from) {} - inline InstructionResult(InstructionResult&& from) noexcept - : InstructionResult(nullptr, ::std::move(from)) {} - inline InstructionResult& operator=(const InstructionResult& from) { - CopyFrom(from); - return *this; - } - inline InstructionResult& operator=(InstructionResult&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const InstructionResult& default_instance() { - return *reinterpret_cast( - &_InstructionResult_default_instance_); - } - static constexpr int kIndexInFileMessages = 23; - friend void swap(InstructionResult& a, InstructionResult& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(InstructionResult* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(InstructionResult* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - InstructionResult* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const InstructionResult& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const InstructionResult& from) { InstructionResult::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(InstructionResult* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.InstructionResult"; } - - protected: - explicit InstructionResult(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - InstructionResult(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const InstructionResult& from); - InstructionResult( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, InstructionResult&& from) noexcept - : InstructionResult(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kNameFieldNumber = 2, - kTypeFieldNumber = 1, - }; - // optional string name = 2; - bool has_name() const; - void clear_name() ; - const ::std::string& name() const; - template - void set_name(Arg_&& arg, Args_... args); - ::std::string* PROTOBUF_NONNULL mutable_name(); - [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_name(); - void set_allocated_name(::std::string* PROTOBUF_NULLABLE value); - - private: - const ::std::string& _internal_name() const; - PROTOBUF_ALWAYS_INLINE void _internal_set_name(const ::std::string& value); - ::std::string* PROTOBUF_NONNULL _internal_mutable_name(); - - public: - // uint32 type = 1; - void clear_type() ; - ::uint32_t type() const; - void set_type(::uint32_t value); - - private: - ::uint32_t _internal_type() const; - void _internal_set_type(::uint32_t value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.InstructionResult) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<1, 2, - 0, 53, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const InstructionResult& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::internal::ArenaStringPtr name_; - ::uint32_t type_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull InstructionResult_class_data_; -// ------------------------------------------------------------------- - -class InstructionNextIteration final : public ::google::protobuf::internal::ZeroFieldsBase -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.InstructionNextIteration) */ { - public: - inline InstructionNextIteration() : InstructionNextIteration(nullptr) {} - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(InstructionNextIteration* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(InstructionNextIteration)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR InstructionNextIteration(::google::protobuf::internal::ConstantInitialized); - - inline InstructionNextIteration(const InstructionNextIteration& from) : InstructionNextIteration(nullptr, from) {} - inline InstructionNextIteration(InstructionNextIteration&& from) noexcept - : InstructionNextIteration(nullptr, ::std::move(from)) {} - inline InstructionNextIteration& operator=(const InstructionNextIteration& from) { - CopyFrom(from); - return *this; - } - inline InstructionNextIteration& operator=(InstructionNextIteration&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const InstructionNextIteration& default_instance() { - return *reinterpret_cast( - &_InstructionNextIteration_default_instance_); - } - static constexpr int kIndexInFileMessages = 59; - friend void swap(InstructionNextIteration& a, InstructionNextIteration& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(InstructionNextIteration* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(InstructionNextIteration* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - InstructionNextIteration* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::internal::ZeroFieldsBase::DefaultConstruct(arena); - } - using ::google::protobuf::internal::ZeroFieldsBase::CopyFrom; - inline void CopyFrom(const InstructionNextIteration& from) { - ::google::protobuf::internal::ZeroFieldsBase::CopyImpl(*this, from); - } - using ::google::protobuf::internal::ZeroFieldsBase::MergeFrom; - void MergeFrom(const InstructionNextIteration& from) { - ::google::protobuf::internal::ZeroFieldsBase::MergeImpl(*this, from); - } - - public: - bool IsInitialized() const { - return true; - } - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.InstructionNextIteration"; } - - protected: - explicit InstructionNextIteration(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - InstructionNextIteration(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const InstructionNextIteration& from); - InstructionNextIteration( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, InstructionNextIteration&& from) noexcept - : InstructionNextIteration(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.InstructionNextIteration) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 0, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull InstructionNextIteration_class_data_; -// ------------------------------------------------------------------- - -class InstructionLoop final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.InstructionLoop) */ { - public: - inline InstructionLoop() : InstructionLoop(nullptr) {} - ~InstructionLoop() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(InstructionLoop* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(InstructionLoop)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR InstructionLoop(::google::protobuf::internal::ConstantInitialized); - - inline InstructionLoop(const InstructionLoop& from) : InstructionLoop(nullptr, from) {} - inline InstructionLoop(InstructionLoop&& from) noexcept - : InstructionLoop(nullptr, ::std::move(from)) {} - inline InstructionLoop& operator=(const InstructionLoop& from) { - CopyFrom(from); - return *this; - } - inline InstructionLoop& operator=(InstructionLoop&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const InstructionLoop& default_instance() { - return *reinterpret_cast( - &_InstructionLoop_default_instance_); - } - static constexpr int kIndexInFileMessages = 53; - friend void swap(InstructionLoop& a, InstructionLoop& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(InstructionLoop* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(InstructionLoop* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - InstructionLoop* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const InstructionLoop& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const InstructionLoop& from) { InstructionLoop::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(InstructionLoop* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.InstructionLoop"; } - - protected: - explicit InstructionLoop(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - InstructionLoop(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const InstructionLoop& from); - InstructionLoop( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, InstructionLoop&& from) noexcept - : InstructionLoop(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kInitializerFieldNumber = 1, - kBodyFieldNumber = 2, - kContinuingFieldNumber = 3, - }; - // optional uint32 initializer = 1; - bool has_initializer() const; - void clear_initializer() ; - ::uint32_t initializer() const; - void set_initializer(::uint32_t value); - - private: - ::uint32_t _internal_initializer() const; - void _internal_set_initializer(::uint32_t value); - - public: - // optional uint32 body = 2; - bool has_body() const; - void clear_body() ; - ::uint32_t body() const; - void set_body(::uint32_t value); - - private: - ::uint32_t _internal_body() const; - void _internal_set_body(::uint32_t value); - - public: - // optional uint32 continuing = 3; - bool has_continuing() const; - void clear_continuing() ; - ::uint32_t continuing() const; - void set_continuing(::uint32_t value); - - private: - ::uint32_t _internal_continuing() const; - void _internal_set_continuing(::uint32_t value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.InstructionLoop) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<2, 3, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const InstructionLoop& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - ::uint32_t initializer_; - ::uint32_t body_; - ::uint32_t continuing_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull InstructionLoop_class_data_; -// ------------------------------------------------------------------- - -class InstructionLoadVectorElement final : public ::google::protobuf::internal::ZeroFieldsBase -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.InstructionLoadVectorElement) */ { - public: - inline InstructionLoadVectorElement() : InstructionLoadVectorElement(nullptr) {} - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(InstructionLoadVectorElement* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(InstructionLoadVectorElement)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR InstructionLoadVectorElement(::google::protobuf::internal::ConstantInitialized); - - inline InstructionLoadVectorElement(const InstructionLoadVectorElement& from) : InstructionLoadVectorElement(nullptr, from) {} - inline InstructionLoadVectorElement(InstructionLoadVectorElement&& from) noexcept - : InstructionLoadVectorElement(nullptr, ::std::move(from)) {} - inline InstructionLoadVectorElement& operator=(const InstructionLoadVectorElement& from) { - CopyFrom(from); - return *this; - } - inline InstructionLoadVectorElement& operator=(InstructionLoadVectorElement&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const InstructionLoadVectorElement& default_instance() { - return *reinterpret_cast( - &_InstructionLoadVectorElement_default_instance_); - } - static constexpr int kIndexInFileMessages = 48; - friend void swap(InstructionLoadVectorElement& a, InstructionLoadVectorElement& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(InstructionLoadVectorElement* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(InstructionLoadVectorElement* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - InstructionLoadVectorElement* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::internal::ZeroFieldsBase::DefaultConstruct(arena); - } - using ::google::protobuf::internal::ZeroFieldsBase::CopyFrom; - inline void CopyFrom(const InstructionLoadVectorElement& from) { - ::google::protobuf::internal::ZeroFieldsBase::CopyImpl(*this, from); - } - using ::google::protobuf::internal::ZeroFieldsBase::MergeFrom; - void MergeFrom(const InstructionLoadVectorElement& from) { - ::google::protobuf::internal::ZeroFieldsBase::MergeImpl(*this, from); - } - - public: - bool IsInitialized() const { - return true; - } - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.InstructionLoadVectorElement"; } - - protected: - explicit InstructionLoadVectorElement(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - InstructionLoadVectorElement(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const InstructionLoadVectorElement& from); - InstructionLoadVectorElement( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, InstructionLoadVectorElement&& from) noexcept - : InstructionLoadVectorElement(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.InstructionLoadVectorElement) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 0, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull InstructionLoadVectorElement_class_data_; -// ------------------------------------------------------------------- - -class InstructionLoad final : public ::google::protobuf::internal::ZeroFieldsBase -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.InstructionLoad) */ { - public: - inline InstructionLoad() : InstructionLoad(nullptr) {} - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(InstructionLoad* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(InstructionLoad)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR InstructionLoad(::google::protobuf::internal::ConstantInitialized); - - inline InstructionLoad(const InstructionLoad& from) : InstructionLoad(nullptr, from) {} - inline InstructionLoad(InstructionLoad&& from) noexcept - : InstructionLoad(nullptr, ::std::move(from)) {} - inline InstructionLoad& operator=(const InstructionLoad& from) { - CopyFrom(from); - return *this; - } - inline InstructionLoad& operator=(InstructionLoad&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const InstructionLoad& default_instance() { - return *reinterpret_cast( - &_InstructionLoad_default_instance_); - } - static constexpr int kIndexInFileMessages = 46; - friend void swap(InstructionLoad& a, InstructionLoad& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(InstructionLoad* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(InstructionLoad* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - InstructionLoad* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::internal::ZeroFieldsBase::DefaultConstruct(arena); - } - using ::google::protobuf::internal::ZeroFieldsBase::CopyFrom; - inline void CopyFrom(const InstructionLoad& from) { - ::google::protobuf::internal::ZeroFieldsBase::CopyImpl(*this, from); - } - using ::google::protobuf::internal::ZeroFieldsBase::MergeFrom; - void MergeFrom(const InstructionLoad& from) { - ::google::protobuf::internal::ZeroFieldsBase::MergeImpl(*this, from); - } - - public: - bool IsInitialized() const { - return true; - } - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.InstructionLoad"; } - - protected: - explicit InstructionLoad(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - InstructionLoad(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const InstructionLoad& from); - InstructionLoad( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, InstructionLoad&& from) noexcept - : InstructionLoad(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.InstructionLoad) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 0, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull InstructionLoad_class_data_; -// ------------------------------------------------------------------- - -class InstructionLet final : public ::google::protobuf::internal::ZeroFieldsBase -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.InstructionLet) */ { - public: - inline InstructionLet() : InstructionLet(nullptr) {} - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(InstructionLet* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(InstructionLet)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR InstructionLet(::google::protobuf::internal::ConstantInitialized); - - inline InstructionLet(const InstructionLet& from) : InstructionLet(nullptr, from) {} - inline InstructionLet(InstructionLet&& from) noexcept - : InstructionLet(nullptr, ::std::move(from)) {} - inline InstructionLet& operator=(const InstructionLet& from) { - CopyFrom(from); - return *this; - } - inline InstructionLet& operator=(InstructionLet&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const InstructionLet& default_instance() { - return *reinterpret_cast( - &_InstructionLet_default_instance_); - } - static constexpr int kIndexInFileMessages = 40; - friend void swap(InstructionLet& a, InstructionLet& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(InstructionLet* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(InstructionLet* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - InstructionLet* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::internal::ZeroFieldsBase::DefaultConstruct(arena); - } - using ::google::protobuf::internal::ZeroFieldsBase::CopyFrom; - inline void CopyFrom(const InstructionLet& from) { - ::google::protobuf::internal::ZeroFieldsBase::CopyImpl(*this, from); - } - using ::google::protobuf::internal::ZeroFieldsBase::MergeFrom; - void MergeFrom(const InstructionLet& from) { - ::google::protobuf::internal::ZeroFieldsBase::MergeImpl(*this, from); - } - - public: - bool IsInitialized() const { - return true; - } - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.InstructionLet"; } - - protected: - explicit InstructionLet(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - InstructionLet(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const InstructionLet& from); - InstructionLet( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, InstructionLet&& from) noexcept - : InstructionLet(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.InstructionLet) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 0, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull InstructionLet_class_data_; -// ------------------------------------------------------------------- - -class InstructionIf final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.InstructionIf) */ { - public: - inline InstructionIf() : InstructionIf(nullptr) {} - ~InstructionIf() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(InstructionIf* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(InstructionIf)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR InstructionIf(::google::protobuf::internal::ConstantInitialized); - - inline InstructionIf(const InstructionIf& from) : InstructionIf(nullptr, from) {} - inline InstructionIf(InstructionIf&& from) noexcept - : InstructionIf(nullptr, ::std::move(from)) {} - inline InstructionIf& operator=(const InstructionIf& from) { - CopyFrom(from); - return *this; - } - inline InstructionIf& operator=(InstructionIf&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const InstructionIf& default_instance() { - return *reinterpret_cast( - &_InstructionIf_default_instance_); - } - static constexpr int kIndexInFileMessages = 51; - friend void swap(InstructionIf& a, InstructionIf& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(InstructionIf* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(InstructionIf* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - InstructionIf* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const InstructionIf& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const InstructionIf& from) { InstructionIf::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(InstructionIf* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.InstructionIf"; } - - protected: - explicit InstructionIf(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - InstructionIf(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const InstructionIf& from); - InstructionIf( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, InstructionIf&& from) noexcept - : InstructionIf(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kTrueFieldNumber = 1, - kFalseFieldNumber = 2, - }; - // optional uint32 true = 1; - bool has_true_() const; - void clear_true_() ; - ::uint32_t true_() const; - void set_true_(::uint32_t value); - - private: - ::uint32_t _internal_true_() const; - void _internal_set_true_(::uint32_t value); - - public: - // optional uint32 false = 2; - bool has_false_() const; - void clear_false_() ; - ::uint32_t false_() const; - void set_false_(::uint32_t value); - - private: - ::uint32_t _internal_false_() const; - void _internal_set_false_(::uint32_t value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.InstructionIf) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<1, 2, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const InstructionIf& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - ::uint32_t true__; - ::uint32_t false__; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull InstructionIf_class_data_; -// ------------------------------------------------------------------- - -class InstructionExitSwitch final : public ::google::protobuf::internal::ZeroFieldsBase -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.InstructionExitSwitch) */ { - public: - inline InstructionExitSwitch() : InstructionExitSwitch(nullptr) {} - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(InstructionExitSwitch* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(InstructionExitSwitch)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR InstructionExitSwitch(::google::protobuf::internal::ConstantInitialized); - - inline InstructionExitSwitch(const InstructionExitSwitch& from) : InstructionExitSwitch(nullptr, from) {} - inline InstructionExitSwitch(InstructionExitSwitch&& from) noexcept - : InstructionExitSwitch(nullptr, ::std::move(from)) {} - inline InstructionExitSwitch& operator=(const InstructionExitSwitch& from) { - CopyFrom(from); - return *this; - } - inline InstructionExitSwitch& operator=(InstructionExitSwitch&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const InstructionExitSwitch& default_instance() { - return *reinterpret_cast( - &_InstructionExitSwitch_default_instance_); - } - static constexpr int kIndexInFileMessages = 55; - friend void swap(InstructionExitSwitch& a, InstructionExitSwitch& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(InstructionExitSwitch* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(InstructionExitSwitch* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - InstructionExitSwitch* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::internal::ZeroFieldsBase::DefaultConstruct(arena); - } - using ::google::protobuf::internal::ZeroFieldsBase::CopyFrom; - inline void CopyFrom(const InstructionExitSwitch& from) { - ::google::protobuf::internal::ZeroFieldsBase::CopyImpl(*this, from); - } - using ::google::protobuf::internal::ZeroFieldsBase::MergeFrom; - void MergeFrom(const InstructionExitSwitch& from) { - ::google::protobuf::internal::ZeroFieldsBase::MergeImpl(*this, from); - } - - public: - bool IsInitialized() const { - return true; - } - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.InstructionExitSwitch"; } - - protected: - explicit InstructionExitSwitch(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - InstructionExitSwitch(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const InstructionExitSwitch& from); - InstructionExitSwitch( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, InstructionExitSwitch&& from) noexcept - : InstructionExitSwitch(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.InstructionExitSwitch) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 0, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull InstructionExitSwitch_class_data_; -// ------------------------------------------------------------------- - -class InstructionExitLoop final : public ::google::protobuf::internal::ZeroFieldsBase -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.InstructionExitLoop) */ { - public: - inline InstructionExitLoop() : InstructionExitLoop(nullptr) {} - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(InstructionExitLoop* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(InstructionExitLoop)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR InstructionExitLoop(::google::protobuf::internal::ConstantInitialized); - - inline InstructionExitLoop(const InstructionExitLoop& from) : InstructionExitLoop(nullptr, from) {} - inline InstructionExitLoop(InstructionExitLoop&& from) noexcept - : InstructionExitLoop(nullptr, ::std::move(from)) {} - inline InstructionExitLoop& operator=(const InstructionExitLoop& from) { - CopyFrom(from); - return *this; - } - inline InstructionExitLoop& operator=(InstructionExitLoop&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const InstructionExitLoop& default_instance() { - return *reinterpret_cast( - &_InstructionExitLoop_default_instance_); - } - static constexpr int kIndexInFileMessages = 56; - friend void swap(InstructionExitLoop& a, InstructionExitLoop& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(InstructionExitLoop* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(InstructionExitLoop* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - InstructionExitLoop* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::internal::ZeroFieldsBase::DefaultConstruct(arena); - } - using ::google::protobuf::internal::ZeroFieldsBase::CopyFrom; - inline void CopyFrom(const InstructionExitLoop& from) { - ::google::protobuf::internal::ZeroFieldsBase::CopyImpl(*this, from); - } - using ::google::protobuf::internal::ZeroFieldsBase::MergeFrom; - void MergeFrom(const InstructionExitLoop& from) { - ::google::protobuf::internal::ZeroFieldsBase::MergeImpl(*this, from); - } - - public: - bool IsInitialized() const { - return true; - } - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.InstructionExitLoop"; } - - protected: - explicit InstructionExitLoop(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - InstructionExitLoop(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const InstructionExitLoop& from); - InstructionExitLoop( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, InstructionExitLoop&& from) noexcept - : InstructionExitLoop(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.InstructionExitLoop) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 0, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull InstructionExitLoop_class_data_; -// ------------------------------------------------------------------- - -class InstructionExitIf final : public ::google::protobuf::internal::ZeroFieldsBase -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.InstructionExitIf) */ { - public: - inline InstructionExitIf() : InstructionExitIf(nullptr) {} - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(InstructionExitIf* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(InstructionExitIf)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR InstructionExitIf(::google::protobuf::internal::ConstantInitialized); - - inline InstructionExitIf(const InstructionExitIf& from) : InstructionExitIf(nullptr, from) {} - inline InstructionExitIf(InstructionExitIf&& from) noexcept - : InstructionExitIf(nullptr, ::std::move(from)) {} - inline InstructionExitIf& operator=(const InstructionExitIf& from) { - CopyFrom(from); - return *this; - } - inline InstructionExitIf& operator=(InstructionExitIf&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const InstructionExitIf& default_instance() { - return *reinterpret_cast( - &_InstructionExitIf_default_instance_); - } - static constexpr int kIndexInFileMessages = 54; - friend void swap(InstructionExitIf& a, InstructionExitIf& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(InstructionExitIf* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(InstructionExitIf* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - InstructionExitIf* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::internal::ZeroFieldsBase::DefaultConstruct(arena); - } - using ::google::protobuf::internal::ZeroFieldsBase::CopyFrom; - inline void CopyFrom(const InstructionExitIf& from) { - ::google::protobuf::internal::ZeroFieldsBase::CopyImpl(*this, from); - } - using ::google::protobuf::internal::ZeroFieldsBase::MergeFrom; - void MergeFrom(const InstructionExitIf& from) { - ::google::protobuf::internal::ZeroFieldsBase::MergeImpl(*this, from); - } - - public: - bool IsInitialized() const { - return true; - } - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.InstructionExitIf"; } - - protected: - explicit InstructionExitIf(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - InstructionExitIf(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const InstructionExitIf& from); - InstructionExitIf( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, InstructionExitIf&& from) noexcept - : InstructionExitIf(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.InstructionExitIf) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 0, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull InstructionExitIf_class_data_; -// ------------------------------------------------------------------- - -class InstructionDiscard final : public ::google::protobuf::internal::ZeroFieldsBase -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.InstructionDiscard) */ { - public: - inline InstructionDiscard() : InstructionDiscard(nullptr) {} - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(InstructionDiscard* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(InstructionDiscard)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR InstructionDiscard(::google::protobuf::internal::ConstantInitialized); - - inline InstructionDiscard(const InstructionDiscard& from) : InstructionDiscard(nullptr, from) {} - inline InstructionDiscard(InstructionDiscard&& from) noexcept - : InstructionDiscard(nullptr, ::std::move(from)) {} - inline InstructionDiscard& operator=(const InstructionDiscard& from) { - CopyFrom(from); - return *this; - } - inline InstructionDiscard& operator=(InstructionDiscard&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const InstructionDiscard& default_instance() { - return *reinterpret_cast( - &_InstructionDiscard_default_instance_); - } - static constexpr int kIndexInFileMessages = 39; - friend void swap(InstructionDiscard& a, InstructionDiscard& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(InstructionDiscard* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(InstructionDiscard* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - InstructionDiscard* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::internal::ZeroFieldsBase::DefaultConstruct(arena); - } - using ::google::protobuf::internal::ZeroFieldsBase::CopyFrom; - inline void CopyFrom(const InstructionDiscard& from) { - ::google::protobuf::internal::ZeroFieldsBase::CopyImpl(*this, from); - } - using ::google::protobuf::internal::ZeroFieldsBase::MergeFrom; - void MergeFrom(const InstructionDiscard& from) { - ::google::protobuf::internal::ZeroFieldsBase::MergeImpl(*this, from); - } - - public: - bool IsInitialized() const { - return true; - } - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.InstructionDiscard"; } - - protected: - explicit InstructionDiscard(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - InstructionDiscard(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const InstructionDiscard& from); - InstructionDiscard( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, InstructionDiscard&& from) noexcept - : InstructionDiscard(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.InstructionDiscard) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 0, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull InstructionDiscard_class_data_; -// ------------------------------------------------------------------- - -class InstructionConvert final : public ::google::protobuf::internal::ZeroFieldsBase -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.InstructionConvert) */ { - public: - inline InstructionConvert() : InstructionConvert(nullptr) {} - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(InstructionConvert* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(InstructionConvert)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR InstructionConvert(::google::protobuf::internal::ConstantInitialized); - - inline InstructionConvert(const InstructionConvert& from) : InstructionConvert(nullptr, from) {} - inline InstructionConvert(InstructionConvert&& from) noexcept - : InstructionConvert(nullptr, ::std::move(from)) {} - inline InstructionConvert& operator=(const InstructionConvert& from) { - CopyFrom(from); - return *this; - } - inline InstructionConvert& operator=(InstructionConvert&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const InstructionConvert& default_instance() { - return *reinterpret_cast( - &_InstructionConvert_default_instance_); - } - static constexpr int kIndexInFileMessages = 42; - friend void swap(InstructionConvert& a, InstructionConvert& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(InstructionConvert* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(InstructionConvert* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - InstructionConvert* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::internal::ZeroFieldsBase::DefaultConstruct(arena); - } - using ::google::protobuf::internal::ZeroFieldsBase::CopyFrom; - inline void CopyFrom(const InstructionConvert& from) { - ::google::protobuf::internal::ZeroFieldsBase::CopyImpl(*this, from); - } - using ::google::protobuf::internal::ZeroFieldsBase::MergeFrom; - void MergeFrom(const InstructionConvert& from) { - ::google::protobuf::internal::ZeroFieldsBase::MergeImpl(*this, from); - } - - public: - bool IsInitialized() const { - return true; - } - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.InstructionConvert"; } - - protected: - explicit InstructionConvert(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - InstructionConvert(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const InstructionConvert& from); - InstructionConvert( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, InstructionConvert&& from) noexcept - : InstructionConvert(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.InstructionConvert) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 0, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull InstructionConvert_class_data_; -// ------------------------------------------------------------------- - -class InstructionContinue final : public ::google::protobuf::internal::ZeroFieldsBase -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.InstructionContinue) */ { - public: - inline InstructionContinue() : InstructionContinue(nullptr) {} - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(InstructionContinue* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(InstructionContinue)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR InstructionContinue(::google::protobuf::internal::ConstantInitialized); - - inline InstructionContinue(const InstructionContinue& from) : InstructionContinue(nullptr, from) {} - inline InstructionContinue(InstructionContinue&& from) noexcept - : InstructionContinue(nullptr, ::std::move(from)) {} - inline InstructionContinue& operator=(const InstructionContinue& from) { - CopyFrom(from); - return *this; - } - inline InstructionContinue& operator=(InstructionContinue&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const InstructionContinue& default_instance() { - return *reinterpret_cast( - &_InstructionContinue_default_instance_); - } - static constexpr int kIndexInFileMessages = 60; - friend void swap(InstructionContinue& a, InstructionContinue& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(InstructionContinue* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(InstructionContinue* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - InstructionContinue* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::internal::ZeroFieldsBase::DefaultConstruct(arena); - } - using ::google::protobuf::internal::ZeroFieldsBase::CopyFrom; - inline void CopyFrom(const InstructionContinue& from) { - ::google::protobuf::internal::ZeroFieldsBase::CopyImpl(*this, from); - } - using ::google::protobuf::internal::ZeroFieldsBase::MergeFrom; - void MergeFrom(const InstructionContinue& from) { - ::google::protobuf::internal::ZeroFieldsBase::MergeImpl(*this, from); - } - - public: - bool IsInitialized() const { - return true; - } - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.InstructionContinue"; } - - protected: - explicit InstructionContinue(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - InstructionContinue(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const InstructionContinue& from); - InstructionContinue( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, InstructionContinue&& from) noexcept - : InstructionContinue(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.InstructionContinue) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 0, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull InstructionContinue_class_data_; -// ------------------------------------------------------------------- - -class InstructionConstruct final : public ::google::protobuf::internal::ZeroFieldsBase -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.InstructionConstruct) */ { - public: - inline InstructionConstruct() : InstructionConstruct(nullptr) {} - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(InstructionConstruct* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(InstructionConstruct)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR InstructionConstruct(::google::protobuf::internal::ConstantInitialized); - - inline InstructionConstruct(const InstructionConstruct& from) : InstructionConstruct(nullptr, from) {} - inline InstructionConstruct(InstructionConstruct&& from) noexcept - : InstructionConstruct(nullptr, ::std::move(from)) {} - inline InstructionConstruct& operator=(const InstructionConstruct& from) { - CopyFrom(from); - return *this; - } - inline InstructionConstruct& operator=(InstructionConstruct&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const InstructionConstruct& default_instance() { - return *reinterpret_cast( - &_InstructionConstruct_default_instance_); - } - static constexpr int kIndexInFileMessages = 38; - friend void swap(InstructionConstruct& a, InstructionConstruct& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(InstructionConstruct* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(InstructionConstruct* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - InstructionConstruct* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::internal::ZeroFieldsBase::DefaultConstruct(arena); - } - using ::google::protobuf::internal::ZeroFieldsBase::CopyFrom; - inline void CopyFrom(const InstructionConstruct& from) { - ::google::protobuf::internal::ZeroFieldsBase::CopyImpl(*this, from); - } - using ::google::protobuf::internal::ZeroFieldsBase::MergeFrom; - void MergeFrom(const InstructionConstruct& from) { - ::google::protobuf::internal::ZeroFieldsBase::MergeImpl(*this, from); - } - - public: - bool IsInitialized() const { - return true; - } - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.InstructionConstruct"; } - - protected: - explicit InstructionConstruct(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - InstructionConstruct(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const InstructionConstruct& from); - InstructionConstruct( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, InstructionConstruct&& from) noexcept - : InstructionConstruct(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.InstructionConstruct) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 0, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull InstructionConstruct_class_data_; -// ------------------------------------------------------------------- - -class InstructionBuiltinCall final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.InstructionBuiltinCall) */ { - public: - inline InstructionBuiltinCall() : InstructionBuiltinCall(nullptr) {} - ~InstructionBuiltinCall() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(InstructionBuiltinCall* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(InstructionBuiltinCall)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR InstructionBuiltinCall(::google::protobuf::internal::ConstantInitialized); - - inline InstructionBuiltinCall(const InstructionBuiltinCall& from) : InstructionBuiltinCall(nullptr, from) {} - inline InstructionBuiltinCall(InstructionBuiltinCall&& from) noexcept - : InstructionBuiltinCall(nullptr, ::std::move(from)) {} - inline InstructionBuiltinCall& operator=(const InstructionBuiltinCall& from) { - CopyFrom(from); - return *this; - } - inline InstructionBuiltinCall& operator=(InstructionBuiltinCall&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const InstructionBuiltinCall& default_instance() { - return *reinterpret_cast( - &_InstructionBuiltinCall_default_instance_); - } - static constexpr int kIndexInFileMessages = 45; - friend void swap(InstructionBuiltinCall& a, InstructionBuiltinCall& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(InstructionBuiltinCall* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(InstructionBuiltinCall* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - InstructionBuiltinCall* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const InstructionBuiltinCall& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const InstructionBuiltinCall& from) { InstructionBuiltinCall::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(InstructionBuiltinCall* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.InstructionBuiltinCall"; } - - protected: - explicit InstructionBuiltinCall(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - InstructionBuiltinCall(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const InstructionBuiltinCall& from); - InstructionBuiltinCall( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, InstructionBuiltinCall&& from) noexcept - : InstructionBuiltinCall(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kExplicitTemplateParamsFieldNumber = 2, - kBuiltinFieldNumber = 1, - }; - // repeated uint32 explicit_template_params = 2; - int explicit_template_params_size() const; - private: - int _internal_explicit_template_params_size() const; - - public: - void clear_explicit_template_params() ; - ::uint32_t explicit_template_params(int index) const; - void set_explicit_template_params(int index, ::uint32_t value); - void add_explicit_template_params(::uint32_t value); - const ::google::protobuf::RepeatedField<::uint32_t>& explicit_template_params() const; - ::google::protobuf::RepeatedField<::uint32_t>* PROTOBUF_NONNULL mutable_explicit_template_params(); - - private: - const ::google::protobuf::RepeatedField<::uint32_t>& _internal_explicit_template_params() const; - ::google::protobuf::RepeatedField<::uint32_t>* PROTOBUF_NONNULL _internal_mutable_explicit_template_params(); - - public: - // .tint.core.ir.binary.pb.BuiltinFn builtin = 1; - void clear_builtin() ; - ::tint::core::ir::binary::pb::BuiltinFn builtin() const; - void set_builtin(::tint::core::ir::binary::pb::BuiltinFn value); - - private: - ::tint::core::ir::binary::pb::BuiltinFn _internal_builtin() const; - void _internal_set_builtin(::tint::core::ir::binary::pb::BuiltinFn value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.InstructionBuiltinCall) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<1, 2, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const InstructionBuiltinCall& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::RepeatedField<::uint32_t> explicit_template_params_; - ::google::protobuf::internal::CachedSize _explicit_template_params_cached_byte_size_; - int builtin_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull InstructionBuiltinCall_class_data_; -// ------------------------------------------------------------------- - -class InstructionBreakIf final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.InstructionBreakIf) */ { - public: - inline InstructionBreakIf() : InstructionBreakIf(nullptr) {} - ~InstructionBreakIf() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(InstructionBreakIf* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(InstructionBreakIf)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR InstructionBreakIf(::google::protobuf::internal::ConstantInitialized); - - inline InstructionBreakIf(const InstructionBreakIf& from) : InstructionBreakIf(nullptr, from) {} - inline InstructionBreakIf(InstructionBreakIf&& from) noexcept - : InstructionBreakIf(nullptr, ::std::move(from)) {} - inline InstructionBreakIf& operator=(const InstructionBreakIf& from) { - CopyFrom(from); - return *this; - } - inline InstructionBreakIf& operator=(InstructionBreakIf&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const InstructionBreakIf& default_instance() { - return *reinterpret_cast( - &_InstructionBreakIf_default_instance_); - } - static constexpr int kIndexInFileMessages = 61; - friend void swap(InstructionBreakIf& a, InstructionBreakIf& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(InstructionBreakIf* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(InstructionBreakIf* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - InstructionBreakIf* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const InstructionBreakIf& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const InstructionBreakIf& from) { InstructionBreakIf::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(InstructionBreakIf* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.InstructionBreakIf"; } - - protected: - explicit InstructionBreakIf(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - InstructionBreakIf(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const InstructionBreakIf& from); - InstructionBreakIf( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, InstructionBreakIf&& from) noexcept - : InstructionBreakIf(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kNumNextIterValuesFieldNumber = 1, - }; - // uint32 num_next_iter_values = 1; - void clear_num_next_iter_values() ; - ::uint32_t num_next_iter_values() const; - void set_num_next_iter_values(::uint32_t value); - - private: - ::uint32_t _internal_num_next_iter_values() const; - void _internal_set_num_next_iter_values(::uint32_t value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.InstructionBreakIf) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 1, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const InstructionBreakIf& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - ::uint32_t num_next_iter_values_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull InstructionBreakIf_class_data_; -// ------------------------------------------------------------------- - -class InstructionBitcast final : public ::google::protobuf::internal::ZeroFieldsBase -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.InstructionBitcast) */ { - public: - inline InstructionBitcast() : InstructionBitcast(nullptr) {} - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(InstructionBitcast* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(InstructionBitcast)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR InstructionBitcast(::google::protobuf::internal::ConstantInitialized); - - inline InstructionBitcast(const InstructionBitcast& from) : InstructionBitcast(nullptr, from) {} - inline InstructionBitcast(InstructionBitcast&& from) noexcept - : InstructionBitcast(nullptr, ::std::move(from)) {} - inline InstructionBitcast& operator=(const InstructionBitcast& from) { - CopyFrom(from); - return *this; - } - inline InstructionBitcast& operator=(InstructionBitcast&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const InstructionBitcast& default_instance() { - return *reinterpret_cast( - &_InstructionBitcast_default_instance_); - } - static constexpr int kIndexInFileMessages = 37; - friend void swap(InstructionBitcast& a, InstructionBitcast& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(InstructionBitcast* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(InstructionBitcast* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - InstructionBitcast* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::internal::ZeroFieldsBase::DefaultConstruct(arena); - } - using ::google::protobuf::internal::ZeroFieldsBase::CopyFrom; - inline void CopyFrom(const InstructionBitcast& from) { - ::google::protobuf::internal::ZeroFieldsBase::CopyImpl(*this, from); - } - using ::google::protobuf::internal::ZeroFieldsBase::MergeFrom; - void MergeFrom(const InstructionBitcast& from) { - ::google::protobuf::internal::ZeroFieldsBase::MergeImpl(*this, from); - } - - public: - bool IsInitialized() const { - return true; - } - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.InstructionBitcast"; } - - protected: - explicit InstructionBitcast(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - InstructionBitcast(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const InstructionBitcast& from); - InstructionBitcast( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, InstructionBitcast&& from) noexcept - : InstructionBitcast(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.InstructionBitcast) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 0, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull InstructionBitcast_class_data_; -// ------------------------------------------------------------------- - -class InstructionBinary final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.InstructionBinary) */ { - public: - inline InstructionBinary() : InstructionBinary(nullptr) {} - ~InstructionBinary() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(InstructionBinary* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(InstructionBinary)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR InstructionBinary(::google::protobuf::internal::ConstantInitialized); - - inline InstructionBinary(const InstructionBinary& from) : InstructionBinary(nullptr, from) {} - inline InstructionBinary(InstructionBinary&& from) noexcept - : InstructionBinary(nullptr, ::std::move(from)) {} - inline InstructionBinary& operator=(const InstructionBinary& from) { - CopyFrom(from); - return *this; - } - inline InstructionBinary& operator=(InstructionBinary&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const InstructionBinary& default_instance() { - return *reinterpret_cast( - &_InstructionBinary_default_instance_); - } - static constexpr int kIndexInFileMessages = 36; - friend void swap(InstructionBinary& a, InstructionBinary& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(InstructionBinary* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(InstructionBinary* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - InstructionBinary* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const InstructionBinary& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const InstructionBinary& from) { InstructionBinary::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(InstructionBinary* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.InstructionBinary"; } - - protected: - explicit InstructionBinary(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - InstructionBinary(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const InstructionBinary& from); - InstructionBinary( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, InstructionBinary&& from) noexcept - : InstructionBinary(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kOpFieldNumber = 1, - }; - // .tint.core.ir.binary.pb.BinaryOp op = 1; - void clear_op() ; - ::tint::core::ir::binary::pb::BinaryOp op() const; - void set_op(::tint::core::ir::binary::pb::BinaryOp value); - - private: - ::tint::core::ir::binary::pb::BinaryOp _internal_op() const; - void _internal_set_op(::tint::core::ir::binary::pb::BinaryOp value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.InstructionBinary) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 1, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const InstructionBinary& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - int op_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull InstructionBinary_class_data_; -// ------------------------------------------------------------------- - -class InstructionAccess final : public ::google::protobuf::internal::ZeroFieldsBase -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.InstructionAccess) */ { - public: - inline InstructionAccess() : InstructionAccess(nullptr) {} - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(InstructionAccess* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(InstructionAccess)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR InstructionAccess(::google::protobuf::internal::ConstantInitialized); - - inline InstructionAccess(const InstructionAccess& from) : InstructionAccess(nullptr, from) {} - inline InstructionAccess(InstructionAccess&& from) noexcept - : InstructionAccess(nullptr, ::std::move(from)) {} - inline InstructionAccess& operator=(const InstructionAccess& from) { - CopyFrom(from); - return *this; - } - inline InstructionAccess& operator=(InstructionAccess&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const InstructionAccess& default_instance() { - return *reinterpret_cast( - &_InstructionAccess_default_instance_); - } - static constexpr int kIndexInFileMessages = 43; - friend void swap(InstructionAccess& a, InstructionAccess& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(InstructionAccess* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(InstructionAccess* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - InstructionAccess* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::internal::ZeroFieldsBase::DefaultConstruct(arena); - } - using ::google::protobuf::internal::ZeroFieldsBase::CopyFrom; - inline void CopyFrom(const InstructionAccess& from) { - ::google::protobuf::internal::ZeroFieldsBase::CopyImpl(*this, from); - } - using ::google::protobuf::internal::ZeroFieldsBase::MergeFrom; - void MergeFrom(const InstructionAccess& from) { - ::google::protobuf::internal::ZeroFieldsBase::MergeImpl(*this, from); - } - - public: - bool IsInitialized() const { - return true; - } - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.InstructionAccess"; } - - protected: - explicit InstructionAccess(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - InstructionAccess(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const InstructionAccess& from); - InstructionAccess( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, InstructionAccess&& from) noexcept - : InstructionAccess(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.InstructionAccess) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 0, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull InstructionAccess_class_data_; -// ------------------------------------------------------------------- - -class ConstantValueSplat final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.ConstantValueSplat) */ { - public: - inline ConstantValueSplat() : ConstantValueSplat(nullptr) {} - ~ConstantValueSplat() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(ConstantValueSplat* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(ConstantValueSplat)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR ConstantValueSplat(::google::protobuf::internal::ConstantInitialized); - - inline ConstantValueSplat(const ConstantValueSplat& from) : ConstantValueSplat(nullptr, from) {} - inline ConstantValueSplat(ConstantValueSplat&& from) noexcept - : ConstantValueSplat(nullptr, ::std::move(from)) {} - inline ConstantValueSplat& operator=(const ConstantValueSplat& from) { - CopyFrom(from); - return *this; - } - inline ConstantValueSplat& operator=(ConstantValueSplat&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const ConstantValueSplat& default_instance() { - return *reinterpret_cast( - &_ConstantValueSplat_default_instance_); - } - static constexpr int kIndexInFileMessages = 29; - friend void swap(ConstantValueSplat& a, ConstantValueSplat& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(ConstantValueSplat* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(ConstantValueSplat* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - ConstantValueSplat* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const ConstantValueSplat& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const ConstantValueSplat& from) { ConstantValueSplat::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(ConstantValueSplat* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.ConstantValueSplat"; } - - protected: - explicit ConstantValueSplat(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - ConstantValueSplat(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ConstantValueSplat& from); - ConstantValueSplat( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ConstantValueSplat&& from) noexcept - : ConstantValueSplat(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kTypeFieldNumber = 1, - kElementsFieldNumber = 2, - kCountFieldNumber = 3, - }; - // uint32 type = 1; - void clear_type() ; - ::uint32_t type() const; - void set_type(::uint32_t value); - - private: - ::uint32_t _internal_type() const; - void _internal_set_type(::uint32_t value); - - public: - // uint32 elements = 2; - void clear_elements() ; - ::uint32_t elements() const; - void set_elements(::uint32_t value); - - private: - ::uint32_t _internal_elements() const; - void _internal_set_elements(::uint32_t value); - - public: - // uint32 count = 3; - void clear_count() ; - ::uint32_t count() const; - void set_count(::uint32_t value); - - private: - ::uint32_t _internal_count() const; - void _internal_set_count(::uint32_t value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.ConstantValueSplat) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<2, 3, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const ConstantValueSplat& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - ::uint32_t type_; - ::uint32_t elements_; - ::uint32_t count_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull ConstantValueSplat_class_data_; -// ------------------------------------------------------------------- - -class ConstantValueScalar final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.ConstantValueScalar) */ { - public: - inline ConstantValueScalar() : ConstantValueScalar(nullptr) {} - ~ConstantValueScalar() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(ConstantValueScalar* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(ConstantValueScalar)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR ConstantValueScalar(::google::protobuf::internal::ConstantInitialized); - - inline ConstantValueScalar(const ConstantValueScalar& from) : ConstantValueScalar(nullptr, from) {} - inline ConstantValueScalar(ConstantValueScalar&& from) noexcept - : ConstantValueScalar(nullptr, ::std::move(from)) {} - inline ConstantValueScalar& operator=(const ConstantValueScalar& from) { - CopyFrom(from); - return *this; - } - inline ConstantValueScalar& operator=(ConstantValueScalar&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const ConstantValueScalar& default_instance() { - return *reinterpret_cast( - &_ConstantValueScalar_default_instance_); - } - enum KindCase { - kBool = 1, - kI32 = 2, - kU32 = 3, - kF32 = 4, - kF16 = 5, - KIND_NOT_SET = 0, - }; - static constexpr int kIndexInFileMessages = 27; - friend void swap(ConstantValueScalar& a, ConstantValueScalar& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(ConstantValueScalar* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(ConstantValueScalar* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - ConstantValueScalar* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const ConstantValueScalar& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const ConstantValueScalar& from) { ConstantValueScalar::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(ConstantValueScalar* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.ConstantValueScalar"; } - - protected: - explicit ConstantValueScalar(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - ConstantValueScalar(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ConstantValueScalar& from); - ConstantValueScalar( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ConstantValueScalar&& from) noexcept - : ConstantValueScalar(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kBoolFieldNumber = 1, - kI32FieldNumber = 2, - kU32FieldNumber = 3, - kF32FieldNumber = 4, - kF16FieldNumber = 5, - }; - // bool bool = 1; - bool has_bool_() const; - void clear_bool_() ; - bool bool_() const; - void set_bool_(bool value); - - private: - bool _internal_bool_() const; - void _internal_set_bool_(bool value); - - public: - // int32 i32 = 2; - bool has_i32() const; - void clear_i32() ; - ::int32_t i32() const; - void set_i32(::int32_t value); - - private: - ::int32_t _internal_i32() const; - void _internal_set_i32(::int32_t value); - - public: - // uint32 u32 = 3; - bool has_u32() const; - void clear_u32() ; - ::uint32_t u32() const; - void set_u32(::uint32_t value); - - private: - ::uint32_t _internal_u32() const; - void _internal_set_u32(::uint32_t value); - - public: - // float f32 = 4; - bool has_f32() const; - void clear_f32() ; - float f32() const; - void set_f32(float value); - - private: - float _internal_f32() const; - void _internal_set_f32(float value); - - public: - // float f16 = 5; - bool has_f16() const; - void clear_f16() ; - float f16() const; - void set_f16(float value); - - private: - float _internal_f16() const; - void _internal_set_f16(float value); - - public: - void clear_kind(); - KindCase kind_case() const; - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.ConstantValueScalar) - private: - class _Internal; - void set_has_bool_(); - void set_has_i32(); - void set_has_u32(); - void set_has_f32(); - void set_has_f16(); - inline bool has_kind() const; - inline void clear_has_kind(); - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 5, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const ConstantValueScalar& from_msg); - union KindUnion { - constexpr KindUnion() : _constinit_{} {} - ::google::protobuf::internal::ConstantInitialized _constinit_; - bool bool__; - ::int32_t i32_; - ::uint32_t u32_; - float f32_; - float f16_; - } kind_; - ::google::protobuf::internal::CachedSize _cached_size_; - ::uint32_t _oneof_case_[1]; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull ConstantValueScalar_class_data_; -// ------------------------------------------------------------------- - -class ConstantValueComposite final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.ConstantValueComposite) */ { - public: - inline ConstantValueComposite() : ConstantValueComposite(nullptr) {} - ~ConstantValueComposite() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(ConstantValueComposite* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(ConstantValueComposite)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR ConstantValueComposite(::google::protobuf::internal::ConstantInitialized); - - inline ConstantValueComposite(const ConstantValueComposite& from) : ConstantValueComposite(nullptr, from) {} - inline ConstantValueComposite(ConstantValueComposite&& from) noexcept - : ConstantValueComposite(nullptr, ::std::move(from)) {} - inline ConstantValueComposite& operator=(const ConstantValueComposite& from) { - CopyFrom(from); - return *this; - } - inline ConstantValueComposite& operator=(ConstantValueComposite&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const ConstantValueComposite& default_instance() { - return *reinterpret_cast( - &_ConstantValueComposite_default_instance_); - } - static constexpr int kIndexInFileMessages = 28; - friend void swap(ConstantValueComposite& a, ConstantValueComposite& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(ConstantValueComposite* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(ConstantValueComposite* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - ConstantValueComposite* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const ConstantValueComposite& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const ConstantValueComposite& from) { ConstantValueComposite::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(ConstantValueComposite* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.ConstantValueComposite"; } - - protected: - explicit ConstantValueComposite(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - ConstantValueComposite(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ConstantValueComposite& from); - ConstantValueComposite( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ConstantValueComposite&& from) noexcept - : ConstantValueComposite(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kElementsFieldNumber = 2, - kTypeFieldNumber = 1, - }; - // repeated uint32 elements = 2; - int elements_size() const; - private: - int _internal_elements_size() const; - - public: - void clear_elements() ; - ::uint32_t elements(int index) const; - void set_elements(int index, ::uint32_t value); - void add_elements(::uint32_t value); - const ::google::protobuf::RepeatedField<::uint32_t>& elements() const; - ::google::protobuf::RepeatedField<::uint32_t>* PROTOBUF_NONNULL mutable_elements(); - - private: - const ::google::protobuf::RepeatedField<::uint32_t>& _internal_elements() const; - ::google::protobuf::RepeatedField<::uint32_t>* PROTOBUF_NONNULL _internal_mutable_elements(); - - public: - // uint32 type = 1; - void clear_type() ; - ::uint32_t type() const; - void set_type(::uint32_t value); - - private: - ::uint32_t _internal_type() const; - void _internal_set_type(::uint32_t value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.ConstantValueComposite) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<1, 2, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const ConstantValueComposite& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::RepeatedField<::uint32_t> elements_; - ::google::protobuf::internal::CachedSize _elements_cached_byte_size_; - ::uint32_t type_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull ConstantValueComposite_class_data_; -// ------------------------------------------------------------------- - -class BlockParameter final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.BlockParameter) */ { - public: - inline BlockParameter() : BlockParameter(nullptr) {} - ~BlockParameter() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(BlockParameter* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(BlockParameter)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR BlockParameter(::google::protobuf::internal::ConstantInitialized); - - inline BlockParameter(const BlockParameter& from) : BlockParameter(nullptr, from) {} - inline BlockParameter(BlockParameter&& from) noexcept - : BlockParameter(nullptr, ::std::move(from)) {} - inline BlockParameter& operator=(const BlockParameter& from) { - CopyFrom(from); - return *this; - } - inline BlockParameter& operator=(BlockParameter&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const BlockParameter& default_instance() { - return *reinterpret_cast( - &_BlockParameter_default_instance_); - } - static constexpr int kIndexInFileMessages = 25; - friend void swap(BlockParameter& a, BlockParameter& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(BlockParameter* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(BlockParameter* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - BlockParameter* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const BlockParameter& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const BlockParameter& from) { BlockParameter::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(BlockParameter* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.BlockParameter"; } - - protected: - explicit BlockParameter(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - BlockParameter(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const BlockParameter& from); - BlockParameter( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, BlockParameter&& from) noexcept - : BlockParameter(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kNameFieldNumber = 2, - kTypeFieldNumber = 1, - }; - // optional string name = 2; - bool has_name() const; - void clear_name() ; - const ::std::string& name() const; - template - void set_name(Arg_&& arg, Args_... args); - ::std::string* PROTOBUF_NONNULL mutable_name(); - [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_name(); - void set_allocated_name(::std::string* PROTOBUF_NULLABLE value); - - private: - const ::std::string& _internal_name() const; - PROTOBUF_ALWAYS_INLINE void _internal_set_name(const ::std::string& value); - ::std::string* PROTOBUF_NONNULL _internal_mutable_name(); - - public: - // uint32 type = 1; - void clear_type() ; - ::uint32_t type() const; - void set_type(::uint32_t value); - - private: - ::uint32_t _internal_type() const; - void _internal_set_type(::uint32_t value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.BlockParameter) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<1, 2, - 0, 50, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const BlockParameter& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::internal::ArenaStringPtr name_; - ::uint32_t type_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull BlockParameter_class_data_; -// ------------------------------------------------------------------- - -class BindingPoint final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.BindingPoint) */ { - public: - inline BindingPoint() : BindingPoint(nullptr) {} - ~BindingPoint() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(BindingPoint* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(BindingPoint)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR BindingPoint(::google::protobuf::internal::ConstantInitialized); - - inline BindingPoint(const BindingPoint& from) : BindingPoint(nullptr, from) {} - inline BindingPoint(BindingPoint&& from) noexcept - : BindingPoint(nullptr, ::std::move(from)) {} - inline BindingPoint& operator=(const BindingPoint& from) { - CopyFrom(from); - return *this; - } - inline BindingPoint& operator=(BindingPoint&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const BindingPoint& default_instance() { - return *reinterpret_cast( - &_BindingPoint_default_instance_); - } - static constexpr int kIndexInFileMessages = 58; - friend void swap(BindingPoint& a, BindingPoint& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(BindingPoint* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(BindingPoint* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - BindingPoint* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const BindingPoint& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const BindingPoint& from) { BindingPoint::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(BindingPoint* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.BindingPoint"; } - - protected: - explicit BindingPoint(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - BindingPoint(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const BindingPoint& from); - BindingPoint( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, BindingPoint&& from) noexcept - : BindingPoint(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kGroupFieldNumber = 1, - kBindingFieldNumber = 2, - }; - // uint32 group = 1; - void clear_group() ; - ::uint32_t group() const; - void set_group(::uint32_t value); - - private: - ::uint32_t _internal_group() const; - void _internal_set_group(::uint32_t value); - - public: - // uint32 binding = 2; - void clear_binding() ; - ::uint32_t binding() const; - void set_binding(::uint32_t value); - - private: - ::uint32_t _internal_binding() const; - void _internal_set_binding(::uint32_t value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.BindingPoint) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<1, 2, - 0, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const BindingPoint& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - ::uint32_t group_; - ::uint32_t binding_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull BindingPoint_class_data_; -// ------------------------------------------------------------------- - -class InstructionVar final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.InstructionVar) */ { - public: - inline InstructionVar() : InstructionVar(nullptr) {} - ~InstructionVar() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(InstructionVar* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(InstructionVar)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR InstructionVar(::google::protobuf::internal::ConstantInitialized); - - inline InstructionVar(const InstructionVar& from) : InstructionVar(nullptr, from) {} - inline InstructionVar(InstructionVar&& from) noexcept - : InstructionVar(nullptr, ::std::move(from)) {} - inline InstructionVar& operator=(const InstructionVar& from) { - CopyFrom(from); - return *this; - } - inline InstructionVar& operator=(InstructionVar&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const InstructionVar& default_instance() { - return *reinterpret_cast( - &_InstructionVar_default_instance_); - } - static constexpr int kIndexInFileMessages = 41; - friend void swap(InstructionVar& a, InstructionVar& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(InstructionVar* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(InstructionVar* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - InstructionVar* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const InstructionVar& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const InstructionVar& from) { InstructionVar::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(InstructionVar* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.InstructionVar"; } - - protected: - explicit InstructionVar(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - InstructionVar(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const InstructionVar& from); - InstructionVar( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, InstructionVar&& from) noexcept - : InstructionVar(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kBindingPointFieldNumber = 1, - kInputAttachmentIndexFieldNumber = 2, - }; - // optional .tint.core.ir.binary.pb.BindingPoint binding_point = 1; - bool has_binding_point() const; - void clear_binding_point() ; - const ::tint::core::ir::binary::pb::BindingPoint& binding_point() const; - [[nodiscard]] ::tint::core::ir::binary::pb::BindingPoint* PROTOBUF_NULLABLE release_binding_point(); - ::tint::core::ir::binary::pb::BindingPoint* PROTOBUF_NONNULL mutable_binding_point(); - void set_allocated_binding_point(::tint::core::ir::binary::pb::BindingPoint* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_binding_point(::tint::core::ir::binary::pb::BindingPoint* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::BindingPoint* PROTOBUF_NULLABLE unsafe_arena_release_binding_point(); - - private: - const ::tint::core::ir::binary::pb::BindingPoint& _internal_binding_point() const; - ::tint::core::ir::binary::pb::BindingPoint* PROTOBUF_NONNULL _internal_mutable_binding_point(); - - public: - // optional uint32 input_attachment_index = 2; - bool has_input_attachment_index() const; - void clear_input_attachment_index() ; - ::uint32_t input_attachment_index() const; - void set_input_attachment_index(::uint32_t value); - - private: - ::uint32_t _internal_input_attachment_index() const; - void _internal_set_input_attachment_index(::uint32_t value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.InstructionVar) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<1, 2, - 1, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const InstructionVar& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - ::tint::core::ir::binary::pb::BindingPoint* PROTOBUF_NULLABLE binding_point_; - ::uint32_t input_attachment_index_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull InstructionVar_class_data_; -// ------------------------------------------------------------------- - -class InstructionSwitch final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.InstructionSwitch) */ { - public: - inline InstructionSwitch() : InstructionSwitch(nullptr) {} - ~InstructionSwitch() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(InstructionSwitch* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(InstructionSwitch)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR InstructionSwitch(::google::protobuf::internal::ConstantInitialized); - - inline InstructionSwitch(const InstructionSwitch& from) : InstructionSwitch(nullptr, from) {} - inline InstructionSwitch(InstructionSwitch&& from) noexcept - : InstructionSwitch(nullptr, ::std::move(from)) {} - inline InstructionSwitch& operator=(const InstructionSwitch& from) { - CopyFrom(from); - return *this; - } - inline InstructionSwitch& operator=(InstructionSwitch&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const InstructionSwitch& default_instance() { - return *reinterpret_cast( - &_InstructionSwitch_default_instance_); - } - static constexpr int kIndexInFileMessages = 52; - friend void swap(InstructionSwitch& a, InstructionSwitch& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(InstructionSwitch* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(InstructionSwitch* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - InstructionSwitch* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const InstructionSwitch& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const InstructionSwitch& from) { InstructionSwitch::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(InstructionSwitch* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.InstructionSwitch"; } - - protected: - explicit InstructionSwitch(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - InstructionSwitch(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const InstructionSwitch& from); - InstructionSwitch( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, InstructionSwitch&& from) noexcept - : InstructionSwitch(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kCasesFieldNumber = 1, - }; - // repeated .tint.core.ir.binary.pb.SwitchCase cases = 1; - int cases_size() const; - private: - int _internal_cases_size() const; - - public: - void clear_cases() ; - ::tint::core::ir::binary::pb::SwitchCase* PROTOBUF_NONNULL mutable_cases(int index); - ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::SwitchCase>* PROTOBUF_NONNULL mutable_cases(); - - private: - const ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::SwitchCase>& _internal_cases() const; - ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::SwitchCase>* PROTOBUF_NONNULL _internal_mutable_cases(); - public: - const ::tint::core::ir::binary::pb::SwitchCase& cases(int index) const; - ::tint::core::ir::binary::pb::SwitchCase* PROTOBUF_NONNULL add_cases(); - const ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::SwitchCase>& cases() const; - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.InstructionSwitch) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 1, - 1, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const InstructionSwitch& from_msg); - ::google::protobuf::RepeatedPtrField< ::tint::core::ir::binary::pb::SwitchCase > cases_; - ::google::protobuf::internal::CachedSize _cached_size_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull InstructionSwitch_class_data_; -// ------------------------------------------------------------------- - -class Function final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.Function) */ { - public: - inline Function() : Function(nullptr) {} - ~Function() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(Function* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(Function)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR Function(::google::protobuf::internal::ConstantInitialized); - - inline Function(const Function& from) : Function(nullptr, from) {} - inline Function(Function&& from) noexcept - : Function(nullptr, ::std::move(from)) {} - inline Function& operator=(const Function& from) { - CopyFrom(from); - return *this; - } - inline Function& operator=(Function&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const Function& default_instance() { - return *reinterpret_cast( - &_Function_default_instance_); - } - static constexpr int kIndexInFileMessages = 30; - friend void swap(Function& a, Function& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(Function* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(Function* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - Function* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const Function& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const Function& from) { Function::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(Function* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.Function"; } - - protected: - explicit Function(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - Function(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Function& from); - Function( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, Function&& from) noexcept - : Function(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kParametersFieldNumber = 6, - kNameFieldNumber = 3, - kWorkgroupSizeFieldNumber = 5, - kReturnInterpolationFieldNumber = 8, - kReturnTypeFieldNumber = 1, - kBlockFieldNumber = 2, - kPipelineStageFieldNumber = 4, - kReturnLocationFieldNumber = 7, - kReturnBuiltinFieldNumber = 9, - kReturnInvariantFieldNumber = 10, - kSubgroupSizeFieldNumber = 11, - }; - // repeated uint32 parameters = 6; - int parameters_size() const; - private: - int _internal_parameters_size() const; - - public: - void clear_parameters() ; - ::uint32_t parameters(int index) const; - void set_parameters(int index, ::uint32_t value); - void add_parameters(::uint32_t value); - const ::google::protobuf::RepeatedField<::uint32_t>& parameters() const; - ::google::protobuf::RepeatedField<::uint32_t>* PROTOBUF_NONNULL mutable_parameters(); - - private: - const ::google::protobuf::RepeatedField<::uint32_t>& _internal_parameters() const; - ::google::protobuf::RepeatedField<::uint32_t>* PROTOBUF_NONNULL _internal_mutable_parameters(); - - public: - // optional string name = 3; - bool has_name() const; - void clear_name() ; - const ::std::string& name() const; - template - void set_name(Arg_&& arg, Args_... args); - ::std::string* PROTOBUF_NONNULL mutable_name(); - [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_name(); - void set_allocated_name(::std::string* PROTOBUF_NULLABLE value); - - private: - const ::std::string& _internal_name() const; - PROTOBUF_ALWAYS_INLINE void _internal_set_name(const ::std::string& value); - ::std::string* PROTOBUF_NONNULL _internal_mutable_name(); - - public: - // optional .tint.core.ir.binary.pb.WorkgroupSize workgroup_size = 5; - bool has_workgroup_size() const; - void clear_workgroup_size() ; - const ::tint::core::ir::binary::pb::WorkgroupSize& workgroup_size() const; - [[nodiscard]] ::tint::core::ir::binary::pb::WorkgroupSize* PROTOBUF_NULLABLE release_workgroup_size(); - ::tint::core::ir::binary::pb::WorkgroupSize* PROTOBUF_NONNULL mutable_workgroup_size(); - void set_allocated_workgroup_size(::tint::core::ir::binary::pb::WorkgroupSize* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_workgroup_size(::tint::core::ir::binary::pb::WorkgroupSize* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::WorkgroupSize* PROTOBUF_NULLABLE unsafe_arena_release_workgroup_size(); - - private: - const ::tint::core::ir::binary::pb::WorkgroupSize& _internal_workgroup_size() const; - ::tint::core::ir::binary::pb::WorkgroupSize* PROTOBUF_NONNULL _internal_mutable_workgroup_size(); - - public: - // optional .tint.core.ir.binary.pb.Interpolation return_interpolation = 8; - bool has_return_interpolation() const; - void clear_return_interpolation() ; - const ::tint::core::ir::binary::pb::Interpolation& return_interpolation() const; - [[nodiscard]] ::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NULLABLE release_return_interpolation(); - ::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NONNULL mutable_return_interpolation(); - void set_allocated_return_interpolation(::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_return_interpolation(::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NULLABLE unsafe_arena_release_return_interpolation(); - - private: - const ::tint::core::ir::binary::pb::Interpolation& _internal_return_interpolation() const; - ::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NONNULL _internal_mutable_return_interpolation(); - - public: - // uint32 return_type = 1; - void clear_return_type() ; - ::uint32_t return_type() const; - void set_return_type(::uint32_t value); - - private: - ::uint32_t _internal_return_type() const; - void _internal_set_return_type(::uint32_t value); - - public: - // uint32 block = 2; - void clear_block() ; - ::uint32_t block() const; - void set_block(::uint32_t value); - - private: - ::uint32_t _internal_block() const; - void _internal_set_block(::uint32_t value); - - public: - // optional .tint.core.ir.binary.pb.PipelineStage pipeline_stage = 4; - bool has_pipeline_stage() const; - void clear_pipeline_stage() ; - ::tint::core::ir::binary::pb::PipelineStage pipeline_stage() const; - void set_pipeline_stage(::tint::core::ir::binary::pb::PipelineStage value); - - private: - ::tint::core::ir::binary::pb::PipelineStage _internal_pipeline_stage() const; - void _internal_set_pipeline_stage(::tint::core::ir::binary::pb::PipelineStage value); - - public: - // optional uint32 return_location = 7; - bool has_return_location() const; - void clear_return_location() ; - ::uint32_t return_location() const; - void set_return_location(::uint32_t value); - - private: - ::uint32_t _internal_return_location() const; - void _internal_set_return_location(::uint32_t value); - - public: - // optional .tint.core.ir.binary.pb.BuiltinValue return_builtin = 9; - bool has_return_builtin() const; - void clear_return_builtin() ; - ::tint::core::ir::binary::pb::BuiltinValue return_builtin() const; - void set_return_builtin(::tint::core::ir::binary::pb::BuiltinValue value); - - private: - ::tint::core::ir::binary::pb::BuiltinValue _internal_return_builtin() const; - void _internal_set_return_builtin(::tint::core::ir::binary::pb::BuiltinValue value); - - public: - // bool return_invariant = 10; - void clear_return_invariant() ; - bool return_invariant() const; - void set_return_invariant(bool value); - - private: - bool _internal_return_invariant() const; - void _internal_set_return_invariant(bool value); - - public: - // optional uint32 subgroup_size = 11; - bool has_subgroup_size() const; - void clear_subgroup_size() ; - ::uint32_t subgroup_size() const; - void set_subgroup_size(::uint32_t value); - - private: - ::uint32_t _internal_subgroup_size() const; - void _internal_set_subgroup_size(::uint32_t value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.Function) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<4, 11, - 2, 52, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const Function& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::RepeatedField<::uint32_t> parameters_; - ::google::protobuf::internal::CachedSize _parameters_cached_byte_size_; - ::google::protobuf::internal::ArenaStringPtr name_; - ::tint::core::ir::binary::pb::WorkgroupSize* PROTOBUF_NULLABLE workgroup_size_; - ::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NULLABLE return_interpolation_; - ::uint32_t return_type_; - ::uint32_t block_; - int pipeline_stage_; - ::uint32_t return_location_; - int return_builtin_; - bool return_invariant_; - ::uint32_t subgroup_size_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull Function_class_data_; -// ------------------------------------------------------------------- - -class ConstantValue final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.ConstantValue) */ { - public: - inline ConstantValue() : ConstantValue(nullptr) {} - ~ConstantValue() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(ConstantValue* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(ConstantValue)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR ConstantValue(::google::protobuf::internal::ConstantInitialized); - - inline ConstantValue(const ConstantValue& from) : ConstantValue(nullptr, from) {} - inline ConstantValue(ConstantValue&& from) noexcept - : ConstantValue(nullptr, ::std::move(from)) {} - inline ConstantValue& operator=(const ConstantValue& from) { - CopyFrom(from); - return *this; - } - inline ConstantValue& operator=(ConstantValue&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const ConstantValue& default_instance() { - return *reinterpret_cast( - &_ConstantValue_default_instance_); - } - enum KindCase { - kScalar = 1, - kComposite = 2, - kSplat = 3, - KIND_NOT_SET = 0, - }; - static constexpr int kIndexInFileMessages = 26; - friend void swap(ConstantValue& a, ConstantValue& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(ConstantValue* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(ConstantValue* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - ConstantValue* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const ConstantValue& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const ConstantValue& from) { ConstantValue::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(ConstantValue* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.ConstantValue"; } - - protected: - explicit ConstantValue(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - ConstantValue(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ConstantValue& from); - ConstantValue( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ConstantValue&& from) noexcept - : ConstantValue(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kScalarFieldNumber = 1, - kCompositeFieldNumber = 2, - kSplatFieldNumber = 3, - }; - // .tint.core.ir.binary.pb.ConstantValueScalar scalar = 1; - bool has_scalar() const; - private: - bool _internal_has_scalar() const; - - public: - void clear_scalar() ; - const ::tint::core::ir::binary::pb::ConstantValueScalar& scalar() const; - [[nodiscard]] ::tint::core::ir::binary::pb::ConstantValueScalar* PROTOBUF_NULLABLE release_scalar(); - ::tint::core::ir::binary::pb::ConstantValueScalar* PROTOBUF_NONNULL mutable_scalar(); - void set_allocated_scalar(::tint::core::ir::binary::pb::ConstantValueScalar* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_scalar(::tint::core::ir::binary::pb::ConstantValueScalar* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::ConstantValueScalar* PROTOBUF_NULLABLE unsafe_arena_release_scalar(); - - private: - const ::tint::core::ir::binary::pb::ConstantValueScalar& _internal_scalar() const; - ::tint::core::ir::binary::pb::ConstantValueScalar* PROTOBUF_NONNULL _internal_mutable_scalar(); - - public: - // .tint.core.ir.binary.pb.ConstantValueComposite composite = 2; - bool has_composite() const; - private: - bool _internal_has_composite() const; - - public: - void clear_composite() ; - const ::tint::core::ir::binary::pb::ConstantValueComposite& composite() const; - [[nodiscard]] ::tint::core::ir::binary::pb::ConstantValueComposite* PROTOBUF_NULLABLE release_composite(); - ::tint::core::ir::binary::pb::ConstantValueComposite* PROTOBUF_NONNULL mutable_composite(); - void set_allocated_composite(::tint::core::ir::binary::pb::ConstantValueComposite* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_composite(::tint::core::ir::binary::pb::ConstantValueComposite* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::ConstantValueComposite* PROTOBUF_NULLABLE unsafe_arena_release_composite(); - - private: - const ::tint::core::ir::binary::pb::ConstantValueComposite& _internal_composite() const; - ::tint::core::ir::binary::pb::ConstantValueComposite* PROTOBUF_NONNULL _internal_mutable_composite(); - - public: - // .tint.core.ir.binary.pb.ConstantValueSplat splat = 3; - bool has_splat() const; - private: - bool _internal_has_splat() const; - - public: - void clear_splat() ; - const ::tint::core::ir::binary::pb::ConstantValueSplat& splat() const; - [[nodiscard]] ::tint::core::ir::binary::pb::ConstantValueSplat* PROTOBUF_NULLABLE release_splat(); - ::tint::core::ir::binary::pb::ConstantValueSplat* PROTOBUF_NONNULL mutable_splat(); - void set_allocated_splat(::tint::core::ir::binary::pb::ConstantValueSplat* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_splat(::tint::core::ir::binary::pb::ConstantValueSplat* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::ConstantValueSplat* PROTOBUF_NULLABLE unsafe_arena_release_splat(); - - private: - const ::tint::core::ir::binary::pb::ConstantValueSplat& _internal_splat() const; - ::tint::core::ir::binary::pb::ConstantValueSplat* PROTOBUF_NONNULL _internal_mutable_splat(); - - public: - void clear_kind(); - KindCase kind_case() const; - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.ConstantValue) - private: - class _Internal; - void set_has_scalar(); - void set_has_composite(); - void set_has_splat(); - inline bool has_kind() const; - inline void clear_has_kind(); - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 3, - 3, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const ConstantValue& from_msg); - union KindUnion { - constexpr KindUnion() : _constinit_{} {} - ::google::protobuf::internal::ConstantInitialized _constinit_; - ::google::protobuf::Message* PROTOBUF_NULLABLE scalar_; - ::google::protobuf::Message* PROTOBUF_NULLABLE composite_; - ::google::protobuf::Message* PROTOBUF_NULLABLE splat_; - } kind_; - ::google::protobuf::internal::CachedSize _cached_size_; - ::uint32_t _oneof_case_[1]; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull ConstantValue_class_data_; -// ------------------------------------------------------------------- - -class AttributesStructMember final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.AttributesStructMember) */ { - public: - inline AttributesStructMember() : AttributesStructMember(nullptr) {} - ~AttributesStructMember() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(AttributesStructMember* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(AttributesStructMember)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR AttributesStructMember(::google::protobuf::internal::ConstantInitialized); - - inline AttributesStructMember(const AttributesStructMember& from) : AttributesStructMember(nullptr, from) {} - inline AttributesStructMember(AttributesStructMember&& from) noexcept - : AttributesStructMember(nullptr, ::std::move(from)) {} - inline AttributesStructMember& operator=(const AttributesStructMember& from) { - CopyFrom(from); - return *this; - } - inline AttributesStructMember& operator=(AttributesStructMember&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const AttributesStructMember& default_instance() { - return *reinterpret_cast( - &_AttributesStructMember_default_instance_); - } - static constexpr int kIndexInFileMessages = 63; - friend void swap(AttributesStructMember& a, AttributesStructMember& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(AttributesStructMember* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(AttributesStructMember* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - AttributesStructMember* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const AttributesStructMember& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const AttributesStructMember& from) { AttributesStructMember::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(AttributesStructMember* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.AttributesStructMember"; } - - protected: - explicit AttributesStructMember(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - AttributesStructMember(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const AttributesStructMember& from); - AttributesStructMember( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, AttributesStructMember&& from) noexcept - : AttributesStructMember(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kInterpolationFieldNumber = 5, - kLocationFieldNumber = 1, - kBlendSrcFieldNumber = 2, - kColorFieldNumber = 3, - kBuiltinFieldNumber = 4, - kInvariantFieldNumber = 6, - }; - // optional .tint.core.ir.binary.pb.Interpolation interpolation = 5; - bool has_interpolation() const; - void clear_interpolation() ; - const ::tint::core::ir::binary::pb::Interpolation& interpolation() const; - [[nodiscard]] ::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NULLABLE release_interpolation(); - ::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NONNULL mutable_interpolation(); - void set_allocated_interpolation(::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_interpolation(::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NULLABLE unsafe_arena_release_interpolation(); - - private: - const ::tint::core::ir::binary::pb::Interpolation& _internal_interpolation() const; - ::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NONNULL _internal_mutable_interpolation(); - - public: - // optional uint32 location = 1; - bool has_location() const; - void clear_location() ; - ::uint32_t location() const; - void set_location(::uint32_t value); - - private: - ::uint32_t _internal_location() const; - void _internal_set_location(::uint32_t value); - - public: - // optional uint32 blend_src = 2; - bool has_blend_src() const; - void clear_blend_src() ; - ::uint32_t blend_src() const; - void set_blend_src(::uint32_t value); - - private: - ::uint32_t _internal_blend_src() const; - void _internal_set_blend_src(::uint32_t value); - - public: - // optional uint32 color = 3; - bool has_color() const; - void clear_color() ; - ::uint32_t color() const; - void set_color(::uint32_t value); - - private: - ::uint32_t _internal_color() const; - void _internal_set_color(::uint32_t value); - - public: - // optional .tint.core.ir.binary.pb.BuiltinValue builtin = 4; - bool has_builtin() const; - void clear_builtin() ; - ::tint::core::ir::binary::pb::BuiltinValue builtin() const; - void set_builtin(::tint::core::ir::binary::pb::BuiltinValue value); - - private: - ::tint::core::ir::binary::pb::BuiltinValue _internal_builtin() const; - void _internal_set_builtin(::tint::core::ir::binary::pb::BuiltinValue value); - - public: - // bool invariant = 6; - void clear_invariant() ; - bool invariant() const; - void set_invariant(bool value); - - private: - bool _internal_invariant() const; - void _internal_set_invariant(bool value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.AttributesStructMember) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<3, 6, - 1, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const AttributesStructMember& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - ::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NULLABLE interpolation_; - ::uint32_t location_; - ::uint32_t blend_src_; - ::uint32_t color_; - int builtin_; - bool invariant_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull AttributesStructMember_class_data_; -// ------------------------------------------------------------------- - -class AttributesFunctionParameter final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.AttributesFunctionParameter) */ { - public: - inline AttributesFunctionParameter() : AttributesFunctionParameter(nullptr) {} - ~AttributesFunctionParameter() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(AttributesFunctionParameter* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(AttributesFunctionParameter)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR AttributesFunctionParameter(::google::protobuf::internal::ConstantInitialized); - - inline AttributesFunctionParameter(const AttributesFunctionParameter& from) : AttributesFunctionParameter(nullptr, from) {} - inline AttributesFunctionParameter(AttributesFunctionParameter&& from) noexcept - : AttributesFunctionParameter(nullptr, ::std::move(from)) {} - inline AttributesFunctionParameter& operator=(const AttributesFunctionParameter& from) { - CopyFrom(from); - return *this; - } - inline AttributesFunctionParameter& operator=(AttributesFunctionParameter&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const AttributesFunctionParameter& default_instance() { - return *reinterpret_cast( - &_AttributesFunctionParameter_default_instance_); - } - static constexpr int kIndexInFileMessages = 64; - friend void swap(AttributesFunctionParameter& a, AttributesFunctionParameter& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(AttributesFunctionParameter* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(AttributesFunctionParameter* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - AttributesFunctionParameter* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const AttributesFunctionParameter& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const AttributesFunctionParameter& from) { AttributesFunctionParameter::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(AttributesFunctionParameter* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.AttributesFunctionParameter"; } - - protected: - explicit AttributesFunctionParameter(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - AttributesFunctionParameter(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const AttributesFunctionParameter& from); - AttributesFunctionParameter( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, AttributesFunctionParameter&& from) noexcept - : AttributesFunctionParameter(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kInterpolationFieldNumber = 4, - kBindingPointFieldNumber = 5, - kBuiltinFieldNumber = 1, - kLocationFieldNumber = 2, - kColorFieldNumber = 3, - kInvariantFieldNumber = 6, - }; - // optional .tint.core.ir.binary.pb.Interpolation interpolation = 4; - bool has_interpolation() const; - void clear_interpolation() ; - const ::tint::core::ir::binary::pb::Interpolation& interpolation() const; - [[nodiscard]] ::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NULLABLE release_interpolation(); - ::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NONNULL mutable_interpolation(); - void set_allocated_interpolation(::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_interpolation(::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NULLABLE unsafe_arena_release_interpolation(); - - private: - const ::tint::core::ir::binary::pb::Interpolation& _internal_interpolation() const; - ::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NONNULL _internal_mutable_interpolation(); - - public: - // optional .tint.core.ir.binary.pb.BindingPoint binding_point = 5; - bool has_binding_point() const; - void clear_binding_point() ; - const ::tint::core::ir::binary::pb::BindingPoint& binding_point() const; - [[nodiscard]] ::tint::core::ir::binary::pb::BindingPoint* PROTOBUF_NULLABLE release_binding_point(); - ::tint::core::ir::binary::pb::BindingPoint* PROTOBUF_NONNULL mutable_binding_point(); - void set_allocated_binding_point(::tint::core::ir::binary::pb::BindingPoint* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_binding_point(::tint::core::ir::binary::pb::BindingPoint* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::BindingPoint* PROTOBUF_NULLABLE unsafe_arena_release_binding_point(); - - private: - const ::tint::core::ir::binary::pb::BindingPoint& _internal_binding_point() const; - ::tint::core::ir::binary::pb::BindingPoint* PROTOBUF_NONNULL _internal_mutable_binding_point(); - - public: - // optional .tint.core.ir.binary.pb.BuiltinValue builtin = 1; - bool has_builtin() const; - void clear_builtin() ; - ::tint::core::ir::binary::pb::BuiltinValue builtin() const; - void set_builtin(::tint::core::ir::binary::pb::BuiltinValue value); - - private: - ::tint::core::ir::binary::pb::BuiltinValue _internal_builtin() const; - void _internal_set_builtin(::tint::core::ir::binary::pb::BuiltinValue value); - - public: - // optional uint32 location = 2; - bool has_location() const; - void clear_location() ; - ::uint32_t location() const; - void set_location(::uint32_t value); - - private: - ::uint32_t _internal_location() const; - void _internal_set_location(::uint32_t value); - - public: - // optional uint32 color = 3; - bool has_color() const; - void clear_color() ; - ::uint32_t color() const; - void set_color(::uint32_t value); - - private: - ::uint32_t _internal_color() const; - void _internal_set_color(::uint32_t value); - - public: - // bool invariant = 6; - void clear_invariant() ; - bool invariant() const; - void set_invariant(bool value); - - private: - bool _internal_invariant() const; - void _internal_set_invariant(bool value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.AttributesFunctionParameter) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<3, 6, - 2, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const AttributesFunctionParameter& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - ::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NULLABLE interpolation_; - ::tint::core::ir::binary::pb::BindingPoint* PROTOBUF_NULLABLE binding_point_; - int builtin_; - ::uint32_t location_; - ::uint32_t color_; - bool invariant_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull AttributesFunctionParameter_class_data_; -// ------------------------------------------------------------------- - -class TypeStructMember final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.TypeStructMember) */ { - public: - inline TypeStructMember() : TypeStructMember(nullptr) {} - ~TypeStructMember() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(TypeStructMember* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(TypeStructMember)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR TypeStructMember(::google::protobuf::internal::ConstantInitialized); - - inline TypeStructMember(const TypeStructMember& from) : TypeStructMember(nullptr, from) {} - inline TypeStructMember(TypeStructMember&& from) noexcept - : TypeStructMember(nullptr, ::std::move(from)) {} - inline TypeStructMember& operator=(const TypeStructMember& from) { - CopyFrom(from); - return *this; - } - inline TypeStructMember& operator=(TypeStructMember&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const TypeStructMember& default_instance() { - return *reinterpret_cast( - &_TypeStructMember_default_instance_); - } - static constexpr int kIndexInFileMessages = 8; - friend void swap(TypeStructMember& a, TypeStructMember& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(TypeStructMember* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(TypeStructMember* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - TypeStructMember* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const TypeStructMember& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const TypeStructMember& from) { TypeStructMember::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(TypeStructMember* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.TypeStructMember"; } - - protected: - explicit TypeStructMember(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - TypeStructMember(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TypeStructMember& from); - TypeStructMember( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TypeStructMember&& from) noexcept - : TypeStructMember(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kNameFieldNumber = 1, - kAttributesFieldNumber = 5, - kTypeFieldNumber = 2, - kSizeFieldNumber = 3, - kAlignFieldNumber = 4, - }; - // string name = 1; - void clear_name() ; - const ::std::string& name() const; - template - void set_name(Arg_&& arg, Args_... args); - ::std::string* PROTOBUF_NONNULL mutable_name(); - [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_name(); - void set_allocated_name(::std::string* PROTOBUF_NULLABLE value); - - private: - const ::std::string& _internal_name() const; - PROTOBUF_ALWAYS_INLINE void _internal_set_name(const ::std::string& value); - ::std::string* PROTOBUF_NONNULL _internal_mutable_name(); - - public: - // optional .tint.core.ir.binary.pb.AttributesStructMember attributes = 5; - bool has_attributes() const; - void clear_attributes() ; - const ::tint::core::ir::binary::pb::AttributesStructMember& attributes() const; - [[nodiscard]] ::tint::core::ir::binary::pb::AttributesStructMember* PROTOBUF_NULLABLE release_attributes(); - ::tint::core::ir::binary::pb::AttributesStructMember* PROTOBUF_NONNULL mutable_attributes(); - void set_allocated_attributes(::tint::core::ir::binary::pb::AttributesStructMember* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_attributes(::tint::core::ir::binary::pb::AttributesStructMember* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::AttributesStructMember* PROTOBUF_NULLABLE unsafe_arena_release_attributes(); - - private: - const ::tint::core::ir::binary::pb::AttributesStructMember& _internal_attributes() const; - ::tint::core::ir::binary::pb::AttributesStructMember* PROTOBUF_NONNULL _internal_mutable_attributes(); - - public: - // uint32 type = 2; - void clear_type() ; - ::uint32_t type() const; - void set_type(::uint32_t value); - - private: - ::uint32_t _internal_type() const; - void _internal_set_type(::uint32_t value); - - public: - // uint32 size = 3; - void clear_size() ; - ::uint32_t size() const; - void set_size(::uint32_t value); - - private: - ::uint32_t _internal_size() const; - void _internal_set_size(::uint32_t value); - - public: - // uint32 align = 4; - void clear_align() ; - ::uint32_t align() const; - void set_align(::uint32_t value); - - private: - ::uint32_t _internal_align() const; - void _internal_set_align(::uint32_t value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.TypeStructMember) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<3, 5, - 1, 52, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const TypeStructMember& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::internal::ArenaStringPtr name_; - ::tint::core::ir::binary::pb::AttributesStructMember* PROTOBUF_NULLABLE attributes_; - ::uint32_t type_; - ::uint32_t size_; - ::uint32_t align_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull TypeStructMember_class_data_; -// ------------------------------------------------------------------- - -class Instruction final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.Instruction) */ { - public: - inline Instruction() : Instruction(nullptr) {} - ~Instruction() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(Instruction* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(Instruction)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR Instruction(::google::protobuf::internal::ConstantInitialized); - - inline Instruction(const Instruction& from) : Instruction(nullptr, from) {} - inline Instruction(Instruction&& from) noexcept - : Instruction(nullptr, ::std::move(from)) {} - inline Instruction& operator=(const Instruction& from) { - CopyFrom(from); - return *this; - } - inline Instruction& operator=(Instruction&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const Instruction& default_instance() { - return *reinterpret_cast( - &_Instruction_default_instance_); - } - enum KindCase { - kReturn = 3, - kUnary = 4, - kBinary = 5, - kDiscard = 6, - kLet = 7, - kVar = 8, - kBitcast = 9, - kConstruct = 10, - kConvert = 11, - kAccess = 12, - kUserCall = 13, - kBuiltinCall = 14, - kLoad = 15, - kStore = 16, - kLoadVectorElement = 17, - kStoreVectorElement = 18, - kSwizzle = 19, - kIf = 20, - kSwitch = 21, - kLoop = 22, - kExitIf = 23, - kExitSwitch = 24, - kExitLoop = 25, - kNextIteration = 26, - kContinue = 27, - kBreakIf = 28, - kUnreachable = 29, - KIND_NOT_SET = 0, - }; - static constexpr int kIndexInFileMessages = 33; - friend void swap(Instruction& a, Instruction& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(Instruction* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(Instruction* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - Instruction* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const Instruction& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const Instruction& from) { Instruction::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(Instruction* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.Instruction"; } - - protected: - explicit Instruction(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - Instruction(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Instruction& from); - Instruction( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, Instruction&& from) noexcept - : Instruction(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kOperandsFieldNumber = 1, - kResultsFieldNumber = 2, - kReturnFieldNumber = 3, - kUnaryFieldNumber = 4, - kBinaryFieldNumber = 5, - kDiscardFieldNumber = 6, - kLetFieldNumber = 7, - kVarFieldNumber = 8, - kBitcastFieldNumber = 9, - kConstructFieldNumber = 10, - kConvertFieldNumber = 11, - kAccessFieldNumber = 12, - kUserCallFieldNumber = 13, - kBuiltinCallFieldNumber = 14, - kLoadFieldNumber = 15, - kStoreFieldNumber = 16, - kLoadVectorElementFieldNumber = 17, - kStoreVectorElementFieldNumber = 18, - kSwizzleFieldNumber = 19, - kIfFieldNumber = 20, - kSwitchFieldNumber = 21, - kLoopFieldNumber = 22, - kExitIfFieldNumber = 23, - kExitSwitchFieldNumber = 24, - kExitLoopFieldNumber = 25, - kNextIterationFieldNumber = 26, - kContinueFieldNumber = 27, - kBreakIfFieldNumber = 28, - kUnreachableFieldNumber = 29, - }; - // repeated uint32 operands = 1; - int operands_size() const; - private: - int _internal_operands_size() const; - - public: - void clear_operands() ; - ::uint32_t operands(int index) const; - void set_operands(int index, ::uint32_t value); - void add_operands(::uint32_t value); - const ::google::protobuf::RepeatedField<::uint32_t>& operands() const; - ::google::protobuf::RepeatedField<::uint32_t>* PROTOBUF_NONNULL mutable_operands(); - - private: - const ::google::protobuf::RepeatedField<::uint32_t>& _internal_operands() const; - ::google::protobuf::RepeatedField<::uint32_t>* PROTOBUF_NONNULL _internal_mutable_operands(); - - public: - // repeated uint32 results = 2; - int results_size() const; - private: - int _internal_results_size() const; - - public: - void clear_results() ; - ::uint32_t results(int index) const; - void set_results(int index, ::uint32_t value); - void add_results(::uint32_t value); - const ::google::protobuf::RepeatedField<::uint32_t>& results() const; - ::google::protobuf::RepeatedField<::uint32_t>* PROTOBUF_NONNULL mutable_results(); - - private: - const ::google::protobuf::RepeatedField<::uint32_t>& _internal_results() const; - ::google::protobuf::RepeatedField<::uint32_t>* PROTOBUF_NONNULL _internal_mutable_results(); - - public: - // .tint.core.ir.binary.pb.InstructionReturn return = 3; - bool has_return_() const; - private: - bool _internal_has_return_() const; - - public: - void clear_return_() ; - const ::tint::core::ir::binary::pb::InstructionReturn& return_() const; - [[nodiscard]] ::tint::core::ir::binary::pb::InstructionReturn* PROTOBUF_NULLABLE release_return_(); - ::tint::core::ir::binary::pb::InstructionReturn* PROTOBUF_NONNULL mutable_return_(); - void set_allocated_return_(::tint::core::ir::binary::pb::InstructionReturn* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_return_(::tint::core::ir::binary::pb::InstructionReturn* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::InstructionReturn* PROTOBUF_NULLABLE unsafe_arena_release_return_(); - - private: - const ::tint::core::ir::binary::pb::InstructionReturn& _internal_return_() const; - ::tint::core::ir::binary::pb::InstructionReturn* PROTOBUF_NONNULL _internal_mutable_return_(); - - public: - // .tint.core.ir.binary.pb.InstructionUnary unary = 4; - bool has_unary() const; - private: - bool _internal_has_unary() const; - - public: - void clear_unary() ; - const ::tint::core::ir::binary::pb::InstructionUnary& unary() const; - [[nodiscard]] ::tint::core::ir::binary::pb::InstructionUnary* PROTOBUF_NULLABLE release_unary(); - ::tint::core::ir::binary::pb::InstructionUnary* PROTOBUF_NONNULL mutable_unary(); - void set_allocated_unary(::tint::core::ir::binary::pb::InstructionUnary* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_unary(::tint::core::ir::binary::pb::InstructionUnary* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::InstructionUnary* PROTOBUF_NULLABLE unsafe_arena_release_unary(); - - private: - const ::tint::core::ir::binary::pb::InstructionUnary& _internal_unary() const; - ::tint::core::ir::binary::pb::InstructionUnary* PROTOBUF_NONNULL _internal_mutable_unary(); - - public: - // .tint.core.ir.binary.pb.InstructionBinary binary = 5; - bool has_binary() const; - private: - bool _internal_has_binary() const; - - public: - void clear_binary() ; - const ::tint::core::ir::binary::pb::InstructionBinary& binary() const; - [[nodiscard]] ::tint::core::ir::binary::pb::InstructionBinary* PROTOBUF_NULLABLE release_binary(); - ::tint::core::ir::binary::pb::InstructionBinary* PROTOBUF_NONNULL mutable_binary(); - void set_allocated_binary(::tint::core::ir::binary::pb::InstructionBinary* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_binary(::tint::core::ir::binary::pb::InstructionBinary* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::InstructionBinary* PROTOBUF_NULLABLE unsafe_arena_release_binary(); - - private: - const ::tint::core::ir::binary::pb::InstructionBinary& _internal_binary() const; - ::tint::core::ir::binary::pb::InstructionBinary* PROTOBUF_NONNULL _internal_mutable_binary(); - - public: - // .tint.core.ir.binary.pb.InstructionDiscard discard = 6; - bool has_discard() const; - private: - bool _internal_has_discard() const; - - public: - void clear_discard() ; - const ::tint::core::ir::binary::pb::InstructionDiscard& discard() const; - [[nodiscard]] ::tint::core::ir::binary::pb::InstructionDiscard* PROTOBUF_NULLABLE release_discard(); - ::tint::core::ir::binary::pb::InstructionDiscard* PROTOBUF_NONNULL mutable_discard(); - void set_allocated_discard(::tint::core::ir::binary::pb::InstructionDiscard* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_discard(::tint::core::ir::binary::pb::InstructionDiscard* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::InstructionDiscard* PROTOBUF_NULLABLE unsafe_arena_release_discard(); - - private: - const ::tint::core::ir::binary::pb::InstructionDiscard& _internal_discard() const; - ::tint::core::ir::binary::pb::InstructionDiscard* PROTOBUF_NONNULL _internal_mutable_discard(); - - public: - // .tint.core.ir.binary.pb.InstructionLet let = 7; - bool has_let() const; - private: - bool _internal_has_let() const; - - public: - void clear_let() ; - const ::tint::core::ir::binary::pb::InstructionLet& let() const; - [[nodiscard]] ::tint::core::ir::binary::pb::InstructionLet* PROTOBUF_NULLABLE release_let(); - ::tint::core::ir::binary::pb::InstructionLet* PROTOBUF_NONNULL mutable_let(); - void set_allocated_let(::tint::core::ir::binary::pb::InstructionLet* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_let(::tint::core::ir::binary::pb::InstructionLet* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::InstructionLet* PROTOBUF_NULLABLE unsafe_arena_release_let(); - - private: - const ::tint::core::ir::binary::pb::InstructionLet& _internal_let() const; - ::tint::core::ir::binary::pb::InstructionLet* PROTOBUF_NONNULL _internal_mutable_let(); - - public: - // .tint.core.ir.binary.pb.InstructionVar var = 8; - bool has_var() const; - private: - bool _internal_has_var() const; - - public: - void clear_var() ; - const ::tint::core::ir::binary::pb::InstructionVar& var() const; - [[nodiscard]] ::tint::core::ir::binary::pb::InstructionVar* PROTOBUF_NULLABLE release_var(); - ::tint::core::ir::binary::pb::InstructionVar* PROTOBUF_NONNULL mutable_var(); - void set_allocated_var(::tint::core::ir::binary::pb::InstructionVar* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_var(::tint::core::ir::binary::pb::InstructionVar* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::InstructionVar* PROTOBUF_NULLABLE unsafe_arena_release_var(); - - private: - const ::tint::core::ir::binary::pb::InstructionVar& _internal_var() const; - ::tint::core::ir::binary::pb::InstructionVar* PROTOBUF_NONNULL _internal_mutable_var(); - - public: - // .tint.core.ir.binary.pb.InstructionBitcast bitcast = 9; - bool has_bitcast() const; - private: - bool _internal_has_bitcast() const; - - public: - void clear_bitcast() ; - const ::tint::core::ir::binary::pb::InstructionBitcast& bitcast() const; - [[nodiscard]] ::tint::core::ir::binary::pb::InstructionBitcast* PROTOBUF_NULLABLE release_bitcast(); - ::tint::core::ir::binary::pb::InstructionBitcast* PROTOBUF_NONNULL mutable_bitcast(); - void set_allocated_bitcast(::tint::core::ir::binary::pb::InstructionBitcast* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_bitcast(::tint::core::ir::binary::pb::InstructionBitcast* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::InstructionBitcast* PROTOBUF_NULLABLE unsafe_arena_release_bitcast(); - - private: - const ::tint::core::ir::binary::pb::InstructionBitcast& _internal_bitcast() const; - ::tint::core::ir::binary::pb::InstructionBitcast* PROTOBUF_NONNULL _internal_mutable_bitcast(); - - public: - // .tint.core.ir.binary.pb.InstructionConstruct construct = 10; - bool has_construct() const; - private: - bool _internal_has_construct() const; - - public: - void clear_construct() ; - const ::tint::core::ir::binary::pb::InstructionConstruct& construct() const; - [[nodiscard]] ::tint::core::ir::binary::pb::InstructionConstruct* PROTOBUF_NULLABLE release_construct(); - ::tint::core::ir::binary::pb::InstructionConstruct* PROTOBUF_NONNULL mutable_construct(); - void set_allocated_construct(::tint::core::ir::binary::pb::InstructionConstruct* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_construct(::tint::core::ir::binary::pb::InstructionConstruct* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::InstructionConstruct* PROTOBUF_NULLABLE unsafe_arena_release_construct(); - - private: - const ::tint::core::ir::binary::pb::InstructionConstruct& _internal_construct() const; - ::tint::core::ir::binary::pb::InstructionConstruct* PROTOBUF_NONNULL _internal_mutable_construct(); - - public: - // .tint.core.ir.binary.pb.InstructionConvert convert = 11; - bool has_convert() const; - private: - bool _internal_has_convert() const; - - public: - void clear_convert() ; - const ::tint::core::ir::binary::pb::InstructionConvert& convert() const; - [[nodiscard]] ::tint::core::ir::binary::pb::InstructionConvert* PROTOBUF_NULLABLE release_convert(); - ::tint::core::ir::binary::pb::InstructionConvert* PROTOBUF_NONNULL mutable_convert(); - void set_allocated_convert(::tint::core::ir::binary::pb::InstructionConvert* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_convert(::tint::core::ir::binary::pb::InstructionConvert* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::InstructionConvert* PROTOBUF_NULLABLE unsafe_arena_release_convert(); - - private: - const ::tint::core::ir::binary::pb::InstructionConvert& _internal_convert() const; - ::tint::core::ir::binary::pb::InstructionConvert* PROTOBUF_NONNULL _internal_mutable_convert(); - - public: - // .tint.core.ir.binary.pb.InstructionAccess access = 12; - bool has_access() const; - private: - bool _internal_has_access() const; - - public: - void clear_access() ; - const ::tint::core::ir::binary::pb::InstructionAccess& access() const; - [[nodiscard]] ::tint::core::ir::binary::pb::InstructionAccess* PROTOBUF_NULLABLE release_access(); - ::tint::core::ir::binary::pb::InstructionAccess* PROTOBUF_NONNULL mutable_access(); - void set_allocated_access(::tint::core::ir::binary::pb::InstructionAccess* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_access(::tint::core::ir::binary::pb::InstructionAccess* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::InstructionAccess* PROTOBUF_NULLABLE unsafe_arena_release_access(); - - private: - const ::tint::core::ir::binary::pb::InstructionAccess& _internal_access() const; - ::tint::core::ir::binary::pb::InstructionAccess* PROTOBUF_NONNULL _internal_mutable_access(); - - public: - // .tint.core.ir.binary.pb.InstructionUserCall user_call = 13; - bool has_user_call() const; - private: - bool _internal_has_user_call() const; - - public: - void clear_user_call() ; - const ::tint::core::ir::binary::pb::InstructionUserCall& user_call() const; - [[nodiscard]] ::tint::core::ir::binary::pb::InstructionUserCall* PROTOBUF_NULLABLE release_user_call(); - ::tint::core::ir::binary::pb::InstructionUserCall* PROTOBUF_NONNULL mutable_user_call(); - void set_allocated_user_call(::tint::core::ir::binary::pb::InstructionUserCall* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_user_call(::tint::core::ir::binary::pb::InstructionUserCall* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::InstructionUserCall* PROTOBUF_NULLABLE unsafe_arena_release_user_call(); - - private: - const ::tint::core::ir::binary::pb::InstructionUserCall& _internal_user_call() const; - ::tint::core::ir::binary::pb::InstructionUserCall* PROTOBUF_NONNULL _internal_mutable_user_call(); - - public: - // .tint.core.ir.binary.pb.InstructionBuiltinCall builtin_call = 14; - bool has_builtin_call() const; - private: - bool _internal_has_builtin_call() const; - - public: - void clear_builtin_call() ; - const ::tint::core::ir::binary::pb::InstructionBuiltinCall& builtin_call() const; - [[nodiscard]] ::tint::core::ir::binary::pb::InstructionBuiltinCall* PROTOBUF_NULLABLE release_builtin_call(); - ::tint::core::ir::binary::pb::InstructionBuiltinCall* PROTOBUF_NONNULL mutable_builtin_call(); - void set_allocated_builtin_call(::tint::core::ir::binary::pb::InstructionBuiltinCall* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_builtin_call(::tint::core::ir::binary::pb::InstructionBuiltinCall* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::InstructionBuiltinCall* PROTOBUF_NULLABLE unsafe_arena_release_builtin_call(); - - private: - const ::tint::core::ir::binary::pb::InstructionBuiltinCall& _internal_builtin_call() const; - ::tint::core::ir::binary::pb::InstructionBuiltinCall* PROTOBUF_NONNULL _internal_mutable_builtin_call(); - - public: - // .tint.core.ir.binary.pb.InstructionLoad load = 15; - bool has_load() const; - private: - bool _internal_has_load() const; - - public: - void clear_load() ; - const ::tint::core::ir::binary::pb::InstructionLoad& load() const; - [[nodiscard]] ::tint::core::ir::binary::pb::InstructionLoad* PROTOBUF_NULLABLE release_load(); - ::tint::core::ir::binary::pb::InstructionLoad* PROTOBUF_NONNULL mutable_load(); - void set_allocated_load(::tint::core::ir::binary::pb::InstructionLoad* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_load(::tint::core::ir::binary::pb::InstructionLoad* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::InstructionLoad* PROTOBUF_NULLABLE unsafe_arena_release_load(); - - private: - const ::tint::core::ir::binary::pb::InstructionLoad& _internal_load() const; - ::tint::core::ir::binary::pb::InstructionLoad* PROTOBUF_NONNULL _internal_mutable_load(); - - public: - // .tint.core.ir.binary.pb.InstructionStore store = 16; - bool has_store() const; - private: - bool _internal_has_store() const; - - public: - void clear_store() ; - const ::tint::core::ir::binary::pb::InstructionStore& store() const; - [[nodiscard]] ::tint::core::ir::binary::pb::InstructionStore* PROTOBUF_NULLABLE release_store(); - ::tint::core::ir::binary::pb::InstructionStore* PROTOBUF_NONNULL mutable_store(); - void set_allocated_store(::tint::core::ir::binary::pb::InstructionStore* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_store(::tint::core::ir::binary::pb::InstructionStore* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::InstructionStore* PROTOBUF_NULLABLE unsafe_arena_release_store(); - - private: - const ::tint::core::ir::binary::pb::InstructionStore& _internal_store() const; - ::tint::core::ir::binary::pb::InstructionStore* PROTOBUF_NONNULL _internal_mutable_store(); - - public: - // .tint.core.ir.binary.pb.InstructionLoadVectorElement load_vector_element = 17; - bool has_load_vector_element() const; - private: - bool _internal_has_load_vector_element() const; - - public: - void clear_load_vector_element() ; - const ::tint::core::ir::binary::pb::InstructionLoadVectorElement& load_vector_element() const; - [[nodiscard]] ::tint::core::ir::binary::pb::InstructionLoadVectorElement* PROTOBUF_NULLABLE release_load_vector_element(); - ::tint::core::ir::binary::pb::InstructionLoadVectorElement* PROTOBUF_NONNULL mutable_load_vector_element(); - void set_allocated_load_vector_element(::tint::core::ir::binary::pb::InstructionLoadVectorElement* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_load_vector_element(::tint::core::ir::binary::pb::InstructionLoadVectorElement* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::InstructionLoadVectorElement* PROTOBUF_NULLABLE unsafe_arena_release_load_vector_element(); - - private: - const ::tint::core::ir::binary::pb::InstructionLoadVectorElement& _internal_load_vector_element() const; - ::tint::core::ir::binary::pb::InstructionLoadVectorElement* PROTOBUF_NONNULL _internal_mutable_load_vector_element(); - - public: - // .tint.core.ir.binary.pb.InstructionStoreVectorElement store_vector_element = 18; - bool has_store_vector_element() const; - private: - bool _internal_has_store_vector_element() const; - - public: - void clear_store_vector_element() ; - const ::tint::core::ir::binary::pb::InstructionStoreVectorElement& store_vector_element() const; - [[nodiscard]] ::tint::core::ir::binary::pb::InstructionStoreVectorElement* PROTOBUF_NULLABLE release_store_vector_element(); - ::tint::core::ir::binary::pb::InstructionStoreVectorElement* PROTOBUF_NONNULL mutable_store_vector_element(); - void set_allocated_store_vector_element(::tint::core::ir::binary::pb::InstructionStoreVectorElement* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_store_vector_element(::tint::core::ir::binary::pb::InstructionStoreVectorElement* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::InstructionStoreVectorElement* PROTOBUF_NULLABLE unsafe_arena_release_store_vector_element(); - - private: - const ::tint::core::ir::binary::pb::InstructionStoreVectorElement& _internal_store_vector_element() const; - ::tint::core::ir::binary::pb::InstructionStoreVectorElement* PROTOBUF_NONNULL _internal_mutable_store_vector_element(); - - public: - // .tint.core.ir.binary.pb.InstructionSwizzle swizzle = 19; - bool has_swizzle() const; - private: - bool _internal_has_swizzle() const; - - public: - void clear_swizzle() ; - const ::tint::core::ir::binary::pb::InstructionSwizzle& swizzle() const; - [[nodiscard]] ::tint::core::ir::binary::pb::InstructionSwizzle* PROTOBUF_NULLABLE release_swizzle(); - ::tint::core::ir::binary::pb::InstructionSwizzle* PROTOBUF_NONNULL mutable_swizzle(); - void set_allocated_swizzle(::tint::core::ir::binary::pb::InstructionSwizzle* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_swizzle(::tint::core::ir::binary::pb::InstructionSwizzle* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::InstructionSwizzle* PROTOBUF_NULLABLE unsafe_arena_release_swizzle(); - - private: - const ::tint::core::ir::binary::pb::InstructionSwizzle& _internal_swizzle() const; - ::tint::core::ir::binary::pb::InstructionSwizzle* PROTOBUF_NONNULL _internal_mutable_swizzle(); - - public: - // .tint.core.ir.binary.pb.InstructionIf if = 20; - bool has_if_() const; - private: - bool _internal_has_if_() const; - - public: - void clear_if_() ; - const ::tint::core::ir::binary::pb::InstructionIf& if_() const; - [[nodiscard]] ::tint::core::ir::binary::pb::InstructionIf* PROTOBUF_NULLABLE release_if_(); - ::tint::core::ir::binary::pb::InstructionIf* PROTOBUF_NONNULL mutable_if_(); - void set_allocated_if_(::tint::core::ir::binary::pb::InstructionIf* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_if_(::tint::core::ir::binary::pb::InstructionIf* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::InstructionIf* PROTOBUF_NULLABLE unsafe_arena_release_if_(); - - private: - const ::tint::core::ir::binary::pb::InstructionIf& _internal_if_() const; - ::tint::core::ir::binary::pb::InstructionIf* PROTOBUF_NONNULL _internal_mutable_if_(); - - public: - // .tint.core.ir.binary.pb.InstructionSwitch switch = 21; - bool has_switch_() const; - private: - bool _internal_has_switch_() const; - - public: - void clear_switch_() ; - const ::tint::core::ir::binary::pb::InstructionSwitch& switch_() const; - [[nodiscard]] ::tint::core::ir::binary::pb::InstructionSwitch* PROTOBUF_NULLABLE release_switch_(); - ::tint::core::ir::binary::pb::InstructionSwitch* PROTOBUF_NONNULL mutable_switch_(); - void set_allocated_switch_(::tint::core::ir::binary::pb::InstructionSwitch* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_switch_(::tint::core::ir::binary::pb::InstructionSwitch* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::InstructionSwitch* PROTOBUF_NULLABLE unsafe_arena_release_switch_(); - - private: - const ::tint::core::ir::binary::pb::InstructionSwitch& _internal_switch_() const; - ::tint::core::ir::binary::pb::InstructionSwitch* PROTOBUF_NONNULL _internal_mutable_switch_(); - - public: - // .tint.core.ir.binary.pb.InstructionLoop loop = 22; - bool has_loop() const; - private: - bool _internal_has_loop() const; - - public: - void clear_loop() ; - const ::tint::core::ir::binary::pb::InstructionLoop& loop() const; - [[nodiscard]] ::tint::core::ir::binary::pb::InstructionLoop* PROTOBUF_NULLABLE release_loop(); - ::tint::core::ir::binary::pb::InstructionLoop* PROTOBUF_NONNULL mutable_loop(); - void set_allocated_loop(::tint::core::ir::binary::pb::InstructionLoop* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_loop(::tint::core::ir::binary::pb::InstructionLoop* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::InstructionLoop* PROTOBUF_NULLABLE unsafe_arena_release_loop(); - - private: - const ::tint::core::ir::binary::pb::InstructionLoop& _internal_loop() const; - ::tint::core::ir::binary::pb::InstructionLoop* PROTOBUF_NONNULL _internal_mutable_loop(); - - public: - // .tint.core.ir.binary.pb.InstructionExitIf exit_if = 23; - bool has_exit_if() const; - private: - bool _internal_has_exit_if() const; - - public: - void clear_exit_if() ; - const ::tint::core::ir::binary::pb::InstructionExitIf& exit_if() const; - [[nodiscard]] ::tint::core::ir::binary::pb::InstructionExitIf* PROTOBUF_NULLABLE release_exit_if(); - ::tint::core::ir::binary::pb::InstructionExitIf* PROTOBUF_NONNULL mutable_exit_if(); - void set_allocated_exit_if(::tint::core::ir::binary::pb::InstructionExitIf* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_exit_if(::tint::core::ir::binary::pb::InstructionExitIf* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::InstructionExitIf* PROTOBUF_NULLABLE unsafe_arena_release_exit_if(); - - private: - const ::tint::core::ir::binary::pb::InstructionExitIf& _internal_exit_if() const; - ::tint::core::ir::binary::pb::InstructionExitIf* PROTOBUF_NONNULL _internal_mutable_exit_if(); - - public: - // .tint.core.ir.binary.pb.InstructionExitSwitch exit_switch = 24; - bool has_exit_switch() const; - private: - bool _internal_has_exit_switch() const; - - public: - void clear_exit_switch() ; - const ::tint::core::ir::binary::pb::InstructionExitSwitch& exit_switch() const; - [[nodiscard]] ::tint::core::ir::binary::pb::InstructionExitSwitch* PROTOBUF_NULLABLE release_exit_switch(); - ::tint::core::ir::binary::pb::InstructionExitSwitch* PROTOBUF_NONNULL mutable_exit_switch(); - void set_allocated_exit_switch(::tint::core::ir::binary::pb::InstructionExitSwitch* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_exit_switch(::tint::core::ir::binary::pb::InstructionExitSwitch* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::InstructionExitSwitch* PROTOBUF_NULLABLE unsafe_arena_release_exit_switch(); - - private: - const ::tint::core::ir::binary::pb::InstructionExitSwitch& _internal_exit_switch() const; - ::tint::core::ir::binary::pb::InstructionExitSwitch* PROTOBUF_NONNULL _internal_mutable_exit_switch(); - - public: - // .tint.core.ir.binary.pb.InstructionExitLoop exit_loop = 25; - bool has_exit_loop() const; - private: - bool _internal_has_exit_loop() const; - - public: - void clear_exit_loop() ; - const ::tint::core::ir::binary::pb::InstructionExitLoop& exit_loop() const; - [[nodiscard]] ::tint::core::ir::binary::pb::InstructionExitLoop* PROTOBUF_NULLABLE release_exit_loop(); - ::tint::core::ir::binary::pb::InstructionExitLoop* PROTOBUF_NONNULL mutable_exit_loop(); - void set_allocated_exit_loop(::tint::core::ir::binary::pb::InstructionExitLoop* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_exit_loop(::tint::core::ir::binary::pb::InstructionExitLoop* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::InstructionExitLoop* PROTOBUF_NULLABLE unsafe_arena_release_exit_loop(); - - private: - const ::tint::core::ir::binary::pb::InstructionExitLoop& _internal_exit_loop() const; - ::tint::core::ir::binary::pb::InstructionExitLoop* PROTOBUF_NONNULL _internal_mutable_exit_loop(); - - public: - // .tint.core.ir.binary.pb.InstructionNextIteration next_iteration = 26; - bool has_next_iteration() const; - private: - bool _internal_has_next_iteration() const; - - public: - void clear_next_iteration() ; - const ::tint::core::ir::binary::pb::InstructionNextIteration& next_iteration() const; - [[nodiscard]] ::tint::core::ir::binary::pb::InstructionNextIteration* PROTOBUF_NULLABLE release_next_iteration(); - ::tint::core::ir::binary::pb::InstructionNextIteration* PROTOBUF_NONNULL mutable_next_iteration(); - void set_allocated_next_iteration(::tint::core::ir::binary::pb::InstructionNextIteration* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_next_iteration(::tint::core::ir::binary::pb::InstructionNextIteration* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::InstructionNextIteration* PROTOBUF_NULLABLE unsafe_arena_release_next_iteration(); - - private: - const ::tint::core::ir::binary::pb::InstructionNextIteration& _internal_next_iteration() const; - ::tint::core::ir::binary::pb::InstructionNextIteration* PROTOBUF_NONNULL _internal_mutable_next_iteration(); - - public: - // .tint.core.ir.binary.pb.InstructionContinue continue = 27; - bool has_continue_() const; - private: - bool _internal_has_continue_() const; - - public: - void clear_continue_() ; - const ::tint::core::ir::binary::pb::InstructionContinue& continue_() const; - [[nodiscard]] ::tint::core::ir::binary::pb::InstructionContinue* PROTOBUF_NULLABLE release_continue_(); - ::tint::core::ir::binary::pb::InstructionContinue* PROTOBUF_NONNULL mutable_continue_(); - void set_allocated_continue_(::tint::core::ir::binary::pb::InstructionContinue* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_continue_(::tint::core::ir::binary::pb::InstructionContinue* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::InstructionContinue* PROTOBUF_NULLABLE unsafe_arena_release_continue_(); - - private: - const ::tint::core::ir::binary::pb::InstructionContinue& _internal_continue_() const; - ::tint::core::ir::binary::pb::InstructionContinue* PROTOBUF_NONNULL _internal_mutable_continue_(); - - public: - // .tint.core.ir.binary.pb.InstructionBreakIf break_if = 28; - bool has_break_if() const; - private: - bool _internal_has_break_if() const; - - public: - void clear_break_if() ; - const ::tint::core::ir::binary::pb::InstructionBreakIf& break_if() const; - [[nodiscard]] ::tint::core::ir::binary::pb::InstructionBreakIf* PROTOBUF_NULLABLE release_break_if(); - ::tint::core::ir::binary::pb::InstructionBreakIf* PROTOBUF_NONNULL mutable_break_if(); - void set_allocated_break_if(::tint::core::ir::binary::pb::InstructionBreakIf* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_break_if(::tint::core::ir::binary::pb::InstructionBreakIf* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::InstructionBreakIf* PROTOBUF_NULLABLE unsafe_arena_release_break_if(); - - private: - const ::tint::core::ir::binary::pb::InstructionBreakIf& _internal_break_if() const; - ::tint::core::ir::binary::pb::InstructionBreakIf* PROTOBUF_NONNULL _internal_mutable_break_if(); - - public: - // .tint.core.ir.binary.pb.InstructionUnreachable unreachable = 29; - bool has_unreachable() const; - private: - bool _internal_has_unreachable() const; - - public: - void clear_unreachable() ; - const ::tint::core::ir::binary::pb::InstructionUnreachable& unreachable() const; - [[nodiscard]] ::tint::core::ir::binary::pb::InstructionUnreachable* PROTOBUF_NULLABLE release_unreachable(); - ::tint::core::ir::binary::pb::InstructionUnreachable* PROTOBUF_NONNULL mutable_unreachable(); - void set_allocated_unreachable(::tint::core::ir::binary::pb::InstructionUnreachable* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_unreachable(::tint::core::ir::binary::pb::InstructionUnreachable* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::InstructionUnreachable* PROTOBUF_NULLABLE unsafe_arena_release_unreachable(); - - private: - const ::tint::core::ir::binary::pb::InstructionUnreachable& _internal_unreachable() const; - ::tint::core::ir::binary::pb::InstructionUnreachable* PROTOBUF_NONNULL _internal_mutable_unreachable(); - - public: - void clear_kind(); - KindCase kind_case() const; - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.Instruction) - private: - class _Internal; - void set_has_return_(); - void set_has_unary(); - void set_has_binary(); - void set_has_discard(); - void set_has_let(); - void set_has_var(); - void set_has_bitcast(); - void set_has_construct(); - void set_has_convert(); - void set_has_access(); - void set_has_user_call(); - void set_has_builtin_call(); - void set_has_load(); - void set_has_store(); - void set_has_load_vector_element(); - void set_has_store_vector_element(); - void set_has_swizzle(); - void set_has_if_(); - void set_has_switch_(); - void set_has_loop(); - void set_has_exit_if(); - void set_has_exit_switch(); - void set_has_exit_loop(); - void set_has_next_iteration(); - void set_has_continue_(); - void set_has_break_if(); - void set_has_unreachable(); - inline bool has_kind() const; - inline void clear_has_kind(); - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<1, 29, - 27, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const Instruction& from_msg); - ::google::protobuf::RepeatedField<::uint32_t> operands_; - ::google::protobuf::internal::CachedSize _operands_cached_byte_size_; - ::google::protobuf::RepeatedField<::uint32_t> results_; - ::google::protobuf::internal::CachedSize _results_cached_byte_size_; - union KindUnion { - constexpr KindUnion() : _constinit_{} {} - ::google::protobuf::internal::ConstantInitialized _constinit_; - ::google::protobuf::Message* PROTOBUF_NULLABLE return__; - ::google::protobuf::Message* PROTOBUF_NULLABLE unary_; - ::google::protobuf::Message* PROTOBUF_NULLABLE binary_; - ::google::protobuf::Message* PROTOBUF_NULLABLE discard_; - ::google::protobuf::Message* PROTOBUF_NULLABLE let_; - ::google::protobuf::Message* PROTOBUF_NULLABLE var_; - ::google::protobuf::Message* PROTOBUF_NULLABLE bitcast_; - ::google::protobuf::Message* PROTOBUF_NULLABLE construct_; - ::google::protobuf::Message* PROTOBUF_NULLABLE convert_; - ::google::protobuf::Message* PROTOBUF_NULLABLE access_; - ::google::protobuf::Message* PROTOBUF_NULLABLE user_call_; - ::google::protobuf::Message* PROTOBUF_NULLABLE builtin_call_; - ::google::protobuf::Message* PROTOBUF_NULLABLE load_; - ::google::protobuf::Message* PROTOBUF_NULLABLE store_; - ::google::protobuf::Message* PROTOBUF_NULLABLE load_vector_element_; - ::google::protobuf::Message* PROTOBUF_NULLABLE store_vector_element_; - ::google::protobuf::Message* PROTOBUF_NULLABLE swizzle_; - ::google::protobuf::Message* PROTOBUF_NULLABLE if__; - ::google::protobuf::Message* PROTOBUF_NULLABLE switch__; - ::google::protobuf::Message* PROTOBUF_NULLABLE loop_; - ::google::protobuf::Message* PROTOBUF_NULLABLE exit_if_; - ::google::protobuf::Message* PROTOBUF_NULLABLE exit_switch_; - ::google::protobuf::Message* PROTOBUF_NULLABLE exit_loop_; - ::google::protobuf::Message* PROTOBUF_NULLABLE next_iteration_; - ::google::protobuf::Message* PROTOBUF_NULLABLE continue__; - ::google::protobuf::Message* PROTOBUF_NULLABLE break_if_; - ::google::protobuf::Message* PROTOBUF_NULLABLE unreachable_; - } kind_; - ::google::protobuf::internal::CachedSize _cached_size_; - ::uint32_t _oneof_case_[1]; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull Instruction_class_data_; -// ------------------------------------------------------------------- - -class FunctionParameter final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.FunctionParameter) */ { - public: - inline FunctionParameter() : FunctionParameter(nullptr) {} - ~FunctionParameter() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(FunctionParameter* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(FunctionParameter)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR FunctionParameter(::google::protobuf::internal::ConstantInitialized); - - inline FunctionParameter(const FunctionParameter& from) : FunctionParameter(nullptr, from) {} - inline FunctionParameter(FunctionParameter&& from) noexcept - : FunctionParameter(nullptr, ::std::move(from)) {} - inline FunctionParameter& operator=(const FunctionParameter& from) { - CopyFrom(from); - return *this; - } - inline FunctionParameter& operator=(FunctionParameter&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const FunctionParameter& default_instance() { - return *reinterpret_cast( - &_FunctionParameter_default_instance_); - } - static constexpr int kIndexInFileMessages = 24; - friend void swap(FunctionParameter& a, FunctionParameter& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(FunctionParameter* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(FunctionParameter* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - FunctionParameter* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const FunctionParameter& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const FunctionParameter& from) { FunctionParameter::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(FunctionParameter* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.FunctionParameter"; } - - protected: - explicit FunctionParameter(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - FunctionParameter(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const FunctionParameter& from); - FunctionParameter( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, FunctionParameter&& from) noexcept - : FunctionParameter(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kNameFieldNumber = 2, - kAttributesFieldNumber = 3, - kTypeFieldNumber = 1, - }; - // optional string name = 2; - bool has_name() const; - void clear_name() ; - const ::std::string& name() const; - template - void set_name(Arg_&& arg, Args_... args); - ::std::string* PROTOBUF_NONNULL mutable_name(); - [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_name(); - void set_allocated_name(::std::string* PROTOBUF_NULLABLE value); - - private: - const ::std::string& _internal_name() const; - PROTOBUF_ALWAYS_INLINE void _internal_set_name(const ::std::string& value); - ::std::string* PROTOBUF_NONNULL _internal_mutable_name(); - - public: - // optional .tint.core.ir.binary.pb.AttributesFunctionParameter attributes = 3; - bool has_attributes() const; - void clear_attributes() ; - const ::tint::core::ir::binary::pb::AttributesFunctionParameter& attributes() const; - [[nodiscard]] ::tint::core::ir::binary::pb::AttributesFunctionParameter* PROTOBUF_NULLABLE release_attributes(); - ::tint::core::ir::binary::pb::AttributesFunctionParameter* PROTOBUF_NONNULL mutable_attributes(); - void set_allocated_attributes(::tint::core::ir::binary::pb::AttributesFunctionParameter* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_attributes(::tint::core::ir::binary::pb::AttributesFunctionParameter* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::AttributesFunctionParameter* PROTOBUF_NULLABLE unsafe_arena_release_attributes(); - - private: - const ::tint::core::ir::binary::pb::AttributesFunctionParameter& _internal_attributes() const; - ::tint::core::ir::binary::pb::AttributesFunctionParameter* PROTOBUF_NONNULL _internal_mutable_attributes(); - - public: - // uint32 type = 1; - void clear_type() ; - ::uint32_t type() const; - void set_type(::uint32_t value); - - private: - ::uint32_t _internal_type() const; - void _internal_set_type(::uint32_t value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.FunctionParameter) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<2, 3, - 1, 53, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const FunctionParameter& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::internal::ArenaStringPtr name_; - ::tint::core::ir::binary::pb::AttributesFunctionParameter* PROTOBUF_NULLABLE attributes_; - ::uint32_t type_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull FunctionParameter_class_data_; -// ------------------------------------------------------------------- - -class Value final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.Value) */ { - public: - inline Value() : Value(nullptr) {} - ~Value() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(Value* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(Value)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR Value(::google::protobuf::internal::ConstantInitialized); - - inline Value(const Value& from) : Value(nullptr, from) {} - inline Value(Value&& from) noexcept - : Value(nullptr, ::std::move(from)) {} - inline Value& operator=(const Value& from) { - CopyFrom(from); - return *this; - } - inline Value& operator=(Value&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const Value& default_instance() { - return *reinterpret_cast( - &_Value_default_instance_); - } - enum KindCase { - kFunction = 1, - kInstructionResult = 2, - kFunctionParameter = 3, - kBlockParameter = 4, - kConstant = 5, - KIND_NOT_SET = 0, - }; - static constexpr int kIndexInFileMessages = 22; - friend void swap(Value& a, Value& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(Value* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(Value* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - Value* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const Value& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const Value& from) { Value::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(Value* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.Value"; } - - protected: - explicit Value(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - Value(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Value& from); - Value( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, Value&& from) noexcept - : Value(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kFunctionFieldNumber = 1, - kInstructionResultFieldNumber = 2, - kFunctionParameterFieldNumber = 3, - kBlockParameterFieldNumber = 4, - kConstantFieldNumber = 5, - }; - // uint32 function = 1; - bool has_function() const; - void clear_function() ; - ::uint32_t function() const; - void set_function(::uint32_t value); - - private: - ::uint32_t _internal_function() const; - void _internal_set_function(::uint32_t value); - - public: - // .tint.core.ir.binary.pb.InstructionResult instruction_result = 2; - bool has_instruction_result() const; - private: - bool _internal_has_instruction_result() const; - - public: - void clear_instruction_result() ; - const ::tint::core::ir::binary::pb::InstructionResult& instruction_result() const; - [[nodiscard]] ::tint::core::ir::binary::pb::InstructionResult* PROTOBUF_NULLABLE release_instruction_result(); - ::tint::core::ir::binary::pb::InstructionResult* PROTOBUF_NONNULL mutable_instruction_result(); - void set_allocated_instruction_result(::tint::core::ir::binary::pb::InstructionResult* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_instruction_result(::tint::core::ir::binary::pb::InstructionResult* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::InstructionResult* PROTOBUF_NULLABLE unsafe_arena_release_instruction_result(); - - private: - const ::tint::core::ir::binary::pb::InstructionResult& _internal_instruction_result() const; - ::tint::core::ir::binary::pb::InstructionResult* PROTOBUF_NONNULL _internal_mutable_instruction_result(); - - public: - // .tint.core.ir.binary.pb.FunctionParameter function_parameter = 3; - bool has_function_parameter() const; - private: - bool _internal_has_function_parameter() const; - - public: - void clear_function_parameter() ; - const ::tint::core::ir::binary::pb::FunctionParameter& function_parameter() const; - [[nodiscard]] ::tint::core::ir::binary::pb::FunctionParameter* PROTOBUF_NULLABLE release_function_parameter(); - ::tint::core::ir::binary::pb::FunctionParameter* PROTOBUF_NONNULL mutable_function_parameter(); - void set_allocated_function_parameter(::tint::core::ir::binary::pb::FunctionParameter* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_function_parameter(::tint::core::ir::binary::pb::FunctionParameter* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::FunctionParameter* PROTOBUF_NULLABLE unsafe_arena_release_function_parameter(); - - private: - const ::tint::core::ir::binary::pb::FunctionParameter& _internal_function_parameter() const; - ::tint::core::ir::binary::pb::FunctionParameter* PROTOBUF_NONNULL _internal_mutable_function_parameter(); - - public: - // .tint.core.ir.binary.pb.BlockParameter block_parameter = 4; - bool has_block_parameter() const; - private: - bool _internal_has_block_parameter() const; - - public: - void clear_block_parameter() ; - const ::tint::core::ir::binary::pb::BlockParameter& block_parameter() const; - [[nodiscard]] ::tint::core::ir::binary::pb::BlockParameter* PROTOBUF_NULLABLE release_block_parameter(); - ::tint::core::ir::binary::pb::BlockParameter* PROTOBUF_NONNULL mutable_block_parameter(); - void set_allocated_block_parameter(::tint::core::ir::binary::pb::BlockParameter* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_block_parameter(::tint::core::ir::binary::pb::BlockParameter* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::BlockParameter* PROTOBUF_NULLABLE unsafe_arena_release_block_parameter(); - - private: - const ::tint::core::ir::binary::pb::BlockParameter& _internal_block_parameter() const; - ::tint::core::ir::binary::pb::BlockParameter* PROTOBUF_NONNULL _internal_mutable_block_parameter(); - - public: - // uint32 constant = 5; - bool has_constant() const; - void clear_constant() ; - ::uint32_t constant() const; - void set_constant(::uint32_t value); - - private: - ::uint32_t _internal_constant() const; - void _internal_set_constant(::uint32_t value); - - public: - void clear_kind(); - KindCase kind_case() const; - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.Value) - private: - class _Internal; - void set_has_function(); - void set_has_instruction_result(); - void set_has_function_parameter(); - void set_has_block_parameter(); - void set_has_constant(); - inline bool has_kind() const; - inline void clear_has_kind(); - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 5, - 3, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const Value& from_msg); - union KindUnion { - constexpr KindUnion() : _constinit_{} {} - ::google::protobuf::internal::ConstantInitialized _constinit_; - ::uint32_t function_; - ::google::protobuf::Message* PROTOBUF_NULLABLE instruction_result_; - ::google::protobuf::Message* PROTOBUF_NULLABLE function_parameter_; - ::google::protobuf::Message* PROTOBUF_NULLABLE block_parameter_; - ::uint32_t constant_; - } kind_; - ::google::protobuf::internal::CachedSize _cached_size_; - ::uint32_t _oneof_case_[1]; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull Value_class_data_; -// ------------------------------------------------------------------- - -class TypeStruct final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.TypeStruct) */ { - public: - inline TypeStruct() : TypeStruct(nullptr) {} - ~TypeStruct() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(TypeStruct* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(TypeStruct)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR TypeStruct(::google::protobuf::internal::ConstantInitialized); - - inline TypeStruct(const TypeStruct& from) : TypeStruct(nullptr, from) {} - inline TypeStruct(TypeStruct&& from) noexcept - : TypeStruct(nullptr, ::std::move(from)) {} - inline TypeStruct& operator=(const TypeStruct& from) { - CopyFrom(from); - return *this; - } - inline TypeStruct& operator=(TypeStruct&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const TypeStruct& default_instance() { - return *reinterpret_cast( - &_TypeStruct_default_instance_); - } - static constexpr int kIndexInFileMessages = 7; - friend void swap(TypeStruct& a, TypeStruct& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(TypeStruct* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(TypeStruct* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - TypeStruct* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const TypeStruct& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const TypeStruct& from) { TypeStruct::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(TypeStruct* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.TypeStruct"; } - - protected: - explicit TypeStruct(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - TypeStruct(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const TypeStruct& from); - TypeStruct( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, TypeStruct&& from) noexcept - : TypeStruct(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kMemberFieldNumber = 2, - kNameFieldNumber = 1, - }; - // repeated .tint.core.ir.binary.pb.TypeStructMember member = 2; - int member_size() const; - private: - int _internal_member_size() const; - - public: - void clear_member() ; - ::tint::core::ir::binary::pb::TypeStructMember* PROTOBUF_NONNULL mutable_member(int index); - ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::TypeStructMember>* PROTOBUF_NONNULL mutable_member(); - - private: - const ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::TypeStructMember>& _internal_member() const; - ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::TypeStructMember>* PROTOBUF_NONNULL _internal_mutable_member(); - public: - const ::tint::core::ir::binary::pb::TypeStructMember& member(int index) const; - ::tint::core::ir::binary::pb::TypeStructMember* PROTOBUF_NONNULL add_member(); - const ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::TypeStructMember>& member() const; - // string name = 1; - void clear_name() ; - const ::std::string& name() const; - template - void set_name(Arg_&& arg, Args_... args); - ::std::string* PROTOBUF_NONNULL mutable_name(); - [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_name(); - void set_allocated_name(::std::string* PROTOBUF_NULLABLE value); - - private: - const ::std::string& _internal_name() const; - PROTOBUF_ALWAYS_INLINE void _internal_set_name(const ::std::string& value); - ::std::string* PROTOBUF_NONNULL _internal_mutable_name(); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.TypeStruct) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<1, 2, - 1, 46, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const TypeStruct& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::RepeatedPtrField< ::tint::core::ir::binary::pb::TypeStructMember > member_; - ::google::protobuf::internal::ArenaStringPtr name_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull TypeStruct_class_data_; -// ------------------------------------------------------------------- - -class Block final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.Block) */ { - public: - inline Block() : Block(nullptr) {} - ~Block() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(Block* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(Block)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR Block(::google::protobuf::internal::ConstantInitialized); - - inline Block(const Block& from) : Block(nullptr, from) {} - inline Block(Block&& from) noexcept - : Block(nullptr, ::std::move(from)) {} - inline Block& operator=(const Block& from) { - CopyFrom(from); - return *this; - } - inline Block& operator=(Block&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const Block& default_instance() { - return *reinterpret_cast( - &_Block_default_instance_); - } - static constexpr int kIndexInFileMessages = 32; - friend void swap(Block& a, Block& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(Block* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(Block* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - Block* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const Block& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const Block& from) { Block::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(Block* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.Block"; } - - protected: - explicit Block(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - Block(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Block& from); - Block( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, Block&& from) noexcept - : Block(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kParametersFieldNumber = 1, - kInstructionsFieldNumber = 2, - kIsMultiInFieldNumber = 3, - }; - // repeated uint32 parameters = 1; - int parameters_size() const; - private: - int _internal_parameters_size() const; - - public: - void clear_parameters() ; - ::uint32_t parameters(int index) const; - void set_parameters(int index, ::uint32_t value); - void add_parameters(::uint32_t value); - const ::google::protobuf::RepeatedField<::uint32_t>& parameters() const; - ::google::protobuf::RepeatedField<::uint32_t>* PROTOBUF_NONNULL mutable_parameters(); - - private: - const ::google::protobuf::RepeatedField<::uint32_t>& _internal_parameters() const; - ::google::protobuf::RepeatedField<::uint32_t>* PROTOBUF_NONNULL _internal_mutable_parameters(); - - public: - // repeated .tint.core.ir.binary.pb.Instruction instructions = 2; - int instructions_size() const; - private: - int _internal_instructions_size() const; - - public: - void clear_instructions() ; - ::tint::core::ir::binary::pb::Instruction* PROTOBUF_NONNULL mutable_instructions(int index); - ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Instruction>* PROTOBUF_NONNULL mutable_instructions(); - - private: - const ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Instruction>& _internal_instructions() const; - ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Instruction>* PROTOBUF_NONNULL _internal_mutable_instructions(); - public: - const ::tint::core::ir::binary::pb::Instruction& instructions(int index) const; - ::tint::core::ir::binary::pb::Instruction* PROTOBUF_NONNULL add_instructions(); - const ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Instruction>& instructions() const; - // bool is_multi_in = 3; - void clear_is_multi_in() ; - bool is_multi_in() const; - void set_is_multi_in(bool value); - - private: - bool _internal_is_multi_in() const; - void _internal_set_is_multi_in(bool value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.Block) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<2, 3, - 1, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const Block& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::RepeatedField<::uint32_t> parameters_; - ::google::protobuf::internal::CachedSize _parameters_cached_byte_size_; - ::google::protobuf::RepeatedPtrField< ::tint::core::ir::binary::pb::Instruction > instructions_; - bool is_multi_in_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull Block_class_data_; -// ------------------------------------------------------------------- - -class Type final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.Type) */ { - public: - inline Type() : Type(nullptr) {} - ~Type() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(Type* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(Type)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR Type(::google::protobuf::internal::ConstantInitialized); - - inline Type(const Type& from) : Type(nullptr, from) {} - inline Type(Type&& from) noexcept - : Type(nullptr, ::std::move(from)) {} - inline Type& operator=(const Type& from) { - CopyFrom(from); - return *this; - } - inline Type& operator=(Type&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const Type& default_instance() { - return *reinterpret_cast( - &_Type_default_instance_); - } - enum KindCase { - kBasic = 1, - kVector = 2, - kMatrix = 3, - kArray = 4, - kPointer = 5, - kStruct = 6, - kAtomic = 7, - kDepthTexture = 8, - kSampledTexture = 9, - kMultisampledTexture = 10, - kDepthMultisampledTexture = 11, - kStorageTexture = 12, - kExternalTexture = 13, - kSampler = 14, - kInputAttachment = 15, - kSubgroupMatrixLeft = 16, - kSubgroupMatrixRight = 17, - kSubgroupMatrixResult = 18, - kBuiltinStruct = 19, - kBindingArray = 20, - kTexelBuffer = 21, - kBuffer = 23, - KIND_NOT_SET = 0, - }; - static constexpr int kIndexInFileMessages = 1; - friend void swap(Type& a, Type& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(Type* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(Type* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - Type* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const Type& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const Type& from) { Type::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(Type* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.Type"; } - - protected: - explicit Type(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - Type(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Type& from); - Type( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, Type&& from) noexcept - : Type(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kBasicFieldNumber = 1, - kVectorFieldNumber = 2, - kMatrixFieldNumber = 3, - kArrayFieldNumber = 4, - kPointerFieldNumber = 5, - kStructFieldNumber = 6, - kAtomicFieldNumber = 7, - kDepthTextureFieldNumber = 8, - kSampledTextureFieldNumber = 9, - kMultisampledTextureFieldNumber = 10, - kDepthMultisampledTextureFieldNumber = 11, - kStorageTextureFieldNumber = 12, - kExternalTextureFieldNumber = 13, - kSamplerFieldNumber = 14, - kInputAttachmentFieldNumber = 15, - kSubgroupMatrixLeftFieldNumber = 16, - kSubgroupMatrixRightFieldNumber = 17, - kSubgroupMatrixResultFieldNumber = 18, - kBuiltinStructFieldNumber = 19, - kBindingArrayFieldNumber = 20, - kTexelBufferFieldNumber = 21, - kBufferFieldNumber = 23, - }; - // .tint.core.ir.binary.pb.TypeBasic basic = 1; - bool has_basic() const; - void clear_basic() ; - ::tint::core::ir::binary::pb::TypeBasic basic() const; - void set_basic(::tint::core::ir::binary::pb::TypeBasic value); - - private: - ::tint::core::ir::binary::pb::TypeBasic _internal_basic() const; - void _internal_set_basic(::tint::core::ir::binary::pb::TypeBasic value); - - public: - // .tint.core.ir.binary.pb.TypeVector vector = 2; - bool has_vector() const; - private: - bool _internal_has_vector() const; - - public: - void clear_vector() ; - const ::tint::core::ir::binary::pb::TypeVector& vector() const; - [[nodiscard]] ::tint::core::ir::binary::pb::TypeVector* PROTOBUF_NULLABLE release_vector(); - ::tint::core::ir::binary::pb::TypeVector* PROTOBUF_NONNULL mutable_vector(); - void set_allocated_vector(::tint::core::ir::binary::pb::TypeVector* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_vector(::tint::core::ir::binary::pb::TypeVector* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::TypeVector* PROTOBUF_NULLABLE unsafe_arena_release_vector(); - - private: - const ::tint::core::ir::binary::pb::TypeVector& _internal_vector() const; - ::tint::core::ir::binary::pb::TypeVector* PROTOBUF_NONNULL _internal_mutable_vector(); - - public: - // .tint.core.ir.binary.pb.TypeMatrix matrix = 3; - bool has_matrix() const; - private: - bool _internal_has_matrix() const; - - public: - void clear_matrix() ; - const ::tint::core::ir::binary::pb::TypeMatrix& matrix() const; - [[nodiscard]] ::tint::core::ir::binary::pb::TypeMatrix* PROTOBUF_NULLABLE release_matrix(); - ::tint::core::ir::binary::pb::TypeMatrix* PROTOBUF_NONNULL mutable_matrix(); - void set_allocated_matrix(::tint::core::ir::binary::pb::TypeMatrix* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_matrix(::tint::core::ir::binary::pb::TypeMatrix* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::TypeMatrix* PROTOBUF_NULLABLE unsafe_arena_release_matrix(); - - private: - const ::tint::core::ir::binary::pb::TypeMatrix& _internal_matrix() const; - ::tint::core::ir::binary::pb::TypeMatrix* PROTOBUF_NONNULL _internal_mutable_matrix(); - - public: - // .tint.core.ir.binary.pb.TypeArray array = 4; - bool has_array() const; - private: - bool _internal_has_array() const; - - public: - void clear_array() ; - const ::tint::core::ir::binary::pb::TypeArray& array() const; - [[nodiscard]] ::tint::core::ir::binary::pb::TypeArray* PROTOBUF_NULLABLE release_array(); - ::tint::core::ir::binary::pb::TypeArray* PROTOBUF_NONNULL mutable_array(); - void set_allocated_array(::tint::core::ir::binary::pb::TypeArray* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_array(::tint::core::ir::binary::pb::TypeArray* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::TypeArray* PROTOBUF_NULLABLE unsafe_arena_release_array(); - - private: - const ::tint::core::ir::binary::pb::TypeArray& _internal_array() const; - ::tint::core::ir::binary::pb::TypeArray* PROTOBUF_NONNULL _internal_mutable_array(); - - public: - // .tint.core.ir.binary.pb.TypePointer pointer = 5; - bool has_pointer() const; - private: - bool _internal_has_pointer() const; - - public: - void clear_pointer() ; - const ::tint::core::ir::binary::pb::TypePointer& pointer() const; - [[nodiscard]] ::tint::core::ir::binary::pb::TypePointer* PROTOBUF_NULLABLE release_pointer(); - ::tint::core::ir::binary::pb::TypePointer* PROTOBUF_NONNULL mutable_pointer(); - void set_allocated_pointer(::tint::core::ir::binary::pb::TypePointer* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_pointer(::tint::core::ir::binary::pb::TypePointer* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::TypePointer* PROTOBUF_NULLABLE unsafe_arena_release_pointer(); - - private: - const ::tint::core::ir::binary::pb::TypePointer& _internal_pointer() const; - ::tint::core::ir::binary::pb::TypePointer* PROTOBUF_NONNULL _internal_mutable_pointer(); - - public: - // .tint.core.ir.binary.pb.TypeStruct struct = 6; - bool has_struct_() const; - private: - bool _internal_has_struct_() const; - - public: - void clear_struct_() ; - const ::tint::core::ir::binary::pb::TypeStruct& struct_() const; - [[nodiscard]] ::tint::core::ir::binary::pb::TypeStruct* PROTOBUF_NULLABLE release_struct_(); - ::tint::core::ir::binary::pb::TypeStruct* PROTOBUF_NONNULL mutable_struct_(); - void set_allocated_struct_(::tint::core::ir::binary::pb::TypeStruct* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_struct_(::tint::core::ir::binary::pb::TypeStruct* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::TypeStruct* PROTOBUF_NULLABLE unsafe_arena_release_struct_(); - - private: - const ::tint::core::ir::binary::pb::TypeStruct& _internal_struct_() const; - ::tint::core::ir::binary::pb::TypeStruct* PROTOBUF_NONNULL _internal_mutable_struct_(); - - public: - // .tint.core.ir.binary.pb.TypeAtomic atomic = 7; - bool has_atomic() const; - private: - bool _internal_has_atomic() const; - - public: - void clear_atomic() ; - const ::tint::core::ir::binary::pb::TypeAtomic& atomic() const; - [[nodiscard]] ::tint::core::ir::binary::pb::TypeAtomic* PROTOBUF_NULLABLE release_atomic(); - ::tint::core::ir::binary::pb::TypeAtomic* PROTOBUF_NONNULL mutable_atomic(); - void set_allocated_atomic(::tint::core::ir::binary::pb::TypeAtomic* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_atomic(::tint::core::ir::binary::pb::TypeAtomic* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::TypeAtomic* PROTOBUF_NULLABLE unsafe_arena_release_atomic(); - - private: - const ::tint::core::ir::binary::pb::TypeAtomic& _internal_atomic() const; - ::tint::core::ir::binary::pb::TypeAtomic* PROTOBUF_NONNULL _internal_mutable_atomic(); - - public: - // .tint.core.ir.binary.pb.TypeDepthTexture depth_texture = 8; - bool has_depth_texture() const; - private: - bool _internal_has_depth_texture() const; - - public: - void clear_depth_texture() ; - const ::tint::core::ir::binary::pb::TypeDepthTexture& depth_texture() const; - [[nodiscard]] ::tint::core::ir::binary::pb::TypeDepthTexture* PROTOBUF_NULLABLE release_depth_texture(); - ::tint::core::ir::binary::pb::TypeDepthTexture* PROTOBUF_NONNULL mutable_depth_texture(); - void set_allocated_depth_texture(::tint::core::ir::binary::pb::TypeDepthTexture* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_depth_texture(::tint::core::ir::binary::pb::TypeDepthTexture* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::TypeDepthTexture* PROTOBUF_NULLABLE unsafe_arena_release_depth_texture(); - - private: - const ::tint::core::ir::binary::pb::TypeDepthTexture& _internal_depth_texture() const; - ::tint::core::ir::binary::pb::TypeDepthTexture* PROTOBUF_NONNULL _internal_mutable_depth_texture(); - - public: - // .tint.core.ir.binary.pb.TypeSampledTexture sampled_texture = 9; - bool has_sampled_texture() const; - private: - bool _internal_has_sampled_texture() const; - - public: - void clear_sampled_texture() ; - const ::tint::core::ir::binary::pb::TypeSampledTexture& sampled_texture() const; - [[nodiscard]] ::tint::core::ir::binary::pb::TypeSampledTexture* PROTOBUF_NULLABLE release_sampled_texture(); - ::tint::core::ir::binary::pb::TypeSampledTexture* PROTOBUF_NONNULL mutable_sampled_texture(); - void set_allocated_sampled_texture(::tint::core::ir::binary::pb::TypeSampledTexture* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_sampled_texture(::tint::core::ir::binary::pb::TypeSampledTexture* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::TypeSampledTexture* PROTOBUF_NULLABLE unsafe_arena_release_sampled_texture(); - - private: - const ::tint::core::ir::binary::pb::TypeSampledTexture& _internal_sampled_texture() const; - ::tint::core::ir::binary::pb::TypeSampledTexture* PROTOBUF_NONNULL _internal_mutable_sampled_texture(); - - public: - // .tint.core.ir.binary.pb.TypeMultisampledTexture multisampled_texture = 10; - bool has_multisampled_texture() const; - private: - bool _internal_has_multisampled_texture() const; - - public: - void clear_multisampled_texture() ; - const ::tint::core::ir::binary::pb::TypeMultisampledTexture& multisampled_texture() const; - [[nodiscard]] ::tint::core::ir::binary::pb::TypeMultisampledTexture* PROTOBUF_NULLABLE release_multisampled_texture(); - ::tint::core::ir::binary::pb::TypeMultisampledTexture* PROTOBUF_NONNULL mutable_multisampled_texture(); - void set_allocated_multisampled_texture(::tint::core::ir::binary::pb::TypeMultisampledTexture* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_multisampled_texture(::tint::core::ir::binary::pb::TypeMultisampledTexture* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::TypeMultisampledTexture* PROTOBUF_NULLABLE unsafe_arena_release_multisampled_texture(); - - private: - const ::tint::core::ir::binary::pb::TypeMultisampledTexture& _internal_multisampled_texture() const; - ::tint::core::ir::binary::pb::TypeMultisampledTexture* PROTOBUF_NONNULL _internal_mutable_multisampled_texture(); - - public: - // .tint.core.ir.binary.pb.TypeDepthMultisampledTexture depth_multisampled_texture = 11; - bool has_depth_multisampled_texture() const; - private: - bool _internal_has_depth_multisampled_texture() const; - - public: - void clear_depth_multisampled_texture() ; - const ::tint::core::ir::binary::pb::TypeDepthMultisampledTexture& depth_multisampled_texture() const; - [[nodiscard]] ::tint::core::ir::binary::pb::TypeDepthMultisampledTexture* PROTOBUF_NULLABLE release_depth_multisampled_texture(); - ::tint::core::ir::binary::pb::TypeDepthMultisampledTexture* PROTOBUF_NONNULL mutable_depth_multisampled_texture(); - void set_allocated_depth_multisampled_texture(::tint::core::ir::binary::pb::TypeDepthMultisampledTexture* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_depth_multisampled_texture(::tint::core::ir::binary::pb::TypeDepthMultisampledTexture* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::TypeDepthMultisampledTexture* PROTOBUF_NULLABLE unsafe_arena_release_depth_multisampled_texture(); - - private: - const ::tint::core::ir::binary::pb::TypeDepthMultisampledTexture& _internal_depth_multisampled_texture() const; - ::tint::core::ir::binary::pb::TypeDepthMultisampledTexture* PROTOBUF_NONNULL _internal_mutable_depth_multisampled_texture(); - - public: - // .tint.core.ir.binary.pb.TypeStorageTexture storage_texture = 12; - bool has_storage_texture() const; - private: - bool _internal_has_storage_texture() const; - - public: - void clear_storage_texture() ; - const ::tint::core::ir::binary::pb::TypeStorageTexture& storage_texture() const; - [[nodiscard]] ::tint::core::ir::binary::pb::TypeStorageTexture* PROTOBUF_NULLABLE release_storage_texture(); - ::tint::core::ir::binary::pb::TypeStorageTexture* PROTOBUF_NONNULL mutable_storage_texture(); - void set_allocated_storage_texture(::tint::core::ir::binary::pb::TypeStorageTexture* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_storage_texture(::tint::core::ir::binary::pb::TypeStorageTexture* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::TypeStorageTexture* PROTOBUF_NULLABLE unsafe_arena_release_storage_texture(); - - private: - const ::tint::core::ir::binary::pb::TypeStorageTexture& _internal_storage_texture() const; - ::tint::core::ir::binary::pb::TypeStorageTexture* PROTOBUF_NONNULL _internal_mutable_storage_texture(); - - public: - // .tint.core.ir.binary.pb.TypeExternalTexture external_texture = 13; - bool has_external_texture() const; - private: - bool _internal_has_external_texture() const; - - public: - void clear_external_texture() ; - const ::tint::core::ir::binary::pb::TypeExternalTexture& external_texture() const; - [[nodiscard]] ::tint::core::ir::binary::pb::TypeExternalTexture* PROTOBUF_NULLABLE release_external_texture(); - ::tint::core::ir::binary::pb::TypeExternalTexture* PROTOBUF_NONNULL mutable_external_texture(); - void set_allocated_external_texture(::tint::core::ir::binary::pb::TypeExternalTexture* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_external_texture(::tint::core::ir::binary::pb::TypeExternalTexture* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::TypeExternalTexture* PROTOBUF_NULLABLE unsafe_arena_release_external_texture(); - - private: - const ::tint::core::ir::binary::pb::TypeExternalTexture& _internal_external_texture() const; - ::tint::core::ir::binary::pb::TypeExternalTexture* PROTOBUF_NONNULL _internal_mutable_external_texture(); - - public: - // .tint.core.ir.binary.pb.TypeSampler sampler = 14; - bool has_sampler() const; - private: - bool _internal_has_sampler() const; - - public: - void clear_sampler() ; - const ::tint::core::ir::binary::pb::TypeSampler& sampler() const; - [[nodiscard]] ::tint::core::ir::binary::pb::TypeSampler* PROTOBUF_NULLABLE release_sampler(); - ::tint::core::ir::binary::pb::TypeSampler* PROTOBUF_NONNULL mutable_sampler(); - void set_allocated_sampler(::tint::core::ir::binary::pb::TypeSampler* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_sampler(::tint::core::ir::binary::pb::TypeSampler* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::TypeSampler* PROTOBUF_NULLABLE unsafe_arena_release_sampler(); - - private: - const ::tint::core::ir::binary::pb::TypeSampler& _internal_sampler() const; - ::tint::core::ir::binary::pb::TypeSampler* PROTOBUF_NONNULL _internal_mutable_sampler(); - - public: - // .tint.core.ir.binary.pb.TypeInputAttachment input_attachment = 15; - bool has_input_attachment() const; - private: - bool _internal_has_input_attachment() const; - - public: - void clear_input_attachment() ; - const ::tint::core::ir::binary::pb::TypeInputAttachment& input_attachment() const; - [[nodiscard]] ::tint::core::ir::binary::pb::TypeInputAttachment* PROTOBUF_NULLABLE release_input_attachment(); - ::tint::core::ir::binary::pb::TypeInputAttachment* PROTOBUF_NONNULL mutable_input_attachment(); - void set_allocated_input_attachment(::tint::core::ir::binary::pb::TypeInputAttachment* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_input_attachment(::tint::core::ir::binary::pb::TypeInputAttachment* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::TypeInputAttachment* PROTOBUF_NULLABLE unsafe_arena_release_input_attachment(); - - private: - const ::tint::core::ir::binary::pb::TypeInputAttachment& _internal_input_attachment() const; - ::tint::core::ir::binary::pb::TypeInputAttachment* PROTOBUF_NONNULL _internal_mutable_input_attachment(); - - public: - // .tint.core.ir.binary.pb.TypeSubgroupMatrix subgroup_matrix_left = 16; - bool has_subgroup_matrix_left() const; - private: - bool _internal_has_subgroup_matrix_left() const; - - public: - void clear_subgroup_matrix_left() ; - const ::tint::core::ir::binary::pb::TypeSubgroupMatrix& subgroup_matrix_left() const; - [[nodiscard]] ::tint::core::ir::binary::pb::TypeSubgroupMatrix* PROTOBUF_NULLABLE release_subgroup_matrix_left(); - ::tint::core::ir::binary::pb::TypeSubgroupMatrix* PROTOBUF_NONNULL mutable_subgroup_matrix_left(); - void set_allocated_subgroup_matrix_left(::tint::core::ir::binary::pb::TypeSubgroupMatrix* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_subgroup_matrix_left(::tint::core::ir::binary::pb::TypeSubgroupMatrix* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::TypeSubgroupMatrix* PROTOBUF_NULLABLE unsafe_arena_release_subgroup_matrix_left(); - - private: - const ::tint::core::ir::binary::pb::TypeSubgroupMatrix& _internal_subgroup_matrix_left() const; - ::tint::core::ir::binary::pb::TypeSubgroupMatrix* PROTOBUF_NONNULL _internal_mutable_subgroup_matrix_left(); - - public: - // .tint.core.ir.binary.pb.TypeSubgroupMatrix subgroup_matrix_right = 17; - bool has_subgroup_matrix_right() const; - private: - bool _internal_has_subgroup_matrix_right() const; - - public: - void clear_subgroup_matrix_right() ; - const ::tint::core::ir::binary::pb::TypeSubgroupMatrix& subgroup_matrix_right() const; - [[nodiscard]] ::tint::core::ir::binary::pb::TypeSubgroupMatrix* PROTOBUF_NULLABLE release_subgroup_matrix_right(); - ::tint::core::ir::binary::pb::TypeSubgroupMatrix* PROTOBUF_NONNULL mutable_subgroup_matrix_right(); - void set_allocated_subgroup_matrix_right(::tint::core::ir::binary::pb::TypeSubgroupMatrix* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_subgroup_matrix_right(::tint::core::ir::binary::pb::TypeSubgroupMatrix* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::TypeSubgroupMatrix* PROTOBUF_NULLABLE unsafe_arena_release_subgroup_matrix_right(); - - private: - const ::tint::core::ir::binary::pb::TypeSubgroupMatrix& _internal_subgroup_matrix_right() const; - ::tint::core::ir::binary::pb::TypeSubgroupMatrix* PROTOBUF_NONNULL _internal_mutable_subgroup_matrix_right(); - - public: - // .tint.core.ir.binary.pb.TypeSubgroupMatrix subgroup_matrix_result = 18; - bool has_subgroup_matrix_result() const; - private: - bool _internal_has_subgroup_matrix_result() const; - - public: - void clear_subgroup_matrix_result() ; - const ::tint::core::ir::binary::pb::TypeSubgroupMatrix& subgroup_matrix_result() const; - [[nodiscard]] ::tint::core::ir::binary::pb::TypeSubgroupMatrix* PROTOBUF_NULLABLE release_subgroup_matrix_result(); - ::tint::core::ir::binary::pb::TypeSubgroupMatrix* PROTOBUF_NONNULL mutable_subgroup_matrix_result(); - void set_allocated_subgroup_matrix_result(::tint::core::ir::binary::pb::TypeSubgroupMatrix* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_subgroup_matrix_result(::tint::core::ir::binary::pb::TypeSubgroupMatrix* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::TypeSubgroupMatrix* PROTOBUF_NULLABLE unsafe_arena_release_subgroup_matrix_result(); - - private: - const ::tint::core::ir::binary::pb::TypeSubgroupMatrix& _internal_subgroup_matrix_result() const; - ::tint::core::ir::binary::pb::TypeSubgroupMatrix* PROTOBUF_NONNULL _internal_mutable_subgroup_matrix_result(); - - public: - // .tint.core.ir.binary.pb.TypeBuiltinStruct builtin_struct = 19; - bool has_builtin_struct() const; - void clear_builtin_struct() ; - ::tint::core::ir::binary::pb::TypeBuiltinStruct builtin_struct() const; - void set_builtin_struct(::tint::core::ir::binary::pb::TypeBuiltinStruct value); - - private: - ::tint::core::ir::binary::pb::TypeBuiltinStruct _internal_builtin_struct() const; - void _internal_set_builtin_struct(::tint::core::ir::binary::pb::TypeBuiltinStruct value); - - public: - // .tint.core.ir.binary.pb.TypeBindingArray binding_array = 20; - bool has_binding_array() const; - private: - bool _internal_has_binding_array() const; - - public: - void clear_binding_array() ; - const ::tint::core::ir::binary::pb::TypeBindingArray& binding_array() const; - [[nodiscard]] ::tint::core::ir::binary::pb::TypeBindingArray* PROTOBUF_NULLABLE release_binding_array(); - ::tint::core::ir::binary::pb::TypeBindingArray* PROTOBUF_NONNULL mutable_binding_array(); - void set_allocated_binding_array(::tint::core::ir::binary::pb::TypeBindingArray* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_binding_array(::tint::core::ir::binary::pb::TypeBindingArray* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::TypeBindingArray* PROTOBUF_NULLABLE unsafe_arena_release_binding_array(); - - private: - const ::tint::core::ir::binary::pb::TypeBindingArray& _internal_binding_array() const; - ::tint::core::ir::binary::pb::TypeBindingArray* PROTOBUF_NONNULL _internal_mutable_binding_array(); - - public: - // .tint.core.ir.binary.pb.TypeTexelBuffer texel_buffer = 21; - bool has_texel_buffer() const; - private: - bool _internal_has_texel_buffer() const; - - public: - void clear_texel_buffer() ; - const ::tint::core::ir::binary::pb::TypeTexelBuffer& texel_buffer() const; - [[nodiscard]] ::tint::core::ir::binary::pb::TypeTexelBuffer* PROTOBUF_NULLABLE release_texel_buffer(); - ::tint::core::ir::binary::pb::TypeTexelBuffer* PROTOBUF_NONNULL mutable_texel_buffer(); - void set_allocated_texel_buffer(::tint::core::ir::binary::pb::TypeTexelBuffer* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_texel_buffer(::tint::core::ir::binary::pb::TypeTexelBuffer* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::TypeTexelBuffer* PROTOBUF_NULLABLE unsafe_arena_release_texel_buffer(); - - private: - const ::tint::core::ir::binary::pb::TypeTexelBuffer& _internal_texel_buffer() const; - ::tint::core::ir::binary::pb::TypeTexelBuffer* PROTOBUF_NONNULL _internal_mutable_texel_buffer(); - - public: - // .tint.core.ir.binary.pb.TypeBuffer buffer = 23; - bool has_buffer() const; - private: - bool _internal_has_buffer() const; - - public: - void clear_buffer() ; - const ::tint::core::ir::binary::pb::TypeBuffer& buffer() const; - [[nodiscard]] ::tint::core::ir::binary::pb::TypeBuffer* PROTOBUF_NULLABLE release_buffer(); - ::tint::core::ir::binary::pb::TypeBuffer* PROTOBUF_NONNULL mutable_buffer(); - void set_allocated_buffer(::tint::core::ir::binary::pb::TypeBuffer* PROTOBUF_NULLABLE value); - void unsafe_arena_set_allocated_buffer(::tint::core::ir::binary::pb::TypeBuffer* PROTOBUF_NULLABLE value); - ::tint::core::ir::binary::pb::TypeBuffer* PROTOBUF_NULLABLE unsafe_arena_release_buffer(); - - private: - const ::tint::core::ir::binary::pb::TypeBuffer& _internal_buffer() const; - ::tint::core::ir::binary::pb::TypeBuffer* PROTOBUF_NONNULL _internal_mutable_buffer(); - - public: - void clear_kind(); - KindCase kind_case() const; - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.Type) - private: - class _Internal; - void set_has_basic(); - void set_has_vector(); - void set_has_matrix(); - void set_has_array(); - void set_has_pointer(); - void set_has_struct_(); - void set_has_atomic(); - void set_has_depth_texture(); - void set_has_sampled_texture(); - void set_has_multisampled_texture(); - void set_has_depth_multisampled_texture(); - void set_has_storage_texture(); - void set_has_external_texture(); - void set_has_sampler(); - void set_has_input_attachment(); - void set_has_subgroup_matrix_left(); - void set_has_subgroup_matrix_right(); - void set_has_subgroup_matrix_result(); - void set_has_builtin_struct(); - void set_has_binding_array(); - void set_has_texel_buffer(); - void set_has_buffer(); - inline bool has_kind() const; - inline void clear_has_kind(); - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 22, - 20, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const Type& from_msg); - union KindUnion { - constexpr KindUnion() : _constinit_{} {} - ::google::protobuf::internal::ConstantInitialized _constinit_; - int basic_; - ::google::protobuf::Message* PROTOBUF_NULLABLE vector_; - ::google::protobuf::Message* PROTOBUF_NULLABLE matrix_; - ::google::protobuf::Message* PROTOBUF_NULLABLE array_; - ::google::protobuf::Message* PROTOBUF_NULLABLE pointer_; - ::google::protobuf::Message* PROTOBUF_NULLABLE struct__; - ::google::protobuf::Message* PROTOBUF_NULLABLE atomic_; - ::google::protobuf::Message* PROTOBUF_NULLABLE depth_texture_; - ::google::protobuf::Message* PROTOBUF_NULLABLE sampled_texture_; - ::google::protobuf::Message* PROTOBUF_NULLABLE multisampled_texture_; - ::google::protobuf::Message* PROTOBUF_NULLABLE depth_multisampled_texture_; - ::google::protobuf::Message* PROTOBUF_NULLABLE storage_texture_; - ::google::protobuf::Message* PROTOBUF_NULLABLE external_texture_; - ::google::protobuf::Message* PROTOBUF_NULLABLE sampler_; - ::google::protobuf::Message* PROTOBUF_NULLABLE input_attachment_; - ::google::protobuf::Message* PROTOBUF_NULLABLE subgroup_matrix_left_; - ::google::protobuf::Message* PROTOBUF_NULLABLE subgroup_matrix_right_; - ::google::protobuf::Message* PROTOBUF_NULLABLE subgroup_matrix_result_; - int builtin_struct_; - ::google::protobuf::Message* PROTOBUF_NULLABLE binding_array_; - ::google::protobuf::Message* PROTOBUF_NULLABLE texel_buffer_; - ::google::protobuf::Message* PROTOBUF_NULLABLE buffer_; - } kind_; - ::google::protobuf::internal::CachedSize _cached_size_; - ::uint32_t _oneof_case_[1]; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull Type_class_data_; -// ------------------------------------------------------------------- - -class Module final : public ::google::protobuf::Message -/* @@protoc_insertion_point(class_definition:tint.core.ir.binary.pb.Module) */ { - public: - inline Module() : Module(nullptr) {} - ~Module() PROTOBUF_FINAL; - -#if defined(PROTOBUF_CUSTOM_VTABLE) - void operator delete(Module* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { - SharedDtor(*msg); - ::google::protobuf::internal::SizedDelete(msg, sizeof(Module)); - } -#endif - - template - explicit PROTOBUF_CONSTEXPR Module(::google::protobuf::internal::ConstantInitialized); - - inline Module(const Module& from) : Module(nullptr, from) {} - inline Module(Module&& from) noexcept - : Module(nullptr, ::std::move(from)) {} - inline Module& operator=(const Module& from) { - CopyFrom(from); - return *this; - } - inline Module& operator=(Module&& from) noexcept { - if (this == &from) return *this; - if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); - } - inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); - } - - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() { - return GetDescriptor(); - } - static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const Module& default_instance() { - return *reinterpret_cast( - &_Module_default_instance_); - } - static constexpr int kIndexInFileMessages = 0; - friend void swap(Module& a, Module& b) { a.Swap(&b); } - PROTOBUF_NOINLINE void Swap(Module* PROTOBUF_NONNULL other) { - if (other == this) return; - if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { - InternalSwap(other); - } else { - ::google::protobuf::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(Module* PROTOBUF_NONNULL other) { - if (other == this) return; - ABSL_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - Module* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { - return ::google::protobuf::Message::DefaultConstruct(arena); - } - using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const Module& from); - using ::google::protobuf::Message::MergeFrom; - void MergeFrom(const Module& from) { Module::MergeImpl(*this, from); } - - private: - static void MergeImpl(::google::protobuf::MessageLite& to_msg, - const ::google::protobuf::MessageLite& from_msg); - - public: - bool IsInitialized() const { - return true; - } - ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; - #if defined(PROTOBUF_CUSTOM_VTABLE) - private: - static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); - static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); - - public: - ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { - return _InternalSerialize(*this, target, stream); - } - #else // PROTOBUF_CUSTOM_VTABLE - ::size_t ByteSizeLong() const final; - ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( - ::uint8_t* PROTOBUF_NONNULL target, - ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; - #endif // PROTOBUF_CUSTOM_VTABLE - int GetCachedSize() const { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static void SharedDtor(MessageLite& self); - void InternalSwap(Module* PROTOBUF_NONNULL other); - private: - template - friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); - static ::absl::string_view FullMessageName() { return "tint.core.ir.binary.pb.Module"; } - - protected: - explicit Module(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - Module(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Module& from); - Module( - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, Module&& from) noexcept - : Module(arena) { - *this = ::std::move(from); - } - const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; - static void* PROTOBUF_NONNULL PlacementNew_( - const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - static constexpr auto InternalNewImpl_(); - - public: - static constexpr auto InternalGenerateClassData_(); - - ::google::protobuf::Metadata GetMetadata() const; - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - enum : int { - kTypesFieldNumber = 1, - kValuesFieldNumber = 2, - kConstantValuesFieldNumber = 3, - kFunctionsFieldNumber = 4, - kBlocksFieldNumber = 5, - kRootBlockFieldNumber = 6, - }; - // repeated .tint.core.ir.binary.pb.Type types = 1; - int types_size() const; - private: - int _internal_types_size() const; - - public: - void clear_types() ; - ::tint::core::ir::binary::pb::Type* PROTOBUF_NONNULL mutable_types(int index); - ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Type>* PROTOBUF_NONNULL mutable_types(); - - private: - const ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Type>& _internal_types() const; - ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Type>* PROTOBUF_NONNULL _internal_mutable_types(); - public: - const ::tint::core::ir::binary::pb::Type& types(int index) const; - ::tint::core::ir::binary::pb::Type* PROTOBUF_NONNULL add_types(); - const ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Type>& types() const; - // repeated .tint.core.ir.binary.pb.Value values = 2; - int values_size() const; - private: - int _internal_values_size() const; - - public: - void clear_values() ; - ::tint::core::ir::binary::pb::Value* PROTOBUF_NONNULL mutable_values(int index); - ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Value>* PROTOBUF_NONNULL mutable_values(); - - private: - const ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Value>& _internal_values() const; - ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Value>* PROTOBUF_NONNULL _internal_mutable_values(); - public: - const ::tint::core::ir::binary::pb::Value& values(int index) const; - ::tint::core::ir::binary::pb::Value* PROTOBUF_NONNULL add_values(); - const ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Value>& values() const; - // repeated .tint.core.ir.binary.pb.ConstantValue constant_values = 3; - int constant_values_size() const; - private: - int _internal_constant_values_size() const; - - public: - void clear_constant_values() ; - ::tint::core::ir::binary::pb::ConstantValue* PROTOBUF_NONNULL mutable_constant_values(int index); - ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::ConstantValue>* PROTOBUF_NONNULL mutable_constant_values(); - - private: - const ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::ConstantValue>& _internal_constant_values() const; - ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::ConstantValue>* PROTOBUF_NONNULL _internal_mutable_constant_values(); - public: - const ::tint::core::ir::binary::pb::ConstantValue& constant_values(int index) const; - ::tint::core::ir::binary::pb::ConstantValue* PROTOBUF_NONNULL add_constant_values(); - const ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::ConstantValue>& constant_values() const; - // repeated .tint.core.ir.binary.pb.Function functions = 4; - int functions_size() const; - private: - int _internal_functions_size() const; - - public: - void clear_functions() ; - ::tint::core::ir::binary::pb::Function* PROTOBUF_NONNULL mutable_functions(int index); - ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Function>* PROTOBUF_NONNULL mutable_functions(); - - private: - const ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Function>& _internal_functions() const; - ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Function>* PROTOBUF_NONNULL _internal_mutable_functions(); - public: - const ::tint::core::ir::binary::pb::Function& functions(int index) const; - ::tint::core::ir::binary::pb::Function* PROTOBUF_NONNULL add_functions(); - const ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Function>& functions() const; - // repeated .tint.core.ir.binary.pb.Block blocks = 5; - int blocks_size() const; - private: - int _internal_blocks_size() const; - - public: - void clear_blocks() ; - ::tint::core::ir::binary::pb::Block* PROTOBUF_NONNULL mutable_blocks(int index); - ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Block>* PROTOBUF_NONNULL mutable_blocks(); - - private: - const ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Block>& _internal_blocks() const; - ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Block>* PROTOBUF_NONNULL _internal_mutable_blocks(); - public: - const ::tint::core::ir::binary::pb::Block& blocks(int index) const; - ::tint::core::ir::binary::pb::Block* PROTOBUF_NONNULL add_blocks(); - const ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Block>& blocks() const; - // uint32 root_block = 6; - void clear_root_block() ; - ::uint32_t root_block() const; - void set_root_block(::uint32_t value); - - private: - ::uint32_t _internal_root_block() const; - void _internal_set_root_block(::uint32_t value); - - public: - // @@protoc_insertion_point(class_scope:tint.core.ir.binary.pb.Module) - private: - class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<3, 6, - 5, 0, - 2> - _table_; - - friend class ::google::protobuf::MessageLite; - friend class ::google::protobuf::Arena; - template - friend class ::google::protobuf::Arena::InternalHelper; - using InternalArenaConstructable_ = void; - using DestructorSkippable_ = void; - struct Impl_ { - inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); - inline explicit Impl_( - ::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, - const Module& from_msg); - ::google::protobuf::internal::HasBits<1> _has_bits_; - ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::RepeatedPtrField< ::tint::core::ir::binary::pb::Type > types_; - ::google::protobuf::RepeatedPtrField< ::tint::core::ir::binary::pb::Value > values_; - ::google::protobuf::RepeatedPtrField< ::tint::core::ir::binary::pb::ConstantValue > constant_values_; - ::google::protobuf::RepeatedPtrField< ::tint::core::ir::binary::pb::Function > functions_; - ::google::protobuf::RepeatedPtrField< ::tint::core::ir::binary::pb::Block > blocks_; - ::uint32_t root_block_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_src_2ftint_2futils_2fprotos_2fir_2fir_2eproto; -}; - -extern const ::google::protobuf::internal::ClassDataFull Module_class_data_; - -// =================================================================== - - - - -// =================================================================== - - -#ifdef __GNUC__ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif // __GNUC__ -// ------------------------------------------------------------------- - -// Module - -// repeated .tint.core.ir.binary.pb.Type types = 1; -inline int Module::_internal_types_size() const { - return _internal_types().size(); -} -inline int Module::types_size() const { - return _internal_types_size(); -} -inline void Module::clear_types() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.types_.Clear(); -} -inline ::tint::core::ir::binary::pb::Type* PROTOBUF_NONNULL Module::mutable_types(int index) - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Module.types) - return _internal_mutable_types()->Mutable(index); -} -inline ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Type>* PROTOBUF_NONNULL Module::mutable_types() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_mutable_list:tint.core.ir.binary.pb.Module.types) - ::google::protobuf::internal::TSanWrite(&_impl_); - return _internal_mutable_types(); -} -inline const ::tint::core::ir::binary::pb::Type& Module::types(int index) const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Module.types) - return _internal_types().Get(index); -} -inline ::tint::core::ir::binary::pb::Type* PROTOBUF_NONNULL Module::add_types() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::google::protobuf::internal::TSanWrite(&_impl_); - ::tint::core::ir::binary::pb::Type* _add = _internal_mutable_types()->Add(); - // @@protoc_insertion_point(field_add:tint.core.ir.binary.pb.Module.types) - return _add; -} -inline const ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Type>& Module::types() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_list:tint.core.ir.binary.pb.Module.types) - return _internal_types(); -} -inline const ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Type>& -Module::_internal_types() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.types_; -} -inline ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Type>* PROTOBUF_NONNULL -Module::_internal_mutable_types() { - ::google::protobuf::internal::TSanRead(&_impl_); - return &_impl_.types_; -} - -// repeated .tint.core.ir.binary.pb.Value values = 2; -inline int Module::_internal_values_size() const { - return _internal_values().size(); -} -inline int Module::values_size() const { - return _internal_values_size(); -} -inline void Module::clear_values() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.values_.Clear(); -} -inline ::tint::core::ir::binary::pb::Value* PROTOBUF_NONNULL Module::mutable_values(int index) - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Module.values) - return _internal_mutable_values()->Mutable(index); -} -inline ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Value>* PROTOBUF_NONNULL Module::mutable_values() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_mutable_list:tint.core.ir.binary.pb.Module.values) - ::google::protobuf::internal::TSanWrite(&_impl_); - return _internal_mutable_values(); -} -inline const ::tint::core::ir::binary::pb::Value& Module::values(int index) const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Module.values) - return _internal_values().Get(index); -} -inline ::tint::core::ir::binary::pb::Value* PROTOBUF_NONNULL Module::add_values() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::google::protobuf::internal::TSanWrite(&_impl_); - ::tint::core::ir::binary::pb::Value* _add = _internal_mutable_values()->Add(); - // @@protoc_insertion_point(field_add:tint.core.ir.binary.pb.Module.values) - return _add; -} -inline const ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Value>& Module::values() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_list:tint.core.ir.binary.pb.Module.values) - return _internal_values(); -} -inline const ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Value>& -Module::_internal_values() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.values_; -} -inline ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Value>* PROTOBUF_NONNULL -Module::_internal_mutable_values() { - ::google::protobuf::internal::TSanRead(&_impl_); - return &_impl_.values_; -} - -// repeated .tint.core.ir.binary.pb.ConstantValue constant_values = 3; -inline int Module::_internal_constant_values_size() const { - return _internal_constant_values().size(); -} -inline int Module::constant_values_size() const { - return _internal_constant_values_size(); -} -inline void Module::clear_constant_values() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.constant_values_.Clear(); -} -inline ::tint::core::ir::binary::pb::ConstantValue* PROTOBUF_NONNULL Module::mutable_constant_values(int index) - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Module.constant_values) - return _internal_mutable_constant_values()->Mutable(index); -} -inline ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::ConstantValue>* PROTOBUF_NONNULL Module::mutable_constant_values() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_mutable_list:tint.core.ir.binary.pb.Module.constant_values) - ::google::protobuf::internal::TSanWrite(&_impl_); - return _internal_mutable_constant_values(); -} -inline const ::tint::core::ir::binary::pb::ConstantValue& Module::constant_values(int index) const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Module.constant_values) - return _internal_constant_values().Get(index); -} -inline ::tint::core::ir::binary::pb::ConstantValue* PROTOBUF_NONNULL Module::add_constant_values() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::google::protobuf::internal::TSanWrite(&_impl_); - ::tint::core::ir::binary::pb::ConstantValue* _add = _internal_mutable_constant_values()->Add(); - // @@protoc_insertion_point(field_add:tint.core.ir.binary.pb.Module.constant_values) - return _add; -} -inline const ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::ConstantValue>& Module::constant_values() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_list:tint.core.ir.binary.pb.Module.constant_values) - return _internal_constant_values(); -} -inline const ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::ConstantValue>& -Module::_internal_constant_values() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.constant_values_; -} -inline ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::ConstantValue>* PROTOBUF_NONNULL -Module::_internal_mutable_constant_values() { - ::google::protobuf::internal::TSanRead(&_impl_); - return &_impl_.constant_values_; -} - -// repeated .tint.core.ir.binary.pb.Function functions = 4; -inline int Module::_internal_functions_size() const { - return _internal_functions().size(); -} -inline int Module::functions_size() const { - return _internal_functions_size(); -} -inline void Module::clear_functions() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.functions_.Clear(); -} -inline ::tint::core::ir::binary::pb::Function* PROTOBUF_NONNULL Module::mutable_functions(int index) - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Module.functions) - return _internal_mutable_functions()->Mutable(index); -} -inline ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Function>* PROTOBUF_NONNULL Module::mutable_functions() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_mutable_list:tint.core.ir.binary.pb.Module.functions) - ::google::protobuf::internal::TSanWrite(&_impl_); - return _internal_mutable_functions(); -} -inline const ::tint::core::ir::binary::pb::Function& Module::functions(int index) const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Module.functions) - return _internal_functions().Get(index); -} -inline ::tint::core::ir::binary::pb::Function* PROTOBUF_NONNULL Module::add_functions() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::google::protobuf::internal::TSanWrite(&_impl_); - ::tint::core::ir::binary::pb::Function* _add = _internal_mutable_functions()->Add(); - // @@protoc_insertion_point(field_add:tint.core.ir.binary.pb.Module.functions) - return _add; -} -inline const ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Function>& Module::functions() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_list:tint.core.ir.binary.pb.Module.functions) - return _internal_functions(); -} -inline const ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Function>& -Module::_internal_functions() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.functions_; -} -inline ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Function>* PROTOBUF_NONNULL -Module::_internal_mutable_functions() { - ::google::protobuf::internal::TSanRead(&_impl_); - return &_impl_.functions_; -} - -// repeated .tint.core.ir.binary.pb.Block blocks = 5; -inline int Module::_internal_blocks_size() const { - return _internal_blocks().size(); -} -inline int Module::blocks_size() const { - return _internal_blocks_size(); -} -inline void Module::clear_blocks() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.blocks_.Clear(); -} -inline ::tint::core::ir::binary::pb::Block* PROTOBUF_NONNULL Module::mutable_blocks(int index) - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Module.blocks) - return _internal_mutable_blocks()->Mutable(index); -} -inline ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Block>* PROTOBUF_NONNULL Module::mutable_blocks() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_mutable_list:tint.core.ir.binary.pb.Module.blocks) - ::google::protobuf::internal::TSanWrite(&_impl_); - return _internal_mutable_blocks(); -} -inline const ::tint::core::ir::binary::pb::Block& Module::blocks(int index) const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Module.blocks) - return _internal_blocks().Get(index); -} -inline ::tint::core::ir::binary::pb::Block* PROTOBUF_NONNULL Module::add_blocks() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::google::protobuf::internal::TSanWrite(&_impl_); - ::tint::core::ir::binary::pb::Block* _add = _internal_mutable_blocks()->Add(); - // @@protoc_insertion_point(field_add:tint.core.ir.binary.pb.Module.blocks) - return _add; -} -inline const ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Block>& Module::blocks() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_list:tint.core.ir.binary.pb.Module.blocks) - return _internal_blocks(); -} -inline const ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Block>& -Module::_internal_blocks() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.blocks_; -} -inline ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Block>* PROTOBUF_NONNULL -Module::_internal_mutable_blocks() { - ::google::protobuf::internal::TSanRead(&_impl_); - return &_impl_.blocks_; -} - -// uint32 root_block = 6; -inline void Module::clear_root_block() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.root_block_ = 0u; - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline ::uint32_t Module::root_block() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Module.root_block) - return _internal_root_block(); -} -inline void Module::set_root_block(::uint32_t value) { - _internal_set_root_block(value); - _impl_._has_bits_[0] |= 0x00000001U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.Module.root_block) -} -inline ::uint32_t Module::_internal_root_block() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.root_block_; -} -inline void Module::_internal_set_root_block(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.root_block_ = value; -} - -// ------------------------------------------------------------------- - -// Type - -// .tint.core.ir.binary.pb.TypeBasic basic = 1; -inline bool Type::has_basic() const { - return kind_case() == kBasic; -} -inline void Type::set_has_basic() { - _impl_._oneof_case_[0] = kBasic; -} -inline void Type::clear_basic() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kBasic) { - _impl_.kind_.basic_ = 0; - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::TypeBasic Type::basic() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Type.basic) - return _internal_basic(); -} -inline void Type::set_basic(::tint::core::ir::binary::pb::TypeBasic value) { - if (kind_case() != kBasic) { - clear_kind(); - set_has_basic(); - } - _impl_.kind_.basic_ = value; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.Type.basic) -} -inline ::tint::core::ir::binary::pb::TypeBasic Type::_internal_basic() const { - if (kind_case() == kBasic) { - return static_cast<::tint::core::ir::binary::pb::TypeBasic>(_impl_.kind_.basic_); - } - return static_cast<::tint::core::ir::binary::pb::TypeBasic>(0); -} - -// .tint.core.ir.binary.pb.TypeVector vector = 2; -inline bool Type::has_vector() const { - return kind_case() == kVector; -} -inline bool Type::_internal_has_vector() const { - return kind_case() == kVector; -} -inline void Type::set_has_vector() { - _impl_._oneof_case_[0] = kVector; -} -inline void Type::clear_vector() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kVector) { - if (GetArena() == nullptr) { - delete _impl_.kind_.vector_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.vector_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::TypeVector* PROTOBUF_NULLABLE Type::release_vector() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Type.vector) - if (kind_case() == kVector) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeVector*>(_impl_.kind_.vector_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.vector_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::TypeVector& Type::_internal_vector() const { - return kind_case() == kVector ? *reinterpret_cast<::tint::core::ir::binary::pb::TypeVector*>(_impl_.kind_.vector_) : reinterpret_cast<::tint::core::ir::binary::pb::TypeVector&>(::tint::core::ir::binary::pb::_TypeVector_default_instance_); -} -inline const ::tint::core::ir::binary::pb::TypeVector& Type::vector() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Type.vector) - return _internal_vector(); -} -inline ::tint::core::ir::binary::pb::TypeVector* PROTOBUF_NULLABLE Type::unsafe_arena_release_vector() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Type.vector) - if (kind_case() == kVector) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeVector*>(_impl_.kind_.vector_); - _impl_.kind_.vector_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Type::unsafe_arena_set_allocated_vector( - ::tint::core::ir::binary::pb::TypeVector* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_vector(); - _impl_.kind_.vector_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Type.vector) -} -inline ::tint::core::ir::binary::pb::TypeVector* PROTOBUF_NONNULL Type::_internal_mutable_vector() { - if (kind_case() != kVector) { - clear_kind(); - set_has_vector(); - _impl_.kind_.vector_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::TypeVector>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::TypeVector*>(_impl_.kind_.vector_); -} -inline ::tint::core::ir::binary::pb::TypeVector* PROTOBUF_NONNULL Type::mutable_vector() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::TypeVector* _msg = _internal_mutable_vector(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Type.vector) - return _msg; -} - -// .tint.core.ir.binary.pb.TypeMatrix matrix = 3; -inline bool Type::has_matrix() const { - return kind_case() == kMatrix; -} -inline bool Type::_internal_has_matrix() const { - return kind_case() == kMatrix; -} -inline void Type::set_has_matrix() { - _impl_._oneof_case_[0] = kMatrix; -} -inline void Type::clear_matrix() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kMatrix) { - if (GetArena() == nullptr) { - delete _impl_.kind_.matrix_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.matrix_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::TypeMatrix* PROTOBUF_NULLABLE Type::release_matrix() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Type.matrix) - if (kind_case() == kMatrix) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeMatrix*>(_impl_.kind_.matrix_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.matrix_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::TypeMatrix& Type::_internal_matrix() const { - return kind_case() == kMatrix ? *reinterpret_cast<::tint::core::ir::binary::pb::TypeMatrix*>(_impl_.kind_.matrix_) : reinterpret_cast<::tint::core::ir::binary::pb::TypeMatrix&>(::tint::core::ir::binary::pb::_TypeMatrix_default_instance_); -} -inline const ::tint::core::ir::binary::pb::TypeMatrix& Type::matrix() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Type.matrix) - return _internal_matrix(); -} -inline ::tint::core::ir::binary::pb::TypeMatrix* PROTOBUF_NULLABLE Type::unsafe_arena_release_matrix() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Type.matrix) - if (kind_case() == kMatrix) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeMatrix*>(_impl_.kind_.matrix_); - _impl_.kind_.matrix_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Type::unsafe_arena_set_allocated_matrix( - ::tint::core::ir::binary::pb::TypeMatrix* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_matrix(); - _impl_.kind_.matrix_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Type.matrix) -} -inline ::tint::core::ir::binary::pb::TypeMatrix* PROTOBUF_NONNULL Type::_internal_mutable_matrix() { - if (kind_case() != kMatrix) { - clear_kind(); - set_has_matrix(); - _impl_.kind_.matrix_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::TypeMatrix>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::TypeMatrix*>(_impl_.kind_.matrix_); -} -inline ::tint::core::ir::binary::pb::TypeMatrix* PROTOBUF_NONNULL Type::mutable_matrix() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::TypeMatrix* _msg = _internal_mutable_matrix(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Type.matrix) - return _msg; -} - -// .tint.core.ir.binary.pb.TypeArray array = 4; -inline bool Type::has_array() const { - return kind_case() == kArray; -} -inline bool Type::_internal_has_array() const { - return kind_case() == kArray; -} -inline void Type::set_has_array() { - _impl_._oneof_case_[0] = kArray; -} -inline void Type::clear_array() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kArray) { - if (GetArena() == nullptr) { - delete _impl_.kind_.array_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.array_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::TypeArray* PROTOBUF_NULLABLE Type::release_array() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Type.array) - if (kind_case() == kArray) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeArray*>(_impl_.kind_.array_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.array_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::TypeArray& Type::_internal_array() const { - return kind_case() == kArray ? *reinterpret_cast<::tint::core::ir::binary::pb::TypeArray*>(_impl_.kind_.array_) : reinterpret_cast<::tint::core::ir::binary::pb::TypeArray&>(::tint::core::ir::binary::pb::_TypeArray_default_instance_); -} -inline const ::tint::core::ir::binary::pb::TypeArray& Type::array() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Type.array) - return _internal_array(); -} -inline ::tint::core::ir::binary::pb::TypeArray* PROTOBUF_NULLABLE Type::unsafe_arena_release_array() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Type.array) - if (kind_case() == kArray) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeArray*>(_impl_.kind_.array_); - _impl_.kind_.array_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Type::unsafe_arena_set_allocated_array( - ::tint::core::ir::binary::pb::TypeArray* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_array(); - _impl_.kind_.array_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Type.array) -} -inline ::tint::core::ir::binary::pb::TypeArray* PROTOBUF_NONNULL Type::_internal_mutable_array() { - if (kind_case() != kArray) { - clear_kind(); - set_has_array(); - _impl_.kind_.array_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::TypeArray>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::TypeArray*>(_impl_.kind_.array_); -} -inline ::tint::core::ir::binary::pb::TypeArray* PROTOBUF_NONNULL Type::mutable_array() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::TypeArray* _msg = _internal_mutable_array(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Type.array) - return _msg; -} - -// .tint.core.ir.binary.pb.TypePointer pointer = 5; -inline bool Type::has_pointer() const { - return kind_case() == kPointer; -} -inline bool Type::_internal_has_pointer() const { - return kind_case() == kPointer; -} -inline void Type::set_has_pointer() { - _impl_._oneof_case_[0] = kPointer; -} -inline void Type::clear_pointer() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kPointer) { - if (GetArena() == nullptr) { - delete _impl_.kind_.pointer_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.pointer_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::TypePointer* PROTOBUF_NULLABLE Type::release_pointer() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Type.pointer) - if (kind_case() == kPointer) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypePointer*>(_impl_.kind_.pointer_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.pointer_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::TypePointer& Type::_internal_pointer() const { - return kind_case() == kPointer ? *reinterpret_cast<::tint::core::ir::binary::pb::TypePointer*>(_impl_.kind_.pointer_) : reinterpret_cast<::tint::core::ir::binary::pb::TypePointer&>(::tint::core::ir::binary::pb::_TypePointer_default_instance_); -} -inline const ::tint::core::ir::binary::pb::TypePointer& Type::pointer() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Type.pointer) - return _internal_pointer(); -} -inline ::tint::core::ir::binary::pb::TypePointer* PROTOBUF_NULLABLE Type::unsafe_arena_release_pointer() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Type.pointer) - if (kind_case() == kPointer) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypePointer*>(_impl_.kind_.pointer_); - _impl_.kind_.pointer_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Type::unsafe_arena_set_allocated_pointer( - ::tint::core::ir::binary::pb::TypePointer* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_pointer(); - _impl_.kind_.pointer_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Type.pointer) -} -inline ::tint::core::ir::binary::pb::TypePointer* PROTOBUF_NONNULL Type::_internal_mutable_pointer() { - if (kind_case() != kPointer) { - clear_kind(); - set_has_pointer(); - _impl_.kind_.pointer_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::TypePointer>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::TypePointer*>(_impl_.kind_.pointer_); -} -inline ::tint::core::ir::binary::pb::TypePointer* PROTOBUF_NONNULL Type::mutable_pointer() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::TypePointer* _msg = _internal_mutable_pointer(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Type.pointer) - return _msg; -} - -// .tint.core.ir.binary.pb.TypeStruct struct = 6; -inline bool Type::has_struct_() const { - return kind_case() == kStruct; -} -inline bool Type::_internal_has_struct_() const { - return kind_case() == kStruct; -} -inline void Type::set_has_struct_() { - _impl_._oneof_case_[0] = kStruct; -} -inline void Type::clear_struct_() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kStruct) { - if (GetArena() == nullptr) { - delete _impl_.kind_.struct__; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.struct__); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::TypeStruct* PROTOBUF_NULLABLE Type::release_struct_() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Type.struct) - if (kind_case() == kStruct) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeStruct*>(_impl_.kind_.struct__); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.struct__ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::TypeStruct& Type::_internal_struct_() const { - return kind_case() == kStruct ? *reinterpret_cast<::tint::core::ir::binary::pb::TypeStruct*>(_impl_.kind_.struct__) : reinterpret_cast<::tint::core::ir::binary::pb::TypeStruct&>(::tint::core::ir::binary::pb::_TypeStruct_default_instance_); -} -inline const ::tint::core::ir::binary::pb::TypeStruct& Type::struct_() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Type.struct) - return _internal_struct_(); -} -inline ::tint::core::ir::binary::pb::TypeStruct* PROTOBUF_NULLABLE Type::unsafe_arena_release_struct_() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Type.struct) - if (kind_case() == kStruct) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeStruct*>(_impl_.kind_.struct__); - _impl_.kind_.struct__ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Type::unsafe_arena_set_allocated_struct_( - ::tint::core::ir::binary::pb::TypeStruct* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_struct_(); - _impl_.kind_.struct__ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Type.struct) -} -inline ::tint::core::ir::binary::pb::TypeStruct* PROTOBUF_NONNULL Type::_internal_mutable_struct_() { - if (kind_case() != kStruct) { - clear_kind(); - set_has_struct_(); - _impl_.kind_.struct__ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::TypeStruct>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::TypeStruct*>(_impl_.kind_.struct__); -} -inline ::tint::core::ir::binary::pb::TypeStruct* PROTOBUF_NONNULL Type::mutable_struct_() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::TypeStruct* _msg = _internal_mutable_struct_(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Type.struct) - return _msg; -} - -// .tint.core.ir.binary.pb.TypeAtomic atomic = 7; -inline bool Type::has_atomic() const { - return kind_case() == kAtomic; -} -inline bool Type::_internal_has_atomic() const { - return kind_case() == kAtomic; -} -inline void Type::set_has_atomic() { - _impl_._oneof_case_[0] = kAtomic; -} -inline void Type::clear_atomic() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kAtomic) { - if (GetArena() == nullptr) { - delete _impl_.kind_.atomic_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.atomic_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::TypeAtomic* PROTOBUF_NULLABLE Type::release_atomic() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Type.atomic) - if (kind_case() == kAtomic) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeAtomic*>(_impl_.kind_.atomic_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.atomic_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::TypeAtomic& Type::_internal_atomic() const { - return kind_case() == kAtomic ? *reinterpret_cast<::tint::core::ir::binary::pb::TypeAtomic*>(_impl_.kind_.atomic_) : reinterpret_cast<::tint::core::ir::binary::pb::TypeAtomic&>(::tint::core::ir::binary::pb::_TypeAtomic_default_instance_); -} -inline const ::tint::core::ir::binary::pb::TypeAtomic& Type::atomic() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Type.atomic) - return _internal_atomic(); -} -inline ::tint::core::ir::binary::pb::TypeAtomic* PROTOBUF_NULLABLE Type::unsafe_arena_release_atomic() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Type.atomic) - if (kind_case() == kAtomic) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeAtomic*>(_impl_.kind_.atomic_); - _impl_.kind_.atomic_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Type::unsafe_arena_set_allocated_atomic( - ::tint::core::ir::binary::pb::TypeAtomic* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_atomic(); - _impl_.kind_.atomic_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Type.atomic) -} -inline ::tint::core::ir::binary::pb::TypeAtomic* PROTOBUF_NONNULL Type::_internal_mutable_atomic() { - if (kind_case() != kAtomic) { - clear_kind(); - set_has_atomic(); - _impl_.kind_.atomic_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::TypeAtomic>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::TypeAtomic*>(_impl_.kind_.atomic_); -} -inline ::tint::core::ir::binary::pb::TypeAtomic* PROTOBUF_NONNULL Type::mutable_atomic() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::TypeAtomic* _msg = _internal_mutable_atomic(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Type.atomic) - return _msg; -} - -// .tint.core.ir.binary.pb.TypeDepthTexture depth_texture = 8; -inline bool Type::has_depth_texture() const { - return kind_case() == kDepthTexture; -} -inline bool Type::_internal_has_depth_texture() const { - return kind_case() == kDepthTexture; -} -inline void Type::set_has_depth_texture() { - _impl_._oneof_case_[0] = kDepthTexture; -} -inline void Type::clear_depth_texture() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kDepthTexture) { - if (GetArena() == nullptr) { - delete _impl_.kind_.depth_texture_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.depth_texture_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::TypeDepthTexture* PROTOBUF_NULLABLE Type::release_depth_texture() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Type.depth_texture) - if (kind_case() == kDepthTexture) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeDepthTexture*>(_impl_.kind_.depth_texture_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.depth_texture_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::TypeDepthTexture& Type::_internal_depth_texture() const { - return kind_case() == kDepthTexture ? *reinterpret_cast<::tint::core::ir::binary::pb::TypeDepthTexture*>(_impl_.kind_.depth_texture_) : reinterpret_cast<::tint::core::ir::binary::pb::TypeDepthTexture&>(::tint::core::ir::binary::pb::_TypeDepthTexture_default_instance_); -} -inline const ::tint::core::ir::binary::pb::TypeDepthTexture& Type::depth_texture() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Type.depth_texture) - return _internal_depth_texture(); -} -inline ::tint::core::ir::binary::pb::TypeDepthTexture* PROTOBUF_NULLABLE Type::unsafe_arena_release_depth_texture() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Type.depth_texture) - if (kind_case() == kDepthTexture) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeDepthTexture*>(_impl_.kind_.depth_texture_); - _impl_.kind_.depth_texture_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Type::unsafe_arena_set_allocated_depth_texture( - ::tint::core::ir::binary::pb::TypeDepthTexture* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_depth_texture(); - _impl_.kind_.depth_texture_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Type.depth_texture) -} -inline ::tint::core::ir::binary::pb::TypeDepthTexture* PROTOBUF_NONNULL Type::_internal_mutable_depth_texture() { - if (kind_case() != kDepthTexture) { - clear_kind(); - set_has_depth_texture(); - _impl_.kind_.depth_texture_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::TypeDepthTexture>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::TypeDepthTexture*>(_impl_.kind_.depth_texture_); -} -inline ::tint::core::ir::binary::pb::TypeDepthTexture* PROTOBUF_NONNULL Type::mutable_depth_texture() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::TypeDepthTexture* _msg = _internal_mutable_depth_texture(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Type.depth_texture) - return _msg; -} - -// .tint.core.ir.binary.pb.TypeSampledTexture sampled_texture = 9; -inline bool Type::has_sampled_texture() const { - return kind_case() == kSampledTexture; -} -inline bool Type::_internal_has_sampled_texture() const { - return kind_case() == kSampledTexture; -} -inline void Type::set_has_sampled_texture() { - _impl_._oneof_case_[0] = kSampledTexture; -} -inline void Type::clear_sampled_texture() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kSampledTexture) { - if (GetArena() == nullptr) { - delete _impl_.kind_.sampled_texture_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.sampled_texture_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::TypeSampledTexture* PROTOBUF_NULLABLE Type::release_sampled_texture() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Type.sampled_texture) - if (kind_case() == kSampledTexture) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeSampledTexture*>(_impl_.kind_.sampled_texture_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.sampled_texture_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::TypeSampledTexture& Type::_internal_sampled_texture() const { - return kind_case() == kSampledTexture ? *reinterpret_cast<::tint::core::ir::binary::pb::TypeSampledTexture*>(_impl_.kind_.sampled_texture_) : reinterpret_cast<::tint::core::ir::binary::pb::TypeSampledTexture&>(::tint::core::ir::binary::pb::_TypeSampledTexture_default_instance_); -} -inline const ::tint::core::ir::binary::pb::TypeSampledTexture& Type::sampled_texture() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Type.sampled_texture) - return _internal_sampled_texture(); -} -inline ::tint::core::ir::binary::pb::TypeSampledTexture* PROTOBUF_NULLABLE Type::unsafe_arena_release_sampled_texture() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Type.sampled_texture) - if (kind_case() == kSampledTexture) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeSampledTexture*>(_impl_.kind_.sampled_texture_); - _impl_.kind_.sampled_texture_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Type::unsafe_arena_set_allocated_sampled_texture( - ::tint::core::ir::binary::pb::TypeSampledTexture* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_sampled_texture(); - _impl_.kind_.sampled_texture_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Type.sampled_texture) -} -inline ::tint::core::ir::binary::pb::TypeSampledTexture* PROTOBUF_NONNULL Type::_internal_mutable_sampled_texture() { - if (kind_case() != kSampledTexture) { - clear_kind(); - set_has_sampled_texture(); - _impl_.kind_.sampled_texture_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::TypeSampledTexture>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::TypeSampledTexture*>(_impl_.kind_.sampled_texture_); -} -inline ::tint::core::ir::binary::pb::TypeSampledTexture* PROTOBUF_NONNULL Type::mutable_sampled_texture() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::TypeSampledTexture* _msg = _internal_mutable_sampled_texture(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Type.sampled_texture) - return _msg; -} - -// .tint.core.ir.binary.pb.TypeMultisampledTexture multisampled_texture = 10; -inline bool Type::has_multisampled_texture() const { - return kind_case() == kMultisampledTexture; -} -inline bool Type::_internal_has_multisampled_texture() const { - return kind_case() == kMultisampledTexture; -} -inline void Type::set_has_multisampled_texture() { - _impl_._oneof_case_[0] = kMultisampledTexture; -} -inline void Type::clear_multisampled_texture() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kMultisampledTexture) { - if (GetArena() == nullptr) { - delete _impl_.kind_.multisampled_texture_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.multisampled_texture_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::TypeMultisampledTexture* PROTOBUF_NULLABLE Type::release_multisampled_texture() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Type.multisampled_texture) - if (kind_case() == kMultisampledTexture) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeMultisampledTexture*>(_impl_.kind_.multisampled_texture_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.multisampled_texture_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::TypeMultisampledTexture& Type::_internal_multisampled_texture() const { - return kind_case() == kMultisampledTexture ? *reinterpret_cast<::tint::core::ir::binary::pb::TypeMultisampledTexture*>(_impl_.kind_.multisampled_texture_) : reinterpret_cast<::tint::core::ir::binary::pb::TypeMultisampledTexture&>(::tint::core::ir::binary::pb::_TypeMultisampledTexture_default_instance_); -} -inline const ::tint::core::ir::binary::pb::TypeMultisampledTexture& Type::multisampled_texture() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Type.multisampled_texture) - return _internal_multisampled_texture(); -} -inline ::tint::core::ir::binary::pb::TypeMultisampledTexture* PROTOBUF_NULLABLE Type::unsafe_arena_release_multisampled_texture() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Type.multisampled_texture) - if (kind_case() == kMultisampledTexture) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeMultisampledTexture*>(_impl_.kind_.multisampled_texture_); - _impl_.kind_.multisampled_texture_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Type::unsafe_arena_set_allocated_multisampled_texture( - ::tint::core::ir::binary::pb::TypeMultisampledTexture* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_multisampled_texture(); - _impl_.kind_.multisampled_texture_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Type.multisampled_texture) -} -inline ::tint::core::ir::binary::pb::TypeMultisampledTexture* PROTOBUF_NONNULL Type::_internal_mutable_multisampled_texture() { - if (kind_case() != kMultisampledTexture) { - clear_kind(); - set_has_multisampled_texture(); - _impl_.kind_.multisampled_texture_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::TypeMultisampledTexture>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::TypeMultisampledTexture*>(_impl_.kind_.multisampled_texture_); -} -inline ::tint::core::ir::binary::pb::TypeMultisampledTexture* PROTOBUF_NONNULL Type::mutable_multisampled_texture() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::TypeMultisampledTexture* _msg = _internal_mutable_multisampled_texture(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Type.multisampled_texture) - return _msg; -} - -// .tint.core.ir.binary.pb.TypeDepthMultisampledTexture depth_multisampled_texture = 11; -inline bool Type::has_depth_multisampled_texture() const { - return kind_case() == kDepthMultisampledTexture; -} -inline bool Type::_internal_has_depth_multisampled_texture() const { - return kind_case() == kDepthMultisampledTexture; -} -inline void Type::set_has_depth_multisampled_texture() { - _impl_._oneof_case_[0] = kDepthMultisampledTexture; -} -inline void Type::clear_depth_multisampled_texture() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kDepthMultisampledTexture) { - if (GetArena() == nullptr) { - delete _impl_.kind_.depth_multisampled_texture_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.depth_multisampled_texture_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::TypeDepthMultisampledTexture* PROTOBUF_NULLABLE Type::release_depth_multisampled_texture() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Type.depth_multisampled_texture) - if (kind_case() == kDepthMultisampledTexture) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeDepthMultisampledTexture*>(_impl_.kind_.depth_multisampled_texture_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.depth_multisampled_texture_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::TypeDepthMultisampledTexture& Type::_internal_depth_multisampled_texture() const { - return kind_case() == kDepthMultisampledTexture ? *reinterpret_cast<::tint::core::ir::binary::pb::TypeDepthMultisampledTexture*>(_impl_.kind_.depth_multisampled_texture_) : reinterpret_cast<::tint::core::ir::binary::pb::TypeDepthMultisampledTexture&>(::tint::core::ir::binary::pb::_TypeDepthMultisampledTexture_default_instance_); -} -inline const ::tint::core::ir::binary::pb::TypeDepthMultisampledTexture& Type::depth_multisampled_texture() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Type.depth_multisampled_texture) - return _internal_depth_multisampled_texture(); -} -inline ::tint::core::ir::binary::pb::TypeDepthMultisampledTexture* PROTOBUF_NULLABLE Type::unsafe_arena_release_depth_multisampled_texture() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Type.depth_multisampled_texture) - if (kind_case() == kDepthMultisampledTexture) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeDepthMultisampledTexture*>(_impl_.kind_.depth_multisampled_texture_); - _impl_.kind_.depth_multisampled_texture_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Type::unsafe_arena_set_allocated_depth_multisampled_texture( - ::tint::core::ir::binary::pb::TypeDepthMultisampledTexture* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_depth_multisampled_texture(); - _impl_.kind_.depth_multisampled_texture_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Type.depth_multisampled_texture) -} -inline ::tint::core::ir::binary::pb::TypeDepthMultisampledTexture* PROTOBUF_NONNULL Type::_internal_mutable_depth_multisampled_texture() { - if (kind_case() != kDepthMultisampledTexture) { - clear_kind(); - set_has_depth_multisampled_texture(); - _impl_.kind_.depth_multisampled_texture_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::TypeDepthMultisampledTexture>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::TypeDepthMultisampledTexture*>(_impl_.kind_.depth_multisampled_texture_); -} -inline ::tint::core::ir::binary::pb::TypeDepthMultisampledTexture* PROTOBUF_NONNULL Type::mutable_depth_multisampled_texture() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::TypeDepthMultisampledTexture* _msg = _internal_mutable_depth_multisampled_texture(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Type.depth_multisampled_texture) - return _msg; -} - -// .tint.core.ir.binary.pb.TypeStorageTexture storage_texture = 12; -inline bool Type::has_storage_texture() const { - return kind_case() == kStorageTexture; -} -inline bool Type::_internal_has_storage_texture() const { - return kind_case() == kStorageTexture; -} -inline void Type::set_has_storage_texture() { - _impl_._oneof_case_[0] = kStorageTexture; -} -inline void Type::clear_storage_texture() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kStorageTexture) { - if (GetArena() == nullptr) { - delete _impl_.kind_.storage_texture_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.storage_texture_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::TypeStorageTexture* PROTOBUF_NULLABLE Type::release_storage_texture() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Type.storage_texture) - if (kind_case() == kStorageTexture) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeStorageTexture*>(_impl_.kind_.storage_texture_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.storage_texture_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::TypeStorageTexture& Type::_internal_storage_texture() const { - return kind_case() == kStorageTexture ? *reinterpret_cast<::tint::core::ir::binary::pb::TypeStorageTexture*>(_impl_.kind_.storage_texture_) : reinterpret_cast<::tint::core::ir::binary::pb::TypeStorageTexture&>(::tint::core::ir::binary::pb::_TypeStorageTexture_default_instance_); -} -inline const ::tint::core::ir::binary::pb::TypeStorageTexture& Type::storage_texture() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Type.storage_texture) - return _internal_storage_texture(); -} -inline ::tint::core::ir::binary::pb::TypeStorageTexture* PROTOBUF_NULLABLE Type::unsafe_arena_release_storage_texture() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Type.storage_texture) - if (kind_case() == kStorageTexture) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeStorageTexture*>(_impl_.kind_.storage_texture_); - _impl_.kind_.storage_texture_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Type::unsafe_arena_set_allocated_storage_texture( - ::tint::core::ir::binary::pb::TypeStorageTexture* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_storage_texture(); - _impl_.kind_.storage_texture_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Type.storage_texture) -} -inline ::tint::core::ir::binary::pb::TypeStorageTexture* PROTOBUF_NONNULL Type::_internal_mutable_storage_texture() { - if (kind_case() != kStorageTexture) { - clear_kind(); - set_has_storage_texture(); - _impl_.kind_.storage_texture_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::TypeStorageTexture>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::TypeStorageTexture*>(_impl_.kind_.storage_texture_); -} -inline ::tint::core::ir::binary::pb::TypeStorageTexture* PROTOBUF_NONNULL Type::mutable_storage_texture() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::TypeStorageTexture* _msg = _internal_mutable_storage_texture(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Type.storage_texture) - return _msg; -} - -// .tint.core.ir.binary.pb.TypeExternalTexture external_texture = 13; -inline bool Type::has_external_texture() const { - return kind_case() == kExternalTexture; -} -inline bool Type::_internal_has_external_texture() const { - return kind_case() == kExternalTexture; -} -inline void Type::set_has_external_texture() { - _impl_._oneof_case_[0] = kExternalTexture; -} -inline void Type::clear_external_texture() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kExternalTexture) { - if (GetArena() == nullptr) { - delete _impl_.kind_.external_texture_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.external_texture_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::TypeExternalTexture* PROTOBUF_NULLABLE Type::release_external_texture() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Type.external_texture) - if (kind_case() == kExternalTexture) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeExternalTexture*>(_impl_.kind_.external_texture_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.external_texture_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::TypeExternalTexture& Type::_internal_external_texture() const { - return kind_case() == kExternalTexture ? *reinterpret_cast<::tint::core::ir::binary::pb::TypeExternalTexture*>(_impl_.kind_.external_texture_) : reinterpret_cast<::tint::core::ir::binary::pb::TypeExternalTexture&>(::tint::core::ir::binary::pb::_TypeExternalTexture_default_instance_); -} -inline const ::tint::core::ir::binary::pb::TypeExternalTexture& Type::external_texture() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Type.external_texture) - return _internal_external_texture(); -} -inline ::tint::core::ir::binary::pb::TypeExternalTexture* PROTOBUF_NULLABLE Type::unsafe_arena_release_external_texture() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Type.external_texture) - if (kind_case() == kExternalTexture) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeExternalTexture*>(_impl_.kind_.external_texture_); - _impl_.kind_.external_texture_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Type::unsafe_arena_set_allocated_external_texture( - ::tint::core::ir::binary::pb::TypeExternalTexture* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_external_texture(); - _impl_.kind_.external_texture_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Type.external_texture) -} -inline ::tint::core::ir::binary::pb::TypeExternalTexture* PROTOBUF_NONNULL Type::_internal_mutable_external_texture() { - if (kind_case() != kExternalTexture) { - clear_kind(); - set_has_external_texture(); - _impl_.kind_.external_texture_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::TypeExternalTexture>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::TypeExternalTexture*>(_impl_.kind_.external_texture_); -} -inline ::tint::core::ir::binary::pb::TypeExternalTexture* PROTOBUF_NONNULL Type::mutable_external_texture() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::TypeExternalTexture* _msg = _internal_mutable_external_texture(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Type.external_texture) - return _msg; -} - -// .tint.core.ir.binary.pb.TypeSampler sampler = 14; -inline bool Type::has_sampler() const { - return kind_case() == kSampler; -} -inline bool Type::_internal_has_sampler() const { - return kind_case() == kSampler; -} -inline void Type::set_has_sampler() { - _impl_._oneof_case_[0] = kSampler; -} -inline void Type::clear_sampler() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kSampler) { - if (GetArena() == nullptr) { - delete _impl_.kind_.sampler_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.sampler_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::TypeSampler* PROTOBUF_NULLABLE Type::release_sampler() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Type.sampler) - if (kind_case() == kSampler) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeSampler*>(_impl_.kind_.sampler_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.sampler_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::TypeSampler& Type::_internal_sampler() const { - return kind_case() == kSampler ? *reinterpret_cast<::tint::core::ir::binary::pb::TypeSampler*>(_impl_.kind_.sampler_) : reinterpret_cast<::tint::core::ir::binary::pb::TypeSampler&>(::tint::core::ir::binary::pb::_TypeSampler_default_instance_); -} -inline const ::tint::core::ir::binary::pb::TypeSampler& Type::sampler() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Type.sampler) - return _internal_sampler(); -} -inline ::tint::core::ir::binary::pb::TypeSampler* PROTOBUF_NULLABLE Type::unsafe_arena_release_sampler() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Type.sampler) - if (kind_case() == kSampler) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeSampler*>(_impl_.kind_.sampler_); - _impl_.kind_.sampler_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Type::unsafe_arena_set_allocated_sampler( - ::tint::core::ir::binary::pb::TypeSampler* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_sampler(); - _impl_.kind_.sampler_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Type.sampler) -} -inline ::tint::core::ir::binary::pb::TypeSampler* PROTOBUF_NONNULL Type::_internal_mutable_sampler() { - if (kind_case() != kSampler) { - clear_kind(); - set_has_sampler(); - _impl_.kind_.sampler_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::TypeSampler>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::TypeSampler*>(_impl_.kind_.sampler_); -} -inline ::tint::core::ir::binary::pb::TypeSampler* PROTOBUF_NONNULL Type::mutable_sampler() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::TypeSampler* _msg = _internal_mutable_sampler(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Type.sampler) - return _msg; -} - -// .tint.core.ir.binary.pb.TypeInputAttachment input_attachment = 15; -inline bool Type::has_input_attachment() const { - return kind_case() == kInputAttachment; -} -inline bool Type::_internal_has_input_attachment() const { - return kind_case() == kInputAttachment; -} -inline void Type::set_has_input_attachment() { - _impl_._oneof_case_[0] = kInputAttachment; -} -inline void Type::clear_input_attachment() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kInputAttachment) { - if (GetArena() == nullptr) { - delete _impl_.kind_.input_attachment_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.input_attachment_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::TypeInputAttachment* PROTOBUF_NULLABLE Type::release_input_attachment() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Type.input_attachment) - if (kind_case() == kInputAttachment) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeInputAttachment*>(_impl_.kind_.input_attachment_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.input_attachment_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::TypeInputAttachment& Type::_internal_input_attachment() const { - return kind_case() == kInputAttachment ? *reinterpret_cast<::tint::core::ir::binary::pb::TypeInputAttachment*>(_impl_.kind_.input_attachment_) : reinterpret_cast<::tint::core::ir::binary::pb::TypeInputAttachment&>(::tint::core::ir::binary::pb::_TypeInputAttachment_default_instance_); -} -inline const ::tint::core::ir::binary::pb::TypeInputAttachment& Type::input_attachment() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Type.input_attachment) - return _internal_input_attachment(); -} -inline ::tint::core::ir::binary::pb::TypeInputAttachment* PROTOBUF_NULLABLE Type::unsafe_arena_release_input_attachment() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Type.input_attachment) - if (kind_case() == kInputAttachment) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeInputAttachment*>(_impl_.kind_.input_attachment_); - _impl_.kind_.input_attachment_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Type::unsafe_arena_set_allocated_input_attachment( - ::tint::core::ir::binary::pb::TypeInputAttachment* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_input_attachment(); - _impl_.kind_.input_attachment_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Type.input_attachment) -} -inline ::tint::core::ir::binary::pb::TypeInputAttachment* PROTOBUF_NONNULL Type::_internal_mutable_input_attachment() { - if (kind_case() != kInputAttachment) { - clear_kind(); - set_has_input_attachment(); - _impl_.kind_.input_attachment_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::TypeInputAttachment>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::TypeInputAttachment*>(_impl_.kind_.input_attachment_); -} -inline ::tint::core::ir::binary::pb::TypeInputAttachment* PROTOBUF_NONNULL Type::mutable_input_attachment() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::TypeInputAttachment* _msg = _internal_mutable_input_attachment(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Type.input_attachment) - return _msg; -} - -// .tint.core.ir.binary.pb.TypeSubgroupMatrix subgroup_matrix_left = 16; -inline bool Type::has_subgroup_matrix_left() const { - return kind_case() == kSubgroupMatrixLeft; -} -inline bool Type::_internal_has_subgroup_matrix_left() const { - return kind_case() == kSubgroupMatrixLeft; -} -inline void Type::set_has_subgroup_matrix_left() { - _impl_._oneof_case_[0] = kSubgroupMatrixLeft; -} -inline void Type::clear_subgroup_matrix_left() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kSubgroupMatrixLeft) { - if (GetArena() == nullptr) { - delete _impl_.kind_.subgroup_matrix_left_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.subgroup_matrix_left_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::TypeSubgroupMatrix* PROTOBUF_NULLABLE Type::release_subgroup_matrix_left() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Type.subgroup_matrix_left) - if (kind_case() == kSubgroupMatrixLeft) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeSubgroupMatrix*>(_impl_.kind_.subgroup_matrix_left_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.subgroup_matrix_left_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::TypeSubgroupMatrix& Type::_internal_subgroup_matrix_left() const { - return kind_case() == kSubgroupMatrixLeft ? *reinterpret_cast<::tint::core::ir::binary::pb::TypeSubgroupMatrix*>(_impl_.kind_.subgroup_matrix_left_) : reinterpret_cast<::tint::core::ir::binary::pb::TypeSubgroupMatrix&>(::tint::core::ir::binary::pb::_TypeSubgroupMatrix_default_instance_); -} -inline const ::tint::core::ir::binary::pb::TypeSubgroupMatrix& Type::subgroup_matrix_left() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Type.subgroup_matrix_left) - return _internal_subgroup_matrix_left(); -} -inline ::tint::core::ir::binary::pb::TypeSubgroupMatrix* PROTOBUF_NULLABLE Type::unsafe_arena_release_subgroup_matrix_left() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Type.subgroup_matrix_left) - if (kind_case() == kSubgroupMatrixLeft) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeSubgroupMatrix*>(_impl_.kind_.subgroup_matrix_left_); - _impl_.kind_.subgroup_matrix_left_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Type::unsafe_arena_set_allocated_subgroup_matrix_left( - ::tint::core::ir::binary::pb::TypeSubgroupMatrix* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_subgroup_matrix_left(); - _impl_.kind_.subgroup_matrix_left_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Type.subgroup_matrix_left) -} -inline ::tint::core::ir::binary::pb::TypeSubgroupMatrix* PROTOBUF_NONNULL Type::_internal_mutable_subgroup_matrix_left() { - if (kind_case() != kSubgroupMatrixLeft) { - clear_kind(); - set_has_subgroup_matrix_left(); - _impl_.kind_.subgroup_matrix_left_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::TypeSubgroupMatrix>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::TypeSubgroupMatrix*>(_impl_.kind_.subgroup_matrix_left_); -} -inline ::tint::core::ir::binary::pb::TypeSubgroupMatrix* PROTOBUF_NONNULL Type::mutable_subgroup_matrix_left() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::TypeSubgroupMatrix* _msg = _internal_mutable_subgroup_matrix_left(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Type.subgroup_matrix_left) - return _msg; -} - -// .tint.core.ir.binary.pb.TypeSubgroupMatrix subgroup_matrix_right = 17; -inline bool Type::has_subgroup_matrix_right() const { - return kind_case() == kSubgroupMatrixRight; -} -inline bool Type::_internal_has_subgroup_matrix_right() const { - return kind_case() == kSubgroupMatrixRight; -} -inline void Type::set_has_subgroup_matrix_right() { - _impl_._oneof_case_[0] = kSubgroupMatrixRight; -} -inline void Type::clear_subgroup_matrix_right() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kSubgroupMatrixRight) { - if (GetArena() == nullptr) { - delete _impl_.kind_.subgroup_matrix_right_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.subgroup_matrix_right_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::TypeSubgroupMatrix* PROTOBUF_NULLABLE Type::release_subgroup_matrix_right() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Type.subgroup_matrix_right) - if (kind_case() == kSubgroupMatrixRight) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeSubgroupMatrix*>(_impl_.kind_.subgroup_matrix_right_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.subgroup_matrix_right_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::TypeSubgroupMatrix& Type::_internal_subgroup_matrix_right() const { - return kind_case() == kSubgroupMatrixRight ? *reinterpret_cast<::tint::core::ir::binary::pb::TypeSubgroupMatrix*>(_impl_.kind_.subgroup_matrix_right_) : reinterpret_cast<::tint::core::ir::binary::pb::TypeSubgroupMatrix&>(::tint::core::ir::binary::pb::_TypeSubgroupMatrix_default_instance_); -} -inline const ::tint::core::ir::binary::pb::TypeSubgroupMatrix& Type::subgroup_matrix_right() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Type.subgroup_matrix_right) - return _internal_subgroup_matrix_right(); -} -inline ::tint::core::ir::binary::pb::TypeSubgroupMatrix* PROTOBUF_NULLABLE Type::unsafe_arena_release_subgroup_matrix_right() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Type.subgroup_matrix_right) - if (kind_case() == kSubgroupMatrixRight) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeSubgroupMatrix*>(_impl_.kind_.subgroup_matrix_right_); - _impl_.kind_.subgroup_matrix_right_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Type::unsafe_arena_set_allocated_subgroup_matrix_right( - ::tint::core::ir::binary::pb::TypeSubgroupMatrix* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_subgroup_matrix_right(); - _impl_.kind_.subgroup_matrix_right_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Type.subgroup_matrix_right) -} -inline ::tint::core::ir::binary::pb::TypeSubgroupMatrix* PROTOBUF_NONNULL Type::_internal_mutable_subgroup_matrix_right() { - if (kind_case() != kSubgroupMatrixRight) { - clear_kind(); - set_has_subgroup_matrix_right(); - _impl_.kind_.subgroup_matrix_right_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::TypeSubgroupMatrix>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::TypeSubgroupMatrix*>(_impl_.kind_.subgroup_matrix_right_); -} -inline ::tint::core::ir::binary::pb::TypeSubgroupMatrix* PROTOBUF_NONNULL Type::mutable_subgroup_matrix_right() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::TypeSubgroupMatrix* _msg = _internal_mutable_subgroup_matrix_right(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Type.subgroup_matrix_right) - return _msg; -} - -// .tint.core.ir.binary.pb.TypeSubgroupMatrix subgroup_matrix_result = 18; -inline bool Type::has_subgroup_matrix_result() const { - return kind_case() == kSubgroupMatrixResult; -} -inline bool Type::_internal_has_subgroup_matrix_result() const { - return kind_case() == kSubgroupMatrixResult; -} -inline void Type::set_has_subgroup_matrix_result() { - _impl_._oneof_case_[0] = kSubgroupMatrixResult; -} -inline void Type::clear_subgroup_matrix_result() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kSubgroupMatrixResult) { - if (GetArena() == nullptr) { - delete _impl_.kind_.subgroup_matrix_result_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.subgroup_matrix_result_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::TypeSubgroupMatrix* PROTOBUF_NULLABLE Type::release_subgroup_matrix_result() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Type.subgroup_matrix_result) - if (kind_case() == kSubgroupMatrixResult) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeSubgroupMatrix*>(_impl_.kind_.subgroup_matrix_result_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.subgroup_matrix_result_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::TypeSubgroupMatrix& Type::_internal_subgroup_matrix_result() const { - return kind_case() == kSubgroupMatrixResult ? *reinterpret_cast<::tint::core::ir::binary::pb::TypeSubgroupMatrix*>(_impl_.kind_.subgroup_matrix_result_) : reinterpret_cast<::tint::core::ir::binary::pb::TypeSubgroupMatrix&>(::tint::core::ir::binary::pb::_TypeSubgroupMatrix_default_instance_); -} -inline const ::tint::core::ir::binary::pb::TypeSubgroupMatrix& Type::subgroup_matrix_result() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Type.subgroup_matrix_result) - return _internal_subgroup_matrix_result(); -} -inline ::tint::core::ir::binary::pb::TypeSubgroupMatrix* PROTOBUF_NULLABLE Type::unsafe_arena_release_subgroup_matrix_result() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Type.subgroup_matrix_result) - if (kind_case() == kSubgroupMatrixResult) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeSubgroupMatrix*>(_impl_.kind_.subgroup_matrix_result_); - _impl_.kind_.subgroup_matrix_result_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Type::unsafe_arena_set_allocated_subgroup_matrix_result( - ::tint::core::ir::binary::pb::TypeSubgroupMatrix* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_subgroup_matrix_result(); - _impl_.kind_.subgroup_matrix_result_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Type.subgroup_matrix_result) -} -inline ::tint::core::ir::binary::pb::TypeSubgroupMatrix* PROTOBUF_NONNULL Type::_internal_mutable_subgroup_matrix_result() { - if (kind_case() != kSubgroupMatrixResult) { - clear_kind(); - set_has_subgroup_matrix_result(); - _impl_.kind_.subgroup_matrix_result_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::TypeSubgroupMatrix>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::TypeSubgroupMatrix*>(_impl_.kind_.subgroup_matrix_result_); -} -inline ::tint::core::ir::binary::pb::TypeSubgroupMatrix* PROTOBUF_NONNULL Type::mutable_subgroup_matrix_result() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::TypeSubgroupMatrix* _msg = _internal_mutable_subgroup_matrix_result(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Type.subgroup_matrix_result) - return _msg; -} - -// .tint.core.ir.binary.pb.TypeBuiltinStruct builtin_struct = 19; -inline bool Type::has_builtin_struct() const { - return kind_case() == kBuiltinStruct; -} -inline void Type::set_has_builtin_struct() { - _impl_._oneof_case_[0] = kBuiltinStruct; -} -inline void Type::clear_builtin_struct() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kBuiltinStruct) { - _impl_.kind_.builtin_struct_ = 0; - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::TypeBuiltinStruct Type::builtin_struct() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Type.builtin_struct) - return _internal_builtin_struct(); -} -inline void Type::set_builtin_struct(::tint::core::ir::binary::pb::TypeBuiltinStruct value) { - if (kind_case() != kBuiltinStruct) { - clear_kind(); - set_has_builtin_struct(); - } - _impl_.kind_.builtin_struct_ = value; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.Type.builtin_struct) -} -inline ::tint::core::ir::binary::pb::TypeBuiltinStruct Type::_internal_builtin_struct() const { - if (kind_case() == kBuiltinStruct) { - return static_cast<::tint::core::ir::binary::pb::TypeBuiltinStruct>(_impl_.kind_.builtin_struct_); - } - return static_cast<::tint::core::ir::binary::pb::TypeBuiltinStruct>(0); -} - -// .tint.core.ir.binary.pb.TypeBindingArray binding_array = 20; -inline bool Type::has_binding_array() const { - return kind_case() == kBindingArray; -} -inline bool Type::_internal_has_binding_array() const { - return kind_case() == kBindingArray; -} -inline void Type::set_has_binding_array() { - _impl_._oneof_case_[0] = kBindingArray; -} -inline void Type::clear_binding_array() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kBindingArray) { - if (GetArena() == nullptr) { - delete _impl_.kind_.binding_array_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.binding_array_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::TypeBindingArray* PROTOBUF_NULLABLE Type::release_binding_array() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Type.binding_array) - if (kind_case() == kBindingArray) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeBindingArray*>(_impl_.kind_.binding_array_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.binding_array_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::TypeBindingArray& Type::_internal_binding_array() const { - return kind_case() == kBindingArray ? *reinterpret_cast<::tint::core::ir::binary::pb::TypeBindingArray*>(_impl_.kind_.binding_array_) : reinterpret_cast<::tint::core::ir::binary::pb::TypeBindingArray&>(::tint::core::ir::binary::pb::_TypeBindingArray_default_instance_); -} -inline const ::tint::core::ir::binary::pb::TypeBindingArray& Type::binding_array() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Type.binding_array) - return _internal_binding_array(); -} -inline ::tint::core::ir::binary::pb::TypeBindingArray* PROTOBUF_NULLABLE Type::unsafe_arena_release_binding_array() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Type.binding_array) - if (kind_case() == kBindingArray) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeBindingArray*>(_impl_.kind_.binding_array_); - _impl_.kind_.binding_array_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Type::unsafe_arena_set_allocated_binding_array( - ::tint::core::ir::binary::pb::TypeBindingArray* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_binding_array(); - _impl_.kind_.binding_array_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Type.binding_array) -} -inline ::tint::core::ir::binary::pb::TypeBindingArray* PROTOBUF_NONNULL Type::_internal_mutable_binding_array() { - if (kind_case() != kBindingArray) { - clear_kind(); - set_has_binding_array(); - _impl_.kind_.binding_array_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::TypeBindingArray>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::TypeBindingArray*>(_impl_.kind_.binding_array_); -} -inline ::tint::core::ir::binary::pb::TypeBindingArray* PROTOBUF_NONNULL Type::mutable_binding_array() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::TypeBindingArray* _msg = _internal_mutable_binding_array(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Type.binding_array) - return _msg; -} - -// .tint.core.ir.binary.pb.TypeTexelBuffer texel_buffer = 21; -inline bool Type::has_texel_buffer() const { - return kind_case() == kTexelBuffer; -} -inline bool Type::_internal_has_texel_buffer() const { - return kind_case() == kTexelBuffer; -} -inline void Type::set_has_texel_buffer() { - _impl_._oneof_case_[0] = kTexelBuffer; -} -inline void Type::clear_texel_buffer() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kTexelBuffer) { - if (GetArena() == nullptr) { - delete _impl_.kind_.texel_buffer_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.texel_buffer_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::TypeTexelBuffer* PROTOBUF_NULLABLE Type::release_texel_buffer() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Type.texel_buffer) - if (kind_case() == kTexelBuffer) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeTexelBuffer*>(_impl_.kind_.texel_buffer_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.texel_buffer_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::TypeTexelBuffer& Type::_internal_texel_buffer() const { - return kind_case() == kTexelBuffer ? *reinterpret_cast<::tint::core::ir::binary::pb::TypeTexelBuffer*>(_impl_.kind_.texel_buffer_) : reinterpret_cast<::tint::core::ir::binary::pb::TypeTexelBuffer&>(::tint::core::ir::binary::pb::_TypeTexelBuffer_default_instance_); -} -inline const ::tint::core::ir::binary::pb::TypeTexelBuffer& Type::texel_buffer() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Type.texel_buffer) - return _internal_texel_buffer(); -} -inline ::tint::core::ir::binary::pb::TypeTexelBuffer* PROTOBUF_NULLABLE Type::unsafe_arena_release_texel_buffer() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Type.texel_buffer) - if (kind_case() == kTexelBuffer) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeTexelBuffer*>(_impl_.kind_.texel_buffer_); - _impl_.kind_.texel_buffer_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Type::unsafe_arena_set_allocated_texel_buffer( - ::tint::core::ir::binary::pb::TypeTexelBuffer* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_texel_buffer(); - _impl_.kind_.texel_buffer_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Type.texel_buffer) -} -inline ::tint::core::ir::binary::pb::TypeTexelBuffer* PROTOBUF_NONNULL Type::_internal_mutable_texel_buffer() { - if (kind_case() != kTexelBuffer) { - clear_kind(); - set_has_texel_buffer(); - _impl_.kind_.texel_buffer_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::TypeTexelBuffer>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::TypeTexelBuffer*>(_impl_.kind_.texel_buffer_); -} -inline ::tint::core::ir::binary::pb::TypeTexelBuffer* PROTOBUF_NONNULL Type::mutable_texel_buffer() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::TypeTexelBuffer* _msg = _internal_mutable_texel_buffer(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Type.texel_buffer) - return _msg; -} - -// .tint.core.ir.binary.pb.TypeBuffer buffer = 23; -inline bool Type::has_buffer() const { - return kind_case() == kBuffer; -} -inline bool Type::_internal_has_buffer() const { - return kind_case() == kBuffer; -} -inline void Type::set_has_buffer() { - _impl_._oneof_case_[0] = kBuffer; -} -inline void Type::clear_buffer() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kBuffer) { - if (GetArena() == nullptr) { - delete _impl_.kind_.buffer_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.buffer_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::TypeBuffer* PROTOBUF_NULLABLE Type::release_buffer() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Type.buffer) - if (kind_case() == kBuffer) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeBuffer*>(_impl_.kind_.buffer_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.buffer_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::TypeBuffer& Type::_internal_buffer() const { - return kind_case() == kBuffer ? *reinterpret_cast<::tint::core::ir::binary::pb::TypeBuffer*>(_impl_.kind_.buffer_) : reinterpret_cast<::tint::core::ir::binary::pb::TypeBuffer&>(::tint::core::ir::binary::pb::_TypeBuffer_default_instance_); -} -inline const ::tint::core::ir::binary::pb::TypeBuffer& Type::buffer() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Type.buffer) - return _internal_buffer(); -} -inline ::tint::core::ir::binary::pb::TypeBuffer* PROTOBUF_NULLABLE Type::unsafe_arena_release_buffer() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Type.buffer) - if (kind_case() == kBuffer) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::TypeBuffer*>(_impl_.kind_.buffer_); - _impl_.kind_.buffer_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Type::unsafe_arena_set_allocated_buffer( - ::tint::core::ir::binary::pb::TypeBuffer* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_buffer(); - _impl_.kind_.buffer_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Type.buffer) -} -inline ::tint::core::ir::binary::pb::TypeBuffer* PROTOBUF_NONNULL Type::_internal_mutable_buffer() { - if (kind_case() != kBuffer) { - clear_kind(); - set_has_buffer(); - _impl_.kind_.buffer_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::TypeBuffer>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::TypeBuffer*>(_impl_.kind_.buffer_); -} -inline ::tint::core::ir::binary::pb::TypeBuffer* PROTOBUF_NONNULL Type::mutable_buffer() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::TypeBuffer* _msg = _internal_mutable_buffer(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Type.buffer) - return _msg; -} - -inline bool Type::has_kind() const { - return kind_case() != KIND_NOT_SET; -} -inline void Type::clear_has_kind() { - _impl_._oneof_case_[0] = KIND_NOT_SET; -} -inline Type::KindCase Type::kind_case() const { - return Type::KindCase(_impl_._oneof_case_[0]); -} -// ------------------------------------------------------------------- - -// TypeVector - -// uint32 width = 1; -inline void TypeVector::clear_width() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.width_ = 0u; - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline ::uint32_t TypeVector::width() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.TypeVector.width) - return _internal_width(); -} -inline void TypeVector::set_width(::uint32_t value) { - _internal_set_width(value); - _impl_._has_bits_[0] |= 0x00000001U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.TypeVector.width) -} -inline ::uint32_t TypeVector::_internal_width() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.width_; -} -inline void TypeVector::_internal_set_width(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.width_ = value; -} - -// uint32 element_type = 2; -inline void TypeVector::clear_element_type() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.element_type_ = 0u; - _impl_._has_bits_[0] &= ~0x00000002U; -} -inline ::uint32_t TypeVector::element_type() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.TypeVector.element_type) - return _internal_element_type(); -} -inline void TypeVector::set_element_type(::uint32_t value) { - _internal_set_element_type(value); - _impl_._has_bits_[0] |= 0x00000002U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.TypeVector.element_type) -} -inline ::uint32_t TypeVector::_internal_element_type() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.element_type_; -} -inline void TypeVector::_internal_set_element_type(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.element_type_ = value; -} - -// ------------------------------------------------------------------- - -// TypeMatrix - -// uint32 num_columns = 1; -inline void TypeMatrix::clear_num_columns() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.num_columns_ = 0u; - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline ::uint32_t TypeMatrix::num_columns() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.TypeMatrix.num_columns) - return _internal_num_columns(); -} -inline void TypeMatrix::set_num_columns(::uint32_t value) { - _internal_set_num_columns(value); - _impl_._has_bits_[0] |= 0x00000001U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.TypeMatrix.num_columns) -} -inline ::uint32_t TypeMatrix::_internal_num_columns() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.num_columns_; -} -inline void TypeMatrix::_internal_set_num_columns(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.num_columns_ = value; -} - -// uint32 num_rows = 2; -inline void TypeMatrix::clear_num_rows() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.num_rows_ = 0u; - _impl_._has_bits_[0] &= ~0x00000002U; -} -inline ::uint32_t TypeMatrix::num_rows() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.TypeMatrix.num_rows) - return _internal_num_rows(); -} -inline void TypeMatrix::set_num_rows(::uint32_t value) { - _internal_set_num_rows(value); - _impl_._has_bits_[0] |= 0x00000002U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.TypeMatrix.num_rows) -} -inline ::uint32_t TypeMatrix::_internal_num_rows() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.num_rows_; -} -inline void TypeMatrix::_internal_set_num_rows(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.num_rows_ = value; -} - -// uint32 element_type = 3; -inline void TypeMatrix::clear_element_type() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.element_type_ = 0u; - _impl_._has_bits_[0] &= ~0x00000004U; -} -inline ::uint32_t TypeMatrix::element_type() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.TypeMatrix.element_type) - return _internal_element_type(); -} -inline void TypeMatrix::set_element_type(::uint32_t value) { - _internal_set_element_type(value); - _impl_._has_bits_[0] |= 0x00000004U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.TypeMatrix.element_type) -} -inline ::uint32_t TypeMatrix::_internal_element_type() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.element_type_; -} -inline void TypeMatrix::_internal_set_element_type(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.element_type_ = value; -} - -// ------------------------------------------------------------------- - -// TypeArray - -// uint32 element = 1; -inline void TypeArray::clear_element() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.element_ = 0u; - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline ::uint32_t TypeArray::element() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.TypeArray.element) - return _internal_element(); -} -inline void TypeArray::set_element(::uint32_t value) { - _internal_set_element(value); - _impl_._has_bits_[0] |= 0x00000001U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.TypeArray.element) -} -inline ::uint32_t TypeArray::_internal_element() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.element_; -} -inline void TypeArray::_internal_set_element(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.element_ = value; -} - -// uint32 count = 3; -inline void TypeArray::clear_count() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.count_ = 0u; - _impl_._has_bits_[0] &= ~0x00000002U; -} -inline ::uint32_t TypeArray::count() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.TypeArray.count) - return _internal_count(); -} -inline void TypeArray::set_count(::uint32_t value) { - _internal_set_count(value); - _impl_._has_bits_[0] |= 0x00000002U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.TypeArray.count) -} -inline ::uint32_t TypeArray::_internal_count() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.count_; -} -inline void TypeArray::_internal_set_count(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.count_ = value; -} - -// ------------------------------------------------------------------- - -// TypeBindingArray - -// uint32 element = 1; -inline void TypeBindingArray::clear_element() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.element_ = 0u; - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline ::uint32_t TypeBindingArray::element() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.TypeBindingArray.element) - return _internal_element(); -} -inline void TypeBindingArray::set_element(::uint32_t value) { - _internal_set_element(value); - _impl_._has_bits_[0] |= 0x00000001U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.TypeBindingArray.element) -} -inline ::uint32_t TypeBindingArray::_internal_element() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.element_; -} -inline void TypeBindingArray::_internal_set_element(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.element_ = value; -} - -// uint32 count = 2; -inline void TypeBindingArray::clear_count() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.count_ = 0u; - _impl_._has_bits_[0] &= ~0x00000002U; -} -inline ::uint32_t TypeBindingArray::count() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.TypeBindingArray.count) - return _internal_count(); -} -inline void TypeBindingArray::set_count(::uint32_t value) { - _internal_set_count(value); - _impl_._has_bits_[0] |= 0x00000002U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.TypeBindingArray.count) -} -inline ::uint32_t TypeBindingArray::_internal_count() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.count_; -} -inline void TypeBindingArray::_internal_set_count(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.count_ = value; -} - -// ------------------------------------------------------------------- - -// TypePointer - -// .tint.core.ir.binary.pb.AddressSpace address_space = 1; -inline void TypePointer::clear_address_space() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.address_space_ = 0; - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline ::tint::core::ir::binary::pb::AddressSpace TypePointer::address_space() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.TypePointer.address_space) - return _internal_address_space(); -} -inline void TypePointer::set_address_space(::tint::core::ir::binary::pb::AddressSpace value) { - _internal_set_address_space(value); - _impl_._has_bits_[0] |= 0x00000001U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.TypePointer.address_space) -} -inline ::tint::core::ir::binary::pb::AddressSpace TypePointer::_internal_address_space() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return static_cast<::tint::core::ir::binary::pb::AddressSpace>(_impl_.address_space_); -} -inline void TypePointer::_internal_set_address_space(::tint::core::ir::binary::pb::AddressSpace value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.address_space_ = value; -} - -// uint32 store_type = 2; -inline void TypePointer::clear_store_type() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.store_type_ = 0u; - _impl_._has_bits_[0] &= ~0x00000002U; -} -inline ::uint32_t TypePointer::store_type() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.TypePointer.store_type) - return _internal_store_type(); -} -inline void TypePointer::set_store_type(::uint32_t value) { - _internal_set_store_type(value); - _impl_._has_bits_[0] |= 0x00000002U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.TypePointer.store_type) -} -inline ::uint32_t TypePointer::_internal_store_type() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.store_type_; -} -inline void TypePointer::_internal_set_store_type(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.store_type_ = value; -} - -// .tint.core.ir.binary.pb.AccessControl access = 3; -inline void TypePointer::clear_access() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.access_ = 0; - _impl_._has_bits_[0] &= ~0x00000004U; -} -inline ::tint::core::ir::binary::pb::AccessControl TypePointer::access() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.TypePointer.access) - return _internal_access(); -} -inline void TypePointer::set_access(::tint::core::ir::binary::pb::AccessControl value) { - _internal_set_access(value); - _impl_._has_bits_[0] |= 0x00000004U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.TypePointer.access) -} -inline ::tint::core::ir::binary::pb::AccessControl TypePointer::_internal_access() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return static_cast<::tint::core::ir::binary::pb::AccessControl>(_impl_.access_); -} -inline void TypePointer::_internal_set_access(::tint::core::ir::binary::pb::AccessControl value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.access_ = value; -} - -// ------------------------------------------------------------------- - -// TypeStruct - -// string name = 1; -inline void TypeStruct::clear_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.name_.ClearToEmpty(); - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline const ::std::string& TypeStruct::name() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.TypeStruct.name) - return _internal_name(); -} -template -PROTOBUF_ALWAYS_INLINE void TypeStruct::set_name(Arg_&& arg, Args_... args) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_._has_bits_[0] |= 0x00000001U; - _impl_.name_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.TypeStruct.name) -} -inline ::std::string* PROTOBUF_NONNULL TypeStruct::mutable_name() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::std::string* _s = _internal_mutable_name(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.TypeStruct.name) - return _s; -} -inline const ::std::string& TypeStruct::_internal_name() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.name_.Get(); -} -inline void TypeStruct::_internal_set_name(const ::std::string& value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_._has_bits_[0] |= 0x00000001U; - _impl_.name_.Set(value, GetArena()); -} -inline ::std::string* PROTOBUF_NONNULL TypeStruct::_internal_mutable_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_._has_bits_[0] |= 0x00000001U; - return _impl_.name_.Mutable( GetArena()); -} -inline ::std::string* PROTOBUF_NULLABLE TypeStruct::release_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.TypeStruct.name) - if ((_impl_._has_bits_[0] & 0x00000001U) == 0) { - return nullptr; - } - _impl_._has_bits_[0] &= ~0x00000001U; - auto* released = _impl_.name_.Release(); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.name_.Set("", GetArena()); - } - return released; -} -inline void TypeStruct::set_allocated_name(::std::string* PROTOBUF_NULLABLE value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (value != nullptr) { - _impl_._has_bits_[0] |= 0x00000001U; - } else { - _impl_._has_bits_[0] &= ~0x00000001U; - } - _impl_.name_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.name_.IsDefault()) { - _impl_.name_.Set("", GetArena()); - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.TypeStruct.name) -} - -// repeated .tint.core.ir.binary.pb.TypeStructMember member = 2; -inline int TypeStruct::_internal_member_size() const { - return _internal_member().size(); -} -inline int TypeStruct::member_size() const { - return _internal_member_size(); -} -inline void TypeStruct::clear_member() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.member_.Clear(); -} -inline ::tint::core::ir::binary::pb::TypeStructMember* PROTOBUF_NONNULL TypeStruct::mutable_member(int index) - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.TypeStruct.member) - return _internal_mutable_member()->Mutable(index); -} -inline ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::TypeStructMember>* PROTOBUF_NONNULL TypeStruct::mutable_member() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_mutable_list:tint.core.ir.binary.pb.TypeStruct.member) - ::google::protobuf::internal::TSanWrite(&_impl_); - return _internal_mutable_member(); -} -inline const ::tint::core::ir::binary::pb::TypeStructMember& TypeStruct::member(int index) const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.TypeStruct.member) - return _internal_member().Get(index); -} -inline ::tint::core::ir::binary::pb::TypeStructMember* PROTOBUF_NONNULL TypeStruct::add_member() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::google::protobuf::internal::TSanWrite(&_impl_); - ::tint::core::ir::binary::pb::TypeStructMember* _add = _internal_mutable_member()->Add(); - // @@protoc_insertion_point(field_add:tint.core.ir.binary.pb.TypeStruct.member) - return _add; -} -inline const ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::TypeStructMember>& TypeStruct::member() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_list:tint.core.ir.binary.pb.TypeStruct.member) - return _internal_member(); -} -inline const ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::TypeStructMember>& -TypeStruct::_internal_member() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.member_; -} -inline ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::TypeStructMember>* PROTOBUF_NONNULL -TypeStruct::_internal_mutable_member() { - ::google::protobuf::internal::TSanRead(&_impl_); - return &_impl_.member_; -} - -// ------------------------------------------------------------------- - -// TypeStructMember - -// string name = 1; -inline void TypeStructMember::clear_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.name_.ClearToEmpty(); - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline const ::std::string& TypeStructMember::name() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.TypeStructMember.name) - return _internal_name(); -} -template -PROTOBUF_ALWAYS_INLINE void TypeStructMember::set_name(Arg_&& arg, Args_... args) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_._has_bits_[0] |= 0x00000001U; - _impl_.name_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.TypeStructMember.name) -} -inline ::std::string* PROTOBUF_NONNULL TypeStructMember::mutable_name() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::std::string* _s = _internal_mutable_name(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.TypeStructMember.name) - return _s; -} -inline const ::std::string& TypeStructMember::_internal_name() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.name_.Get(); -} -inline void TypeStructMember::_internal_set_name(const ::std::string& value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_._has_bits_[0] |= 0x00000001U; - _impl_.name_.Set(value, GetArena()); -} -inline ::std::string* PROTOBUF_NONNULL TypeStructMember::_internal_mutable_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_._has_bits_[0] |= 0x00000001U; - return _impl_.name_.Mutable( GetArena()); -} -inline ::std::string* PROTOBUF_NULLABLE TypeStructMember::release_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.TypeStructMember.name) - if ((_impl_._has_bits_[0] & 0x00000001U) == 0) { - return nullptr; - } - _impl_._has_bits_[0] &= ~0x00000001U; - auto* released = _impl_.name_.Release(); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.name_.Set("", GetArena()); - } - return released; -} -inline void TypeStructMember::set_allocated_name(::std::string* PROTOBUF_NULLABLE value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (value != nullptr) { - _impl_._has_bits_[0] |= 0x00000001U; - } else { - _impl_._has_bits_[0] &= ~0x00000001U; - } - _impl_.name_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.name_.IsDefault()) { - _impl_.name_.Set("", GetArena()); - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.TypeStructMember.name) -} - -// uint32 type = 2; -inline void TypeStructMember::clear_type() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.type_ = 0u; - _impl_._has_bits_[0] &= ~0x00000004U; -} -inline ::uint32_t TypeStructMember::type() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.TypeStructMember.type) - return _internal_type(); -} -inline void TypeStructMember::set_type(::uint32_t value) { - _internal_set_type(value); - _impl_._has_bits_[0] |= 0x00000004U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.TypeStructMember.type) -} -inline ::uint32_t TypeStructMember::_internal_type() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.type_; -} -inline void TypeStructMember::_internal_set_type(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.type_ = value; -} - -// uint32 size = 3; -inline void TypeStructMember::clear_size() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.size_ = 0u; - _impl_._has_bits_[0] &= ~0x00000008U; -} -inline ::uint32_t TypeStructMember::size() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.TypeStructMember.size) - return _internal_size(); -} -inline void TypeStructMember::set_size(::uint32_t value) { - _internal_set_size(value); - _impl_._has_bits_[0] |= 0x00000008U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.TypeStructMember.size) -} -inline ::uint32_t TypeStructMember::_internal_size() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.size_; -} -inline void TypeStructMember::_internal_set_size(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.size_ = value; -} - -// uint32 align = 4; -inline void TypeStructMember::clear_align() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.align_ = 0u; - _impl_._has_bits_[0] &= ~0x00000010U; -} -inline ::uint32_t TypeStructMember::align() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.TypeStructMember.align) - return _internal_align(); -} -inline void TypeStructMember::set_align(::uint32_t value) { - _internal_set_align(value); - _impl_._has_bits_[0] |= 0x00000010U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.TypeStructMember.align) -} -inline ::uint32_t TypeStructMember::_internal_align() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.align_; -} -inline void TypeStructMember::_internal_set_align(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.align_ = value; -} - -// optional .tint.core.ir.binary.pb.AttributesStructMember attributes = 5; -inline bool TypeStructMember::has_attributes() const { - bool value = (_impl_._has_bits_[0] & 0x00000002U) != 0; - PROTOBUF_ASSUME(!value || _impl_.attributes_ != nullptr); - return value; -} -inline void TypeStructMember::clear_attributes() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (_impl_.attributes_ != nullptr) _impl_.attributes_->Clear(); - _impl_._has_bits_[0] &= ~0x00000002U; -} -inline const ::tint::core::ir::binary::pb::AttributesStructMember& TypeStructMember::_internal_attributes() const { - ::google::protobuf::internal::TSanRead(&_impl_); - const ::tint::core::ir::binary::pb::AttributesStructMember* p = _impl_.attributes_; - return p != nullptr ? *p : reinterpret_cast(::tint::core::ir::binary::pb::_AttributesStructMember_default_instance_); -} -inline const ::tint::core::ir::binary::pb::AttributesStructMember& TypeStructMember::attributes() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.TypeStructMember.attributes) - return _internal_attributes(); -} -inline void TypeStructMember::unsafe_arena_set_allocated_attributes( - ::tint::core::ir::binary::pb::AttributesStructMember* PROTOBUF_NULLABLE value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (GetArena() == nullptr) { - delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.attributes_); - } - _impl_.attributes_ = reinterpret_cast<::tint::core::ir::binary::pb::AttributesStructMember*>(value); - if (value != nullptr) { - _impl_._has_bits_[0] |= 0x00000002U; - } else { - _impl_._has_bits_[0] &= ~0x00000002U; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.TypeStructMember.attributes) -} -inline ::tint::core::ir::binary::pb::AttributesStructMember* PROTOBUF_NULLABLE TypeStructMember::release_attributes() { - ::google::protobuf::internal::TSanWrite(&_impl_); - - _impl_._has_bits_[0] &= ~0x00000002U; - ::tint::core::ir::binary::pb::AttributesStructMember* released = _impl_.attributes_; - _impl_.attributes_ = nullptr; - if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { - auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); - released = ::google::protobuf::internal::DuplicateIfNonNull(released); - if (GetArena() == nullptr) { - delete old; - } - } else { - if (GetArena() != nullptr) { - released = ::google::protobuf::internal::DuplicateIfNonNull(released); - } - } - return released; -} -inline ::tint::core::ir::binary::pb::AttributesStructMember* PROTOBUF_NULLABLE TypeStructMember::unsafe_arena_release_attributes() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.TypeStructMember.attributes) - - _impl_._has_bits_[0] &= ~0x00000002U; - ::tint::core::ir::binary::pb::AttributesStructMember* temp = _impl_.attributes_; - _impl_.attributes_ = nullptr; - return temp; -} -inline ::tint::core::ir::binary::pb::AttributesStructMember* PROTOBUF_NONNULL TypeStructMember::_internal_mutable_attributes() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (_impl_.attributes_ == nullptr) { - auto* p = ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::AttributesStructMember>(GetArena()); - _impl_.attributes_ = reinterpret_cast<::tint::core::ir::binary::pb::AttributesStructMember*>(p); - } - return _impl_.attributes_; -} -inline ::tint::core::ir::binary::pb::AttributesStructMember* PROTOBUF_NONNULL TypeStructMember::mutable_attributes() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - _impl_._has_bits_[0] |= 0x00000002U; - ::tint::core::ir::binary::pb::AttributesStructMember* _msg = _internal_mutable_attributes(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.TypeStructMember.attributes) - return _msg; -} -inline void TypeStructMember::set_allocated_attributes(::tint::core::ir::binary::pb::AttributesStructMember* PROTOBUF_NULLABLE value) { - ::google::protobuf::Arena* message_arena = GetArena(); - ::google::protobuf::internal::TSanWrite(&_impl_); - if (message_arena == nullptr) { - delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.attributes_); - } - - if (value != nullptr) { - ::google::protobuf::Arena* submessage_arena = value->GetArena(); - if (message_arena != submessage_arena) { - value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00000002U; - } else { - _impl_._has_bits_[0] &= ~0x00000002U; - } - - _impl_.attributes_ = reinterpret_cast<::tint::core::ir::binary::pb::AttributesStructMember*>(value); - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.TypeStructMember.attributes) -} - -// ------------------------------------------------------------------- - -// TypeAtomic - -// uint32 type = 1; -inline void TypeAtomic::clear_type() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.type_ = 0u; - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline ::uint32_t TypeAtomic::type() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.TypeAtomic.type) - return _internal_type(); -} -inline void TypeAtomic::set_type(::uint32_t value) { - _internal_set_type(value); - _impl_._has_bits_[0] |= 0x00000001U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.TypeAtomic.type) -} -inline ::uint32_t TypeAtomic::_internal_type() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.type_; -} -inline void TypeAtomic::_internal_set_type(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.type_ = value; -} - -// ------------------------------------------------------------------- - -// TypeDepthTexture - -// .tint.core.ir.binary.pb.TextureDimension dimension = 1; -inline void TypeDepthTexture::clear_dimension() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.dimension_ = 0; - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline ::tint::core::ir::binary::pb::TextureDimension TypeDepthTexture::dimension() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.TypeDepthTexture.dimension) - return _internal_dimension(); -} -inline void TypeDepthTexture::set_dimension(::tint::core::ir::binary::pb::TextureDimension value) { - _internal_set_dimension(value); - _impl_._has_bits_[0] |= 0x00000001U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.TypeDepthTexture.dimension) -} -inline ::tint::core::ir::binary::pb::TextureDimension TypeDepthTexture::_internal_dimension() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return static_cast<::tint::core::ir::binary::pb::TextureDimension>(_impl_.dimension_); -} -inline void TypeDepthTexture::_internal_set_dimension(::tint::core::ir::binary::pb::TextureDimension value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.dimension_ = value; -} - -// ------------------------------------------------------------------- - -// TypeSampledTexture - -// .tint.core.ir.binary.pb.TextureDimension dimension = 1; -inline void TypeSampledTexture::clear_dimension() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.dimension_ = 0; - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline ::tint::core::ir::binary::pb::TextureDimension TypeSampledTexture::dimension() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.TypeSampledTexture.dimension) - return _internal_dimension(); -} -inline void TypeSampledTexture::set_dimension(::tint::core::ir::binary::pb::TextureDimension value) { - _internal_set_dimension(value); - _impl_._has_bits_[0] |= 0x00000001U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.TypeSampledTexture.dimension) -} -inline ::tint::core::ir::binary::pb::TextureDimension TypeSampledTexture::_internal_dimension() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return static_cast<::tint::core::ir::binary::pb::TextureDimension>(_impl_.dimension_); -} -inline void TypeSampledTexture::_internal_set_dimension(::tint::core::ir::binary::pb::TextureDimension value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.dimension_ = value; -} - -// uint32 sub_type = 2; -inline void TypeSampledTexture::clear_sub_type() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.sub_type_ = 0u; - _impl_._has_bits_[0] &= ~0x00000002U; -} -inline ::uint32_t TypeSampledTexture::sub_type() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.TypeSampledTexture.sub_type) - return _internal_sub_type(); -} -inline void TypeSampledTexture::set_sub_type(::uint32_t value) { - _internal_set_sub_type(value); - _impl_._has_bits_[0] |= 0x00000002U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.TypeSampledTexture.sub_type) -} -inline ::uint32_t TypeSampledTexture::_internal_sub_type() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.sub_type_; -} -inline void TypeSampledTexture::_internal_set_sub_type(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.sub_type_ = value; -} - -// ------------------------------------------------------------------- - -// TypeMultisampledTexture - -// .tint.core.ir.binary.pb.TextureDimension dimension = 1; -inline void TypeMultisampledTexture::clear_dimension() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.dimension_ = 0; - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline ::tint::core::ir::binary::pb::TextureDimension TypeMultisampledTexture::dimension() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.TypeMultisampledTexture.dimension) - return _internal_dimension(); -} -inline void TypeMultisampledTexture::set_dimension(::tint::core::ir::binary::pb::TextureDimension value) { - _internal_set_dimension(value); - _impl_._has_bits_[0] |= 0x00000001U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.TypeMultisampledTexture.dimension) -} -inline ::tint::core::ir::binary::pb::TextureDimension TypeMultisampledTexture::_internal_dimension() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return static_cast<::tint::core::ir::binary::pb::TextureDimension>(_impl_.dimension_); -} -inline void TypeMultisampledTexture::_internal_set_dimension(::tint::core::ir::binary::pb::TextureDimension value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.dimension_ = value; -} - -// uint32 sub_type = 2; -inline void TypeMultisampledTexture::clear_sub_type() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.sub_type_ = 0u; - _impl_._has_bits_[0] &= ~0x00000002U; -} -inline ::uint32_t TypeMultisampledTexture::sub_type() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.TypeMultisampledTexture.sub_type) - return _internal_sub_type(); -} -inline void TypeMultisampledTexture::set_sub_type(::uint32_t value) { - _internal_set_sub_type(value); - _impl_._has_bits_[0] |= 0x00000002U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.TypeMultisampledTexture.sub_type) -} -inline ::uint32_t TypeMultisampledTexture::_internal_sub_type() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.sub_type_; -} -inline void TypeMultisampledTexture::_internal_set_sub_type(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.sub_type_ = value; -} - -// ------------------------------------------------------------------- - -// TypeDepthMultisampledTexture - -// .tint.core.ir.binary.pb.TextureDimension dimension = 1; -inline void TypeDepthMultisampledTexture::clear_dimension() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.dimension_ = 0; - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline ::tint::core::ir::binary::pb::TextureDimension TypeDepthMultisampledTexture::dimension() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.TypeDepthMultisampledTexture.dimension) - return _internal_dimension(); -} -inline void TypeDepthMultisampledTexture::set_dimension(::tint::core::ir::binary::pb::TextureDimension value) { - _internal_set_dimension(value); - _impl_._has_bits_[0] |= 0x00000001U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.TypeDepthMultisampledTexture.dimension) -} -inline ::tint::core::ir::binary::pb::TextureDimension TypeDepthMultisampledTexture::_internal_dimension() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return static_cast<::tint::core::ir::binary::pb::TextureDimension>(_impl_.dimension_); -} -inline void TypeDepthMultisampledTexture::_internal_set_dimension(::tint::core::ir::binary::pb::TextureDimension value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.dimension_ = value; -} - -// ------------------------------------------------------------------- - -// TypeStorageTexture - -// .tint.core.ir.binary.pb.TextureDimension dimension = 1; -inline void TypeStorageTexture::clear_dimension() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.dimension_ = 0; - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline ::tint::core::ir::binary::pb::TextureDimension TypeStorageTexture::dimension() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.TypeStorageTexture.dimension) - return _internal_dimension(); -} -inline void TypeStorageTexture::set_dimension(::tint::core::ir::binary::pb::TextureDimension value) { - _internal_set_dimension(value); - _impl_._has_bits_[0] |= 0x00000001U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.TypeStorageTexture.dimension) -} -inline ::tint::core::ir::binary::pb::TextureDimension TypeStorageTexture::_internal_dimension() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return static_cast<::tint::core::ir::binary::pb::TextureDimension>(_impl_.dimension_); -} -inline void TypeStorageTexture::_internal_set_dimension(::tint::core::ir::binary::pb::TextureDimension value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.dimension_ = value; -} - -// .tint.core.ir.binary.pb.TexelFormat texel_format = 2; -inline void TypeStorageTexture::clear_texel_format() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.texel_format_ = 0; - _impl_._has_bits_[0] &= ~0x00000002U; -} -inline ::tint::core::ir::binary::pb::TexelFormat TypeStorageTexture::texel_format() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.TypeStorageTexture.texel_format) - return _internal_texel_format(); -} -inline void TypeStorageTexture::set_texel_format(::tint::core::ir::binary::pb::TexelFormat value) { - _internal_set_texel_format(value); - _impl_._has_bits_[0] |= 0x00000002U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.TypeStorageTexture.texel_format) -} -inline ::tint::core::ir::binary::pb::TexelFormat TypeStorageTexture::_internal_texel_format() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return static_cast<::tint::core::ir::binary::pb::TexelFormat>(_impl_.texel_format_); -} -inline void TypeStorageTexture::_internal_set_texel_format(::tint::core::ir::binary::pb::TexelFormat value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.texel_format_ = value; -} - -// .tint.core.ir.binary.pb.AccessControl access = 3; -inline void TypeStorageTexture::clear_access() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.access_ = 0; - _impl_._has_bits_[0] &= ~0x00000004U; -} -inline ::tint::core::ir::binary::pb::AccessControl TypeStorageTexture::access() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.TypeStorageTexture.access) - return _internal_access(); -} -inline void TypeStorageTexture::set_access(::tint::core::ir::binary::pb::AccessControl value) { - _internal_set_access(value); - _impl_._has_bits_[0] |= 0x00000004U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.TypeStorageTexture.access) -} -inline ::tint::core::ir::binary::pb::AccessControl TypeStorageTexture::_internal_access() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return static_cast<::tint::core::ir::binary::pb::AccessControl>(_impl_.access_); -} -inline void TypeStorageTexture::_internal_set_access(::tint::core::ir::binary::pb::AccessControl value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.access_ = value; -} - -// ------------------------------------------------------------------- - -// TypeResourceBinding - -// ------------------------------------------------------------------- - -// TypeExternalTexture - -// ------------------------------------------------------------------- - -// TypeSampler - -// .tint.core.ir.binary.pb.SamplerKind kind = 1; -inline void TypeSampler::clear_kind() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.kind_ = 0; - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline ::tint::core::ir::binary::pb::SamplerKind TypeSampler::kind() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.TypeSampler.kind) - return _internal_kind(); -} -inline void TypeSampler::set_kind(::tint::core::ir::binary::pb::SamplerKind value) { - _internal_set_kind(value); - _impl_._has_bits_[0] |= 0x00000001U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.TypeSampler.kind) -} -inline ::tint::core::ir::binary::pb::SamplerKind TypeSampler::_internal_kind() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return static_cast<::tint::core::ir::binary::pb::SamplerKind>(_impl_.kind_); -} -inline void TypeSampler::_internal_set_kind(::tint::core::ir::binary::pb::SamplerKind value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.kind_ = value; -} - -// ------------------------------------------------------------------- - -// TypeInputAttachment - -// uint32 sub_type = 1; -inline void TypeInputAttachment::clear_sub_type() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.sub_type_ = 0u; - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline ::uint32_t TypeInputAttachment::sub_type() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.TypeInputAttachment.sub_type) - return _internal_sub_type(); -} -inline void TypeInputAttachment::set_sub_type(::uint32_t value) { - _internal_set_sub_type(value); - _impl_._has_bits_[0] |= 0x00000001U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.TypeInputAttachment.sub_type) -} -inline ::uint32_t TypeInputAttachment::_internal_sub_type() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.sub_type_; -} -inline void TypeInputAttachment::_internal_set_sub_type(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.sub_type_ = value; -} - -// ------------------------------------------------------------------- - -// TypeSubgroupMatrix - -// uint32 sub_type = 1; -inline void TypeSubgroupMatrix::clear_sub_type() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.sub_type_ = 0u; - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline ::uint32_t TypeSubgroupMatrix::sub_type() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.TypeSubgroupMatrix.sub_type) - return _internal_sub_type(); -} -inline void TypeSubgroupMatrix::set_sub_type(::uint32_t value) { - _internal_set_sub_type(value); - _impl_._has_bits_[0] |= 0x00000001U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.TypeSubgroupMatrix.sub_type) -} -inline ::uint32_t TypeSubgroupMatrix::_internal_sub_type() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.sub_type_; -} -inline void TypeSubgroupMatrix::_internal_set_sub_type(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.sub_type_ = value; -} - -// uint32 rows = 2; -inline void TypeSubgroupMatrix::clear_rows() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.rows_ = 0u; - _impl_._has_bits_[0] &= ~0x00000002U; -} -inline ::uint32_t TypeSubgroupMatrix::rows() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.TypeSubgroupMatrix.rows) - return _internal_rows(); -} -inline void TypeSubgroupMatrix::set_rows(::uint32_t value) { - _internal_set_rows(value); - _impl_._has_bits_[0] |= 0x00000002U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.TypeSubgroupMatrix.rows) -} -inline ::uint32_t TypeSubgroupMatrix::_internal_rows() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.rows_; -} -inline void TypeSubgroupMatrix::_internal_set_rows(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.rows_ = value; -} - -// uint32 columns = 3; -inline void TypeSubgroupMatrix::clear_columns() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.columns_ = 0u; - _impl_._has_bits_[0] &= ~0x00000004U; -} -inline ::uint32_t TypeSubgroupMatrix::columns() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.TypeSubgroupMatrix.columns) - return _internal_columns(); -} -inline void TypeSubgroupMatrix::set_columns(::uint32_t value) { - _internal_set_columns(value); - _impl_._has_bits_[0] |= 0x00000004U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.TypeSubgroupMatrix.columns) -} -inline ::uint32_t TypeSubgroupMatrix::_internal_columns() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.columns_; -} -inline void TypeSubgroupMatrix::_internal_set_columns(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.columns_ = value; -} - -// ------------------------------------------------------------------- - -// TypeBuffer - -// uint32 count = 1; -inline void TypeBuffer::clear_count() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.count_ = 0u; - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline ::uint32_t TypeBuffer::count() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.TypeBuffer.count) - return _internal_count(); -} -inline void TypeBuffer::set_count(::uint32_t value) { - _internal_set_count(value); - _impl_._has_bits_[0] |= 0x00000001U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.TypeBuffer.count) -} -inline ::uint32_t TypeBuffer::_internal_count() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.count_; -} -inline void TypeBuffer::_internal_set_count(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.count_ = value; -} - -// ------------------------------------------------------------------- - -// TypeTexelBuffer - -// .tint.core.ir.binary.pb.TexelFormat texel_format = 1; -inline void TypeTexelBuffer::clear_texel_format() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.texel_format_ = 0; - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline ::tint::core::ir::binary::pb::TexelFormat TypeTexelBuffer::texel_format() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.TypeTexelBuffer.texel_format) - return _internal_texel_format(); -} -inline void TypeTexelBuffer::set_texel_format(::tint::core::ir::binary::pb::TexelFormat value) { - _internal_set_texel_format(value); - _impl_._has_bits_[0] |= 0x00000001U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.TypeTexelBuffer.texel_format) -} -inline ::tint::core::ir::binary::pb::TexelFormat TypeTexelBuffer::_internal_texel_format() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return static_cast<::tint::core::ir::binary::pb::TexelFormat>(_impl_.texel_format_); -} -inline void TypeTexelBuffer::_internal_set_texel_format(::tint::core::ir::binary::pb::TexelFormat value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.texel_format_ = value; -} - -// .tint.core.ir.binary.pb.AccessControl access = 2; -inline void TypeTexelBuffer::clear_access() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.access_ = 0; - _impl_._has_bits_[0] &= ~0x00000002U; -} -inline ::tint::core::ir::binary::pb::AccessControl TypeTexelBuffer::access() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.TypeTexelBuffer.access) - return _internal_access(); -} -inline void TypeTexelBuffer::set_access(::tint::core::ir::binary::pb::AccessControl value) { - _internal_set_access(value); - _impl_._has_bits_[0] |= 0x00000002U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.TypeTexelBuffer.access) -} -inline ::tint::core::ir::binary::pb::AccessControl TypeTexelBuffer::_internal_access() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return static_cast<::tint::core::ir::binary::pb::AccessControl>(_impl_.access_); -} -inline void TypeTexelBuffer::_internal_set_access(::tint::core::ir::binary::pb::AccessControl value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.access_ = value; -} - -// ------------------------------------------------------------------- - -// Value - -// uint32 function = 1; -inline bool Value::has_function() const { - return kind_case() == kFunction; -} -inline void Value::set_has_function() { - _impl_._oneof_case_[0] = kFunction; -} -inline void Value::clear_function() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kFunction) { - _impl_.kind_.function_ = 0u; - clear_has_kind(); - } -} -inline ::uint32_t Value::function() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Value.function) - return _internal_function(); -} -inline void Value::set_function(::uint32_t value) { - if (kind_case() != kFunction) { - clear_kind(); - set_has_function(); - } - _impl_.kind_.function_ = value; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.Value.function) -} -inline ::uint32_t Value::_internal_function() const { - if (kind_case() == kFunction) { - return _impl_.kind_.function_; - } - return 0u; -} - -// .tint.core.ir.binary.pb.InstructionResult instruction_result = 2; -inline bool Value::has_instruction_result() const { - return kind_case() == kInstructionResult; -} -inline bool Value::_internal_has_instruction_result() const { - return kind_case() == kInstructionResult; -} -inline void Value::set_has_instruction_result() { - _impl_._oneof_case_[0] = kInstructionResult; -} -inline void Value::clear_instruction_result() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kInstructionResult) { - if (GetArena() == nullptr) { - delete _impl_.kind_.instruction_result_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.instruction_result_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::InstructionResult* PROTOBUF_NULLABLE Value::release_instruction_result() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Value.instruction_result) - if (kind_case() == kInstructionResult) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionResult*>(_impl_.kind_.instruction_result_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.instruction_result_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::InstructionResult& Value::_internal_instruction_result() const { - return kind_case() == kInstructionResult ? *reinterpret_cast<::tint::core::ir::binary::pb::InstructionResult*>(_impl_.kind_.instruction_result_) : reinterpret_cast<::tint::core::ir::binary::pb::InstructionResult&>(::tint::core::ir::binary::pb::_InstructionResult_default_instance_); -} -inline const ::tint::core::ir::binary::pb::InstructionResult& Value::instruction_result() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Value.instruction_result) - return _internal_instruction_result(); -} -inline ::tint::core::ir::binary::pb::InstructionResult* PROTOBUF_NULLABLE Value::unsafe_arena_release_instruction_result() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Value.instruction_result) - if (kind_case() == kInstructionResult) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionResult*>(_impl_.kind_.instruction_result_); - _impl_.kind_.instruction_result_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Value::unsafe_arena_set_allocated_instruction_result( - ::tint::core::ir::binary::pb::InstructionResult* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_instruction_result(); - _impl_.kind_.instruction_result_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Value.instruction_result) -} -inline ::tint::core::ir::binary::pb::InstructionResult* PROTOBUF_NONNULL Value::_internal_mutable_instruction_result() { - if (kind_case() != kInstructionResult) { - clear_kind(); - set_has_instruction_result(); - _impl_.kind_.instruction_result_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::InstructionResult>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::InstructionResult*>(_impl_.kind_.instruction_result_); -} -inline ::tint::core::ir::binary::pb::InstructionResult* PROTOBUF_NONNULL Value::mutable_instruction_result() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::InstructionResult* _msg = _internal_mutable_instruction_result(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Value.instruction_result) - return _msg; -} - -// .tint.core.ir.binary.pb.FunctionParameter function_parameter = 3; -inline bool Value::has_function_parameter() const { - return kind_case() == kFunctionParameter; -} -inline bool Value::_internal_has_function_parameter() const { - return kind_case() == kFunctionParameter; -} -inline void Value::set_has_function_parameter() { - _impl_._oneof_case_[0] = kFunctionParameter; -} -inline void Value::clear_function_parameter() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kFunctionParameter) { - if (GetArena() == nullptr) { - delete _impl_.kind_.function_parameter_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.function_parameter_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::FunctionParameter* PROTOBUF_NULLABLE Value::release_function_parameter() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Value.function_parameter) - if (kind_case() == kFunctionParameter) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::FunctionParameter*>(_impl_.kind_.function_parameter_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.function_parameter_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::FunctionParameter& Value::_internal_function_parameter() const { - return kind_case() == kFunctionParameter ? *reinterpret_cast<::tint::core::ir::binary::pb::FunctionParameter*>(_impl_.kind_.function_parameter_) : reinterpret_cast<::tint::core::ir::binary::pb::FunctionParameter&>(::tint::core::ir::binary::pb::_FunctionParameter_default_instance_); -} -inline const ::tint::core::ir::binary::pb::FunctionParameter& Value::function_parameter() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Value.function_parameter) - return _internal_function_parameter(); -} -inline ::tint::core::ir::binary::pb::FunctionParameter* PROTOBUF_NULLABLE Value::unsafe_arena_release_function_parameter() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Value.function_parameter) - if (kind_case() == kFunctionParameter) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::FunctionParameter*>(_impl_.kind_.function_parameter_); - _impl_.kind_.function_parameter_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Value::unsafe_arena_set_allocated_function_parameter( - ::tint::core::ir::binary::pb::FunctionParameter* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_function_parameter(); - _impl_.kind_.function_parameter_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Value.function_parameter) -} -inline ::tint::core::ir::binary::pb::FunctionParameter* PROTOBUF_NONNULL Value::_internal_mutable_function_parameter() { - if (kind_case() != kFunctionParameter) { - clear_kind(); - set_has_function_parameter(); - _impl_.kind_.function_parameter_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::FunctionParameter>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::FunctionParameter*>(_impl_.kind_.function_parameter_); -} -inline ::tint::core::ir::binary::pb::FunctionParameter* PROTOBUF_NONNULL Value::mutable_function_parameter() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::FunctionParameter* _msg = _internal_mutable_function_parameter(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Value.function_parameter) - return _msg; -} - -// .tint.core.ir.binary.pb.BlockParameter block_parameter = 4; -inline bool Value::has_block_parameter() const { - return kind_case() == kBlockParameter; -} -inline bool Value::_internal_has_block_parameter() const { - return kind_case() == kBlockParameter; -} -inline void Value::set_has_block_parameter() { - _impl_._oneof_case_[0] = kBlockParameter; -} -inline void Value::clear_block_parameter() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kBlockParameter) { - if (GetArena() == nullptr) { - delete _impl_.kind_.block_parameter_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.block_parameter_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::BlockParameter* PROTOBUF_NULLABLE Value::release_block_parameter() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Value.block_parameter) - if (kind_case() == kBlockParameter) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::BlockParameter*>(_impl_.kind_.block_parameter_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.block_parameter_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::BlockParameter& Value::_internal_block_parameter() const { - return kind_case() == kBlockParameter ? *reinterpret_cast<::tint::core::ir::binary::pb::BlockParameter*>(_impl_.kind_.block_parameter_) : reinterpret_cast<::tint::core::ir::binary::pb::BlockParameter&>(::tint::core::ir::binary::pb::_BlockParameter_default_instance_); -} -inline const ::tint::core::ir::binary::pb::BlockParameter& Value::block_parameter() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Value.block_parameter) - return _internal_block_parameter(); -} -inline ::tint::core::ir::binary::pb::BlockParameter* PROTOBUF_NULLABLE Value::unsafe_arena_release_block_parameter() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Value.block_parameter) - if (kind_case() == kBlockParameter) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::BlockParameter*>(_impl_.kind_.block_parameter_); - _impl_.kind_.block_parameter_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Value::unsafe_arena_set_allocated_block_parameter( - ::tint::core::ir::binary::pb::BlockParameter* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_block_parameter(); - _impl_.kind_.block_parameter_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Value.block_parameter) -} -inline ::tint::core::ir::binary::pb::BlockParameter* PROTOBUF_NONNULL Value::_internal_mutable_block_parameter() { - if (kind_case() != kBlockParameter) { - clear_kind(); - set_has_block_parameter(); - _impl_.kind_.block_parameter_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::BlockParameter>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::BlockParameter*>(_impl_.kind_.block_parameter_); -} -inline ::tint::core::ir::binary::pb::BlockParameter* PROTOBUF_NONNULL Value::mutable_block_parameter() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::BlockParameter* _msg = _internal_mutable_block_parameter(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Value.block_parameter) - return _msg; -} - -// uint32 constant = 5; -inline bool Value::has_constant() const { - return kind_case() == kConstant; -} -inline void Value::set_has_constant() { - _impl_._oneof_case_[0] = kConstant; -} -inline void Value::clear_constant() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kConstant) { - _impl_.kind_.constant_ = 0u; - clear_has_kind(); - } -} -inline ::uint32_t Value::constant() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Value.constant) - return _internal_constant(); -} -inline void Value::set_constant(::uint32_t value) { - if (kind_case() != kConstant) { - clear_kind(); - set_has_constant(); - } - _impl_.kind_.constant_ = value; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.Value.constant) -} -inline ::uint32_t Value::_internal_constant() const { - if (kind_case() == kConstant) { - return _impl_.kind_.constant_; - } - return 0u; -} - -inline bool Value::has_kind() const { - return kind_case() != KIND_NOT_SET; -} -inline void Value::clear_has_kind() { - _impl_._oneof_case_[0] = KIND_NOT_SET; -} -inline Value::KindCase Value::kind_case() const { - return Value::KindCase(_impl_._oneof_case_[0]); -} -// ------------------------------------------------------------------- - -// InstructionResult - -// uint32 type = 1; -inline void InstructionResult::clear_type() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.type_ = 0u; - _impl_._has_bits_[0] &= ~0x00000002U; -} -inline ::uint32_t InstructionResult::type() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.InstructionResult.type) - return _internal_type(); -} -inline void InstructionResult::set_type(::uint32_t value) { - _internal_set_type(value); - _impl_._has_bits_[0] |= 0x00000002U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.InstructionResult.type) -} -inline ::uint32_t InstructionResult::_internal_type() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.type_; -} -inline void InstructionResult::_internal_set_type(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.type_ = value; -} - -// optional string name = 2; -inline bool InstructionResult::has_name() const { - bool value = (_impl_._has_bits_[0] & 0x00000001U) != 0; - return value; -} -inline void InstructionResult::clear_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.name_.ClearToEmpty(); - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline const ::std::string& InstructionResult::name() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.InstructionResult.name) - return _internal_name(); -} -template -PROTOBUF_ALWAYS_INLINE void InstructionResult::set_name(Arg_&& arg, Args_... args) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_._has_bits_[0] |= 0x00000001U; - _impl_.name_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.InstructionResult.name) -} -inline ::std::string* PROTOBUF_NONNULL InstructionResult::mutable_name() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::std::string* _s = _internal_mutable_name(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.InstructionResult.name) - return _s; -} -inline const ::std::string& InstructionResult::_internal_name() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.name_.Get(); -} -inline void InstructionResult::_internal_set_name(const ::std::string& value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_._has_bits_[0] |= 0x00000001U; - _impl_.name_.Set(value, GetArena()); -} -inline ::std::string* PROTOBUF_NONNULL InstructionResult::_internal_mutable_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_._has_bits_[0] |= 0x00000001U; - return _impl_.name_.Mutable( GetArena()); -} -inline ::std::string* PROTOBUF_NULLABLE InstructionResult::release_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.InstructionResult.name) - if ((_impl_._has_bits_[0] & 0x00000001U) == 0) { - return nullptr; - } - _impl_._has_bits_[0] &= ~0x00000001U; - auto* released = _impl_.name_.Release(); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.name_.Set("", GetArena()); - } - return released; -} -inline void InstructionResult::set_allocated_name(::std::string* PROTOBUF_NULLABLE value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (value != nullptr) { - _impl_._has_bits_[0] |= 0x00000001U; - } else { - _impl_._has_bits_[0] &= ~0x00000001U; - } - _impl_.name_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.name_.IsDefault()) { - _impl_.name_.Set("", GetArena()); - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.InstructionResult.name) -} - -// ------------------------------------------------------------------- - -// FunctionParameter - -// uint32 type = 1; -inline void FunctionParameter::clear_type() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.type_ = 0u; - _impl_._has_bits_[0] &= ~0x00000004U; -} -inline ::uint32_t FunctionParameter::type() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.FunctionParameter.type) - return _internal_type(); -} -inline void FunctionParameter::set_type(::uint32_t value) { - _internal_set_type(value); - _impl_._has_bits_[0] |= 0x00000004U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.FunctionParameter.type) -} -inline ::uint32_t FunctionParameter::_internal_type() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.type_; -} -inline void FunctionParameter::_internal_set_type(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.type_ = value; -} - -// optional string name = 2; -inline bool FunctionParameter::has_name() const { - bool value = (_impl_._has_bits_[0] & 0x00000001U) != 0; - return value; -} -inline void FunctionParameter::clear_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.name_.ClearToEmpty(); - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline const ::std::string& FunctionParameter::name() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.FunctionParameter.name) - return _internal_name(); -} -template -PROTOBUF_ALWAYS_INLINE void FunctionParameter::set_name(Arg_&& arg, Args_... args) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_._has_bits_[0] |= 0x00000001U; - _impl_.name_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.FunctionParameter.name) -} -inline ::std::string* PROTOBUF_NONNULL FunctionParameter::mutable_name() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::std::string* _s = _internal_mutable_name(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.FunctionParameter.name) - return _s; -} -inline const ::std::string& FunctionParameter::_internal_name() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.name_.Get(); -} -inline void FunctionParameter::_internal_set_name(const ::std::string& value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_._has_bits_[0] |= 0x00000001U; - _impl_.name_.Set(value, GetArena()); -} -inline ::std::string* PROTOBUF_NONNULL FunctionParameter::_internal_mutable_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_._has_bits_[0] |= 0x00000001U; - return _impl_.name_.Mutable( GetArena()); -} -inline ::std::string* PROTOBUF_NULLABLE FunctionParameter::release_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.FunctionParameter.name) - if ((_impl_._has_bits_[0] & 0x00000001U) == 0) { - return nullptr; - } - _impl_._has_bits_[0] &= ~0x00000001U; - auto* released = _impl_.name_.Release(); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.name_.Set("", GetArena()); - } - return released; -} -inline void FunctionParameter::set_allocated_name(::std::string* PROTOBUF_NULLABLE value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (value != nullptr) { - _impl_._has_bits_[0] |= 0x00000001U; - } else { - _impl_._has_bits_[0] &= ~0x00000001U; - } - _impl_.name_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.name_.IsDefault()) { - _impl_.name_.Set("", GetArena()); - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.FunctionParameter.name) -} - -// optional .tint.core.ir.binary.pb.AttributesFunctionParameter attributes = 3; -inline bool FunctionParameter::has_attributes() const { - bool value = (_impl_._has_bits_[0] & 0x00000002U) != 0; - PROTOBUF_ASSUME(!value || _impl_.attributes_ != nullptr); - return value; -} -inline void FunctionParameter::clear_attributes() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (_impl_.attributes_ != nullptr) _impl_.attributes_->Clear(); - _impl_._has_bits_[0] &= ~0x00000002U; -} -inline const ::tint::core::ir::binary::pb::AttributesFunctionParameter& FunctionParameter::_internal_attributes() const { - ::google::protobuf::internal::TSanRead(&_impl_); - const ::tint::core::ir::binary::pb::AttributesFunctionParameter* p = _impl_.attributes_; - return p != nullptr ? *p : reinterpret_cast(::tint::core::ir::binary::pb::_AttributesFunctionParameter_default_instance_); -} -inline const ::tint::core::ir::binary::pb::AttributesFunctionParameter& FunctionParameter::attributes() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.FunctionParameter.attributes) - return _internal_attributes(); -} -inline void FunctionParameter::unsafe_arena_set_allocated_attributes( - ::tint::core::ir::binary::pb::AttributesFunctionParameter* PROTOBUF_NULLABLE value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (GetArena() == nullptr) { - delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.attributes_); - } - _impl_.attributes_ = reinterpret_cast<::tint::core::ir::binary::pb::AttributesFunctionParameter*>(value); - if (value != nullptr) { - _impl_._has_bits_[0] |= 0x00000002U; - } else { - _impl_._has_bits_[0] &= ~0x00000002U; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.FunctionParameter.attributes) -} -inline ::tint::core::ir::binary::pb::AttributesFunctionParameter* PROTOBUF_NULLABLE FunctionParameter::release_attributes() { - ::google::protobuf::internal::TSanWrite(&_impl_); - - _impl_._has_bits_[0] &= ~0x00000002U; - ::tint::core::ir::binary::pb::AttributesFunctionParameter* released = _impl_.attributes_; - _impl_.attributes_ = nullptr; - if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { - auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); - released = ::google::protobuf::internal::DuplicateIfNonNull(released); - if (GetArena() == nullptr) { - delete old; - } - } else { - if (GetArena() != nullptr) { - released = ::google::protobuf::internal::DuplicateIfNonNull(released); - } - } - return released; -} -inline ::tint::core::ir::binary::pb::AttributesFunctionParameter* PROTOBUF_NULLABLE FunctionParameter::unsafe_arena_release_attributes() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.FunctionParameter.attributes) - - _impl_._has_bits_[0] &= ~0x00000002U; - ::tint::core::ir::binary::pb::AttributesFunctionParameter* temp = _impl_.attributes_; - _impl_.attributes_ = nullptr; - return temp; -} -inline ::tint::core::ir::binary::pb::AttributesFunctionParameter* PROTOBUF_NONNULL FunctionParameter::_internal_mutable_attributes() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (_impl_.attributes_ == nullptr) { - auto* p = ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::AttributesFunctionParameter>(GetArena()); - _impl_.attributes_ = reinterpret_cast<::tint::core::ir::binary::pb::AttributesFunctionParameter*>(p); - } - return _impl_.attributes_; -} -inline ::tint::core::ir::binary::pb::AttributesFunctionParameter* PROTOBUF_NONNULL FunctionParameter::mutable_attributes() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - _impl_._has_bits_[0] |= 0x00000002U; - ::tint::core::ir::binary::pb::AttributesFunctionParameter* _msg = _internal_mutable_attributes(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.FunctionParameter.attributes) - return _msg; -} -inline void FunctionParameter::set_allocated_attributes(::tint::core::ir::binary::pb::AttributesFunctionParameter* PROTOBUF_NULLABLE value) { - ::google::protobuf::Arena* message_arena = GetArena(); - ::google::protobuf::internal::TSanWrite(&_impl_); - if (message_arena == nullptr) { - delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.attributes_); - } - - if (value != nullptr) { - ::google::protobuf::Arena* submessage_arena = value->GetArena(); - if (message_arena != submessage_arena) { - value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00000002U; - } else { - _impl_._has_bits_[0] &= ~0x00000002U; - } - - _impl_.attributes_ = reinterpret_cast<::tint::core::ir::binary::pb::AttributesFunctionParameter*>(value); - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.FunctionParameter.attributes) -} - -// ------------------------------------------------------------------- - -// BlockParameter - -// uint32 type = 1; -inline void BlockParameter::clear_type() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.type_ = 0u; - _impl_._has_bits_[0] &= ~0x00000002U; -} -inline ::uint32_t BlockParameter::type() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.BlockParameter.type) - return _internal_type(); -} -inline void BlockParameter::set_type(::uint32_t value) { - _internal_set_type(value); - _impl_._has_bits_[0] |= 0x00000002U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.BlockParameter.type) -} -inline ::uint32_t BlockParameter::_internal_type() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.type_; -} -inline void BlockParameter::_internal_set_type(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.type_ = value; -} - -// optional string name = 2; -inline bool BlockParameter::has_name() const { - bool value = (_impl_._has_bits_[0] & 0x00000001U) != 0; - return value; -} -inline void BlockParameter::clear_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.name_.ClearToEmpty(); - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline const ::std::string& BlockParameter::name() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.BlockParameter.name) - return _internal_name(); -} -template -PROTOBUF_ALWAYS_INLINE void BlockParameter::set_name(Arg_&& arg, Args_... args) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_._has_bits_[0] |= 0x00000001U; - _impl_.name_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.BlockParameter.name) -} -inline ::std::string* PROTOBUF_NONNULL BlockParameter::mutable_name() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::std::string* _s = _internal_mutable_name(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.BlockParameter.name) - return _s; -} -inline const ::std::string& BlockParameter::_internal_name() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.name_.Get(); -} -inline void BlockParameter::_internal_set_name(const ::std::string& value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_._has_bits_[0] |= 0x00000001U; - _impl_.name_.Set(value, GetArena()); -} -inline ::std::string* PROTOBUF_NONNULL BlockParameter::_internal_mutable_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_._has_bits_[0] |= 0x00000001U; - return _impl_.name_.Mutable( GetArena()); -} -inline ::std::string* PROTOBUF_NULLABLE BlockParameter::release_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.BlockParameter.name) - if ((_impl_._has_bits_[0] & 0x00000001U) == 0) { - return nullptr; - } - _impl_._has_bits_[0] &= ~0x00000001U; - auto* released = _impl_.name_.Release(); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.name_.Set("", GetArena()); - } - return released; -} -inline void BlockParameter::set_allocated_name(::std::string* PROTOBUF_NULLABLE value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (value != nullptr) { - _impl_._has_bits_[0] |= 0x00000001U; - } else { - _impl_._has_bits_[0] &= ~0x00000001U; - } - _impl_.name_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.name_.IsDefault()) { - _impl_.name_.Set("", GetArena()); - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.BlockParameter.name) -} - -// ------------------------------------------------------------------- - -// ConstantValue - -// .tint.core.ir.binary.pb.ConstantValueScalar scalar = 1; -inline bool ConstantValue::has_scalar() const { - return kind_case() == kScalar; -} -inline bool ConstantValue::_internal_has_scalar() const { - return kind_case() == kScalar; -} -inline void ConstantValue::set_has_scalar() { - _impl_._oneof_case_[0] = kScalar; -} -inline void ConstantValue::clear_scalar() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kScalar) { - if (GetArena() == nullptr) { - delete _impl_.kind_.scalar_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.scalar_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::ConstantValueScalar* PROTOBUF_NULLABLE ConstantValue::release_scalar() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.ConstantValue.scalar) - if (kind_case() == kScalar) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::ConstantValueScalar*>(_impl_.kind_.scalar_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.scalar_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::ConstantValueScalar& ConstantValue::_internal_scalar() const { - return kind_case() == kScalar ? *reinterpret_cast<::tint::core::ir::binary::pb::ConstantValueScalar*>(_impl_.kind_.scalar_) : reinterpret_cast<::tint::core::ir::binary::pb::ConstantValueScalar&>(::tint::core::ir::binary::pb::_ConstantValueScalar_default_instance_); -} -inline const ::tint::core::ir::binary::pb::ConstantValueScalar& ConstantValue::scalar() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.ConstantValue.scalar) - return _internal_scalar(); -} -inline ::tint::core::ir::binary::pb::ConstantValueScalar* PROTOBUF_NULLABLE ConstantValue::unsafe_arena_release_scalar() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.ConstantValue.scalar) - if (kind_case() == kScalar) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::ConstantValueScalar*>(_impl_.kind_.scalar_); - _impl_.kind_.scalar_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void ConstantValue::unsafe_arena_set_allocated_scalar( - ::tint::core::ir::binary::pb::ConstantValueScalar* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_scalar(); - _impl_.kind_.scalar_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.ConstantValue.scalar) -} -inline ::tint::core::ir::binary::pb::ConstantValueScalar* PROTOBUF_NONNULL ConstantValue::_internal_mutable_scalar() { - if (kind_case() != kScalar) { - clear_kind(); - set_has_scalar(); - _impl_.kind_.scalar_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::ConstantValueScalar>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::ConstantValueScalar*>(_impl_.kind_.scalar_); -} -inline ::tint::core::ir::binary::pb::ConstantValueScalar* PROTOBUF_NONNULL ConstantValue::mutable_scalar() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::ConstantValueScalar* _msg = _internal_mutable_scalar(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.ConstantValue.scalar) - return _msg; -} - -// .tint.core.ir.binary.pb.ConstantValueComposite composite = 2; -inline bool ConstantValue::has_composite() const { - return kind_case() == kComposite; -} -inline bool ConstantValue::_internal_has_composite() const { - return kind_case() == kComposite; -} -inline void ConstantValue::set_has_composite() { - _impl_._oneof_case_[0] = kComposite; -} -inline void ConstantValue::clear_composite() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kComposite) { - if (GetArena() == nullptr) { - delete _impl_.kind_.composite_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.composite_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::ConstantValueComposite* PROTOBUF_NULLABLE ConstantValue::release_composite() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.ConstantValue.composite) - if (kind_case() == kComposite) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::ConstantValueComposite*>(_impl_.kind_.composite_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.composite_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::ConstantValueComposite& ConstantValue::_internal_composite() const { - return kind_case() == kComposite ? *reinterpret_cast<::tint::core::ir::binary::pb::ConstantValueComposite*>(_impl_.kind_.composite_) : reinterpret_cast<::tint::core::ir::binary::pb::ConstantValueComposite&>(::tint::core::ir::binary::pb::_ConstantValueComposite_default_instance_); -} -inline const ::tint::core::ir::binary::pb::ConstantValueComposite& ConstantValue::composite() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.ConstantValue.composite) - return _internal_composite(); -} -inline ::tint::core::ir::binary::pb::ConstantValueComposite* PROTOBUF_NULLABLE ConstantValue::unsafe_arena_release_composite() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.ConstantValue.composite) - if (kind_case() == kComposite) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::ConstantValueComposite*>(_impl_.kind_.composite_); - _impl_.kind_.composite_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void ConstantValue::unsafe_arena_set_allocated_composite( - ::tint::core::ir::binary::pb::ConstantValueComposite* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_composite(); - _impl_.kind_.composite_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.ConstantValue.composite) -} -inline ::tint::core::ir::binary::pb::ConstantValueComposite* PROTOBUF_NONNULL ConstantValue::_internal_mutable_composite() { - if (kind_case() != kComposite) { - clear_kind(); - set_has_composite(); - _impl_.kind_.composite_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::ConstantValueComposite>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::ConstantValueComposite*>(_impl_.kind_.composite_); -} -inline ::tint::core::ir::binary::pb::ConstantValueComposite* PROTOBUF_NONNULL ConstantValue::mutable_composite() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::ConstantValueComposite* _msg = _internal_mutable_composite(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.ConstantValue.composite) - return _msg; -} - -// .tint.core.ir.binary.pb.ConstantValueSplat splat = 3; -inline bool ConstantValue::has_splat() const { - return kind_case() == kSplat; -} -inline bool ConstantValue::_internal_has_splat() const { - return kind_case() == kSplat; -} -inline void ConstantValue::set_has_splat() { - _impl_._oneof_case_[0] = kSplat; -} -inline void ConstantValue::clear_splat() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kSplat) { - if (GetArena() == nullptr) { - delete _impl_.kind_.splat_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.splat_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::ConstantValueSplat* PROTOBUF_NULLABLE ConstantValue::release_splat() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.ConstantValue.splat) - if (kind_case() == kSplat) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::ConstantValueSplat*>(_impl_.kind_.splat_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.splat_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::ConstantValueSplat& ConstantValue::_internal_splat() const { - return kind_case() == kSplat ? *reinterpret_cast<::tint::core::ir::binary::pb::ConstantValueSplat*>(_impl_.kind_.splat_) : reinterpret_cast<::tint::core::ir::binary::pb::ConstantValueSplat&>(::tint::core::ir::binary::pb::_ConstantValueSplat_default_instance_); -} -inline const ::tint::core::ir::binary::pb::ConstantValueSplat& ConstantValue::splat() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.ConstantValue.splat) - return _internal_splat(); -} -inline ::tint::core::ir::binary::pb::ConstantValueSplat* PROTOBUF_NULLABLE ConstantValue::unsafe_arena_release_splat() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.ConstantValue.splat) - if (kind_case() == kSplat) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::ConstantValueSplat*>(_impl_.kind_.splat_); - _impl_.kind_.splat_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void ConstantValue::unsafe_arena_set_allocated_splat( - ::tint::core::ir::binary::pb::ConstantValueSplat* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_splat(); - _impl_.kind_.splat_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.ConstantValue.splat) -} -inline ::tint::core::ir::binary::pb::ConstantValueSplat* PROTOBUF_NONNULL ConstantValue::_internal_mutable_splat() { - if (kind_case() != kSplat) { - clear_kind(); - set_has_splat(); - _impl_.kind_.splat_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::ConstantValueSplat>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::ConstantValueSplat*>(_impl_.kind_.splat_); -} -inline ::tint::core::ir::binary::pb::ConstantValueSplat* PROTOBUF_NONNULL ConstantValue::mutable_splat() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::ConstantValueSplat* _msg = _internal_mutable_splat(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.ConstantValue.splat) - return _msg; -} - -inline bool ConstantValue::has_kind() const { - return kind_case() != KIND_NOT_SET; -} -inline void ConstantValue::clear_has_kind() { - _impl_._oneof_case_[0] = KIND_NOT_SET; -} -inline ConstantValue::KindCase ConstantValue::kind_case() const { - return ConstantValue::KindCase(_impl_._oneof_case_[0]); -} -// ------------------------------------------------------------------- - -// ConstantValueScalar - -// bool bool = 1; -inline bool ConstantValueScalar::has_bool_() const { - return kind_case() == kBool; -} -inline void ConstantValueScalar::set_has_bool_() { - _impl_._oneof_case_[0] = kBool; -} -inline void ConstantValueScalar::clear_bool_() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kBool) { - _impl_.kind_.bool__ = false; - clear_has_kind(); - } -} -inline bool ConstantValueScalar::bool_() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.ConstantValueScalar.bool) - return _internal_bool_(); -} -inline void ConstantValueScalar::set_bool_(bool value) { - if (kind_case() != kBool) { - clear_kind(); - set_has_bool_(); - } - _impl_.kind_.bool__ = value; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.ConstantValueScalar.bool) -} -inline bool ConstantValueScalar::_internal_bool_() const { - if (kind_case() == kBool) { - return _impl_.kind_.bool__; - } - return false; -} - -// int32 i32 = 2; -inline bool ConstantValueScalar::has_i32() const { - return kind_case() == kI32; -} -inline void ConstantValueScalar::set_has_i32() { - _impl_._oneof_case_[0] = kI32; -} -inline void ConstantValueScalar::clear_i32() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kI32) { - _impl_.kind_.i32_ = 0; - clear_has_kind(); - } -} -inline ::int32_t ConstantValueScalar::i32() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.ConstantValueScalar.i32) - return _internal_i32(); -} -inline void ConstantValueScalar::set_i32(::int32_t value) { - if (kind_case() != kI32) { - clear_kind(); - set_has_i32(); - } - _impl_.kind_.i32_ = value; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.ConstantValueScalar.i32) -} -inline ::int32_t ConstantValueScalar::_internal_i32() const { - if (kind_case() == kI32) { - return _impl_.kind_.i32_; - } - return 0; -} - -// uint32 u32 = 3; -inline bool ConstantValueScalar::has_u32() const { - return kind_case() == kU32; -} -inline void ConstantValueScalar::set_has_u32() { - _impl_._oneof_case_[0] = kU32; -} -inline void ConstantValueScalar::clear_u32() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kU32) { - _impl_.kind_.u32_ = 0u; - clear_has_kind(); - } -} -inline ::uint32_t ConstantValueScalar::u32() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.ConstantValueScalar.u32) - return _internal_u32(); -} -inline void ConstantValueScalar::set_u32(::uint32_t value) { - if (kind_case() != kU32) { - clear_kind(); - set_has_u32(); - } - _impl_.kind_.u32_ = value; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.ConstantValueScalar.u32) -} -inline ::uint32_t ConstantValueScalar::_internal_u32() const { - if (kind_case() == kU32) { - return _impl_.kind_.u32_; - } - return 0u; -} - -// float f32 = 4; -inline bool ConstantValueScalar::has_f32() const { - return kind_case() == kF32; -} -inline void ConstantValueScalar::set_has_f32() { - _impl_._oneof_case_[0] = kF32; -} -inline void ConstantValueScalar::clear_f32() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kF32) { - _impl_.kind_.f32_ = 0; - clear_has_kind(); - } -} -inline float ConstantValueScalar::f32() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.ConstantValueScalar.f32) - return _internal_f32(); -} -inline void ConstantValueScalar::set_f32(float value) { - if (kind_case() != kF32) { - clear_kind(); - set_has_f32(); - } - _impl_.kind_.f32_ = value; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.ConstantValueScalar.f32) -} -inline float ConstantValueScalar::_internal_f32() const { - if (kind_case() == kF32) { - return _impl_.kind_.f32_; - } - return 0; -} - -// float f16 = 5; -inline bool ConstantValueScalar::has_f16() const { - return kind_case() == kF16; -} -inline void ConstantValueScalar::set_has_f16() { - _impl_._oneof_case_[0] = kF16; -} -inline void ConstantValueScalar::clear_f16() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kF16) { - _impl_.kind_.f16_ = 0; - clear_has_kind(); - } -} -inline float ConstantValueScalar::f16() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.ConstantValueScalar.f16) - return _internal_f16(); -} -inline void ConstantValueScalar::set_f16(float value) { - if (kind_case() != kF16) { - clear_kind(); - set_has_f16(); - } - _impl_.kind_.f16_ = value; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.ConstantValueScalar.f16) -} -inline float ConstantValueScalar::_internal_f16() const { - if (kind_case() == kF16) { - return _impl_.kind_.f16_; - } - return 0; -} - -inline bool ConstantValueScalar::has_kind() const { - return kind_case() != KIND_NOT_SET; -} -inline void ConstantValueScalar::clear_has_kind() { - _impl_._oneof_case_[0] = KIND_NOT_SET; -} -inline ConstantValueScalar::KindCase ConstantValueScalar::kind_case() const { - return ConstantValueScalar::KindCase(_impl_._oneof_case_[0]); -} -// ------------------------------------------------------------------- - -// ConstantValueComposite - -// uint32 type = 1; -inline void ConstantValueComposite::clear_type() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.type_ = 0u; - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline ::uint32_t ConstantValueComposite::type() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.ConstantValueComposite.type) - return _internal_type(); -} -inline void ConstantValueComposite::set_type(::uint32_t value) { - _internal_set_type(value); - _impl_._has_bits_[0] |= 0x00000001U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.ConstantValueComposite.type) -} -inline ::uint32_t ConstantValueComposite::_internal_type() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.type_; -} -inline void ConstantValueComposite::_internal_set_type(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.type_ = value; -} - -// repeated uint32 elements = 2; -inline int ConstantValueComposite::_internal_elements_size() const { - return _internal_elements().size(); -} -inline int ConstantValueComposite::elements_size() const { - return _internal_elements_size(); -} -inline void ConstantValueComposite::clear_elements() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.elements_.Clear(); -} -inline ::uint32_t ConstantValueComposite::elements(int index) const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.ConstantValueComposite.elements) - return _internal_elements().Get(index); -} -inline void ConstantValueComposite::set_elements(int index, ::uint32_t value) { - _internal_mutable_elements()->Set(index, value); - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.ConstantValueComposite.elements) -} -inline void ConstantValueComposite::add_elements(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _internal_mutable_elements()->Add(value); - // @@protoc_insertion_point(field_add:tint.core.ir.binary.pb.ConstantValueComposite.elements) -} -inline const ::google::protobuf::RepeatedField<::uint32_t>& ConstantValueComposite::elements() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_list:tint.core.ir.binary.pb.ConstantValueComposite.elements) - return _internal_elements(); -} -inline ::google::protobuf::RepeatedField<::uint32_t>* PROTOBUF_NONNULL ConstantValueComposite::mutable_elements() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_mutable_list:tint.core.ir.binary.pb.ConstantValueComposite.elements) - ::google::protobuf::internal::TSanWrite(&_impl_); - return _internal_mutable_elements(); -} -inline const ::google::protobuf::RepeatedField<::uint32_t>& -ConstantValueComposite::_internal_elements() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.elements_; -} -inline ::google::protobuf::RepeatedField<::uint32_t>* PROTOBUF_NONNULL -ConstantValueComposite::_internal_mutable_elements() { - ::google::protobuf::internal::TSanRead(&_impl_); - return &_impl_.elements_; -} - -// ------------------------------------------------------------------- - -// ConstantValueSplat - -// uint32 type = 1; -inline void ConstantValueSplat::clear_type() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.type_ = 0u; - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline ::uint32_t ConstantValueSplat::type() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.ConstantValueSplat.type) - return _internal_type(); -} -inline void ConstantValueSplat::set_type(::uint32_t value) { - _internal_set_type(value); - _impl_._has_bits_[0] |= 0x00000001U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.ConstantValueSplat.type) -} -inline ::uint32_t ConstantValueSplat::_internal_type() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.type_; -} -inline void ConstantValueSplat::_internal_set_type(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.type_ = value; -} - -// uint32 elements = 2; -inline void ConstantValueSplat::clear_elements() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.elements_ = 0u; - _impl_._has_bits_[0] &= ~0x00000002U; -} -inline ::uint32_t ConstantValueSplat::elements() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.ConstantValueSplat.elements) - return _internal_elements(); -} -inline void ConstantValueSplat::set_elements(::uint32_t value) { - _internal_set_elements(value); - _impl_._has_bits_[0] |= 0x00000002U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.ConstantValueSplat.elements) -} -inline ::uint32_t ConstantValueSplat::_internal_elements() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.elements_; -} -inline void ConstantValueSplat::_internal_set_elements(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.elements_ = value; -} - -// uint32 count = 3; -inline void ConstantValueSplat::clear_count() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.count_ = 0u; - _impl_._has_bits_[0] &= ~0x00000004U; -} -inline ::uint32_t ConstantValueSplat::count() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.ConstantValueSplat.count) - return _internal_count(); -} -inline void ConstantValueSplat::set_count(::uint32_t value) { - _internal_set_count(value); - _impl_._has_bits_[0] |= 0x00000004U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.ConstantValueSplat.count) -} -inline ::uint32_t ConstantValueSplat::_internal_count() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.count_; -} -inline void ConstantValueSplat::_internal_set_count(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.count_ = value; -} - -// ------------------------------------------------------------------- - -// Function - -// uint32 return_type = 1; -inline void Function::clear_return_type() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.return_type_ = 0u; - _impl_._has_bits_[0] &= ~0x00000008U; -} -inline ::uint32_t Function::return_type() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Function.return_type) - return _internal_return_type(); -} -inline void Function::set_return_type(::uint32_t value) { - _internal_set_return_type(value); - _impl_._has_bits_[0] |= 0x00000008U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.Function.return_type) -} -inline ::uint32_t Function::_internal_return_type() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.return_type_; -} -inline void Function::_internal_set_return_type(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.return_type_ = value; -} - -// uint32 block = 2; -inline void Function::clear_block() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.block_ = 0u; - _impl_._has_bits_[0] &= ~0x00000010U; -} -inline ::uint32_t Function::block() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Function.block) - return _internal_block(); -} -inline void Function::set_block(::uint32_t value) { - _internal_set_block(value); - _impl_._has_bits_[0] |= 0x00000010U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.Function.block) -} -inline ::uint32_t Function::_internal_block() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.block_; -} -inline void Function::_internal_set_block(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.block_ = value; -} - -// optional string name = 3; -inline bool Function::has_name() const { - bool value = (_impl_._has_bits_[0] & 0x00000001U) != 0; - return value; -} -inline void Function::clear_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.name_.ClearToEmpty(); - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline const ::std::string& Function::name() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Function.name) - return _internal_name(); -} -template -PROTOBUF_ALWAYS_INLINE void Function::set_name(Arg_&& arg, Args_... args) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_._has_bits_[0] |= 0x00000001U; - _impl_.name_.Set(static_cast(arg), args..., GetArena()); - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.Function.name) -} -inline ::std::string* PROTOBUF_NONNULL Function::mutable_name() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::std::string* _s = _internal_mutable_name(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Function.name) - return _s; -} -inline const ::std::string& Function::_internal_name() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.name_.Get(); -} -inline void Function::_internal_set_name(const ::std::string& value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_._has_bits_[0] |= 0x00000001U; - _impl_.name_.Set(value, GetArena()); -} -inline ::std::string* PROTOBUF_NONNULL Function::_internal_mutable_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_._has_bits_[0] |= 0x00000001U; - return _impl_.name_.Mutable( GetArena()); -} -inline ::std::string* PROTOBUF_NULLABLE Function::release_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Function.name) - if ((_impl_._has_bits_[0] & 0x00000001U) == 0) { - return nullptr; - } - _impl_._has_bits_[0] &= ~0x00000001U; - auto* released = _impl_.name_.Release(); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { - _impl_.name_.Set("", GetArena()); - } - return released; -} -inline void Function::set_allocated_name(::std::string* PROTOBUF_NULLABLE value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (value != nullptr) { - _impl_._has_bits_[0] |= 0x00000001U; - } else { - _impl_._has_bits_[0] &= ~0x00000001U; - } - _impl_.name_.SetAllocated(value, GetArena()); - if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.name_.IsDefault()) { - _impl_.name_.Set("", GetArena()); - } - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Function.name) -} - -// optional .tint.core.ir.binary.pb.PipelineStage pipeline_stage = 4; -inline bool Function::has_pipeline_stage() const { - bool value = (_impl_._has_bits_[0] & 0x00000020U) != 0; - return value; -} -inline void Function::clear_pipeline_stage() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.pipeline_stage_ = 0; - _impl_._has_bits_[0] &= ~0x00000020U; -} -inline ::tint::core::ir::binary::pb::PipelineStage Function::pipeline_stage() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Function.pipeline_stage) - return _internal_pipeline_stage(); -} -inline void Function::set_pipeline_stage(::tint::core::ir::binary::pb::PipelineStage value) { - _internal_set_pipeline_stage(value); - _impl_._has_bits_[0] |= 0x00000020U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.Function.pipeline_stage) -} -inline ::tint::core::ir::binary::pb::PipelineStage Function::_internal_pipeline_stage() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return static_cast<::tint::core::ir::binary::pb::PipelineStage>(_impl_.pipeline_stage_); -} -inline void Function::_internal_set_pipeline_stage(::tint::core::ir::binary::pb::PipelineStage value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.pipeline_stage_ = value; -} - -// optional .tint.core.ir.binary.pb.WorkgroupSize workgroup_size = 5; -inline bool Function::has_workgroup_size() const { - bool value = (_impl_._has_bits_[0] & 0x00000002U) != 0; - PROTOBUF_ASSUME(!value || _impl_.workgroup_size_ != nullptr); - return value; -} -inline void Function::clear_workgroup_size() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (_impl_.workgroup_size_ != nullptr) _impl_.workgroup_size_->Clear(); - _impl_._has_bits_[0] &= ~0x00000002U; -} -inline const ::tint::core::ir::binary::pb::WorkgroupSize& Function::_internal_workgroup_size() const { - ::google::protobuf::internal::TSanRead(&_impl_); - const ::tint::core::ir::binary::pb::WorkgroupSize* p = _impl_.workgroup_size_; - return p != nullptr ? *p : reinterpret_cast(::tint::core::ir::binary::pb::_WorkgroupSize_default_instance_); -} -inline const ::tint::core::ir::binary::pb::WorkgroupSize& Function::workgroup_size() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Function.workgroup_size) - return _internal_workgroup_size(); -} -inline void Function::unsafe_arena_set_allocated_workgroup_size( - ::tint::core::ir::binary::pb::WorkgroupSize* PROTOBUF_NULLABLE value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (GetArena() == nullptr) { - delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.workgroup_size_); - } - _impl_.workgroup_size_ = reinterpret_cast<::tint::core::ir::binary::pb::WorkgroupSize*>(value); - if (value != nullptr) { - _impl_._has_bits_[0] |= 0x00000002U; - } else { - _impl_._has_bits_[0] &= ~0x00000002U; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Function.workgroup_size) -} -inline ::tint::core::ir::binary::pb::WorkgroupSize* PROTOBUF_NULLABLE Function::release_workgroup_size() { - ::google::protobuf::internal::TSanWrite(&_impl_); - - _impl_._has_bits_[0] &= ~0x00000002U; - ::tint::core::ir::binary::pb::WorkgroupSize* released = _impl_.workgroup_size_; - _impl_.workgroup_size_ = nullptr; - if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { - auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); - released = ::google::protobuf::internal::DuplicateIfNonNull(released); - if (GetArena() == nullptr) { - delete old; - } - } else { - if (GetArena() != nullptr) { - released = ::google::protobuf::internal::DuplicateIfNonNull(released); - } - } - return released; -} -inline ::tint::core::ir::binary::pb::WorkgroupSize* PROTOBUF_NULLABLE Function::unsafe_arena_release_workgroup_size() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Function.workgroup_size) - - _impl_._has_bits_[0] &= ~0x00000002U; - ::tint::core::ir::binary::pb::WorkgroupSize* temp = _impl_.workgroup_size_; - _impl_.workgroup_size_ = nullptr; - return temp; -} -inline ::tint::core::ir::binary::pb::WorkgroupSize* PROTOBUF_NONNULL Function::_internal_mutable_workgroup_size() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (_impl_.workgroup_size_ == nullptr) { - auto* p = ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::WorkgroupSize>(GetArena()); - _impl_.workgroup_size_ = reinterpret_cast<::tint::core::ir::binary::pb::WorkgroupSize*>(p); - } - return _impl_.workgroup_size_; -} -inline ::tint::core::ir::binary::pb::WorkgroupSize* PROTOBUF_NONNULL Function::mutable_workgroup_size() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - _impl_._has_bits_[0] |= 0x00000002U; - ::tint::core::ir::binary::pb::WorkgroupSize* _msg = _internal_mutable_workgroup_size(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Function.workgroup_size) - return _msg; -} -inline void Function::set_allocated_workgroup_size(::tint::core::ir::binary::pb::WorkgroupSize* PROTOBUF_NULLABLE value) { - ::google::protobuf::Arena* message_arena = GetArena(); - ::google::protobuf::internal::TSanWrite(&_impl_); - if (message_arena == nullptr) { - delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.workgroup_size_); - } - - if (value != nullptr) { - ::google::protobuf::Arena* submessage_arena = value->GetArena(); - if (message_arena != submessage_arena) { - value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00000002U; - } else { - _impl_._has_bits_[0] &= ~0x00000002U; - } - - _impl_.workgroup_size_ = reinterpret_cast<::tint::core::ir::binary::pb::WorkgroupSize*>(value); - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Function.workgroup_size) -} - -// repeated uint32 parameters = 6; -inline int Function::_internal_parameters_size() const { - return _internal_parameters().size(); -} -inline int Function::parameters_size() const { - return _internal_parameters_size(); -} -inline void Function::clear_parameters() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.parameters_.Clear(); -} -inline ::uint32_t Function::parameters(int index) const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Function.parameters) - return _internal_parameters().Get(index); -} -inline void Function::set_parameters(int index, ::uint32_t value) { - _internal_mutable_parameters()->Set(index, value); - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.Function.parameters) -} -inline void Function::add_parameters(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _internal_mutable_parameters()->Add(value); - // @@protoc_insertion_point(field_add:tint.core.ir.binary.pb.Function.parameters) -} -inline const ::google::protobuf::RepeatedField<::uint32_t>& Function::parameters() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_list:tint.core.ir.binary.pb.Function.parameters) - return _internal_parameters(); -} -inline ::google::protobuf::RepeatedField<::uint32_t>* PROTOBUF_NONNULL Function::mutable_parameters() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_mutable_list:tint.core.ir.binary.pb.Function.parameters) - ::google::protobuf::internal::TSanWrite(&_impl_); - return _internal_mutable_parameters(); -} -inline const ::google::protobuf::RepeatedField<::uint32_t>& -Function::_internal_parameters() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.parameters_; -} -inline ::google::protobuf::RepeatedField<::uint32_t>* PROTOBUF_NONNULL -Function::_internal_mutable_parameters() { - ::google::protobuf::internal::TSanRead(&_impl_); - return &_impl_.parameters_; -} - -// optional uint32 return_location = 7; -inline bool Function::has_return_location() const { - bool value = (_impl_._has_bits_[0] & 0x00000040U) != 0; - return value; -} -inline void Function::clear_return_location() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.return_location_ = 0u; - _impl_._has_bits_[0] &= ~0x00000040U; -} -inline ::uint32_t Function::return_location() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Function.return_location) - return _internal_return_location(); -} -inline void Function::set_return_location(::uint32_t value) { - _internal_set_return_location(value); - _impl_._has_bits_[0] |= 0x00000040U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.Function.return_location) -} -inline ::uint32_t Function::_internal_return_location() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.return_location_; -} -inline void Function::_internal_set_return_location(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.return_location_ = value; -} - -// optional .tint.core.ir.binary.pb.Interpolation return_interpolation = 8; -inline bool Function::has_return_interpolation() const { - bool value = (_impl_._has_bits_[0] & 0x00000004U) != 0; - PROTOBUF_ASSUME(!value || _impl_.return_interpolation_ != nullptr); - return value; -} -inline void Function::clear_return_interpolation() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (_impl_.return_interpolation_ != nullptr) _impl_.return_interpolation_->Clear(); - _impl_._has_bits_[0] &= ~0x00000004U; -} -inline const ::tint::core::ir::binary::pb::Interpolation& Function::_internal_return_interpolation() const { - ::google::protobuf::internal::TSanRead(&_impl_); - const ::tint::core::ir::binary::pb::Interpolation* p = _impl_.return_interpolation_; - return p != nullptr ? *p : reinterpret_cast(::tint::core::ir::binary::pb::_Interpolation_default_instance_); -} -inline const ::tint::core::ir::binary::pb::Interpolation& Function::return_interpolation() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Function.return_interpolation) - return _internal_return_interpolation(); -} -inline void Function::unsafe_arena_set_allocated_return_interpolation( - ::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NULLABLE value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (GetArena() == nullptr) { - delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.return_interpolation_); - } - _impl_.return_interpolation_ = reinterpret_cast<::tint::core::ir::binary::pb::Interpolation*>(value); - if (value != nullptr) { - _impl_._has_bits_[0] |= 0x00000004U; - } else { - _impl_._has_bits_[0] &= ~0x00000004U; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Function.return_interpolation) -} -inline ::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NULLABLE Function::release_return_interpolation() { - ::google::protobuf::internal::TSanWrite(&_impl_); - - _impl_._has_bits_[0] &= ~0x00000004U; - ::tint::core::ir::binary::pb::Interpolation* released = _impl_.return_interpolation_; - _impl_.return_interpolation_ = nullptr; - if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { - auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); - released = ::google::protobuf::internal::DuplicateIfNonNull(released); - if (GetArena() == nullptr) { - delete old; - } - } else { - if (GetArena() != nullptr) { - released = ::google::protobuf::internal::DuplicateIfNonNull(released); - } - } - return released; -} -inline ::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NULLABLE Function::unsafe_arena_release_return_interpolation() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Function.return_interpolation) - - _impl_._has_bits_[0] &= ~0x00000004U; - ::tint::core::ir::binary::pb::Interpolation* temp = _impl_.return_interpolation_; - _impl_.return_interpolation_ = nullptr; - return temp; -} -inline ::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NONNULL Function::_internal_mutable_return_interpolation() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (_impl_.return_interpolation_ == nullptr) { - auto* p = ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::Interpolation>(GetArena()); - _impl_.return_interpolation_ = reinterpret_cast<::tint::core::ir::binary::pb::Interpolation*>(p); - } - return _impl_.return_interpolation_; -} -inline ::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NONNULL Function::mutable_return_interpolation() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - _impl_._has_bits_[0] |= 0x00000004U; - ::tint::core::ir::binary::pb::Interpolation* _msg = _internal_mutable_return_interpolation(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Function.return_interpolation) - return _msg; -} -inline void Function::set_allocated_return_interpolation(::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NULLABLE value) { - ::google::protobuf::Arena* message_arena = GetArena(); - ::google::protobuf::internal::TSanWrite(&_impl_); - if (message_arena == nullptr) { - delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.return_interpolation_); - } - - if (value != nullptr) { - ::google::protobuf::Arena* submessage_arena = value->GetArena(); - if (message_arena != submessage_arena) { - value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00000004U; - } else { - _impl_._has_bits_[0] &= ~0x00000004U; - } - - _impl_.return_interpolation_ = reinterpret_cast<::tint::core::ir::binary::pb::Interpolation*>(value); - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.Function.return_interpolation) -} - -// optional .tint.core.ir.binary.pb.BuiltinValue return_builtin = 9; -inline bool Function::has_return_builtin() const { - bool value = (_impl_._has_bits_[0] & 0x00000080U) != 0; - return value; -} -inline void Function::clear_return_builtin() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.return_builtin_ = 0; - _impl_._has_bits_[0] &= ~0x00000080U; -} -inline ::tint::core::ir::binary::pb::BuiltinValue Function::return_builtin() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Function.return_builtin) - return _internal_return_builtin(); -} -inline void Function::set_return_builtin(::tint::core::ir::binary::pb::BuiltinValue value) { - _internal_set_return_builtin(value); - _impl_._has_bits_[0] |= 0x00000080U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.Function.return_builtin) -} -inline ::tint::core::ir::binary::pb::BuiltinValue Function::_internal_return_builtin() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return static_cast<::tint::core::ir::binary::pb::BuiltinValue>(_impl_.return_builtin_); -} -inline void Function::_internal_set_return_builtin(::tint::core::ir::binary::pb::BuiltinValue value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.return_builtin_ = value; -} - -// bool return_invariant = 10; -inline void Function::clear_return_invariant() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.return_invariant_ = false; - _impl_._has_bits_[0] &= ~0x00000100U; -} -inline bool Function::return_invariant() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Function.return_invariant) - return _internal_return_invariant(); -} -inline void Function::set_return_invariant(bool value) { - _internal_set_return_invariant(value); - _impl_._has_bits_[0] |= 0x00000100U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.Function.return_invariant) -} -inline bool Function::_internal_return_invariant() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.return_invariant_; -} -inline void Function::_internal_set_return_invariant(bool value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.return_invariant_ = value; -} - -// optional uint32 subgroup_size = 11; -inline bool Function::has_subgroup_size() const { - bool value = (_impl_._has_bits_[0] & 0x00000200U) != 0; - return value; -} -inline void Function::clear_subgroup_size() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.subgroup_size_ = 0u; - _impl_._has_bits_[0] &= ~0x00000200U; -} -inline ::uint32_t Function::subgroup_size() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Function.subgroup_size) - return _internal_subgroup_size(); -} -inline void Function::set_subgroup_size(::uint32_t value) { - _internal_set_subgroup_size(value); - _impl_._has_bits_[0] |= 0x00000200U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.Function.subgroup_size) -} -inline ::uint32_t Function::_internal_subgroup_size() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.subgroup_size_; -} -inline void Function::_internal_set_subgroup_size(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.subgroup_size_ = value; -} - -// ------------------------------------------------------------------- - -// WorkgroupSize - -// uint32 x = 1; -inline void WorkgroupSize::clear_x() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.x_ = 0u; - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline ::uint32_t WorkgroupSize::x() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.WorkgroupSize.x) - return _internal_x(); -} -inline void WorkgroupSize::set_x(::uint32_t value) { - _internal_set_x(value); - _impl_._has_bits_[0] |= 0x00000001U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.WorkgroupSize.x) -} -inline ::uint32_t WorkgroupSize::_internal_x() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.x_; -} -inline void WorkgroupSize::_internal_set_x(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.x_ = value; -} - -// uint32 y = 2; -inline void WorkgroupSize::clear_y() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.y_ = 0u; - _impl_._has_bits_[0] &= ~0x00000002U; -} -inline ::uint32_t WorkgroupSize::y() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.WorkgroupSize.y) - return _internal_y(); -} -inline void WorkgroupSize::set_y(::uint32_t value) { - _internal_set_y(value); - _impl_._has_bits_[0] |= 0x00000002U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.WorkgroupSize.y) -} -inline ::uint32_t WorkgroupSize::_internal_y() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.y_; -} -inline void WorkgroupSize::_internal_set_y(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.y_ = value; -} - -// uint32 z = 3; -inline void WorkgroupSize::clear_z() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.z_ = 0u; - _impl_._has_bits_[0] &= ~0x00000004U; -} -inline ::uint32_t WorkgroupSize::z() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.WorkgroupSize.z) - return _internal_z(); -} -inline void WorkgroupSize::set_z(::uint32_t value) { - _internal_set_z(value); - _impl_._has_bits_[0] |= 0x00000004U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.WorkgroupSize.z) -} -inline ::uint32_t WorkgroupSize::_internal_z() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.z_; -} -inline void WorkgroupSize::_internal_set_z(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.z_ = value; -} - -// ------------------------------------------------------------------- - -// Block - -// repeated uint32 parameters = 1; -inline int Block::_internal_parameters_size() const { - return _internal_parameters().size(); -} -inline int Block::parameters_size() const { - return _internal_parameters_size(); -} -inline void Block::clear_parameters() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.parameters_.Clear(); -} -inline ::uint32_t Block::parameters(int index) const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Block.parameters) - return _internal_parameters().Get(index); -} -inline void Block::set_parameters(int index, ::uint32_t value) { - _internal_mutable_parameters()->Set(index, value); - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.Block.parameters) -} -inline void Block::add_parameters(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _internal_mutable_parameters()->Add(value); - // @@protoc_insertion_point(field_add:tint.core.ir.binary.pb.Block.parameters) -} -inline const ::google::protobuf::RepeatedField<::uint32_t>& Block::parameters() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_list:tint.core.ir.binary.pb.Block.parameters) - return _internal_parameters(); -} -inline ::google::protobuf::RepeatedField<::uint32_t>* PROTOBUF_NONNULL Block::mutable_parameters() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_mutable_list:tint.core.ir.binary.pb.Block.parameters) - ::google::protobuf::internal::TSanWrite(&_impl_); - return _internal_mutable_parameters(); -} -inline const ::google::protobuf::RepeatedField<::uint32_t>& -Block::_internal_parameters() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.parameters_; -} -inline ::google::protobuf::RepeatedField<::uint32_t>* PROTOBUF_NONNULL -Block::_internal_mutable_parameters() { - ::google::protobuf::internal::TSanRead(&_impl_); - return &_impl_.parameters_; -} - -// repeated .tint.core.ir.binary.pb.Instruction instructions = 2; -inline int Block::_internal_instructions_size() const { - return _internal_instructions().size(); -} -inline int Block::instructions_size() const { - return _internal_instructions_size(); -} -inline void Block::clear_instructions() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.instructions_.Clear(); -} -inline ::tint::core::ir::binary::pb::Instruction* PROTOBUF_NONNULL Block::mutable_instructions(int index) - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Block.instructions) - return _internal_mutable_instructions()->Mutable(index); -} -inline ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Instruction>* PROTOBUF_NONNULL Block::mutable_instructions() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_mutable_list:tint.core.ir.binary.pb.Block.instructions) - ::google::protobuf::internal::TSanWrite(&_impl_); - return _internal_mutable_instructions(); -} -inline const ::tint::core::ir::binary::pb::Instruction& Block::instructions(int index) const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Block.instructions) - return _internal_instructions().Get(index); -} -inline ::tint::core::ir::binary::pb::Instruction* PROTOBUF_NONNULL Block::add_instructions() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::google::protobuf::internal::TSanWrite(&_impl_); - ::tint::core::ir::binary::pb::Instruction* _add = _internal_mutable_instructions()->Add(); - // @@protoc_insertion_point(field_add:tint.core.ir.binary.pb.Block.instructions) - return _add; -} -inline const ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Instruction>& Block::instructions() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_list:tint.core.ir.binary.pb.Block.instructions) - return _internal_instructions(); -} -inline const ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Instruction>& -Block::_internal_instructions() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.instructions_; -} -inline ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::Instruction>* PROTOBUF_NONNULL -Block::_internal_mutable_instructions() { - ::google::protobuf::internal::TSanRead(&_impl_); - return &_impl_.instructions_; -} - -// bool is_multi_in = 3; -inline void Block::clear_is_multi_in() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.is_multi_in_ = false; - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline bool Block::is_multi_in() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Block.is_multi_in) - return _internal_is_multi_in(); -} -inline void Block::set_is_multi_in(bool value) { - _internal_set_is_multi_in(value); - _impl_._has_bits_[0] |= 0x00000001U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.Block.is_multi_in) -} -inline bool Block::_internal_is_multi_in() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.is_multi_in_; -} -inline void Block::_internal_set_is_multi_in(bool value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.is_multi_in_ = value; -} - -// ------------------------------------------------------------------- - -// Instruction - -// repeated uint32 operands = 1; -inline int Instruction::_internal_operands_size() const { - return _internal_operands().size(); -} -inline int Instruction::operands_size() const { - return _internal_operands_size(); -} -inline void Instruction::clear_operands() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.operands_.Clear(); -} -inline ::uint32_t Instruction::operands(int index) const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Instruction.operands) - return _internal_operands().Get(index); -} -inline void Instruction::set_operands(int index, ::uint32_t value) { - _internal_mutable_operands()->Set(index, value); - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.Instruction.operands) -} -inline void Instruction::add_operands(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _internal_mutable_operands()->Add(value); - // @@protoc_insertion_point(field_add:tint.core.ir.binary.pb.Instruction.operands) -} -inline const ::google::protobuf::RepeatedField<::uint32_t>& Instruction::operands() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_list:tint.core.ir.binary.pb.Instruction.operands) - return _internal_operands(); -} -inline ::google::protobuf::RepeatedField<::uint32_t>* PROTOBUF_NONNULL Instruction::mutable_operands() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_mutable_list:tint.core.ir.binary.pb.Instruction.operands) - ::google::protobuf::internal::TSanWrite(&_impl_); - return _internal_mutable_operands(); -} -inline const ::google::protobuf::RepeatedField<::uint32_t>& -Instruction::_internal_operands() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.operands_; -} -inline ::google::protobuf::RepeatedField<::uint32_t>* PROTOBUF_NONNULL -Instruction::_internal_mutable_operands() { - ::google::protobuf::internal::TSanRead(&_impl_); - return &_impl_.operands_; -} - -// repeated uint32 results = 2; -inline int Instruction::_internal_results_size() const { - return _internal_results().size(); -} -inline int Instruction::results_size() const { - return _internal_results_size(); -} -inline void Instruction::clear_results() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.results_.Clear(); -} -inline ::uint32_t Instruction::results(int index) const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Instruction.results) - return _internal_results().Get(index); -} -inline void Instruction::set_results(int index, ::uint32_t value) { - _internal_mutable_results()->Set(index, value); - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.Instruction.results) -} -inline void Instruction::add_results(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _internal_mutable_results()->Add(value); - // @@protoc_insertion_point(field_add:tint.core.ir.binary.pb.Instruction.results) -} -inline const ::google::protobuf::RepeatedField<::uint32_t>& Instruction::results() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_list:tint.core.ir.binary.pb.Instruction.results) - return _internal_results(); -} -inline ::google::protobuf::RepeatedField<::uint32_t>* PROTOBUF_NONNULL Instruction::mutable_results() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_mutable_list:tint.core.ir.binary.pb.Instruction.results) - ::google::protobuf::internal::TSanWrite(&_impl_); - return _internal_mutable_results(); -} -inline const ::google::protobuf::RepeatedField<::uint32_t>& -Instruction::_internal_results() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.results_; -} -inline ::google::protobuf::RepeatedField<::uint32_t>* PROTOBUF_NONNULL -Instruction::_internal_mutable_results() { - ::google::protobuf::internal::TSanRead(&_impl_); - return &_impl_.results_; -} - -// .tint.core.ir.binary.pb.InstructionReturn return = 3; -inline bool Instruction::has_return_() const { - return kind_case() == kReturn; -} -inline bool Instruction::_internal_has_return_() const { - return kind_case() == kReturn; -} -inline void Instruction::set_has_return_() { - _impl_._oneof_case_[0] = kReturn; -} -inline void Instruction::clear_return_() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kReturn) { - if (GetArena() == nullptr) { - delete _impl_.kind_.return__; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.return__); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::InstructionReturn* PROTOBUF_NULLABLE Instruction::release_return_() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Instruction.return) - if (kind_case() == kReturn) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionReturn*>(_impl_.kind_.return__); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.return__ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::InstructionReturn& Instruction::_internal_return_() const { - return kind_case() == kReturn ? *reinterpret_cast<::tint::core::ir::binary::pb::InstructionReturn*>(_impl_.kind_.return__) : reinterpret_cast<::tint::core::ir::binary::pb::InstructionReturn&>(::tint::core::ir::binary::pb::_InstructionReturn_default_instance_); -} -inline const ::tint::core::ir::binary::pb::InstructionReturn& Instruction::return_() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Instruction.return) - return _internal_return_(); -} -inline ::tint::core::ir::binary::pb::InstructionReturn* PROTOBUF_NULLABLE Instruction::unsafe_arena_release_return_() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Instruction.return) - if (kind_case() == kReturn) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionReturn*>(_impl_.kind_.return__); - _impl_.kind_.return__ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Instruction::unsafe_arena_set_allocated_return_( - ::tint::core::ir::binary::pb::InstructionReturn* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_return_(); - _impl_.kind_.return__ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Instruction.return) -} -inline ::tint::core::ir::binary::pb::InstructionReturn* PROTOBUF_NONNULL Instruction::_internal_mutable_return_() { - if (kind_case() != kReturn) { - clear_kind(); - set_has_return_(); - _impl_.kind_.return__ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::InstructionReturn>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::InstructionReturn*>(_impl_.kind_.return__); -} -inline ::tint::core::ir::binary::pb::InstructionReturn* PROTOBUF_NONNULL Instruction::mutable_return_() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::InstructionReturn* _msg = _internal_mutable_return_(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Instruction.return) - return _msg; -} - -// .tint.core.ir.binary.pb.InstructionUnary unary = 4; -inline bool Instruction::has_unary() const { - return kind_case() == kUnary; -} -inline bool Instruction::_internal_has_unary() const { - return kind_case() == kUnary; -} -inline void Instruction::set_has_unary() { - _impl_._oneof_case_[0] = kUnary; -} -inline void Instruction::clear_unary() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kUnary) { - if (GetArena() == nullptr) { - delete _impl_.kind_.unary_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.unary_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::InstructionUnary* PROTOBUF_NULLABLE Instruction::release_unary() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Instruction.unary) - if (kind_case() == kUnary) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionUnary*>(_impl_.kind_.unary_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.unary_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::InstructionUnary& Instruction::_internal_unary() const { - return kind_case() == kUnary ? *reinterpret_cast<::tint::core::ir::binary::pb::InstructionUnary*>(_impl_.kind_.unary_) : reinterpret_cast<::tint::core::ir::binary::pb::InstructionUnary&>(::tint::core::ir::binary::pb::_InstructionUnary_default_instance_); -} -inline const ::tint::core::ir::binary::pb::InstructionUnary& Instruction::unary() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Instruction.unary) - return _internal_unary(); -} -inline ::tint::core::ir::binary::pb::InstructionUnary* PROTOBUF_NULLABLE Instruction::unsafe_arena_release_unary() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Instruction.unary) - if (kind_case() == kUnary) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionUnary*>(_impl_.kind_.unary_); - _impl_.kind_.unary_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Instruction::unsafe_arena_set_allocated_unary( - ::tint::core::ir::binary::pb::InstructionUnary* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_unary(); - _impl_.kind_.unary_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Instruction.unary) -} -inline ::tint::core::ir::binary::pb::InstructionUnary* PROTOBUF_NONNULL Instruction::_internal_mutable_unary() { - if (kind_case() != kUnary) { - clear_kind(); - set_has_unary(); - _impl_.kind_.unary_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::InstructionUnary>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::InstructionUnary*>(_impl_.kind_.unary_); -} -inline ::tint::core::ir::binary::pb::InstructionUnary* PROTOBUF_NONNULL Instruction::mutable_unary() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::InstructionUnary* _msg = _internal_mutable_unary(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Instruction.unary) - return _msg; -} - -// .tint.core.ir.binary.pb.InstructionBinary binary = 5; -inline bool Instruction::has_binary() const { - return kind_case() == kBinary; -} -inline bool Instruction::_internal_has_binary() const { - return kind_case() == kBinary; -} -inline void Instruction::set_has_binary() { - _impl_._oneof_case_[0] = kBinary; -} -inline void Instruction::clear_binary() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kBinary) { - if (GetArena() == nullptr) { - delete _impl_.kind_.binary_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.binary_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::InstructionBinary* PROTOBUF_NULLABLE Instruction::release_binary() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Instruction.binary) - if (kind_case() == kBinary) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionBinary*>(_impl_.kind_.binary_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.binary_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::InstructionBinary& Instruction::_internal_binary() const { - return kind_case() == kBinary ? *reinterpret_cast<::tint::core::ir::binary::pb::InstructionBinary*>(_impl_.kind_.binary_) : reinterpret_cast<::tint::core::ir::binary::pb::InstructionBinary&>(::tint::core::ir::binary::pb::_InstructionBinary_default_instance_); -} -inline const ::tint::core::ir::binary::pb::InstructionBinary& Instruction::binary() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Instruction.binary) - return _internal_binary(); -} -inline ::tint::core::ir::binary::pb::InstructionBinary* PROTOBUF_NULLABLE Instruction::unsafe_arena_release_binary() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Instruction.binary) - if (kind_case() == kBinary) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionBinary*>(_impl_.kind_.binary_); - _impl_.kind_.binary_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Instruction::unsafe_arena_set_allocated_binary( - ::tint::core::ir::binary::pb::InstructionBinary* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_binary(); - _impl_.kind_.binary_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Instruction.binary) -} -inline ::tint::core::ir::binary::pb::InstructionBinary* PROTOBUF_NONNULL Instruction::_internal_mutable_binary() { - if (kind_case() != kBinary) { - clear_kind(); - set_has_binary(); - _impl_.kind_.binary_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::InstructionBinary>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::InstructionBinary*>(_impl_.kind_.binary_); -} -inline ::tint::core::ir::binary::pb::InstructionBinary* PROTOBUF_NONNULL Instruction::mutable_binary() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::InstructionBinary* _msg = _internal_mutable_binary(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Instruction.binary) - return _msg; -} - -// .tint.core.ir.binary.pb.InstructionDiscard discard = 6; -inline bool Instruction::has_discard() const { - return kind_case() == kDiscard; -} -inline bool Instruction::_internal_has_discard() const { - return kind_case() == kDiscard; -} -inline void Instruction::set_has_discard() { - _impl_._oneof_case_[0] = kDiscard; -} -inline void Instruction::clear_discard() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kDiscard) { - if (GetArena() == nullptr) { - delete _impl_.kind_.discard_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.discard_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::InstructionDiscard* PROTOBUF_NULLABLE Instruction::release_discard() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Instruction.discard) - if (kind_case() == kDiscard) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionDiscard*>(_impl_.kind_.discard_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.discard_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::InstructionDiscard& Instruction::_internal_discard() const { - return kind_case() == kDiscard ? *reinterpret_cast<::tint::core::ir::binary::pb::InstructionDiscard*>(_impl_.kind_.discard_) : reinterpret_cast<::tint::core::ir::binary::pb::InstructionDiscard&>(::tint::core::ir::binary::pb::_InstructionDiscard_default_instance_); -} -inline const ::tint::core::ir::binary::pb::InstructionDiscard& Instruction::discard() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Instruction.discard) - return _internal_discard(); -} -inline ::tint::core::ir::binary::pb::InstructionDiscard* PROTOBUF_NULLABLE Instruction::unsafe_arena_release_discard() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Instruction.discard) - if (kind_case() == kDiscard) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionDiscard*>(_impl_.kind_.discard_); - _impl_.kind_.discard_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Instruction::unsafe_arena_set_allocated_discard( - ::tint::core::ir::binary::pb::InstructionDiscard* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_discard(); - _impl_.kind_.discard_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Instruction.discard) -} -inline ::tint::core::ir::binary::pb::InstructionDiscard* PROTOBUF_NONNULL Instruction::_internal_mutable_discard() { - if (kind_case() != kDiscard) { - clear_kind(); - set_has_discard(); - _impl_.kind_.discard_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::InstructionDiscard>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::InstructionDiscard*>(_impl_.kind_.discard_); -} -inline ::tint::core::ir::binary::pb::InstructionDiscard* PROTOBUF_NONNULL Instruction::mutable_discard() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::InstructionDiscard* _msg = _internal_mutable_discard(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Instruction.discard) - return _msg; -} - -// .tint.core.ir.binary.pb.InstructionLet let = 7; -inline bool Instruction::has_let() const { - return kind_case() == kLet; -} -inline bool Instruction::_internal_has_let() const { - return kind_case() == kLet; -} -inline void Instruction::set_has_let() { - _impl_._oneof_case_[0] = kLet; -} -inline void Instruction::clear_let() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kLet) { - if (GetArena() == nullptr) { - delete _impl_.kind_.let_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.let_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::InstructionLet* PROTOBUF_NULLABLE Instruction::release_let() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Instruction.let) - if (kind_case() == kLet) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionLet*>(_impl_.kind_.let_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.let_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::InstructionLet& Instruction::_internal_let() const { - return kind_case() == kLet ? *reinterpret_cast<::tint::core::ir::binary::pb::InstructionLet*>(_impl_.kind_.let_) : reinterpret_cast<::tint::core::ir::binary::pb::InstructionLet&>(::tint::core::ir::binary::pb::_InstructionLet_default_instance_); -} -inline const ::tint::core::ir::binary::pb::InstructionLet& Instruction::let() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Instruction.let) - return _internal_let(); -} -inline ::tint::core::ir::binary::pb::InstructionLet* PROTOBUF_NULLABLE Instruction::unsafe_arena_release_let() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Instruction.let) - if (kind_case() == kLet) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionLet*>(_impl_.kind_.let_); - _impl_.kind_.let_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Instruction::unsafe_arena_set_allocated_let( - ::tint::core::ir::binary::pb::InstructionLet* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_let(); - _impl_.kind_.let_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Instruction.let) -} -inline ::tint::core::ir::binary::pb::InstructionLet* PROTOBUF_NONNULL Instruction::_internal_mutable_let() { - if (kind_case() != kLet) { - clear_kind(); - set_has_let(); - _impl_.kind_.let_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::InstructionLet>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::InstructionLet*>(_impl_.kind_.let_); -} -inline ::tint::core::ir::binary::pb::InstructionLet* PROTOBUF_NONNULL Instruction::mutable_let() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::InstructionLet* _msg = _internal_mutable_let(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Instruction.let) - return _msg; -} - -// .tint.core.ir.binary.pb.InstructionVar var = 8; -inline bool Instruction::has_var() const { - return kind_case() == kVar; -} -inline bool Instruction::_internal_has_var() const { - return kind_case() == kVar; -} -inline void Instruction::set_has_var() { - _impl_._oneof_case_[0] = kVar; -} -inline void Instruction::clear_var() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kVar) { - if (GetArena() == nullptr) { - delete _impl_.kind_.var_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.var_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::InstructionVar* PROTOBUF_NULLABLE Instruction::release_var() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Instruction.var) - if (kind_case() == kVar) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionVar*>(_impl_.kind_.var_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.var_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::InstructionVar& Instruction::_internal_var() const { - return kind_case() == kVar ? *reinterpret_cast<::tint::core::ir::binary::pb::InstructionVar*>(_impl_.kind_.var_) : reinterpret_cast<::tint::core::ir::binary::pb::InstructionVar&>(::tint::core::ir::binary::pb::_InstructionVar_default_instance_); -} -inline const ::tint::core::ir::binary::pb::InstructionVar& Instruction::var() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Instruction.var) - return _internal_var(); -} -inline ::tint::core::ir::binary::pb::InstructionVar* PROTOBUF_NULLABLE Instruction::unsafe_arena_release_var() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Instruction.var) - if (kind_case() == kVar) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionVar*>(_impl_.kind_.var_); - _impl_.kind_.var_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Instruction::unsafe_arena_set_allocated_var( - ::tint::core::ir::binary::pb::InstructionVar* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_var(); - _impl_.kind_.var_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Instruction.var) -} -inline ::tint::core::ir::binary::pb::InstructionVar* PROTOBUF_NONNULL Instruction::_internal_mutable_var() { - if (kind_case() != kVar) { - clear_kind(); - set_has_var(); - _impl_.kind_.var_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::InstructionVar>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::InstructionVar*>(_impl_.kind_.var_); -} -inline ::tint::core::ir::binary::pb::InstructionVar* PROTOBUF_NONNULL Instruction::mutable_var() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::InstructionVar* _msg = _internal_mutable_var(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Instruction.var) - return _msg; -} - -// .tint.core.ir.binary.pb.InstructionBitcast bitcast = 9; -inline bool Instruction::has_bitcast() const { - return kind_case() == kBitcast; -} -inline bool Instruction::_internal_has_bitcast() const { - return kind_case() == kBitcast; -} -inline void Instruction::set_has_bitcast() { - _impl_._oneof_case_[0] = kBitcast; -} -inline void Instruction::clear_bitcast() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kBitcast) { - if (GetArena() == nullptr) { - delete _impl_.kind_.bitcast_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.bitcast_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::InstructionBitcast* PROTOBUF_NULLABLE Instruction::release_bitcast() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Instruction.bitcast) - if (kind_case() == kBitcast) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionBitcast*>(_impl_.kind_.bitcast_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.bitcast_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::InstructionBitcast& Instruction::_internal_bitcast() const { - return kind_case() == kBitcast ? *reinterpret_cast<::tint::core::ir::binary::pb::InstructionBitcast*>(_impl_.kind_.bitcast_) : reinterpret_cast<::tint::core::ir::binary::pb::InstructionBitcast&>(::tint::core::ir::binary::pb::_InstructionBitcast_default_instance_); -} -inline const ::tint::core::ir::binary::pb::InstructionBitcast& Instruction::bitcast() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Instruction.bitcast) - return _internal_bitcast(); -} -inline ::tint::core::ir::binary::pb::InstructionBitcast* PROTOBUF_NULLABLE Instruction::unsafe_arena_release_bitcast() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Instruction.bitcast) - if (kind_case() == kBitcast) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionBitcast*>(_impl_.kind_.bitcast_); - _impl_.kind_.bitcast_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Instruction::unsafe_arena_set_allocated_bitcast( - ::tint::core::ir::binary::pb::InstructionBitcast* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_bitcast(); - _impl_.kind_.bitcast_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Instruction.bitcast) -} -inline ::tint::core::ir::binary::pb::InstructionBitcast* PROTOBUF_NONNULL Instruction::_internal_mutable_bitcast() { - if (kind_case() != kBitcast) { - clear_kind(); - set_has_bitcast(); - _impl_.kind_.bitcast_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::InstructionBitcast>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::InstructionBitcast*>(_impl_.kind_.bitcast_); -} -inline ::tint::core::ir::binary::pb::InstructionBitcast* PROTOBUF_NONNULL Instruction::mutable_bitcast() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::InstructionBitcast* _msg = _internal_mutable_bitcast(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Instruction.bitcast) - return _msg; -} - -// .tint.core.ir.binary.pb.InstructionConstruct construct = 10; -inline bool Instruction::has_construct() const { - return kind_case() == kConstruct; -} -inline bool Instruction::_internal_has_construct() const { - return kind_case() == kConstruct; -} -inline void Instruction::set_has_construct() { - _impl_._oneof_case_[0] = kConstruct; -} -inline void Instruction::clear_construct() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kConstruct) { - if (GetArena() == nullptr) { - delete _impl_.kind_.construct_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.construct_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::InstructionConstruct* PROTOBUF_NULLABLE Instruction::release_construct() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Instruction.construct) - if (kind_case() == kConstruct) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionConstruct*>(_impl_.kind_.construct_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.construct_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::InstructionConstruct& Instruction::_internal_construct() const { - return kind_case() == kConstruct ? *reinterpret_cast<::tint::core::ir::binary::pb::InstructionConstruct*>(_impl_.kind_.construct_) : reinterpret_cast<::tint::core::ir::binary::pb::InstructionConstruct&>(::tint::core::ir::binary::pb::_InstructionConstruct_default_instance_); -} -inline const ::tint::core::ir::binary::pb::InstructionConstruct& Instruction::construct() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Instruction.construct) - return _internal_construct(); -} -inline ::tint::core::ir::binary::pb::InstructionConstruct* PROTOBUF_NULLABLE Instruction::unsafe_arena_release_construct() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Instruction.construct) - if (kind_case() == kConstruct) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionConstruct*>(_impl_.kind_.construct_); - _impl_.kind_.construct_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Instruction::unsafe_arena_set_allocated_construct( - ::tint::core::ir::binary::pb::InstructionConstruct* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_construct(); - _impl_.kind_.construct_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Instruction.construct) -} -inline ::tint::core::ir::binary::pb::InstructionConstruct* PROTOBUF_NONNULL Instruction::_internal_mutable_construct() { - if (kind_case() != kConstruct) { - clear_kind(); - set_has_construct(); - _impl_.kind_.construct_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::InstructionConstruct>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::InstructionConstruct*>(_impl_.kind_.construct_); -} -inline ::tint::core::ir::binary::pb::InstructionConstruct* PROTOBUF_NONNULL Instruction::mutable_construct() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::InstructionConstruct* _msg = _internal_mutable_construct(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Instruction.construct) - return _msg; -} - -// .tint.core.ir.binary.pb.InstructionConvert convert = 11; -inline bool Instruction::has_convert() const { - return kind_case() == kConvert; -} -inline bool Instruction::_internal_has_convert() const { - return kind_case() == kConvert; -} -inline void Instruction::set_has_convert() { - _impl_._oneof_case_[0] = kConvert; -} -inline void Instruction::clear_convert() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kConvert) { - if (GetArena() == nullptr) { - delete _impl_.kind_.convert_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.convert_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::InstructionConvert* PROTOBUF_NULLABLE Instruction::release_convert() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Instruction.convert) - if (kind_case() == kConvert) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionConvert*>(_impl_.kind_.convert_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.convert_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::InstructionConvert& Instruction::_internal_convert() const { - return kind_case() == kConvert ? *reinterpret_cast<::tint::core::ir::binary::pb::InstructionConvert*>(_impl_.kind_.convert_) : reinterpret_cast<::tint::core::ir::binary::pb::InstructionConvert&>(::tint::core::ir::binary::pb::_InstructionConvert_default_instance_); -} -inline const ::tint::core::ir::binary::pb::InstructionConvert& Instruction::convert() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Instruction.convert) - return _internal_convert(); -} -inline ::tint::core::ir::binary::pb::InstructionConvert* PROTOBUF_NULLABLE Instruction::unsafe_arena_release_convert() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Instruction.convert) - if (kind_case() == kConvert) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionConvert*>(_impl_.kind_.convert_); - _impl_.kind_.convert_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Instruction::unsafe_arena_set_allocated_convert( - ::tint::core::ir::binary::pb::InstructionConvert* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_convert(); - _impl_.kind_.convert_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Instruction.convert) -} -inline ::tint::core::ir::binary::pb::InstructionConvert* PROTOBUF_NONNULL Instruction::_internal_mutable_convert() { - if (kind_case() != kConvert) { - clear_kind(); - set_has_convert(); - _impl_.kind_.convert_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::InstructionConvert>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::InstructionConvert*>(_impl_.kind_.convert_); -} -inline ::tint::core::ir::binary::pb::InstructionConvert* PROTOBUF_NONNULL Instruction::mutable_convert() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::InstructionConvert* _msg = _internal_mutable_convert(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Instruction.convert) - return _msg; -} - -// .tint.core.ir.binary.pb.InstructionAccess access = 12; -inline bool Instruction::has_access() const { - return kind_case() == kAccess; -} -inline bool Instruction::_internal_has_access() const { - return kind_case() == kAccess; -} -inline void Instruction::set_has_access() { - _impl_._oneof_case_[0] = kAccess; -} -inline void Instruction::clear_access() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kAccess) { - if (GetArena() == nullptr) { - delete _impl_.kind_.access_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.access_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::InstructionAccess* PROTOBUF_NULLABLE Instruction::release_access() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Instruction.access) - if (kind_case() == kAccess) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionAccess*>(_impl_.kind_.access_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.access_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::InstructionAccess& Instruction::_internal_access() const { - return kind_case() == kAccess ? *reinterpret_cast<::tint::core::ir::binary::pb::InstructionAccess*>(_impl_.kind_.access_) : reinterpret_cast<::tint::core::ir::binary::pb::InstructionAccess&>(::tint::core::ir::binary::pb::_InstructionAccess_default_instance_); -} -inline const ::tint::core::ir::binary::pb::InstructionAccess& Instruction::access() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Instruction.access) - return _internal_access(); -} -inline ::tint::core::ir::binary::pb::InstructionAccess* PROTOBUF_NULLABLE Instruction::unsafe_arena_release_access() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Instruction.access) - if (kind_case() == kAccess) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionAccess*>(_impl_.kind_.access_); - _impl_.kind_.access_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Instruction::unsafe_arena_set_allocated_access( - ::tint::core::ir::binary::pb::InstructionAccess* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_access(); - _impl_.kind_.access_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Instruction.access) -} -inline ::tint::core::ir::binary::pb::InstructionAccess* PROTOBUF_NONNULL Instruction::_internal_mutable_access() { - if (kind_case() != kAccess) { - clear_kind(); - set_has_access(); - _impl_.kind_.access_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::InstructionAccess>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::InstructionAccess*>(_impl_.kind_.access_); -} -inline ::tint::core::ir::binary::pb::InstructionAccess* PROTOBUF_NONNULL Instruction::mutable_access() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::InstructionAccess* _msg = _internal_mutable_access(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Instruction.access) - return _msg; -} - -// .tint.core.ir.binary.pb.InstructionUserCall user_call = 13; -inline bool Instruction::has_user_call() const { - return kind_case() == kUserCall; -} -inline bool Instruction::_internal_has_user_call() const { - return kind_case() == kUserCall; -} -inline void Instruction::set_has_user_call() { - _impl_._oneof_case_[0] = kUserCall; -} -inline void Instruction::clear_user_call() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kUserCall) { - if (GetArena() == nullptr) { - delete _impl_.kind_.user_call_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.user_call_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::InstructionUserCall* PROTOBUF_NULLABLE Instruction::release_user_call() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Instruction.user_call) - if (kind_case() == kUserCall) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionUserCall*>(_impl_.kind_.user_call_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.user_call_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::InstructionUserCall& Instruction::_internal_user_call() const { - return kind_case() == kUserCall ? *reinterpret_cast<::tint::core::ir::binary::pb::InstructionUserCall*>(_impl_.kind_.user_call_) : reinterpret_cast<::tint::core::ir::binary::pb::InstructionUserCall&>(::tint::core::ir::binary::pb::_InstructionUserCall_default_instance_); -} -inline const ::tint::core::ir::binary::pb::InstructionUserCall& Instruction::user_call() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Instruction.user_call) - return _internal_user_call(); -} -inline ::tint::core::ir::binary::pb::InstructionUserCall* PROTOBUF_NULLABLE Instruction::unsafe_arena_release_user_call() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Instruction.user_call) - if (kind_case() == kUserCall) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionUserCall*>(_impl_.kind_.user_call_); - _impl_.kind_.user_call_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Instruction::unsafe_arena_set_allocated_user_call( - ::tint::core::ir::binary::pb::InstructionUserCall* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_user_call(); - _impl_.kind_.user_call_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Instruction.user_call) -} -inline ::tint::core::ir::binary::pb::InstructionUserCall* PROTOBUF_NONNULL Instruction::_internal_mutable_user_call() { - if (kind_case() != kUserCall) { - clear_kind(); - set_has_user_call(); - _impl_.kind_.user_call_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::InstructionUserCall>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::InstructionUserCall*>(_impl_.kind_.user_call_); -} -inline ::tint::core::ir::binary::pb::InstructionUserCall* PROTOBUF_NONNULL Instruction::mutable_user_call() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::InstructionUserCall* _msg = _internal_mutable_user_call(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Instruction.user_call) - return _msg; -} - -// .tint.core.ir.binary.pb.InstructionBuiltinCall builtin_call = 14; -inline bool Instruction::has_builtin_call() const { - return kind_case() == kBuiltinCall; -} -inline bool Instruction::_internal_has_builtin_call() const { - return kind_case() == kBuiltinCall; -} -inline void Instruction::set_has_builtin_call() { - _impl_._oneof_case_[0] = kBuiltinCall; -} -inline void Instruction::clear_builtin_call() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kBuiltinCall) { - if (GetArena() == nullptr) { - delete _impl_.kind_.builtin_call_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.builtin_call_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::InstructionBuiltinCall* PROTOBUF_NULLABLE Instruction::release_builtin_call() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Instruction.builtin_call) - if (kind_case() == kBuiltinCall) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionBuiltinCall*>(_impl_.kind_.builtin_call_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.builtin_call_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::InstructionBuiltinCall& Instruction::_internal_builtin_call() const { - return kind_case() == kBuiltinCall ? *reinterpret_cast<::tint::core::ir::binary::pb::InstructionBuiltinCall*>(_impl_.kind_.builtin_call_) : reinterpret_cast<::tint::core::ir::binary::pb::InstructionBuiltinCall&>(::tint::core::ir::binary::pb::_InstructionBuiltinCall_default_instance_); -} -inline const ::tint::core::ir::binary::pb::InstructionBuiltinCall& Instruction::builtin_call() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Instruction.builtin_call) - return _internal_builtin_call(); -} -inline ::tint::core::ir::binary::pb::InstructionBuiltinCall* PROTOBUF_NULLABLE Instruction::unsafe_arena_release_builtin_call() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Instruction.builtin_call) - if (kind_case() == kBuiltinCall) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionBuiltinCall*>(_impl_.kind_.builtin_call_); - _impl_.kind_.builtin_call_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Instruction::unsafe_arena_set_allocated_builtin_call( - ::tint::core::ir::binary::pb::InstructionBuiltinCall* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_builtin_call(); - _impl_.kind_.builtin_call_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Instruction.builtin_call) -} -inline ::tint::core::ir::binary::pb::InstructionBuiltinCall* PROTOBUF_NONNULL Instruction::_internal_mutable_builtin_call() { - if (kind_case() != kBuiltinCall) { - clear_kind(); - set_has_builtin_call(); - _impl_.kind_.builtin_call_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::InstructionBuiltinCall>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::InstructionBuiltinCall*>(_impl_.kind_.builtin_call_); -} -inline ::tint::core::ir::binary::pb::InstructionBuiltinCall* PROTOBUF_NONNULL Instruction::mutable_builtin_call() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::InstructionBuiltinCall* _msg = _internal_mutable_builtin_call(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Instruction.builtin_call) - return _msg; -} - -// .tint.core.ir.binary.pb.InstructionLoad load = 15; -inline bool Instruction::has_load() const { - return kind_case() == kLoad; -} -inline bool Instruction::_internal_has_load() const { - return kind_case() == kLoad; -} -inline void Instruction::set_has_load() { - _impl_._oneof_case_[0] = kLoad; -} -inline void Instruction::clear_load() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kLoad) { - if (GetArena() == nullptr) { - delete _impl_.kind_.load_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.load_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::InstructionLoad* PROTOBUF_NULLABLE Instruction::release_load() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Instruction.load) - if (kind_case() == kLoad) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionLoad*>(_impl_.kind_.load_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.load_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::InstructionLoad& Instruction::_internal_load() const { - return kind_case() == kLoad ? *reinterpret_cast<::tint::core::ir::binary::pb::InstructionLoad*>(_impl_.kind_.load_) : reinterpret_cast<::tint::core::ir::binary::pb::InstructionLoad&>(::tint::core::ir::binary::pb::_InstructionLoad_default_instance_); -} -inline const ::tint::core::ir::binary::pb::InstructionLoad& Instruction::load() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Instruction.load) - return _internal_load(); -} -inline ::tint::core::ir::binary::pb::InstructionLoad* PROTOBUF_NULLABLE Instruction::unsafe_arena_release_load() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Instruction.load) - if (kind_case() == kLoad) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionLoad*>(_impl_.kind_.load_); - _impl_.kind_.load_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Instruction::unsafe_arena_set_allocated_load( - ::tint::core::ir::binary::pb::InstructionLoad* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_load(); - _impl_.kind_.load_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Instruction.load) -} -inline ::tint::core::ir::binary::pb::InstructionLoad* PROTOBUF_NONNULL Instruction::_internal_mutable_load() { - if (kind_case() != kLoad) { - clear_kind(); - set_has_load(); - _impl_.kind_.load_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::InstructionLoad>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::InstructionLoad*>(_impl_.kind_.load_); -} -inline ::tint::core::ir::binary::pb::InstructionLoad* PROTOBUF_NONNULL Instruction::mutable_load() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::InstructionLoad* _msg = _internal_mutable_load(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Instruction.load) - return _msg; -} - -// .tint.core.ir.binary.pb.InstructionStore store = 16; -inline bool Instruction::has_store() const { - return kind_case() == kStore; -} -inline bool Instruction::_internal_has_store() const { - return kind_case() == kStore; -} -inline void Instruction::set_has_store() { - _impl_._oneof_case_[0] = kStore; -} -inline void Instruction::clear_store() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kStore) { - if (GetArena() == nullptr) { - delete _impl_.kind_.store_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.store_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::InstructionStore* PROTOBUF_NULLABLE Instruction::release_store() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Instruction.store) - if (kind_case() == kStore) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionStore*>(_impl_.kind_.store_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.store_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::InstructionStore& Instruction::_internal_store() const { - return kind_case() == kStore ? *reinterpret_cast<::tint::core::ir::binary::pb::InstructionStore*>(_impl_.kind_.store_) : reinterpret_cast<::tint::core::ir::binary::pb::InstructionStore&>(::tint::core::ir::binary::pb::_InstructionStore_default_instance_); -} -inline const ::tint::core::ir::binary::pb::InstructionStore& Instruction::store() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Instruction.store) - return _internal_store(); -} -inline ::tint::core::ir::binary::pb::InstructionStore* PROTOBUF_NULLABLE Instruction::unsafe_arena_release_store() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Instruction.store) - if (kind_case() == kStore) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionStore*>(_impl_.kind_.store_); - _impl_.kind_.store_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Instruction::unsafe_arena_set_allocated_store( - ::tint::core::ir::binary::pb::InstructionStore* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_store(); - _impl_.kind_.store_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Instruction.store) -} -inline ::tint::core::ir::binary::pb::InstructionStore* PROTOBUF_NONNULL Instruction::_internal_mutable_store() { - if (kind_case() != kStore) { - clear_kind(); - set_has_store(); - _impl_.kind_.store_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::InstructionStore>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::InstructionStore*>(_impl_.kind_.store_); -} -inline ::tint::core::ir::binary::pb::InstructionStore* PROTOBUF_NONNULL Instruction::mutable_store() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::InstructionStore* _msg = _internal_mutable_store(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Instruction.store) - return _msg; -} - -// .tint.core.ir.binary.pb.InstructionLoadVectorElement load_vector_element = 17; -inline bool Instruction::has_load_vector_element() const { - return kind_case() == kLoadVectorElement; -} -inline bool Instruction::_internal_has_load_vector_element() const { - return kind_case() == kLoadVectorElement; -} -inline void Instruction::set_has_load_vector_element() { - _impl_._oneof_case_[0] = kLoadVectorElement; -} -inline void Instruction::clear_load_vector_element() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kLoadVectorElement) { - if (GetArena() == nullptr) { - delete _impl_.kind_.load_vector_element_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.load_vector_element_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::InstructionLoadVectorElement* PROTOBUF_NULLABLE Instruction::release_load_vector_element() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Instruction.load_vector_element) - if (kind_case() == kLoadVectorElement) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionLoadVectorElement*>(_impl_.kind_.load_vector_element_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.load_vector_element_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::InstructionLoadVectorElement& Instruction::_internal_load_vector_element() const { - return kind_case() == kLoadVectorElement ? *reinterpret_cast<::tint::core::ir::binary::pb::InstructionLoadVectorElement*>(_impl_.kind_.load_vector_element_) : reinterpret_cast<::tint::core::ir::binary::pb::InstructionLoadVectorElement&>(::tint::core::ir::binary::pb::_InstructionLoadVectorElement_default_instance_); -} -inline const ::tint::core::ir::binary::pb::InstructionLoadVectorElement& Instruction::load_vector_element() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Instruction.load_vector_element) - return _internal_load_vector_element(); -} -inline ::tint::core::ir::binary::pb::InstructionLoadVectorElement* PROTOBUF_NULLABLE Instruction::unsafe_arena_release_load_vector_element() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Instruction.load_vector_element) - if (kind_case() == kLoadVectorElement) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionLoadVectorElement*>(_impl_.kind_.load_vector_element_); - _impl_.kind_.load_vector_element_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Instruction::unsafe_arena_set_allocated_load_vector_element( - ::tint::core::ir::binary::pb::InstructionLoadVectorElement* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_load_vector_element(); - _impl_.kind_.load_vector_element_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Instruction.load_vector_element) -} -inline ::tint::core::ir::binary::pb::InstructionLoadVectorElement* PROTOBUF_NONNULL Instruction::_internal_mutable_load_vector_element() { - if (kind_case() != kLoadVectorElement) { - clear_kind(); - set_has_load_vector_element(); - _impl_.kind_.load_vector_element_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::InstructionLoadVectorElement>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::InstructionLoadVectorElement*>(_impl_.kind_.load_vector_element_); -} -inline ::tint::core::ir::binary::pb::InstructionLoadVectorElement* PROTOBUF_NONNULL Instruction::mutable_load_vector_element() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::InstructionLoadVectorElement* _msg = _internal_mutable_load_vector_element(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Instruction.load_vector_element) - return _msg; -} - -// .tint.core.ir.binary.pb.InstructionStoreVectorElement store_vector_element = 18; -inline bool Instruction::has_store_vector_element() const { - return kind_case() == kStoreVectorElement; -} -inline bool Instruction::_internal_has_store_vector_element() const { - return kind_case() == kStoreVectorElement; -} -inline void Instruction::set_has_store_vector_element() { - _impl_._oneof_case_[0] = kStoreVectorElement; -} -inline void Instruction::clear_store_vector_element() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kStoreVectorElement) { - if (GetArena() == nullptr) { - delete _impl_.kind_.store_vector_element_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.store_vector_element_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::InstructionStoreVectorElement* PROTOBUF_NULLABLE Instruction::release_store_vector_element() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Instruction.store_vector_element) - if (kind_case() == kStoreVectorElement) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionStoreVectorElement*>(_impl_.kind_.store_vector_element_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.store_vector_element_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::InstructionStoreVectorElement& Instruction::_internal_store_vector_element() const { - return kind_case() == kStoreVectorElement ? *reinterpret_cast<::tint::core::ir::binary::pb::InstructionStoreVectorElement*>(_impl_.kind_.store_vector_element_) : reinterpret_cast<::tint::core::ir::binary::pb::InstructionStoreVectorElement&>(::tint::core::ir::binary::pb::_InstructionStoreVectorElement_default_instance_); -} -inline const ::tint::core::ir::binary::pb::InstructionStoreVectorElement& Instruction::store_vector_element() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Instruction.store_vector_element) - return _internal_store_vector_element(); -} -inline ::tint::core::ir::binary::pb::InstructionStoreVectorElement* PROTOBUF_NULLABLE Instruction::unsafe_arena_release_store_vector_element() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Instruction.store_vector_element) - if (kind_case() == kStoreVectorElement) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionStoreVectorElement*>(_impl_.kind_.store_vector_element_); - _impl_.kind_.store_vector_element_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Instruction::unsafe_arena_set_allocated_store_vector_element( - ::tint::core::ir::binary::pb::InstructionStoreVectorElement* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_store_vector_element(); - _impl_.kind_.store_vector_element_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Instruction.store_vector_element) -} -inline ::tint::core::ir::binary::pb::InstructionStoreVectorElement* PROTOBUF_NONNULL Instruction::_internal_mutable_store_vector_element() { - if (kind_case() != kStoreVectorElement) { - clear_kind(); - set_has_store_vector_element(); - _impl_.kind_.store_vector_element_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::InstructionStoreVectorElement>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::InstructionStoreVectorElement*>(_impl_.kind_.store_vector_element_); -} -inline ::tint::core::ir::binary::pb::InstructionStoreVectorElement* PROTOBUF_NONNULL Instruction::mutable_store_vector_element() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::InstructionStoreVectorElement* _msg = _internal_mutable_store_vector_element(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Instruction.store_vector_element) - return _msg; -} - -// .tint.core.ir.binary.pb.InstructionSwizzle swizzle = 19; -inline bool Instruction::has_swizzle() const { - return kind_case() == kSwizzle; -} -inline bool Instruction::_internal_has_swizzle() const { - return kind_case() == kSwizzle; -} -inline void Instruction::set_has_swizzle() { - _impl_._oneof_case_[0] = kSwizzle; -} -inline void Instruction::clear_swizzle() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kSwizzle) { - if (GetArena() == nullptr) { - delete _impl_.kind_.swizzle_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.swizzle_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::InstructionSwizzle* PROTOBUF_NULLABLE Instruction::release_swizzle() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Instruction.swizzle) - if (kind_case() == kSwizzle) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionSwizzle*>(_impl_.kind_.swizzle_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.swizzle_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::InstructionSwizzle& Instruction::_internal_swizzle() const { - return kind_case() == kSwizzle ? *reinterpret_cast<::tint::core::ir::binary::pb::InstructionSwizzle*>(_impl_.kind_.swizzle_) : reinterpret_cast<::tint::core::ir::binary::pb::InstructionSwizzle&>(::tint::core::ir::binary::pb::_InstructionSwizzle_default_instance_); -} -inline const ::tint::core::ir::binary::pb::InstructionSwizzle& Instruction::swizzle() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Instruction.swizzle) - return _internal_swizzle(); -} -inline ::tint::core::ir::binary::pb::InstructionSwizzle* PROTOBUF_NULLABLE Instruction::unsafe_arena_release_swizzle() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Instruction.swizzle) - if (kind_case() == kSwizzle) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionSwizzle*>(_impl_.kind_.swizzle_); - _impl_.kind_.swizzle_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Instruction::unsafe_arena_set_allocated_swizzle( - ::tint::core::ir::binary::pb::InstructionSwizzle* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_swizzle(); - _impl_.kind_.swizzle_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Instruction.swizzle) -} -inline ::tint::core::ir::binary::pb::InstructionSwizzle* PROTOBUF_NONNULL Instruction::_internal_mutable_swizzle() { - if (kind_case() != kSwizzle) { - clear_kind(); - set_has_swizzle(); - _impl_.kind_.swizzle_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::InstructionSwizzle>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::InstructionSwizzle*>(_impl_.kind_.swizzle_); -} -inline ::tint::core::ir::binary::pb::InstructionSwizzle* PROTOBUF_NONNULL Instruction::mutable_swizzle() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::InstructionSwizzle* _msg = _internal_mutable_swizzle(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Instruction.swizzle) - return _msg; -} - -// .tint.core.ir.binary.pb.InstructionIf if = 20; -inline bool Instruction::has_if_() const { - return kind_case() == kIf; -} -inline bool Instruction::_internal_has_if_() const { - return kind_case() == kIf; -} -inline void Instruction::set_has_if_() { - _impl_._oneof_case_[0] = kIf; -} -inline void Instruction::clear_if_() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kIf) { - if (GetArena() == nullptr) { - delete _impl_.kind_.if__; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.if__); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::InstructionIf* PROTOBUF_NULLABLE Instruction::release_if_() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Instruction.if) - if (kind_case() == kIf) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionIf*>(_impl_.kind_.if__); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.if__ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::InstructionIf& Instruction::_internal_if_() const { - return kind_case() == kIf ? *reinterpret_cast<::tint::core::ir::binary::pb::InstructionIf*>(_impl_.kind_.if__) : reinterpret_cast<::tint::core::ir::binary::pb::InstructionIf&>(::tint::core::ir::binary::pb::_InstructionIf_default_instance_); -} -inline const ::tint::core::ir::binary::pb::InstructionIf& Instruction::if_() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Instruction.if) - return _internal_if_(); -} -inline ::tint::core::ir::binary::pb::InstructionIf* PROTOBUF_NULLABLE Instruction::unsafe_arena_release_if_() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Instruction.if) - if (kind_case() == kIf) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionIf*>(_impl_.kind_.if__); - _impl_.kind_.if__ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Instruction::unsafe_arena_set_allocated_if_( - ::tint::core::ir::binary::pb::InstructionIf* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_if_(); - _impl_.kind_.if__ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Instruction.if) -} -inline ::tint::core::ir::binary::pb::InstructionIf* PROTOBUF_NONNULL Instruction::_internal_mutable_if_() { - if (kind_case() != kIf) { - clear_kind(); - set_has_if_(); - _impl_.kind_.if__ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::InstructionIf>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::InstructionIf*>(_impl_.kind_.if__); -} -inline ::tint::core::ir::binary::pb::InstructionIf* PROTOBUF_NONNULL Instruction::mutable_if_() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::InstructionIf* _msg = _internal_mutable_if_(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Instruction.if) - return _msg; -} - -// .tint.core.ir.binary.pb.InstructionSwitch switch = 21; -inline bool Instruction::has_switch_() const { - return kind_case() == kSwitch; -} -inline bool Instruction::_internal_has_switch_() const { - return kind_case() == kSwitch; -} -inline void Instruction::set_has_switch_() { - _impl_._oneof_case_[0] = kSwitch; -} -inline void Instruction::clear_switch_() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kSwitch) { - if (GetArena() == nullptr) { - delete _impl_.kind_.switch__; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.switch__); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::InstructionSwitch* PROTOBUF_NULLABLE Instruction::release_switch_() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Instruction.switch) - if (kind_case() == kSwitch) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionSwitch*>(_impl_.kind_.switch__); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.switch__ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::InstructionSwitch& Instruction::_internal_switch_() const { - return kind_case() == kSwitch ? *reinterpret_cast<::tint::core::ir::binary::pb::InstructionSwitch*>(_impl_.kind_.switch__) : reinterpret_cast<::tint::core::ir::binary::pb::InstructionSwitch&>(::tint::core::ir::binary::pb::_InstructionSwitch_default_instance_); -} -inline const ::tint::core::ir::binary::pb::InstructionSwitch& Instruction::switch_() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Instruction.switch) - return _internal_switch_(); -} -inline ::tint::core::ir::binary::pb::InstructionSwitch* PROTOBUF_NULLABLE Instruction::unsafe_arena_release_switch_() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Instruction.switch) - if (kind_case() == kSwitch) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionSwitch*>(_impl_.kind_.switch__); - _impl_.kind_.switch__ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Instruction::unsafe_arena_set_allocated_switch_( - ::tint::core::ir::binary::pb::InstructionSwitch* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_switch_(); - _impl_.kind_.switch__ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Instruction.switch) -} -inline ::tint::core::ir::binary::pb::InstructionSwitch* PROTOBUF_NONNULL Instruction::_internal_mutable_switch_() { - if (kind_case() != kSwitch) { - clear_kind(); - set_has_switch_(); - _impl_.kind_.switch__ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::InstructionSwitch>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::InstructionSwitch*>(_impl_.kind_.switch__); -} -inline ::tint::core::ir::binary::pb::InstructionSwitch* PROTOBUF_NONNULL Instruction::mutable_switch_() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::InstructionSwitch* _msg = _internal_mutable_switch_(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Instruction.switch) - return _msg; -} - -// .tint.core.ir.binary.pb.InstructionLoop loop = 22; -inline bool Instruction::has_loop() const { - return kind_case() == kLoop; -} -inline bool Instruction::_internal_has_loop() const { - return kind_case() == kLoop; -} -inline void Instruction::set_has_loop() { - _impl_._oneof_case_[0] = kLoop; -} -inline void Instruction::clear_loop() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kLoop) { - if (GetArena() == nullptr) { - delete _impl_.kind_.loop_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.loop_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::InstructionLoop* PROTOBUF_NULLABLE Instruction::release_loop() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Instruction.loop) - if (kind_case() == kLoop) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionLoop*>(_impl_.kind_.loop_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.loop_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::InstructionLoop& Instruction::_internal_loop() const { - return kind_case() == kLoop ? *reinterpret_cast<::tint::core::ir::binary::pb::InstructionLoop*>(_impl_.kind_.loop_) : reinterpret_cast<::tint::core::ir::binary::pb::InstructionLoop&>(::tint::core::ir::binary::pb::_InstructionLoop_default_instance_); -} -inline const ::tint::core::ir::binary::pb::InstructionLoop& Instruction::loop() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Instruction.loop) - return _internal_loop(); -} -inline ::tint::core::ir::binary::pb::InstructionLoop* PROTOBUF_NULLABLE Instruction::unsafe_arena_release_loop() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Instruction.loop) - if (kind_case() == kLoop) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionLoop*>(_impl_.kind_.loop_); - _impl_.kind_.loop_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Instruction::unsafe_arena_set_allocated_loop( - ::tint::core::ir::binary::pb::InstructionLoop* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_loop(); - _impl_.kind_.loop_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Instruction.loop) -} -inline ::tint::core::ir::binary::pb::InstructionLoop* PROTOBUF_NONNULL Instruction::_internal_mutable_loop() { - if (kind_case() != kLoop) { - clear_kind(); - set_has_loop(); - _impl_.kind_.loop_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::InstructionLoop>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::InstructionLoop*>(_impl_.kind_.loop_); -} -inline ::tint::core::ir::binary::pb::InstructionLoop* PROTOBUF_NONNULL Instruction::mutable_loop() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::InstructionLoop* _msg = _internal_mutable_loop(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Instruction.loop) - return _msg; -} - -// .tint.core.ir.binary.pb.InstructionExitIf exit_if = 23; -inline bool Instruction::has_exit_if() const { - return kind_case() == kExitIf; -} -inline bool Instruction::_internal_has_exit_if() const { - return kind_case() == kExitIf; -} -inline void Instruction::set_has_exit_if() { - _impl_._oneof_case_[0] = kExitIf; -} -inline void Instruction::clear_exit_if() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kExitIf) { - if (GetArena() == nullptr) { - delete _impl_.kind_.exit_if_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.exit_if_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::InstructionExitIf* PROTOBUF_NULLABLE Instruction::release_exit_if() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Instruction.exit_if) - if (kind_case() == kExitIf) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionExitIf*>(_impl_.kind_.exit_if_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.exit_if_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::InstructionExitIf& Instruction::_internal_exit_if() const { - return kind_case() == kExitIf ? *reinterpret_cast<::tint::core::ir::binary::pb::InstructionExitIf*>(_impl_.kind_.exit_if_) : reinterpret_cast<::tint::core::ir::binary::pb::InstructionExitIf&>(::tint::core::ir::binary::pb::_InstructionExitIf_default_instance_); -} -inline const ::tint::core::ir::binary::pb::InstructionExitIf& Instruction::exit_if() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Instruction.exit_if) - return _internal_exit_if(); -} -inline ::tint::core::ir::binary::pb::InstructionExitIf* PROTOBUF_NULLABLE Instruction::unsafe_arena_release_exit_if() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Instruction.exit_if) - if (kind_case() == kExitIf) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionExitIf*>(_impl_.kind_.exit_if_); - _impl_.kind_.exit_if_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Instruction::unsafe_arena_set_allocated_exit_if( - ::tint::core::ir::binary::pb::InstructionExitIf* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_exit_if(); - _impl_.kind_.exit_if_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Instruction.exit_if) -} -inline ::tint::core::ir::binary::pb::InstructionExitIf* PROTOBUF_NONNULL Instruction::_internal_mutable_exit_if() { - if (kind_case() != kExitIf) { - clear_kind(); - set_has_exit_if(); - _impl_.kind_.exit_if_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::InstructionExitIf>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::InstructionExitIf*>(_impl_.kind_.exit_if_); -} -inline ::tint::core::ir::binary::pb::InstructionExitIf* PROTOBUF_NONNULL Instruction::mutable_exit_if() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::InstructionExitIf* _msg = _internal_mutable_exit_if(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Instruction.exit_if) - return _msg; -} - -// .tint.core.ir.binary.pb.InstructionExitSwitch exit_switch = 24; -inline bool Instruction::has_exit_switch() const { - return kind_case() == kExitSwitch; -} -inline bool Instruction::_internal_has_exit_switch() const { - return kind_case() == kExitSwitch; -} -inline void Instruction::set_has_exit_switch() { - _impl_._oneof_case_[0] = kExitSwitch; -} -inline void Instruction::clear_exit_switch() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kExitSwitch) { - if (GetArena() == nullptr) { - delete _impl_.kind_.exit_switch_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.exit_switch_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::InstructionExitSwitch* PROTOBUF_NULLABLE Instruction::release_exit_switch() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Instruction.exit_switch) - if (kind_case() == kExitSwitch) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionExitSwitch*>(_impl_.kind_.exit_switch_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.exit_switch_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::InstructionExitSwitch& Instruction::_internal_exit_switch() const { - return kind_case() == kExitSwitch ? *reinterpret_cast<::tint::core::ir::binary::pb::InstructionExitSwitch*>(_impl_.kind_.exit_switch_) : reinterpret_cast<::tint::core::ir::binary::pb::InstructionExitSwitch&>(::tint::core::ir::binary::pb::_InstructionExitSwitch_default_instance_); -} -inline const ::tint::core::ir::binary::pb::InstructionExitSwitch& Instruction::exit_switch() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Instruction.exit_switch) - return _internal_exit_switch(); -} -inline ::tint::core::ir::binary::pb::InstructionExitSwitch* PROTOBUF_NULLABLE Instruction::unsafe_arena_release_exit_switch() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Instruction.exit_switch) - if (kind_case() == kExitSwitch) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionExitSwitch*>(_impl_.kind_.exit_switch_); - _impl_.kind_.exit_switch_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Instruction::unsafe_arena_set_allocated_exit_switch( - ::tint::core::ir::binary::pb::InstructionExitSwitch* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_exit_switch(); - _impl_.kind_.exit_switch_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Instruction.exit_switch) -} -inline ::tint::core::ir::binary::pb::InstructionExitSwitch* PROTOBUF_NONNULL Instruction::_internal_mutable_exit_switch() { - if (kind_case() != kExitSwitch) { - clear_kind(); - set_has_exit_switch(); - _impl_.kind_.exit_switch_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::InstructionExitSwitch>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::InstructionExitSwitch*>(_impl_.kind_.exit_switch_); -} -inline ::tint::core::ir::binary::pb::InstructionExitSwitch* PROTOBUF_NONNULL Instruction::mutable_exit_switch() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::InstructionExitSwitch* _msg = _internal_mutable_exit_switch(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Instruction.exit_switch) - return _msg; -} - -// .tint.core.ir.binary.pb.InstructionExitLoop exit_loop = 25; -inline bool Instruction::has_exit_loop() const { - return kind_case() == kExitLoop; -} -inline bool Instruction::_internal_has_exit_loop() const { - return kind_case() == kExitLoop; -} -inline void Instruction::set_has_exit_loop() { - _impl_._oneof_case_[0] = kExitLoop; -} -inline void Instruction::clear_exit_loop() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kExitLoop) { - if (GetArena() == nullptr) { - delete _impl_.kind_.exit_loop_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.exit_loop_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::InstructionExitLoop* PROTOBUF_NULLABLE Instruction::release_exit_loop() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Instruction.exit_loop) - if (kind_case() == kExitLoop) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionExitLoop*>(_impl_.kind_.exit_loop_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.exit_loop_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::InstructionExitLoop& Instruction::_internal_exit_loop() const { - return kind_case() == kExitLoop ? *reinterpret_cast<::tint::core::ir::binary::pb::InstructionExitLoop*>(_impl_.kind_.exit_loop_) : reinterpret_cast<::tint::core::ir::binary::pb::InstructionExitLoop&>(::tint::core::ir::binary::pb::_InstructionExitLoop_default_instance_); -} -inline const ::tint::core::ir::binary::pb::InstructionExitLoop& Instruction::exit_loop() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Instruction.exit_loop) - return _internal_exit_loop(); -} -inline ::tint::core::ir::binary::pb::InstructionExitLoop* PROTOBUF_NULLABLE Instruction::unsafe_arena_release_exit_loop() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Instruction.exit_loop) - if (kind_case() == kExitLoop) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionExitLoop*>(_impl_.kind_.exit_loop_); - _impl_.kind_.exit_loop_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Instruction::unsafe_arena_set_allocated_exit_loop( - ::tint::core::ir::binary::pb::InstructionExitLoop* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_exit_loop(); - _impl_.kind_.exit_loop_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Instruction.exit_loop) -} -inline ::tint::core::ir::binary::pb::InstructionExitLoop* PROTOBUF_NONNULL Instruction::_internal_mutable_exit_loop() { - if (kind_case() != kExitLoop) { - clear_kind(); - set_has_exit_loop(); - _impl_.kind_.exit_loop_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::InstructionExitLoop>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::InstructionExitLoop*>(_impl_.kind_.exit_loop_); -} -inline ::tint::core::ir::binary::pb::InstructionExitLoop* PROTOBUF_NONNULL Instruction::mutable_exit_loop() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::InstructionExitLoop* _msg = _internal_mutable_exit_loop(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Instruction.exit_loop) - return _msg; -} - -// .tint.core.ir.binary.pb.InstructionNextIteration next_iteration = 26; -inline bool Instruction::has_next_iteration() const { - return kind_case() == kNextIteration; -} -inline bool Instruction::_internal_has_next_iteration() const { - return kind_case() == kNextIteration; -} -inline void Instruction::set_has_next_iteration() { - _impl_._oneof_case_[0] = kNextIteration; -} -inline void Instruction::clear_next_iteration() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kNextIteration) { - if (GetArena() == nullptr) { - delete _impl_.kind_.next_iteration_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.next_iteration_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::InstructionNextIteration* PROTOBUF_NULLABLE Instruction::release_next_iteration() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Instruction.next_iteration) - if (kind_case() == kNextIteration) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionNextIteration*>(_impl_.kind_.next_iteration_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.next_iteration_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::InstructionNextIteration& Instruction::_internal_next_iteration() const { - return kind_case() == kNextIteration ? *reinterpret_cast<::tint::core::ir::binary::pb::InstructionNextIteration*>(_impl_.kind_.next_iteration_) : reinterpret_cast<::tint::core::ir::binary::pb::InstructionNextIteration&>(::tint::core::ir::binary::pb::_InstructionNextIteration_default_instance_); -} -inline const ::tint::core::ir::binary::pb::InstructionNextIteration& Instruction::next_iteration() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Instruction.next_iteration) - return _internal_next_iteration(); -} -inline ::tint::core::ir::binary::pb::InstructionNextIteration* PROTOBUF_NULLABLE Instruction::unsafe_arena_release_next_iteration() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Instruction.next_iteration) - if (kind_case() == kNextIteration) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionNextIteration*>(_impl_.kind_.next_iteration_); - _impl_.kind_.next_iteration_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Instruction::unsafe_arena_set_allocated_next_iteration( - ::tint::core::ir::binary::pb::InstructionNextIteration* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_next_iteration(); - _impl_.kind_.next_iteration_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Instruction.next_iteration) -} -inline ::tint::core::ir::binary::pb::InstructionNextIteration* PROTOBUF_NONNULL Instruction::_internal_mutable_next_iteration() { - if (kind_case() != kNextIteration) { - clear_kind(); - set_has_next_iteration(); - _impl_.kind_.next_iteration_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::InstructionNextIteration>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::InstructionNextIteration*>(_impl_.kind_.next_iteration_); -} -inline ::tint::core::ir::binary::pb::InstructionNextIteration* PROTOBUF_NONNULL Instruction::mutable_next_iteration() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::InstructionNextIteration* _msg = _internal_mutable_next_iteration(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Instruction.next_iteration) - return _msg; -} - -// .tint.core.ir.binary.pb.InstructionContinue continue = 27; -inline bool Instruction::has_continue_() const { - return kind_case() == kContinue; -} -inline bool Instruction::_internal_has_continue_() const { - return kind_case() == kContinue; -} -inline void Instruction::set_has_continue_() { - _impl_._oneof_case_[0] = kContinue; -} -inline void Instruction::clear_continue_() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kContinue) { - if (GetArena() == nullptr) { - delete _impl_.kind_.continue__; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.continue__); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::InstructionContinue* PROTOBUF_NULLABLE Instruction::release_continue_() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Instruction.continue) - if (kind_case() == kContinue) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionContinue*>(_impl_.kind_.continue__); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.continue__ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::InstructionContinue& Instruction::_internal_continue_() const { - return kind_case() == kContinue ? *reinterpret_cast<::tint::core::ir::binary::pb::InstructionContinue*>(_impl_.kind_.continue__) : reinterpret_cast<::tint::core::ir::binary::pb::InstructionContinue&>(::tint::core::ir::binary::pb::_InstructionContinue_default_instance_); -} -inline const ::tint::core::ir::binary::pb::InstructionContinue& Instruction::continue_() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Instruction.continue) - return _internal_continue_(); -} -inline ::tint::core::ir::binary::pb::InstructionContinue* PROTOBUF_NULLABLE Instruction::unsafe_arena_release_continue_() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Instruction.continue) - if (kind_case() == kContinue) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionContinue*>(_impl_.kind_.continue__); - _impl_.kind_.continue__ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Instruction::unsafe_arena_set_allocated_continue_( - ::tint::core::ir::binary::pb::InstructionContinue* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_continue_(); - _impl_.kind_.continue__ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Instruction.continue) -} -inline ::tint::core::ir::binary::pb::InstructionContinue* PROTOBUF_NONNULL Instruction::_internal_mutable_continue_() { - if (kind_case() != kContinue) { - clear_kind(); - set_has_continue_(); - _impl_.kind_.continue__ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::InstructionContinue>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::InstructionContinue*>(_impl_.kind_.continue__); -} -inline ::tint::core::ir::binary::pb::InstructionContinue* PROTOBUF_NONNULL Instruction::mutable_continue_() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::InstructionContinue* _msg = _internal_mutable_continue_(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Instruction.continue) - return _msg; -} - -// .tint.core.ir.binary.pb.InstructionBreakIf break_if = 28; -inline bool Instruction::has_break_if() const { - return kind_case() == kBreakIf; -} -inline bool Instruction::_internal_has_break_if() const { - return kind_case() == kBreakIf; -} -inline void Instruction::set_has_break_if() { - _impl_._oneof_case_[0] = kBreakIf; -} -inline void Instruction::clear_break_if() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kBreakIf) { - if (GetArena() == nullptr) { - delete _impl_.kind_.break_if_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.break_if_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::InstructionBreakIf* PROTOBUF_NULLABLE Instruction::release_break_if() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Instruction.break_if) - if (kind_case() == kBreakIf) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionBreakIf*>(_impl_.kind_.break_if_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.break_if_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::InstructionBreakIf& Instruction::_internal_break_if() const { - return kind_case() == kBreakIf ? *reinterpret_cast<::tint::core::ir::binary::pb::InstructionBreakIf*>(_impl_.kind_.break_if_) : reinterpret_cast<::tint::core::ir::binary::pb::InstructionBreakIf&>(::tint::core::ir::binary::pb::_InstructionBreakIf_default_instance_); -} -inline const ::tint::core::ir::binary::pb::InstructionBreakIf& Instruction::break_if() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Instruction.break_if) - return _internal_break_if(); -} -inline ::tint::core::ir::binary::pb::InstructionBreakIf* PROTOBUF_NULLABLE Instruction::unsafe_arena_release_break_if() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Instruction.break_if) - if (kind_case() == kBreakIf) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionBreakIf*>(_impl_.kind_.break_if_); - _impl_.kind_.break_if_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Instruction::unsafe_arena_set_allocated_break_if( - ::tint::core::ir::binary::pb::InstructionBreakIf* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_break_if(); - _impl_.kind_.break_if_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Instruction.break_if) -} -inline ::tint::core::ir::binary::pb::InstructionBreakIf* PROTOBUF_NONNULL Instruction::_internal_mutable_break_if() { - if (kind_case() != kBreakIf) { - clear_kind(); - set_has_break_if(); - _impl_.kind_.break_if_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::InstructionBreakIf>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::InstructionBreakIf*>(_impl_.kind_.break_if_); -} -inline ::tint::core::ir::binary::pb::InstructionBreakIf* PROTOBUF_NONNULL Instruction::mutable_break_if() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::InstructionBreakIf* _msg = _internal_mutable_break_if(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Instruction.break_if) - return _msg; -} - -// .tint.core.ir.binary.pb.InstructionUnreachable unreachable = 29; -inline bool Instruction::has_unreachable() const { - return kind_case() == kUnreachable; -} -inline bool Instruction::_internal_has_unreachable() const { - return kind_case() == kUnreachable; -} -inline void Instruction::set_has_unreachable() { - _impl_._oneof_case_[0] = kUnreachable; -} -inline void Instruction::clear_unreachable() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (kind_case() == kUnreachable) { - if (GetArena() == nullptr) { - delete _impl_.kind_.unreachable_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.kind_.unreachable_); - } - clear_has_kind(); - } -} -inline ::tint::core::ir::binary::pb::InstructionUnreachable* PROTOBUF_NULLABLE Instruction::release_unreachable() { - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.Instruction.unreachable) - if (kind_case() == kUnreachable) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionUnreachable*>(_impl_.kind_.unreachable_); - if (GetArena() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); - } - _impl_.kind_.unreachable_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline const ::tint::core::ir::binary::pb::InstructionUnreachable& Instruction::_internal_unreachable() const { - return kind_case() == kUnreachable ? *reinterpret_cast<::tint::core::ir::binary::pb::InstructionUnreachable*>(_impl_.kind_.unreachable_) : reinterpret_cast<::tint::core::ir::binary::pb::InstructionUnreachable&>(::tint::core::ir::binary::pb::_InstructionUnreachable_default_instance_); -} -inline const ::tint::core::ir::binary::pb::InstructionUnreachable& Instruction::unreachable() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Instruction.unreachable) - return _internal_unreachable(); -} -inline ::tint::core::ir::binary::pb::InstructionUnreachable* PROTOBUF_NULLABLE Instruction::unsafe_arena_release_unreachable() { - // @@protoc_insertion_point(field_unsafe_arena_release:tint.core.ir.binary.pb.Instruction.unreachable) - if (kind_case() == kUnreachable) { - clear_has_kind(); - auto* temp = reinterpret_cast<::tint::core::ir::binary::pb::InstructionUnreachable*>(_impl_.kind_.unreachable_); - _impl_.kind_.unreachable_ = nullptr; - return temp; - } else { - return nullptr; - } -} -inline void Instruction::unsafe_arena_set_allocated_unreachable( - ::tint::core::ir::binary::pb::InstructionUnreachable* PROTOBUF_NULLABLE value) { - // We rely on the oneof clear method to free the earlier contents - // of this oneof. We can directly use the pointer we're given to - // set the new value. - clear_kind(); - if (value) { - set_has_unreachable(); - _impl_.kind_.unreachable_ = reinterpret_cast<::google::protobuf::Message*>(value); - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.Instruction.unreachable) -} -inline ::tint::core::ir::binary::pb::InstructionUnreachable* PROTOBUF_NONNULL Instruction::_internal_mutable_unreachable() { - if (kind_case() != kUnreachable) { - clear_kind(); - set_has_unreachable(); - _impl_.kind_.unreachable_ = reinterpret_cast<::google::protobuf::Message*>( - ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::InstructionUnreachable>(GetArena())); - } - return reinterpret_cast<::tint::core::ir::binary::pb::InstructionUnreachable*>(_impl_.kind_.unreachable_); -} -inline ::tint::core::ir::binary::pb::InstructionUnreachable* PROTOBUF_NONNULL Instruction::mutable_unreachable() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::tint::core::ir::binary::pb::InstructionUnreachable* _msg = _internal_mutable_unreachable(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.Instruction.unreachable) - return _msg; -} - -inline bool Instruction::has_kind() const { - return kind_case() != KIND_NOT_SET; -} -inline void Instruction::clear_has_kind() { - _impl_._oneof_case_[0] = KIND_NOT_SET; -} -inline Instruction::KindCase Instruction::kind_case() const { - return Instruction::KindCase(_impl_._oneof_case_[0]); -} -// ------------------------------------------------------------------- - -// InstructionReturn - -// ------------------------------------------------------------------- - -// InstructionUnary - -// .tint.core.ir.binary.pb.UnaryOp op = 1; -inline void InstructionUnary::clear_op() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.op_ = 0; - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline ::tint::core::ir::binary::pb::UnaryOp InstructionUnary::op() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.InstructionUnary.op) - return _internal_op(); -} -inline void InstructionUnary::set_op(::tint::core::ir::binary::pb::UnaryOp value) { - _internal_set_op(value); - _impl_._has_bits_[0] |= 0x00000001U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.InstructionUnary.op) -} -inline ::tint::core::ir::binary::pb::UnaryOp InstructionUnary::_internal_op() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return static_cast<::tint::core::ir::binary::pb::UnaryOp>(_impl_.op_); -} -inline void InstructionUnary::_internal_set_op(::tint::core::ir::binary::pb::UnaryOp value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.op_ = value; -} - -// ------------------------------------------------------------------- - -// InstructionBinary - -// .tint.core.ir.binary.pb.BinaryOp op = 1; -inline void InstructionBinary::clear_op() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.op_ = 0; - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline ::tint::core::ir::binary::pb::BinaryOp InstructionBinary::op() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.InstructionBinary.op) - return _internal_op(); -} -inline void InstructionBinary::set_op(::tint::core::ir::binary::pb::BinaryOp value) { - _internal_set_op(value); - _impl_._has_bits_[0] |= 0x00000001U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.InstructionBinary.op) -} -inline ::tint::core::ir::binary::pb::BinaryOp InstructionBinary::_internal_op() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return static_cast<::tint::core::ir::binary::pb::BinaryOp>(_impl_.op_); -} -inline void InstructionBinary::_internal_set_op(::tint::core::ir::binary::pb::BinaryOp value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.op_ = value; -} - -// ------------------------------------------------------------------- - -// InstructionBitcast - -// ------------------------------------------------------------------- - -// InstructionConstruct - -// ------------------------------------------------------------------- - -// InstructionDiscard - -// ------------------------------------------------------------------- - -// InstructionLet - -// ------------------------------------------------------------------- - -// InstructionVar - -// optional .tint.core.ir.binary.pb.BindingPoint binding_point = 1; -inline bool InstructionVar::has_binding_point() const { - bool value = (_impl_._has_bits_[0] & 0x00000001U) != 0; - PROTOBUF_ASSUME(!value || _impl_.binding_point_ != nullptr); - return value; -} -inline void InstructionVar::clear_binding_point() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (_impl_.binding_point_ != nullptr) _impl_.binding_point_->Clear(); - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline const ::tint::core::ir::binary::pb::BindingPoint& InstructionVar::_internal_binding_point() const { - ::google::protobuf::internal::TSanRead(&_impl_); - const ::tint::core::ir::binary::pb::BindingPoint* p = _impl_.binding_point_; - return p != nullptr ? *p : reinterpret_cast(::tint::core::ir::binary::pb::_BindingPoint_default_instance_); -} -inline const ::tint::core::ir::binary::pb::BindingPoint& InstructionVar::binding_point() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.InstructionVar.binding_point) - return _internal_binding_point(); -} -inline void InstructionVar::unsafe_arena_set_allocated_binding_point( - ::tint::core::ir::binary::pb::BindingPoint* PROTOBUF_NULLABLE value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (GetArena() == nullptr) { - delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.binding_point_); - } - _impl_.binding_point_ = reinterpret_cast<::tint::core::ir::binary::pb::BindingPoint*>(value); - if (value != nullptr) { - _impl_._has_bits_[0] |= 0x00000001U; - } else { - _impl_._has_bits_[0] &= ~0x00000001U; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.InstructionVar.binding_point) -} -inline ::tint::core::ir::binary::pb::BindingPoint* PROTOBUF_NULLABLE InstructionVar::release_binding_point() { - ::google::protobuf::internal::TSanWrite(&_impl_); - - _impl_._has_bits_[0] &= ~0x00000001U; - ::tint::core::ir::binary::pb::BindingPoint* released = _impl_.binding_point_; - _impl_.binding_point_ = nullptr; - if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { - auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); - released = ::google::protobuf::internal::DuplicateIfNonNull(released); - if (GetArena() == nullptr) { - delete old; - } - } else { - if (GetArena() != nullptr) { - released = ::google::protobuf::internal::DuplicateIfNonNull(released); - } - } - return released; -} -inline ::tint::core::ir::binary::pb::BindingPoint* PROTOBUF_NULLABLE InstructionVar::unsafe_arena_release_binding_point() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.InstructionVar.binding_point) - - _impl_._has_bits_[0] &= ~0x00000001U; - ::tint::core::ir::binary::pb::BindingPoint* temp = _impl_.binding_point_; - _impl_.binding_point_ = nullptr; - return temp; -} -inline ::tint::core::ir::binary::pb::BindingPoint* PROTOBUF_NONNULL InstructionVar::_internal_mutable_binding_point() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (_impl_.binding_point_ == nullptr) { - auto* p = ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::BindingPoint>(GetArena()); - _impl_.binding_point_ = reinterpret_cast<::tint::core::ir::binary::pb::BindingPoint*>(p); - } - return _impl_.binding_point_; -} -inline ::tint::core::ir::binary::pb::BindingPoint* PROTOBUF_NONNULL InstructionVar::mutable_binding_point() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - _impl_._has_bits_[0] |= 0x00000001U; - ::tint::core::ir::binary::pb::BindingPoint* _msg = _internal_mutable_binding_point(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.InstructionVar.binding_point) - return _msg; -} -inline void InstructionVar::set_allocated_binding_point(::tint::core::ir::binary::pb::BindingPoint* PROTOBUF_NULLABLE value) { - ::google::protobuf::Arena* message_arena = GetArena(); - ::google::protobuf::internal::TSanWrite(&_impl_); - if (message_arena == nullptr) { - delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.binding_point_); - } - - if (value != nullptr) { - ::google::protobuf::Arena* submessage_arena = value->GetArena(); - if (message_arena != submessage_arena) { - value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00000001U; - } else { - _impl_._has_bits_[0] &= ~0x00000001U; - } - - _impl_.binding_point_ = reinterpret_cast<::tint::core::ir::binary::pb::BindingPoint*>(value); - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.InstructionVar.binding_point) -} - -// optional uint32 input_attachment_index = 2; -inline bool InstructionVar::has_input_attachment_index() const { - bool value = (_impl_._has_bits_[0] & 0x00000002U) != 0; - return value; -} -inline void InstructionVar::clear_input_attachment_index() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.input_attachment_index_ = 0u; - _impl_._has_bits_[0] &= ~0x00000002U; -} -inline ::uint32_t InstructionVar::input_attachment_index() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.InstructionVar.input_attachment_index) - return _internal_input_attachment_index(); -} -inline void InstructionVar::set_input_attachment_index(::uint32_t value) { - _internal_set_input_attachment_index(value); - _impl_._has_bits_[0] |= 0x00000002U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.InstructionVar.input_attachment_index) -} -inline ::uint32_t InstructionVar::_internal_input_attachment_index() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.input_attachment_index_; -} -inline void InstructionVar::_internal_set_input_attachment_index(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.input_attachment_index_ = value; -} - -// ------------------------------------------------------------------- - -// InstructionConvert - -// ------------------------------------------------------------------- - -// InstructionAccess - -// ------------------------------------------------------------------- - -// InstructionUserCall - -// ------------------------------------------------------------------- - -// InstructionBuiltinCall - -// .tint.core.ir.binary.pb.BuiltinFn builtin = 1; -inline void InstructionBuiltinCall::clear_builtin() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.builtin_ = 0; - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline ::tint::core::ir::binary::pb::BuiltinFn InstructionBuiltinCall::builtin() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.InstructionBuiltinCall.builtin) - return _internal_builtin(); -} -inline void InstructionBuiltinCall::set_builtin(::tint::core::ir::binary::pb::BuiltinFn value) { - _internal_set_builtin(value); - _impl_._has_bits_[0] |= 0x00000001U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.InstructionBuiltinCall.builtin) -} -inline ::tint::core::ir::binary::pb::BuiltinFn InstructionBuiltinCall::_internal_builtin() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return static_cast<::tint::core::ir::binary::pb::BuiltinFn>(_impl_.builtin_); -} -inline void InstructionBuiltinCall::_internal_set_builtin(::tint::core::ir::binary::pb::BuiltinFn value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.builtin_ = value; -} - -// repeated uint32 explicit_template_params = 2; -inline int InstructionBuiltinCall::_internal_explicit_template_params_size() const { - return _internal_explicit_template_params().size(); -} -inline int InstructionBuiltinCall::explicit_template_params_size() const { - return _internal_explicit_template_params_size(); -} -inline void InstructionBuiltinCall::clear_explicit_template_params() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.explicit_template_params_.Clear(); -} -inline ::uint32_t InstructionBuiltinCall::explicit_template_params(int index) const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.InstructionBuiltinCall.explicit_template_params) - return _internal_explicit_template_params().Get(index); -} -inline void InstructionBuiltinCall::set_explicit_template_params(int index, ::uint32_t value) { - _internal_mutable_explicit_template_params()->Set(index, value); - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.InstructionBuiltinCall.explicit_template_params) -} -inline void InstructionBuiltinCall::add_explicit_template_params(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _internal_mutable_explicit_template_params()->Add(value); - // @@protoc_insertion_point(field_add:tint.core.ir.binary.pb.InstructionBuiltinCall.explicit_template_params) -} -inline const ::google::protobuf::RepeatedField<::uint32_t>& InstructionBuiltinCall::explicit_template_params() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_list:tint.core.ir.binary.pb.InstructionBuiltinCall.explicit_template_params) - return _internal_explicit_template_params(); -} -inline ::google::protobuf::RepeatedField<::uint32_t>* PROTOBUF_NONNULL InstructionBuiltinCall::mutable_explicit_template_params() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_mutable_list:tint.core.ir.binary.pb.InstructionBuiltinCall.explicit_template_params) - ::google::protobuf::internal::TSanWrite(&_impl_); - return _internal_mutable_explicit_template_params(); -} -inline const ::google::protobuf::RepeatedField<::uint32_t>& -InstructionBuiltinCall::_internal_explicit_template_params() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.explicit_template_params_; -} -inline ::google::protobuf::RepeatedField<::uint32_t>* PROTOBUF_NONNULL -InstructionBuiltinCall::_internal_mutable_explicit_template_params() { - ::google::protobuf::internal::TSanRead(&_impl_); - return &_impl_.explicit_template_params_; -} - -// ------------------------------------------------------------------- - -// InstructionLoad - -// ------------------------------------------------------------------- - -// InstructionStore - -// ------------------------------------------------------------------- - -// InstructionLoadVectorElement - -// ------------------------------------------------------------------- - -// InstructionStoreVectorElement - -// ------------------------------------------------------------------- - -// InstructionSwizzle - -// repeated uint32 indices = 1; -inline int InstructionSwizzle::_internal_indices_size() const { - return _internal_indices().size(); -} -inline int InstructionSwizzle::indices_size() const { - return _internal_indices_size(); -} -inline void InstructionSwizzle::clear_indices() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.indices_.Clear(); -} -inline ::uint32_t InstructionSwizzle::indices(int index) const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.InstructionSwizzle.indices) - return _internal_indices().Get(index); -} -inline void InstructionSwizzle::set_indices(int index, ::uint32_t value) { - _internal_mutable_indices()->Set(index, value); - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.InstructionSwizzle.indices) -} -inline void InstructionSwizzle::add_indices(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _internal_mutable_indices()->Add(value); - // @@protoc_insertion_point(field_add:tint.core.ir.binary.pb.InstructionSwizzle.indices) -} -inline const ::google::protobuf::RepeatedField<::uint32_t>& InstructionSwizzle::indices() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_list:tint.core.ir.binary.pb.InstructionSwizzle.indices) - return _internal_indices(); -} -inline ::google::protobuf::RepeatedField<::uint32_t>* PROTOBUF_NONNULL InstructionSwizzle::mutable_indices() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_mutable_list:tint.core.ir.binary.pb.InstructionSwizzle.indices) - ::google::protobuf::internal::TSanWrite(&_impl_); - return _internal_mutable_indices(); -} -inline const ::google::protobuf::RepeatedField<::uint32_t>& -InstructionSwizzle::_internal_indices() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.indices_; -} -inline ::google::protobuf::RepeatedField<::uint32_t>* PROTOBUF_NONNULL -InstructionSwizzle::_internal_mutable_indices() { - ::google::protobuf::internal::TSanRead(&_impl_); - return &_impl_.indices_; -} - -// ------------------------------------------------------------------- - -// InstructionIf - -// optional uint32 true = 1; -inline bool InstructionIf::has_true_() const { - bool value = (_impl_._has_bits_[0] & 0x00000001U) != 0; - return value; -} -inline void InstructionIf::clear_true_() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.true__ = 0u; - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline ::uint32_t InstructionIf::true_() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.InstructionIf.true) - return _internal_true_(); -} -inline void InstructionIf::set_true_(::uint32_t value) { - _internal_set_true_(value); - _impl_._has_bits_[0] |= 0x00000001U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.InstructionIf.true) -} -inline ::uint32_t InstructionIf::_internal_true_() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.true__; -} -inline void InstructionIf::_internal_set_true_(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.true__ = value; -} - -// optional uint32 false = 2; -inline bool InstructionIf::has_false_() const { - bool value = (_impl_._has_bits_[0] & 0x00000002U) != 0; - return value; -} -inline void InstructionIf::clear_false_() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.false__ = 0u; - _impl_._has_bits_[0] &= ~0x00000002U; -} -inline ::uint32_t InstructionIf::false_() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.InstructionIf.false) - return _internal_false_(); -} -inline void InstructionIf::set_false_(::uint32_t value) { - _internal_set_false_(value); - _impl_._has_bits_[0] |= 0x00000002U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.InstructionIf.false) -} -inline ::uint32_t InstructionIf::_internal_false_() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.false__; -} -inline void InstructionIf::_internal_set_false_(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.false__ = value; -} - -// ------------------------------------------------------------------- - -// InstructionSwitch - -// repeated .tint.core.ir.binary.pb.SwitchCase cases = 1; -inline int InstructionSwitch::_internal_cases_size() const { - return _internal_cases().size(); -} -inline int InstructionSwitch::cases_size() const { - return _internal_cases_size(); -} -inline void InstructionSwitch::clear_cases() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.cases_.Clear(); -} -inline ::tint::core::ir::binary::pb::SwitchCase* PROTOBUF_NONNULL InstructionSwitch::mutable_cases(int index) - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.InstructionSwitch.cases) - return _internal_mutable_cases()->Mutable(index); -} -inline ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::SwitchCase>* PROTOBUF_NONNULL InstructionSwitch::mutable_cases() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_mutable_list:tint.core.ir.binary.pb.InstructionSwitch.cases) - ::google::protobuf::internal::TSanWrite(&_impl_); - return _internal_mutable_cases(); -} -inline const ::tint::core::ir::binary::pb::SwitchCase& InstructionSwitch::cases(int index) const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.InstructionSwitch.cases) - return _internal_cases().Get(index); -} -inline ::tint::core::ir::binary::pb::SwitchCase* PROTOBUF_NONNULL InstructionSwitch::add_cases() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::google::protobuf::internal::TSanWrite(&_impl_); - ::tint::core::ir::binary::pb::SwitchCase* _add = _internal_mutable_cases()->Add(); - // @@protoc_insertion_point(field_add:tint.core.ir.binary.pb.InstructionSwitch.cases) - return _add; -} -inline const ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::SwitchCase>& InstructionSwitch::cases() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_list:tint.core.ir.binary.pb.InstructionSwitch.cases) - return _internal_cases(); -} -inline const ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::SwitchCase>& -InstructionSwitch::_internal_cases() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.cases_; -} -inline ::google::protobuf::RepeatedPtrField<::tint::core::ir::binary::pb::SwitchCase>* PROTOBUF_NONNULL -InstructionSwitch::_internal_mutable_cases() { - ::google::protobuf::internal::TSanRead(&_impl_); - return &_impl_.cases_; -} - -// ------------------------------------------------------------------- - -// InstructionLoop - -// optional uint32 initializer = 1; -inline bool InstructionLoop::has_initializer() const { - bool value = (_impl_._has_bits_[0] & 0x00000001U) != 0; - return value; -} -inline void InstructionLoop::clear_initializer() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.initializer_ = 0u; - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline ::uint32_t InstructionLoop::initializer() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.InstructionLoop.initializer) - return _internal_initializer(); -} -inline void InstructionLoop::set_initializer(::uint32_t value) { - _internal_set_initializer(value); - _impl_._has_bits_[0] |= 0x00000001U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.InstructionLoop.initializer) -} -inline ::uint32_t InstructionLoop::_internal_initializer() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.initializer_; -} -inline void InstructionLoop::_internal_set_initializer(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.initializer_ = value; -} - -// optional uint32 body = 2; -inline bool InstructionLoop::has_body() const { - bool value = (_impl_._has_bits_[0] & 0x00000002U) != 0; - return value; -} -inline void InstructionLoop::clear_body() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.body_ = 0u; - _impl_._has_bits_[0] &= ~0x00000002U; -} -inline ::uint32_t InstructionLoop::body() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.InstructionLoop.body) - return _internal_body(); -} -inline void InstructionLoop::set_body(::uint32_t value) { - _internal_set_body(value); - _impl_._has_bits_[0] |= 0x00000002U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.InstructionLoop.body) -} -inline ::uint32_t InstructionLoop::_internal_body() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.body_; -} -inline void InstructionLoop::_internal_set_body(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.body_ = value; -} - -// optional uint32 continuing = 3; -inline bool InstructionLoop::has_continuing() const { - bool value = (_impl_._has_bits_[0] & 0x00000004U) != 0; - return value; -} -inline void InstructionLoop::clear_continuing() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.continuing_ = 0u; - _impl_._has_bits_[0] &= ~0x00000004U; -} -inline ::uint32_t InstructionLoop::continuing() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.InstructionLoop.continuing) - return _internal_continuing(); -} -inline void InstructionLoop::set_continuing(::uint32_t value) { - _internal_set_continuing(value); - _impl_._has_bits_[0] |= 0x00000004U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.InstructionLoop.continuing) -} -inline ::uint32_t InstructionLoop::_internal_continuing() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.continuing_; -} -inline void InstructionLoop::_internal_set_continuing(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.continuing_ = value; -} - -// ------------------------------------------------------------------- - -// InstructionExitIf - -// ------------------------------------------------------------------- - -// InstructionExitSwitch - -// ------------------------------------------------------------------- - -// InstructionExitLoop - -// ------------------------------------------------------------------- - -// SwitchCase - -// uint32 block = 1; -inline void SwitchCase::clear_block() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.block_ = 0u; - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline ::uint32_t SwitchCase::block() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.SwitchCase.block) - return _internal_block(); -} -inline void SwitchCase::set_block(::uint32_t value) { - _internal_set_block(value); - _impl_._has_bits_[0] |= 0x00000001U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.SwitchCase.block) -} -inline ::uint32_t SwitchCase::_internal_block() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.block_; -} -inline void SwitchCase::_internal_set_block(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.block_ = value; -} - -// repeated uint32 selectors = 2; -inline int SwitchCase::_internal_selectors_size() const { - return _internal_selectors().size(); -} -inline int SwitchCase::selectors_size() const { - return _internal_selectors_size(); -} -inline void SwitchCase::clear_selectors() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.selectors_.Clear(); -} -inline ::uint32_t SwitchCase::selectors(int index) const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.SwitchCase.selectors) - return _internal_selectors().Get(index); -} -inline void SwitchCase::set_selectors(int index, ::uint32_t value) { - _internal_mutable_selectors()->Set(index, value); - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.SwitchCase.selectors) -} -inline void SwitchCase::add_selectors(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _internal_mutable_selectors()->Add(value); - // @@protoc_insertion_point(field_add:tint.core.ir.binary.pb.SwitchCase.selectors) -} -inline const ::google::protobuf::RepeatedField<::uint32_t>& SwitchCase::selectors() const - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_list:tint.core.ir.binary.pb.SwitchCase.selectors) - return _internal_selectors(); -} -inline ::google::protobuf::RepeatedField<::uint32_t>* PROTOBUF_NONNULL SwitchCase::mutable_selectors() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_mutable_list:tint.core.ir.binary.pb.SwitchCase.selectors) - ::google::protobuf::internal::TSanWrite(&_impl_); - return _internal_mutable_selectors(); -} -inline const ::google::protobuf::RepeatedField<::uint32_t>& -SwitchCase::_internal_selectors() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.selectors_; -} -inline ::google::protobuf::RepeatedField<::uint32_t>* PROTOBUF_NONNULL -SwitchCase::_internal_mutable_selectors() { - ::google::protobuf::internal::TSanRead(&_impl_); - return &_impl_.selectors_; -} - -// bool is_default = 3; -inline void SwitchCase::clear_is_default() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.is_default_ = false; - _impl_._has_bits_[0] &= ~0x00000002U; -} -inline bool SwitchCase::is_default() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.SwitchCase.is_default) - return _internal_is_default(); -} -inline void SwitchCase::set_is_default(bool value) { - _internal_set_is_default(value); - _impl_._has_bits_[0] |= 0x00000002U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.SwitchCase.is_default) -} -inline bool SwitchCase::_internal_is_default() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.is_default_; -} -inline void SwitchCase::_internal_set_is_default(bool value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.is_default_ = value; -} - -// ------------------------------------------------------------------- - -// BindingPoint - -// uint32 group = 1; -inline void BindingPoint::clear_group() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.group_ = 0u; - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline ::uint32_t BindingPoint::group() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.BindingPoint.group) - return _internal_group(); -} -inline void BindingPoint::set_group(::uint32_t value) { - _internal_set_group(value); - _impl_._has_bits_[0] |= 0x00000001U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.BindingPoint.group) -} -inline ::uint32_t BindingPoint::_internal_group() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.group_; -} -inline void BindingPoint::_internal_set_group(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.group_ = value; -} - -// uint32 binding = 2; -inline void BindingPoint::clear_binding() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.binding_ = 0u; - _impl_._has_bits_[0] &= ~0x00000002U; -} -inline ::uint32_t BindingPoint::binding() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.BindingPoint.binding) - return _internal_binding(); -} -inline void BindingPoint::set_binding(::uint32_t value) { - _internal_set_binding(value); - _impl_._has_bits_[0] |= 0x00000002U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.BindingPoint.binding) -} -inline ::uint32_t BindingPoint::_internal_binding() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.binding_; -} -inline void BindingPoint::_internal_set_binding(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.binding_ = value; -} - -// ------------------------------------------------------------------- - -// InstructionNextIteration - -// ------------------------------------------------------------------- - -// InstructionContinue - -// ------------------------------------------------------------------- - -// InstructionBreakIf - -// uint32 num_next_iter_values = 1; -inline void InstructionBreakIf::clear_num_next_iter_values() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.num_next_iter_values_ = 0u; - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline ::uint32_t InstructionBreakIf::num_next_iter_values() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.InstructionBreakIf.num_next_iter_values) - return _internal_num_next_iter_values(); -} -inline void InstructionBreakIf::set_num_next_iter_values(::uint32_t value) { - _internal_set_num_next_iter_values(value); - _impl_._has_bits_[0] |= 0x00000001U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.InstructionBreakIf.num_next_iter_values) -} -inline ::uint32_t InstructionBreakIf::_internal_num_next_iter_values() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.num_next_iter_values_; -} -inline void InstructionBreakIf::_internal_set_num_next_iter_values(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.num_next_iter_values_ = value; -} - -// ------------------------------------------------------------------- - -// InstructionUnreachable - -// ------------------------------------------------------------------- - -// AttributesStructMember - -// optional uint32 location = 1; -inline bool AttributesStructMember::has_location() const { - bool value = (_impl_._has_bits_[0] & 0x00000002U) != 0; - return value; -} -inline void AttributesStructMember::clear_location() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.location_ = 0u; - _impl_._has_bits_[0] &= ~0x00000002U; -} -inline ::uint32_t AttributesStructMember::location() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.AttributesStructMember.location) - return _internal_location(); -} -inline void AttributesStructMember::set_location(::uint32_t value) { - _internal_set_location(value); - _impl_._has_bits_[0] |= 0x00000002U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.AttributesStructMember.location) -} -inline ::uint32_t AttributesStructMember::_internal_location() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.location_; -} -inline void AttributesStructMember::_internal_set_location(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.location_ = value; -} - -// optional uint32 blend_src = 2; -inline bool AttributesStructMember::has_blend_src() const { - bool value = (_impl_._has_bits_[0] & 0x00000004U) != 0; - return value; -} -inline void AttributesStructMember::clear_blend_src() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.blend_src_ = 0u; - _impl_._has_bits_[0] &= ~0x00000004U; -} -inline ::uint32_t AttributesStructMember::blend_src() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.AttributesStructMember.blend_src) - return _internal_blend_src(); -} -inline void AttributesStructMember::set_blend_src(::uint32_t value) { - _internal_set_blend_src(value); - _impl_._has_bits_[0] |= 0x00000004U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.AttributesStructMember.blend_src) -} -inline ::uint32_t AttributesStructMember::_internal_blend_src() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.blend_src_; -} -inline void AttributesStructMember::_internal_set_blend_src(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.blend_src_ = value; -} - -// optional uint32 color = 3; -inline bool AttributesStructMember::has_color() const { - bool value = (_impl_._has_bits_[0] & 0x00000008U) != 0; - return value; -} -inline void AttributesStructMember::clear_color() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.color_ = 0u; - _impl_._has_bits_[0] &= ~0x00000008U; -} -inline ::uint32_t AttributesStructMember::color() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.AttributesStructMember.color) - return _internal_color(); -} -inline void AttributesStructMember::set_color(::uint32_t value) { - _internal_set_color(value); - _impl_._has_bits_[0] |= 0x00000008U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.AttributesStructMember.color) -} -inline ::uint32_t AttributesStructMember::_internal_color() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.color_; -} -inline void AttributesStructMember::_internal_set_color(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.color_ = value; -} - -// optional .tint.core.ir.binary.pb.BuiltinValue builtin = 4; -inline bool AttributesStructMember::has_builtin() const { - bool value = (_impl_._has_bits_[0] & 0x00000010U) != 0; - return value; -} -inline void AttributesStructMember::clear_builtin() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.builtin_ = 0; - _impl_._has_bits_[0] &= ~0x00000010U; -} -inline ::tint::core::ir::binary::pb::BuiltinValue AttributesStructMember::builtin() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.AttributesStructMember.builtin) - return _internal_builtin(); -} -inline void AttributesStructMember::set_builtin(::tint::core::ir::binary::pb::BuiltinValue value) { - _internal_set_builtin(value); - _impl_._has_bits_[0] |= 0x00000010U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.AttributesStructMember.builtin) -} -inline ::tint::core::ir::binary::pb::BuiltinValue AttributesStructMember::_internal_builtin() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return static_cast<::tint::core::ir::binary::pb::BuiltinValue>(_impl_.builtin_); -} -inline void AttributesStructMember::_internal_set_builtin(::tint::core::ir::binary::pb::BuiltinValue value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.builtin_ = value; -} - -// optional .tint.core.ir.binary.pb.Interpolation interpolation = 5; -inline bool AttributesStructMember::has_interpolation() const { - bool value = (_impl_._has_bits_[0] & 0x00000001U) != 0; - PROTOBUF_ASSUME(!value || _impl_.interpolation_ != nullptr); - return value; -} -inline void AttributesStructMember::clear_interpolation() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (_impl_.interpolation_ != nullptr) _impl_.interpolation_->Clear(); - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline const ::tint::core::ir::binary::pb::Interpolation& AttributesStructMember::_internal_interpolation() const { - ::google::protobuf::internal::TSanRead(&_impl_); - const ::tint::core::ir::binary::pb::Interpolation* p = _impl_.interpolation_; - return p != nullptr ? *p : reinterpret_cast(::tint::core::ir::binary::pb::_Interpolation_default_instance_); -} -inline const ::tint::core::ir::binary::pb::Interpolation& AttributesStructMember::interpolation() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.AttributesStructMember.interpolation) - return _internal_interpolation(); -} -inline void AttributesStructMember::unsafe_arena_set_allocated_interpolation( - ::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NULLABLE value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (GetArena() == nullptr) { - delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.interpolation_); - } - _impl_.interpolation_ = reinterpret_cast<::tint::core::ir::binary::pb::Interpolation*>(value); - if (value != nullptr) { - _impl_._has_bits_[0] |= 0x00000001U; - } else { - _impl_._has_bits_[0] &= ~0x00000001U; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.AttributesStructMember.interpolation) -} -inline ::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NULLABLE AttributesStructMember::release_interpolation() { - ::google::protobuf::internal::TSanWrite(&_impl_); - - _impl_._has_bits_[0] &= ~0x00000001U; - ::tint::core::ir::binary::pb::Interpolation* released = _impl_.interpolation_; - _impl_.interpolation_ = nullptr; - if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { - auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); - released = ::google::protobuf::internal::DuplicateIfNonNull(released); - if (GetArena() == nullptr) { - delete old; - } - } else { - if (GetArena() != nullptr) { - released = ::google::protobuf::internal::DuplicateIfNonNull(released); - } - } - return released; -} -inline ::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NULLABLE AttributesStructMember::unsafe_arena_release_interpolation() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.AttributesStructMember.interpolation) - - _impl_._has_bits_[0] &= ~0x00000001U; - ::tint::core::ir::binary::pb::Interpolation* temp = _impl_.interpolation_; - _impl_.interpolation_ = nullptr; - return temp; -} -inline ::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NONNULL AttributesStructMember::_internal_mutable_interpolation() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (_impl_.interpolation_ == nullptr) { - auto* p = ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::Interpolation>(GetArena()); - _impl_.interpolation_ = reinterpret_cast<::tint::core::ir::binary::pb::Interpolation*>(p); - } - return _impl_.interpolation_; -} -inline ::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NONNULL AttributesStructMember::mutable_interpolation() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - _impl_._has_bits_[0] |= 0x00000001U; - ::tint::core::ir::binary::pb::Interpolation* _msg = _internal_mutable_interpolation(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.AttributesStructMember.interpolation) - return _msg; -} -inline void AttributesStructMember::set_allocated_interpolation(::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NULLABLE value) { - ::google::protobuf::Arena* message_arena = GetArena(); - ::google::protobuf::internal::TSanWrite(&_impl_); - if (message_arena == nullptr) { - delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.interpolation_); - } - - if (value != nullptr) { - ::google::protobuf::Arena* submessage_arena = value->GetArena(); - if (message_arena != submessage_arena) { - value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00000001U; - } else { - _impl_._has_bits_[0] &= ~0x00000001U; - } - - _impl_.interpolation_ = reinterpret_cast<::tint::core::ir::binary::pb::Interpolation*>(value); - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.AttributesStructMember.interpolation) -} - -// bool invariant = 6; -inline void AttributesStructMember::clear_invariant() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.invariant_ = false; - _impl_._has_bits_[0] &= ~0x00000020U; -} -inline bool AttributesStructMember::invariant() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.AttributesStructMember.invariant) - return _internal_invariant(); -} -inline void AttributesStructMember::set_invariant(bool value) { - _internal_set_invariant(value); - _impl_._has_bits_[0] |= 0x00000020U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.AttributesStructMember.invariant) -} -inline bool AttributesStructMember::_internal_invariant() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.invariant_; -} -inline void AttributesStructMember::_internal_set_invariant(bool value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.invariant_ = value; -} - -// ------------------------------------------------------------------- - -// AttributesFunctionParameter - -// optional .tint.core.ir.binary.pb.BuiltinValue builtin = 1; -inline bool AttributesFunctionParameter::has_builtin() const { - bool value = (_impl_._has_bits_[0] & 0x00000004U) != 0; - return value; -} -inline void AttributesFunctionParameter::clear_builtin() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.builtin_ = 0; - _impl_._has_bits_[0] &= ~0x00000004U; -} -inline ::tint::core::ir::binary::pb::BuiltinValue AttributesFunctionParameter::builtin() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.AttributesFunctionParameter.builtin) - return _internal_builtin(); -} -inline void AttributesFunctionParameter::set_builtin(::tint::core::ir::binary::pb::BuiltinValue value) { - _internal_set_builtin(value); - _impl_._has_bits_[0] |= 0x00000004U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.AttributesFunctionParameter.builtin) -} -inline ::tint::core::ir::binary::pb::BuiltinValue AttributesFunctionParameter::_internal_builtin() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return static_cast<::tint::core::ir::binary::pb::BuiltinValue>(_impl_.builtin_); -} -inline void AttributesFunctionParameter::_internal_set_builtin(::tint::core::ir::binary::pb::BuiltinValue value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.builtin_ = value; -} - -// optional uint32 location = 2; -inline bool AttributesFunctionParameter::has_location() const { - bool value = (_impl_._has_bits_[0] & 0x00000008U) != 0; - return value; -} -inline void AttributesFunctionParameter::clear_location() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.location_ = 0u; - _impl_._has_bits_[0] &= ~0x00000008U; -} -inline ::uint32_t AttributesFunctionParameter::location() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.AttributesFunctionParameter.location) - return _internal_location(); -} -inline void AttributesFunctionParameter::set_location(::uint32_t value) { - _internal_set_location(value); - _impl_._has_bits_[0] |= 0x00000008U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.AttributesFunctionParameter.location) -} -inline ::uint32_t AttributesFunctionParameter::_internal_location() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.location_; -} -inline void AttributesFunctionParameter::_internal_set_location(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.location_ = value; -} - -// optional uint32 color = 3; -inline bool AttributesFunctionParameter::has_color() const { - bool value = (_impl_._has_bits_[0] & 0x00000010U) != 0; - return value; -} -inline void AttributesFunctionParameter::clear_color() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.color_ = 0u; - _impl_._has_bits_[0] &= ~0x00000010U; -} -inline ::uint32_t AttributesFunctionParameter::color() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.AttributesFunctionParameter.color) - return _internal_color(); -} -inline void AttributesFunctionParameter::set_color(::uint32_t value) { - _internal_set_color(value); - _impl_._has_bits_[0] |= 0x00000010U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.AttributesFunctionParameter.color) -} -inline ::uint32_t AttributesFunctionParameter::_internal_color() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.color_; -} -inline void AttributesFunctionParameter::_internal_set_color(::uint32_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.color_ = value; -} - -// optional .tint.core.ir.binary.pb.Interpolation interpolation = 4; -inline bool AttributesFunctionParameter::has_interpolation() const { - bool value = (_impl_._has_bits_[0] & 0x00000001U) != 0; - PROTOBUF_ASSUME(!value || _impl_.interpolation_ != nullptr); - return value; -} -inline void AttributesFunctionParameter::clear_interpolation() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (_impl_.interpolation_ != nullptr) _impl_.interpolation_->Clear(); - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline const ::tint::core::ir::binary::pb::Interpolation& AttributesFunctionParameter::_internal_interpolation() const { - ::google::protobuf::internal::TSanRead(&_impl_); - const ::tint::core::ir::binary::pb::Interpolation* p = _impl_.interpolation_; - return p != nullptr ? *p : reinterpret_cast(::tint::core::ir::binary::pb::_Interpolation_default_instance_); -} -inline const ::tint::core::ir::binary::pb::Interpolation& AttributesFunctionParameter::interpolation() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.AttributesFunctionParameter.interpolation) - return _internal_interpolation(); -} -inline void AttributesFunctionParameter::unsafe_arena_set_allocated_interpolation( - ::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NULLABLE value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (GetArena() == nullptr) { - delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.interpolation_); - } - _impl_.interpolation_ = reinterpret_cast<::tint::core::ir::binary::pb::Interpolation*>(value); - if (value != nullptr) { - _impl_._has_bits_[0] |= 0x00000001U; - } else { - _impl_._has_bits_[0] &= ~0x00000001U; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.AttributesFunctionParameter.interpolation) -} -inline ::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NULLABLE AttributesFunctionParameter::release_interpolation() { - ::google::protobuf::internal::TSanWrite(&_impl_); - - _impl_._has_bits_[0] &= ~0x00000001U; - ::tint::core::ir::binary::pb::Interpolation* released = _impl_.interpolation_; - _impl_.interpolation_ = nullptr; - if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { - auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); - released = ::google::protobuf::internal::DuplicateIfNonNull(released); - if (GetArena() == nullptr) { - delete old; - } - } else { - if (GetArena() != nullptr) { - released = ::google::protobuf::internal::DuplicateIfNonNull(released); - } - } - return released; -} -inline ::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NULLABLE AttributesFunctionParameter::unsafe_arena_release_interpolation() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.AttributesFunctionParameter.interpolation) - - _impl_._has_bits_[0] &= ~0x00000001U; - ::tint::core::ir::binary::pb::Interpolation* temp = _impl_.interpolation_; - _impl_.interpolation_ = nullptr; - return temp; -} -inline ::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NONNULL AttributesFunctionParameter::_internal_mutable_interpolation() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (_impl_.interpolation_ == nullptr) { - auto* p = ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::Interpolation>(GetArena()); - _impl_.interpolation_ = reinterpret_cast<::tint::core::ir::binary::pb::Interpolation*>(p); - } - return _impl_.interpolation_; -} -inline ::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NONNULL AttributesFunctionParameter::mutable_interpolation() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - _impl_._has_bits_[0] |= 0x00000001U; - ::tint::core::ir::binary::pb::Interpolation* _msg = _internal_mutable_interpolation(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.AttributesFunctionParameter.interpolation) - return _msg; -} -inline void AttributesFunctionParameter::set_allocated_interpolation(::tint::core::ir::binary::pb::Interpolation* PROTOBUF_NULLABLE value) { - ::google::protobuf::Arena* message_arena = GetArena(); - ::google::protobuf::internal::TSanWrite(&_impl_); - if (message_arena == nullptr) { - delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.interpolation_); - } - - if (value != nullptr) { - ::google::protobuf::Arena* submessage_arena = value->GetArena(); - if (message_arena != submessage_arena) { - value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00000001U; - } else { - _impl_._has_bits_[0] &= ~0x00000001U; - } - - _impl_.interpolation_ = reinterpret_cast<::tint::core::ir::binary::pb::Interpolation*>(value); - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.AttributesFunctionParameter.interpolation) -} - -// optional .tint.core.ir.binary.pb.BindingPoint binding_point = 5; -inline bool AttributesFunctionParameter::has_binding_point() const { - bool value = (_impl_._has_bits_[0] & 0x00000002U) != 0; - PROTOBUF_ASSUME(!value || _impl_.binding_point_ != nullptr); - return value; -} -inline void AttributesFunctionParameter::clear_binding_point() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (_impl_.binding_point_ != nullptr) _impl_.binding_point_->Clear(); - _impl_._has_bits_[0] &= ~0x00000002U; -} -inline const ::tint::core::ir::binary::pb::BindingPoint& AttributesFunctionParameter::_internal_binding_point() const { - ::google::protobuf::internal::TSanRead(&_impl_); - const ::tint::core::ir::binary::pb::BindingPoint* p = _impl_.binding_point_; - return p != nullptr ? *p : reinterpret_cast(::tint::core::ir::binary::pb::_BindingPoint_default_instance_); -} -inline const ::tint::core::ir::binary::pb::BindingPoint& AttributesFunctionParameter::binding_point() const ABSL_ATTRIBUTE_LIFETIME_BOUND { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.AttributesFunctionParameter.binding_point) - return _internal_binding_point(); -} -inline void AttributesFunctionParameter::unsafe_arena_set_allocated_binding_point( - ::tint::core::ir::binary::pb::BindingPoint* PROTOBUF_NULLABLE value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (GetArena() == nullptr) { - delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.binding_point_); - } - _impl_.binding_point_ = reinterpret_cast<::tint::core::ir::binary::pb::BindingPoint*>(value); - if (value != nullptr) { - _impl_._has_bits_[0] |= 0x00000002U; - } else { - _impl_._has_bits_[0] &= ~0x00000002U; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tint.core.ir.binary.pb.AttributesFunctionParameter.binding_point) -} -inline ::tint::core::ir::binary::pb::BindingPoint* PROTOBUF_NULLABLE AttributesFunctionParameter::release_binding_point() { - ::google::protobuf::internal::TSanWrite(&_impl_); - - _impl_._has_bits_[0] &= ~0x00000002U; - ::tint::core::ir::binary::pb::BindingPoint* released = _impl_.binding_point_; - _impl_.binding_point_ = nullptr; - if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { - auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); - released = ::google::protobuf::internal::DuplicateIfNonNull(released); - if (GetArena() == nullptr) { - delete old; - } - } else { - if (GetArena() != nullptr) { - released = ::google::protobuf::internal::DuplicateIfNonNull(released); - } - } - return released; -} -inline ::tint::core::ir::binary::pb::BindingPoint* PROTOBUF_NULLABLE AttributesFunctionParameter::unsafe_arena_release_binding_point() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:tint.core.ir.binary.pb.AttributesFunctionParameter.binding_point) - - _impl_._has_bits_[0] &= ~0x00000002U; - ::tint::core::ir::binary::pb::BindingPoint* temp = _impl_.binding_point_; - _impl_.binding_point_ = nullptr; - return temp; -} -inline ::tint::core::ir::binary::pb::BindingPoint* PROTOBUF_NONNULL AttributesFunctionParameter::_internal_mutable_binding_point() { - ::google::protobuf::internal::TSanWrite(&_impl_); - if (_impl_.binding_point_ == nullptr) { - auto* p = ::google::protobuf::Message::DefaultConstruct<::tint::core::ir::binary::pb::BindingPoint>(GetArena()); - _impl_.binding_point_ = reinterpret_cast<::tint::core::ir::binary::pb::BindingPoint*>(p); - } - return _impl_.binding_point_; -} -inline ::tint::core::ir::binary::pb::BindingPoint* PROTOBUF_NONNULL AttributesFunctionParameter::mutable_binding_point() - ABSL_ATTRIBUTE_LIFETIME_BOUND { - _impl_._has_bits_[0] |= 0x00000002U; - ::tint::core::ir::binary::pb::BindingPoint* _msg = _internal_mutable_binding_point(); - // @@protoc_insertion_point(field_mutable:tint.core.ir.binary.pb.AttributesFunctionParameter.binding_point) - return _msg; -} -inline void AttributesFunctionParameter::set_allocated_binding_point(::tint::core::ir::binary::pb::BindingPoint* PROTOBUF_NULLABLE value) { - ::google::protobuf::Arena* message_arena = GetArena(); - ::google::protobuf::internal::TSanWrite(&_impl_); - if (message_arena == nullptr) { - delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.binding_point_); - } - - if (value != nullptr) { - ::google::protobuf::Arena* submessage_arena = value->GetArena(); - if (message_arena != submessage_arena) { - value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00000002U; - } else { - _impl_._has_bits_[0] &= ~0x00000002U; - } - - _impl_.binding_point_ = reinterpret_cast<::tint::core::ir::binary::pb::BindingPoint*>(value); - // @@protoc_insertion_point(field_set_allocated:tint.core.ir.binary.pb.AttributesFunctionParameter.binding_point) -} - -// bool invariant = 6; -inline void AttributesFunctionParameter::clear_invariant() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.invariant_ = false; - _impl_._has_bits_[0] &= ~0x00000020U; -} -inline bool AttributesFunctionParameter::invariant() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.AttributesFunctionParameter.invariant) - return _internal_invariant(); -} -inline void AttributesFunctionParameter::set_invariant(bool value) { - _internal_set_invariant(value); - _impl_._has_bits_[0] |= 0x00000020U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.AttributesFunctionParameter.invariant) -} -inline bool AttributesFunctionParameter::_internal_invariant() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return _impl_.invariant_; -} -inline void AttributesFunctionParameter::_internal_set_invariant(bool value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.invariant_ = value; -} - -// ------------------------------------------------------------------- - -// Interpolation - -// .tint.core.ir.binary.pb.InterpolationType type = 1; -inline void Interpolation::clear_type() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.type_ = 0; - _impl_._has_bits_[0] &= ~0x00000001U; -} -inline ::tint::core::ir::binary::pb::InterpolationType Interpolation::type() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Interpolation.type) - return _internal_type(); -} -inline void Interpolation::set_type(::tint::core::ir::binary::pb::InterpolationType value) { - _internal_set_type(value); - _impl_._has_bits_[0] |= 0x00000001U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.Interpolation.type) -} -inline ::tint::core::ir::binary::pb::InterpolationType Interpolation::_internal_type() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return static_cast<::tint::core::ir::binary::pb::InterpolationType>(_impl_.type_); -} -inline void Interpolation::_internal_set_type(::tint::core::ir::binary::pb::InterpolationType value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.type_ = value; -} - -// optional .tint.core.ir.binary.pb.InterpolationSampling sampling = 2; -inline bool Interpolation::has_sampling() const { - bool value = (_impl_._has_bits_[0] & 0x00000002U) != 0; - return value; -} -inline void Interpolation::clear_sampling() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.sampling_ = 0; - _impl_._has_bits_[0] &= ~0x00000002U; -} -inline ::tint::core::ir::binary::pb::InterpolationSampling Interpolation::sampling() const { - // @@protoc_insertion_point(field_get:tint.core.ir.binary.pb.Interpolation.sampling) - return _internal_sampling(); -} -inline void Interpolation::set_sampling(::tint::core::ir::binary::pb::InterpolationSampling value) { - _internal_set_sampling(value); - _impl_._has_bits_[0] |= 0x00000002U; - // @@protoc_insertion_point(field_set:tint.core.ir.binary.pb.Interpolation.sampling) -} -inline ::tint::core::ir::binary::pb::InterpolationSampling Interpolation::_internal_sampling() const { - ::google::protobuf::internal::TSanRead(&_impl_); - return static_cast<::tint::core::ir::binary::pb::InterpolationSampling>(_impl_.sampling_); -} -inline void Interpolation::_internal_set_sampling(::tint::core::ir::binary::pb::InterpolationSampling value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.sampling_ = value; -} - -#ifdef __GNUC__ -#pragma GCC diagnostic pop -#endif // __GNUC__ - -// @@protoc_insertion_point(namespace_scope) -} // namespace pb -} // namespace binary -} // namespace ir -} // namespace core -} // namespace tint - - -namespace google { -namespace protobuf { - -template <> -struct is_proto_enum<::tint::core::ir::binary::pb::TypeBasic> : std::true_type {}; -template <> -inline const EnumDescriptor* PROTOBUF_NONNULL GetEnumDescriptor<::tint::core::ir::binary::pb::TypeBasic>() { - return ::tint::core::ir::binary::pb::TypeBasic_descriptor(); -} -template <> -struct is_proto_enum<::tint::core::ir::binary::pb::TypeBuiltinStruct> : std::true_type {}; -template <> -inline const EnumDescriptor* PROTOBUF_NONNULL GetEnumDescriptor<::tint::core::ir::binary::pb::TypeBuiltinStruct>() { - return ::tint::core::ir::binary::pb::TypeBuiltinStruct_descriptor(); -} -template <> -struct is_proto_enum<::tint::core::ir::binary::pb::PipelineStage> : std::true_type {}; -template <> -inline const EnumDescriptor* PROTOBUF_NONNULL GetEnumDescriptor<::tint::core::ir::binary::pb::PipelineStage>() { - return ::tint::core::ir::binary::pb::PipelineStage_descriptor(); -} -template <> -struct is_proto_enum<::tint::core::ir::binary::pb::AddressSpace> : std::true_type {}; -template <> -inline const EnumDescriptor* PROTOBUF_NONNULL GetEnumDescriptor<::tint::core::ir::binary::pb::AddressSpace>() { - return ::tint::core::ir::binary::pb::AddressSpace_descriptor(); -} -template <> -struct is_proto_enum<::tint::core::ir::binary::pb::AccessControl> : std::true_type {}; -template <> -inline const EnumDescriptor* PROTOBUF_NONNULL GetEnumDescriptor<::tint::core::ir::binary::pb::AccessControl>() { - return ::tint::core::ir::binary::pb::AccessControl_descriptor(); -} -template <> -struct is_proto_enum<::tint::core::ir::binary::pb::UnaryOp> : std::true_type {}; -template <> -inline const EnumDescriptor* PROTOBUF_NONNULL GetEnumDescriptor<::tint::core::ir::binary::pb::UnaryOp>() { - return ::tint::core::ir::binary::pb::UnaryOp_descriptor(); -} -template <> -struct is_proto_enum<::tint::core::ir::binary::pb::BinaryOp> : std::true_type {}; -template <> -inline const EnumDescriptor* PROTOBUF_NONNULL GetEnumDescriptor<::tint::core::ir::binary::pb::BinaryOp>() { - return ::tint::core::ir::binary::pb::BinaryOp_descriptor(); -} -template <> -struct is_proto_enum<::tint::core::ir::binary::pb::TextureDimension> : std::true_type {}; -template <> -inline const EnumDescriptor* PROTOBUF_NONNULL GetEnumDescriptor<::tint::core::ir::binary::pb::TextureDimension>() { - return ::tint::core::ir::binary::pb::TextureDimension_descriptor(); -} -template <> -struct is_proto_enum<::tint::core::ir::binary::pb::TexelFormat> : std::true_type {}; -template <> -inline const EnumDescriptor* PROTOBUF_NONNULL GetEnumDescriptor<::tint::core::ir::binary::pb::TexelFormat>() { - return ::tint::core::ir::binary::pb::TexelFormat_descriptor(); -} -template <> -struct is_proto_enum<::tint::core::ir::binary::pb::SamplerKind> : std::true_type {}; -template <> -inline const EnumDescriptor* PROTOBUF_NONNULL GetEnumDescriptor<::tint::core::ir::binary::pb::SamplerKind>() { - return ::tint::core::ir::binary::pb::SamplerKind_descriptor(); -} -template <> -struct is_proto_enum<::tint::core::ir::binary::pb::InterpolationType> : std::true_type {}; -template <> -inline const EnumDescriptor* PROTOBUF_NONNULL GetEnumDescriptor<::tint::core::ir::binary::pb::InterpolationType>() { - return ::tint::core::ir::binary::pb::InterpolationType_descriptor(); -} -template <> -struct is_proto_enum<::tint::core::ir::binary::pb::InterpolationSampling> : std::true_type {}; -template <> -inline const EnumDescriptor* PROTOBUF_NONNULL GetEnumDescriptor<::tint::core::ir::binary::pb::InterpolationSampling>() { - return ::tint::core::ir::binary::pb::InterpolationSampling_descriptor(); -} -template <> -struct is_proto_enum<::tint::core::ir::binary::pb::BuiltinValue> : std::true_type {}; -template <> -inline const EnumDescriptor* PROTOBUF_NONNULL GetEnumDescriptor<::tint::core::ir::binary::pb::BuiltinValue>() { - return ::tint::core::ir::binary::pb::BuiltinValue_descriptor(); -} -template <> -struct is_proto_enum<::tint::core::ir::binary::pb::BuiltinFn> : std::true_type {}; -template <> -inline const EnumDescriptor* PROTOBUF_NONNULL GetEnumDescriptor<::tint::core::ir::binary::pb::BuiltinFn>() { - return ::tint::core::ir::binary::pb::BuiltinFn_descriptor(); -} - -} // namespace protobuf -} // namespace google - -// @@protoc_insertion_point(global_scope) - -#include "google/protobuf/port_undef.inc" - -#endif // src_2ftint_2futils_2fprotos_2fir_2fir_2eproto_2epb_2eh diff --git a/3rdparty/dawn/src/tint/utils/strconv/parse_num.cc b/3rdparty/dawn/src/tint/utils/strconv/parse_num.cc deleted file mode 100644 index b9a06edf2..000000000 --- a/3rdparty/dawn/src/tint/utils/strconv/parse_num.cc +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright 2023 The Dawn & Tint Authors -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// 3. Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "src/tint/utils/strconv/parse_num.h" - -#include - -#include "absl/strings/charconv.h" - -namespace tint::strconv { - -namespace { - -// The unsafe buffer warnings here are intrinsic to how the underlying API being called operates, so -// cannot be easily avoided. -TINT_BEGIN_DISABLE_WARNING(UNSAFE_BUFFER_USAGE); -template -Result Parse(std::string_view number) { - T val = 0; - if constexpr (std::is_floating_point_v) { - auto result = absl::from_chars(number.data(), number.data() + number.size(), val); - if (result.ec == std::errc::result_out_of_range) { - return ParseNumberError::kResultOutOfRange; - } - if (result.ec != std::errc() || result.ptr != number.data() + number.size()) { - return ParseNumberError::kUnparsable; - } - } else { - auto result = std::from_chars(number.data(), number.data() + number.size(), val); - if (result.ec == std::errc::result_out_of_range) { - return ParseNumberError::kResultOutOfRange; - } - if (result.ec != std::errc() || result.ptr != number.data() + number.size()) { - return ParseNumberError::kUnparsable; - } - } - return val; -} -TINT_END_DISABLE_WARNING(UNSAFE_BUFFER_USAGE); - -} // namespace - -Result ParseFloat(std::string_view str) { - return Parse(str); -} - -Result ParseDouble(std::string_view str) { - return Parse(str); -} - -Result ParseInt(std::string_view str) { - return Parse(str); -} - -Result ParseUint(std::string_view str) { - return Parse(str); -} - -Result ParseInt64(std::string_view str) { - return Parse(str); -} - -Result ParseUint64(std::string_view str) { - return Parse(str); -} - -Result ParseInt32(std::string_view str) { - return Parse(str); -} - -Result ParseUint32(std::string_view str) { - return Parse(str); -} - -Result ParseInt16(std::string_view str) { - return Parse(str); -} - -Result ParseUint16(std::string_view str) { - return Parse(str); -} - -Result ParseInt8(std::string_view str) { - return Parse(str); -} - -Result ParseUint8(std::string_view str) { - return Parse(str); -} - -} // namespace tint::strconv diff --git a/3rdparty/dawn/src/tint/utils/strconv/parse_num.h b/3rdparty/dawn/src/tint/utils/strconv/parse_num.h deleted file mode 100644 index 5b0026962..000000000 --- a/3rdparty/dawn/src/tint/utils/strconv/parse_num.h +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright 2023 The Dawn & Tint Authors -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// 3. Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef SRC_TINT_UTILS_STRCONV_PARSE_NUM_H_ -#define SRC_TINT_UTILS_STRCONV_PARSE_NUM_H_ - -#include - -#include "src/tint/utils/macros/compiler.h" -#include "src/tint/utils/result.h" - -namespace tint::strconv { - -/// Error returned by the number parsing functions -enum class ParseNumberError : uint8_t { - /// The number was unparsable - kUnparsable, - /// The parsed number is not representable by the target datatype - kResultOutOfRange, -}; - -/// @param str the string -/// @returns the string @p str parsed as a float -Result ParseFloat(std::string_view str); - -/// @param str the string -/// @returns the string @p str parsed as a double -Result ParseDouble(std::string_view str); - -/// @param str the string -/// @returns the string @p str parsed as a int -Result ParseInt(std::string_view str); - -/// @param str the string -/// @returns the string @p str parsed as a unsigned int -Result ParseUint(std::string_view str); - -/// @param str the string -/// @returns the string @p str parsed as a int64_t -Result ParseInt64(std::string_view str); - -/// @param str the string -/// @returns the string @p str parsed as a uint64_t -Result ParseUint64(std::string_view str); - -/// @param str the string -/// @returns the string @p str parsed as a int32_t -Result ParseInt32(std::string_view str); - -/// @param str the string -/// @returns the string @p str parsed as a uint32_t -Result ParseUint32(std::string_view str); - -/// @param str the string -/// @returns the string @p str parsed as a int16_t -Result ParseInt16(std::string_view str); - -/// @param str the string -/// @returns the string @p str parsed as a uint16_t -Result ParseUint16(std::string_view str); - -/// @param str the string -/// @returns the string @p str parsed as a int8_t -Result ParseInt8(std::string_view str); - -/// @param str the string -/// @returns the string @p str parsed as a uint8_t -Result ParseUint8(std::string_view str); - -/// Disables the false-positive unreachable-code compiler warnings -TINT_BEGIN_DISABLE_WARNING(UNREACHABLE_CODE); - -/// @param str the string -/// @returns the string @p str parsed as a the number @p T -template -inline Result ParseNumber(std::string_view str) { - if constexpr (std::is_same_v) { - return ParseFloat(str); - } - if constexpr (std::is_same_v) { - return ParseDouble(str); - } - if constexpr (std::is_same_v) { - return ParseInt(str); - } - if constexpr (std::is_same_v) { - return ParseUint(str); - } - if constexpr (std::is_same_v) { - return ParseInt64(str); - } - if constexpr (std::is_same_v) { - return ParseUint64(str); - } - if constexpr (std::is_same_v) { - return ParseInt32(str); - } - if constexpr (std::is_same_v) { - return ParseUint32(str); - } - if constexpr (std::is_same_v) { - return ParseInt16(str); - } - if constexpr (std::is_same_v) { - return ParseUint16(str); - } - if constexpr (std::is_same_v) { - return ParseInt8(str); - } - if constexpr (std::is_same_v) { - return ParseUint8(str); - } - return ParseNumberError::kUnparsable; -} - -/// Re-enables the unreachable-code compiler warnings -TINT_END_DISABLE_WARNING(UNREACHABLE_CODE); - -} // namespace tint::strconv - -#endif // SRC_TINT_UTILS_STRCONV_PARSE_NUM_H_ diff --git a/3rdparty/dawn/third_party/abseil-cpp/LICENSE b/3rdparty/dawn/third_party/abseil-cpp/LICENSE deleted file mode 100644 index ccd61dcfe..000000000 --- a/3rdparty/dawn/third_party/abseil-cpp/LICENSE +++ /dev/null @@ -1,203 +0,0 @@ - - Apache License - Version 2.0, January 2004 - https://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - diff --git a/3rdparty/dawn/third_party/abseil-cpp/absl/algorithm/algorithm.h b/3rdparty/dawn/third_party/abseil-cpp/absl/algorithm/algorithm.h deleted file mode 100644 index 48f59504d..000000000 --- a/3rdparty/dawn/third_party/abseil-cpp/absl/algorithm/algorithm.h +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ----------------------------------------------------------------------------- -// File: algorithm.h -// ----------------------------------------------------------------------------- -// -// This header file contains Google extensions to the standard C++ -// header. - -#ifndef ABSL_ALGORITHM_ALGORITHM_H_ -#define ABSL_ALGORITHM_ALGORITHM_H_ - -#include -#include -#include - -#include "absl/base/config.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN - -// equal() -// rotate() -// -// Historical note: Abseil once provided implementations of these algorithms -// prior to their adoption in C++14. New code should prefer to use the std -// variants. -// -// See the documentation for the STL header for more information: -// https://en.cppreference.com/w/cpp/header/algorithm -using std::equal; -using std::rotate; - -// linear_search() -// -// Performs a linear search for `value` using the iterator `first` up to -// but not including `last`, returning true if [`first`, `last`) contains an -// element equal to `value`. -// -// A linear search is of O(n) complexity which is guaranteed to make at most -// n = (`last` - `first`) comparisons. A linear search over short containers -// may be faster than a binary search, even when the container is sorted. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool linear_search( - InputIterator first, InputIterator last, const EqualityComparable& value) { - return std::find(first, last, value) != last; -} - -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_ALGORITHM_ALGORITHM_H_ diff --git a/3rdparty/dawn/third_party/abseil-cpp/absl/algorithm/container.h b/3rdparty/dawn/third_party/abseil-cpp/absl/algorithm/container.h deleted file mode 100644 index c0b8a10ae..000000000 --- a/3rdparty/dawn/third_party/abseil-cpp/absl/algorithm/container.h +++ /dev/null @@ -1,1864 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ----------------------------------------------------------------------------- -// File: container.h -// ----------------------------------------------------------------------------- -// -// This header file provides Container-based versions of algorithmic functions -// within the C++ standard library. The following standard library sets of -// functions are covered within this file: -// -// * Algorithmic functions -// * Algorithmic functions -// * functions -// -// The standard library functions operate on iterator ranges; the functions -// within this API operate on containers, though many return iterator ranges. -// -// All functions within this API are named with a `c_` prefix. Calls such as -// `absl::c_xx(container, ...) are equivalent to std:: functions such as -// `std::xx(std::begin(cont), std::end(cont), ...)`. Functions that act on -// iterators but not conceptually on iterator ranges (e.g. `std::iter_swap`) -// have no equivalent here. -// -// For template parameter and variable naming, `C` indicates the container type -// to which the function is applied, `Pred` indicates the predicate object type -// to be used by the function and `T` indicates the applicable element type. - -#ifndef ABSL_ALGORITHM_CONTAINER_H_ -#define ABSL_ALGORITHM_CONTAINER_H_ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "absl/algorithm/algorithm.h" -#include "absl/base/config.h" -#include "absl/base/macros.h" -#include "absl/meta/type_traits.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace container_algorithm_internal { - -// NOTE: it is important to defer to ADL lookup for building with C++ modules, -// especially for headers like which are not visible from this file -// but specialize std::begin and std::end. -using std::begin; -using std::end; - -// The type of the iterator given by begin(c) (possibly std::begin(c)). -// ContainerIter> gives vector::const_iterator, -// while ContainerIter> gives vector::iterator. -template -using ContainerIter = decltype(begin(std::declval())); - -// An MSVC bug involving template parameter substitution requires us to use -// decltype() here instead of just std::pair. -template -using ContainerIterPairType = decltype(std::make_pair( - std::declval>(), std::declval>())); - -template -using ContainerDifferenceType = decltype(std::distance( - std::declval>(), std::declval>())); - -template -using ContainerPointerType = - typename std::iterator_traits>::pointer; - -// container_algorithm_internal::c_begin and -// container_algorithm_internal::c_end are abbreviations for proper ADL -// lookup of std::begin and std::end, i.e. -// using std::begin; -// using std::end; -// std::foo(begin(c), end(c)); -// becomes -// std::foo(container_algorithm_internal::c_begin(c), -// container_algorithm_internal::c_end(c)); -// These are meant for internal use only. - -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX17 ContainerIter c_begin(C& c) { - return begin(c); -} - -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX17 ContainerIter c_end(C& c) { - return end(c); -} - -template -struct IsUnorderedContainer : std::false_type {}; - -template -struct IsUnorderedContainer< - std::unordered_map> : std::true_type {}; - -template -struct IsUnorderedContainer> - : std::true_type {}; - -} // namespace container_algorithm_internal - -// PUBLIC API - -//------------------------------------------------------------------------------ -// Abseil algorithm.h functions -//------------------------------------------------------------------------------ - -// c_linear_search() -// -// Container-based version of absl::linear_search() for performing a linear -// search within a container. -// -// For a generalization that uses a predicate, see absl::c_any_of(). -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_linear_search( - const C& c, EqualityComparable&& value) { - return absl::linear_search(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(value)); -} - -//------------------------------------------------------------------------------ -// algorithms -//------------------------------------------------------------------------------ - -// c_distance() -// -// Container-based version of the `std::distance()` function to -// return the number of elements within a container. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX17 - container_algorithm_internal::ContainerDifferenceType - c_distance(const C& c) { - return std::distance(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c)); -} - -//------------------------------------------------------------------------------ -// Non-modifying sequence operations -//------------------------------------------------------------------------------ - -// c_all_of() -// -// Container-based version of the `std::all_of()` function to -// test if all elements within a container satisfy a condition. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_all_of(const C& c, Pred&& pred) { - return std::all_of(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(pred)); -} - -// c_any_of() -// -// Container-based version of the `std::any_of()` function to -// test if any element in a container fulfills a condition. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_any_of(const C& c, Pred&& pred) { - return std::any_of(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(pred)); -} - -// c_none_of() -// -// Container-based version of the `std::none_of()` function to -// test if no elements in a container fulfill a condition. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_none_of(const C& c, Pred&& pred) { - return std::none_of(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(pred)); -} - -// c_for_each() -// -// Container-based version of the `std::for_each()` function to -// apply a function to a container's elements. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 decay_t c_for_each(C&& c, - Function&& f) { - return std::for_each(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(f)); -} - -// c_find() -// -// Container-based version of the `std::find()` function to find -// the first element containing the passed value within a container value. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 - container_algorithm_internal::ContainerIter - c_find(C& c, T&& value) { - return std::find(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(value)); -} - -// c_contains() -// -// Container-based version of the `std::ranges::contains()` C++23 -// function to search a container for a value. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_contains(const Sequence& sequence, - T&& value) { - return absl::c_find(sequence, std::forward(value)) != - container_algorithm_internal::c_end(sequence); -} - -// c_find_if() -// -// Container-based version of the `std::find_if()` function to find -// the first element in a container matching the given condition. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 - container_algorithm_internal::ContainerIter - c_find_if(C& c, Pred&& pred) { - return std::find_if(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(pred)); -} - -// c_find_if_not() -// -// Container-based version of the `std::find_if_not()` function to -// find the first element in a container not matching the given condition. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 - container_algorithm_internal::ContainerIter - c_find_if_not(C& c, Pred&& pred) { - return std::find_if_not(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(pred)); -} - -// c_find_end() -// -// Container-based version of the `std::find_end()` function to -// find the last subsequence within a container. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 - container_algorithm_internal::ContainerIter - c_find_end(Sequence1& sequence, Sequence2& subsequence) { - return std::find_end(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - container_algorithm_internal::c_begin(subsequence), - container_algorithm_internal::c_end(subsequence)); -} - -// Overload of c_find_end() for using a predicate evaluation other than `==` as -// the function's test condition. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 - container_algorithm_internal::ContainerIter - c_find_end(Sequence1& sequence, Sequence2& subsequence, - BinaryPredicate&& pred) { - return std::find_end(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - container_algorithm_internal::c_begin(subsequence), - container_algorithm_internal::c_end(subsequence), - std::forward(pred)); -} - -// c_find_first_of() -// -// Container-based version of the `std::find_first_of()` function to -// find the first element within the container that is also within the options -// container. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 - container_algorithm_internal::ContainerIter - c_find_first_of(C1& container, const C2& options) { - return std::find_first_of(container_algorithm_internal::c_begin(container), - container_algorithm_internal::c_end(container), - container_algorithm_internal::c_begin(options), - container_algorithm_internal::c_end(options)); -} - -// Overload of c_find_first_of() for using a predicate evaluation other than -// `==` as the function's test condition. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 - container_algorithm_internal::ContainerIter - c_find_first_of(C1& container, const C2& options, BinaryPredicate&& pred) { - return std::find_first_of(container_algorithm_internal::c_begin(container), - container_algorithm_internal::c_end(container), - container_algorithm_internal::c_begin(options), - container_algorithm_internal::c_end(options), - std::forward(pred)); -} - -// c_adjacent_find() -// -// Container-based version of the `std::adjacent_find()` function to -// find equal adjacent elements within a container. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 - container_algorithm_internal::ContainerIter - c_adjacent_find(Sequence& sequence) { - return std::adjacent_find(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence)); -} - -// Overload of c_adjacent_find() for using a predicate evaluation other than -// `==` as the function's test condition. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 - container_algorithm_internal::ContainerIter - c_adjacent_find(Sequence& sequence, BinaryPredicate&& pred) { - return std::adjacent_find(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - std::forward(pred)); -} - -// c_count() -// -// Container-based version of the `std::count()` function to count -// values that match within a container. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 - container_algorithm_internal::ContainerDifferenceType - c_count(const C& c, T&& value) { - return std::count(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(value)); -} - -// c_count_if() -// -// Container-based version of the `std::count_if()` function to -// count values matching a condition within a container. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 - container_algorithm_internal::ContainerDifferenceType - c_count_if(const C& c, Pred&& pred) { - return std::count_if(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(pred)); -} - -// c_mismatch() -// -// Container-based version of the `std::mismatch()` function to -// return the first element where two ordered containers differ. Applies `==` to -// the first N elements of `c1` and `c2`, where N = min(size(c1), size(c2)). -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 - container_algorithm_internal::ContainerIterPairType - c_mismatch(C1& c1, C2& c2) { - return std::mismatch(container_algorithm_internal::c_begin(c1), - container_algorithm_internal::c_end(c1), - container_algorithm_internal::c_begin(c2), - container_algorithm_internal::c_end(c2)); -} - -// Overload of c_mismatch() for using a predicate evaluation other than `==` as -// the function's test condition. Applies `pred`to the first N elements of `c1` -// and `c2`, where N = min(size(c1), size(c2)). -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 - container_algorithm_internal::ContainerIterPairType - c_mismatch(C1& c1, C2& c2, BinaryPredicate pred) { - return std::mismatch(container_algorithm_internal::c_begin(c1), - container_algorithm_internal::c_end(c1), - container_algorithm_internal::c_begin(c2), - container_algorithm_internal::c_end(c2), pred); -} - -// c_equal() -// -// Container-based version of the `std::equal()` function to -// test whether two containers are equal. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_equal(const C1& c1, const C2& c2) { - return std::equal(container_algorithm_internal::c_begin(c1), - container_algorithm_internal::c_end(c1), - container_algorithm_internal::c_begin(c2), - container_algorithm_internal::c_end(c2)); -} - -// Overload of c_equal() for using a predicate evaluation other than `==` as -// the function's test condition. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_equal(const C1& c1, const C2& c2, - BinaryPredicate&& pred) { - return std::equal(container_algorithm_internal::c_begin(c1), - container_algorithm_internal::c_end(c1), - container_algorithm_internal::c_begin(c2), - container_algorithm_internal::c_end(c2), - std::forward(pred)); -} - -// c_is_permutation() -// -// Container-based version of the `std::is_permutation()` function -// to test whether a container is a permutation of another. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_is_permutation(const C1& c1, - const C2& c2) { - return std::is_permutation(container_algorithm_internal::c_begin(c1), - container_algorithm_internal::c_end(c1), - container_algorithm_internal::c_begin(c2), - container_algorithm_internal::c_end(c2)); -} - -// Overload of c_is_permutation() for using a predicate evaluation other than -// `==` as the function's test condition. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_is_permutation( - const C1& c1, const C2& c2, BinaryPredicate&& pred) { - return std::is_permutation(container_algorithm_internal::c_begin(c1), - container_algorithm_internal::c_end(c1), - container_algorithm_internal::c_begin(c2), - container_algorithm_internal::c_end(c2), - std::forward(pred)); -} - -// c_search() -// -// Container-based version of the `std::search()` function to search -// a container for a subsequence. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 - container_algorithm_internal::ContainerIter - c_search(Sequence1& sequence, Sequence2& subsequence) { - return std::search(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - container_algorithm_internal::c_begin(subsequence), - container_algorithm_internal::c_end(subsequence)); -} - -// Overload of c_search() for using a predicate evaluation other than -// `==` as the function's test condition. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 - container_algorithm_internal::ContainerIter - c_search(Sequence1& sequence, Sequence2& subsequence, - BinaryPredicate&& pred) { - return std::search(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - container_algorithm_internal::c_begin(subsequence), - container_algorithm_internal::c_end(subsequence), - std::forward(pred)); -} - -// c_contains_subrange() -// -// Container-based version of the `std::ranges::contains_subrange()` -// C++23 function to search a container for a subsequence. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_contains_subrange( - Sequence1& sequence, Sequence2& subsequence) { - return absl::c_search(sequence, subsequence) != - container_algorithm_internal::c_end(sequence); -} - -// Overload of c_contains_subrange() for using a predicate evaluation other than -// `==` as the function's test condition. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_contains_subrange( - Sequence1& sequence, Sequence2& subsequence, BinaryPredicate&& pred) { - return absl::c_search(sequence, subsequence, - std::forward(pred)) != - container_algorithm_internal::c_end(sequence); -} - -// c_search_n() -// -// Container-based version of the `std::search_n()` function to -// search a container for the first sequence of N elements. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 - container_algorithm_internal::ContainerIter - c_search_n(Sequence& sequence, Size count, T&& value) { - return std::search_n(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), count, - std::forward(value)); -} - -// Overload of c_search_n() for using a predicate evaluation other than -// `==` as the function's test condition. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 - container_algorithm_internal::ContainerIter - c_search_n(Sequence& sequence, Size count, T&& value, - BinaryPredicate&& pred) { - return std::search_n(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), count, - std::forward(value), - std::forward(pred)); -} - -//------------------------------------------------------------------------------ -// Modifying sequence operations -//------------------------------------------------------------------------------ - -// c_copy() -// -// Container-based version of the `std::copy()` function to copy a -// container's elements into an iterator. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator -c_copy(const InputSequence& input, OutputIterator output) { - return std::copy(container_algorithm_internal::c_begin(input), - container_algorithm_internal::c_end(input), output); -} - -// c_copy_n() -// -// Container-based version of the `std::copy_n()` function to copy a -// container's first N elements into an iterator. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator -c_copy_n(const C& input, Size n, OutputIterator output) { - return std::copy_n(container_algorithm_internal::c_begin(input), n, output); -} - -// c_copy_if() -// -// Container-based version of the `std::copy_if()` function to copy -// a container's elements satisfying some condition into an iterator. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator -c_copy_if(const InputSequence& input, OutputIterator output, Pred&& pred) { - return std::copy_if(container_algorithm_internal::c_begin(input), - container_algorithm_internal::c_end(input), output, - std::forward(pred)); -} - -// c_copy_backward() -// -// Container-based version of the `std::copy_backward()` function to -// copy a container's elements in reverse order into an iterator. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 BidirectionalIterator -c_copy_backward(const C& src, BidirectionalIterator dest) { - return std::copy_backward(container_algorithm_internal::c_begin(src), - container_algorithm_internal::c_end(src), dest); -} - -// c_move() -// -// Container-based version of the `std::move()` function to move -// a container's elements into an iterator. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator c_move(C&& src, - OutputIterator dest) { - return std::move(container_algorithm_internal::c_begin(src), - container_algorithm_internal::c_end(src), dest); -} - -// c_move_backward() -// -// Container-based version of the `std::move_backward()` function to -// move a container's elements into an iterator in reverse order. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 BidirectionalIterator -c_move_backward(C&& src, BidirectionalIterator dest) { - return std::move_backward(container_algorithm_internal::c_begin(src), - container_algorithm_internal::c_end(src), dest); -} - -// c_swap_ranges() -// -// Container-based version of the `std::swap_ranges()` function to -// swap a container's elements with another container's elements. Swaps the -// first N elements of `c1` and `c2`, where N = min(size(c1), size(c2)). -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 - container_algorithm_internal::ContainerIter - c_swap_ranges(C1& c1, C2& c2) { - auto first1 = container_algorithm_internal::c_begin(c1); - auto last1 = container_algorithm_internal::c_end(c1); - auto first2 = container_algorithm_internal::c_begin(c2); - auto last2 = container_algorithm_internal::c_end(c2); - - using std::swap; - for (; first1 != last1 && first2 != last2; ++first1, (void)++first2) { - swap(*first1, *first2); - } - return first2; -} - -// c_transform() -// -// Container-based version of the `std::transform()` function to -// transform a container's elements using the unary operation, storing the -// result in an iterator pointing to the last transformed element in the output -// range. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator c_transform( - const InputSequence& input, OutputIterator output, UnaryOp&& unary_op) { - return std::transform(container_algorithm_internal::c_begin(input), - container_algorithm_internal::c_end(input), output, - std::forward(unary_op)); -} - -// Overload of c_transform() for performing a transformation using a binary -// predicate. Applies `binary_op` to the first N elements of `c1` and `c2`, -// where N = min(size(c1), size(c2)). -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator -c_transform(const InputSequence1& input1, const InputSequence2& input2, - OutputIterator output, BinaryOp&& binary_op) { - auto first1 = container_algorithm_internal::c_begin(input1); - auto last1 = container_algorithm_internal::c_end(input1); - auto first2 = container_algorithm_internal::c_begin(input2); - auto last2 = container_algorithm_internal::c_end(input2); - for (; first1 != last1 && first2 != last2; - ++first1, (void)++first2, ++output) { - *output = binary_op(*first1, *first2); - } - - return output; -} - -// c_replace() -// -// Container-based version of the `std::replace()` function to -// replace a container's elements of some value with a new value. The container -// is modified in place. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_replace(Sequence& sequence, - const T& old_value, - const T& new_value) { - std::replace(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), old_value, - new_value); -} - -// c_replace_if() -// -// Container-based version of the `std::replace_if()` function to -// replace a container's elements of some value with a new value based on some -// condition. The container is modified in place. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_replace_if(C& c, Pred&& pred, - T&& new_value) { - std::replace_if(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(pred), std::forward(new_value)); -} - -// c_replace_copy() -// -// Container-based version of the `std::replace_copy()` function to -// replace a container's elements of some value with a new value and return the -// results within an iterator. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator c_replace_copy( - const C& c, OutputIterator result, T&& old_value, T&& new_value) { - return std::replace_copy(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), result, - std::forward(old_value), - std::forward(new_value)); -} - -// c_replace_copy_if() -// -// Container-based version of the `std::replace_copy_if()` function -// to replace a container's elements of some value with a new value based on -// some condition, and return the results within an iterator. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator c_replace_copy_if( - const C& c, OutputIterator result, Pred&& pred, const T& new_value) { - return std::replace_copy_if(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), result, - std::forward(pred), new_value); -} - -// c_fill() -// -// Container-based version of the `std::fill()` function to fill a -// container with some value. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_fill(C& c, const T& value) { - std::fill(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), value); -} - -// c_fill_n() -// -// Container-based version of the `std::fill_n()` function to fill -// the first N elements in a container with some value. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_fill_n(C& c, Size n, - const T& value) { - std::fill_n(container_algorithm_internal::c_begin(c), n, value); -} - -// c_generate() -// -// Container-based version of the `std::generate()` function to -// assign a container's elements to the values provided by the given generator. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_generate(C& c, Generator&& gen) { - std::generate(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(gen)); -} - -// c_generate_n() -// -// Container-based version of the `std::generate_n()` function to -// assign a container's first N elements to the values provided by the given -// generator. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 - container_algorithm_internal::ContainerIter - c_generate_n(C& c, Size n, Generator&& gen) { - return std::generate_n(container_algorithm_internal::c_begin(c), n, - std::forward(gen)); -} - -// Note: `c_xx()` container versions for `remove()`, `remove_if()`, -// and `unique()` are omitted, because it's not clear whether or not such -// functions should call erase on their supplied sequences afterwards. Either -// behavior would be surprising for a different set of users. - -// c_remove_copy() -// -// Container-based version of the `std::remove_copy()` function to -// copy a container's elements while removing any elements matching the given -// `value`. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator -c_remove_copy(const C& c, OutputIterator result, const T& value) { - return std::remove_copy(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), result, - value); -} - -// c_remove_copy_if() -// -// Container-based version of the `std::remove_copy_if()` function -// to copy a container's elements while removing any elements matching the given -// condition. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator -c_remove_copy_if(const C& c, OutputIterator result, Pred&& pred) { - return std::remove_copy_if(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), result, - std::forward(pred)); -} - -// c_unique_copy() -// -// Container-based version of the `std::unique_copy()` function to -// copy a container's elements while removing any elements containing duplicate -// values. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator -c_unique_copy(const C& c, OutputIterator result) { - return std::unique_copy(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), result); -} - -// Overload of c_unique_copy() for using a predicate evaluation other than -// `==` for comparing uniqueness of the element values. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator -c_unique_copy(const C& c, OutputIterator result, BinaryPredicate&& pred) { - return std::unique_copy(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), result, - std::forward(pred)); -} - -// c_reverse() -// -// Container-based version of the `std::reverse()` function to -// reverse a container's elements. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_reverse(Sequence& sequence) { - std::reverse(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence)); -} - -// c_reverse_copy() -// -// Container-based version of the `std::reverse()` function to -// reverse a container's elements and write them to an iterator range. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator -c_reverse_copy(const C& sequence, OutputIterator result) { - return std::reverse_copy(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - result); -} - -// c_rotate() -// -// Container-based version of the `std::rotate()` function to -// shift a container's elements leftward such that the `middle` element becomes -// the first element in the container. -template > -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 Iterator c_rotate(C& sequence, - Iterator middle) { - return absl::rotate(container_algorithm_internal::c_begin(sequence), middle, - container_algorithm_internal::c_end(sequence)); -} - -// c_rotate_copy() -// -// Container-based version of the `std::rotate_copy()` function to -// shift a container's elements leftward such that the `middle` element becomes -// the first element in a new iterator range. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator -c_rotate_copy(const C& sequence, - container_algorithm_internal::ContainerIter middle, - OutputIterator result) { - return std::rotate_copy(container_algorithm_internal::c_begin(sequence), - middle, container_algorithm_internal::c_end(sequence), - result); -} - -// c_shuffle() -// -// Container-based version of the `std::shuffle()` function to -// randomly shuffle elements within the container using a `gen()` uniform random -// number generator. -template -void c_shuffle(RandomAccessContainer& c, UniformRandomBitGenerator&& gen) { - std::shuffle(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(gen)); -} - -// c_sample() -// -// Container-based version of the `std::sample()` function to -// randomly sample elements from the container without replacement using a -// `gen()` uniform random number generator and write them to an iterator range. -template -OutputIterator c_sample(const C& c, OutputIterator result, Distance n, - UniformRandomBitGenerator&& gen) { - return std::sample(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), result, n, - std::forward(gen)); -} - -//------------------------------------------------------------------------------ -// Partition functions -//------------------------------------------------------------------------------ - -// c_is_partitioned() -// -// Container-based version of the `std::is_partitioned()` function -// to test whether all elements in the container for which `pred` returns `true` -// precede those for which `pred` is `false`. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_is_partitioned(const C& c, - Pred&& pred) { - return std::is_partitioned(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(pred)); -} - -// c_partition() -// -// Container-based version of the `std::partition()` function -// to rearrange all elements in a container in such a way that all elements for -// which `pred` returns `true` precede all those for which it returns `false`, -// returning an iterator to the first element of the second group. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 - container_algorithm_internal::ContainerIter - c_partition(C& c, Pred&& pred) { - return std::partition(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(pred)); -} - -// c_stable_partition() -// -// Container-based version of the `std::stable_partition()` function -// to rearrange all elements in a container in such a way that all elements for -// which `pred` returns `true` precede all those for which it returns `false`, -// preserving the relative ordering between the two groups. The function returns -// an iterator to the first element of the second group. -template -container_algorithm_internal::ContainerIter c_stable_partition(C& c, - Pred&& pred) { - return std::stable_partition(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(pred)); -} - -// c_partition_copy() -// -// Container-based version of the `std::partition_copy()` function -// to partition a container's elements and return them into two iterators: one -// for which `pred` returns `true`, and one for which `pred` returns `false.` - -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 std::pair -c_partition_copy(const C& c, OutputIterator1 out_true, - OutputIterator2 out_false, Pred&& pred) { - return std::partition_copy(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), out_true, - out_false, std::forward(pred)); -} - -// c_partition_point() -// -// Container-based version of the `std::partition_point()` function -// to return the first element of an already partitioned container for which -// the given `pred` is not `true`. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 - container_algorithm_internal::ContainerIter - c_partition_point(C& c, Pred&& pred) { - return std::partition_point(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(pred)); -} - -//------------------------------------------------------------------------------ -// Sorting functions -//------------------------------------------------------------------------------ - -// c_sort() -// -// Container-based version of the `std::sort()` function -// to sort elements in ascending order of their values. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_sort(C& c) { - std::sort(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c)); -} - -// Overload of c_sort() for performing a `comp` comparison other than the -// default `operator<`. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_sort(C& c, LessThan&& comp) { - std::sort(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(comp)); -} - -// c_stable_sort() -// -// Container-based version of the `std::stable_sort()` function -// to sort elements in ascending order of their values, preserving the order -// of equivalents. -template -void c_stable_sort(C& c) { - std::stable_sort(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c)); -} - -// Overload of c_stable_sort() for performing a `comp` comparison other than the -// default `operator<`. -template -void c_stable_sort(C& c, LessThan&& comp) { - std::stable_sort(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(comp)); -} - -// c_is_sorted() -// -// Container-based version of the `std::is_sorted()` function -// to evaluate whether the given container is sorted in ascending order. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_is_sorted(const C& c) { - return std::is_sorted(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c)); -} - -// c_is_sorted() overload for performing a `comp` comparison other than the -// default `operator<`. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_is_sorted(const C& c, - LessThan&& comp) { - return std::is_sorted(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(comp)); -} - -// c_partial_sort() -// -// Container-based version of the `std::partial_sort()` function -// to rearrange elements within a container such that elements before `middle` -// are sorted in ascending order. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_partial_sort( - RandomAccessContainer& sequence, - container_algorithm_internal::ContainerIter middle) { - std::partial_sort(container_algorithm_internal::c_begin(sequence), middle, - container_algorithm_internal::c_end(sequence)); -} - -// Overload of c_partial_sort() for performing a `comp` comparison other than -// the default `operator<`. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_partial_sort( - RandomAccessContainer& sequence, - container_algorithm_internal::ContainerIter middle, - LessThan&& comp) { - std::partial_sort(container_algorithm_internal::c_begin(sequence), middle, - container_algorithm_internal::c_end(sequence), - std::forward(comp)); -} - -// c_partial_sort_copy() -// -// Container-based version of the `std::partial_sort_copy()` -// function to sort the elements in the given range `result` within the larger -// `sequence` in ascending order (and using `result` as the output parameter). -// At most min(result.last - result.first, sequence.last - sequence.first) -// elements from the sequence will be stored in the result. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 - container_algorithm_internal::ContainerIter - c_partial_sort_copy(const C& sequence, RandomAccessContainer& result) { - return std::partial_sort_copy(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - container_algorithm_internal::c_begin(result), - container_algorithm_internal::c_end(result)); -} - -// Overload of c_partial_sort_copy() for performing a `comp` comparison other -// than the default `operator<`. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 - container_algorithm_internal::ContainerIter - c_partial_sort_copy(const C& sequence, RandomAccessContainer& result, - LessThan&& comp) { - return std::partial_sort_copy(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - container_algorithm_internal::c_begin(result), - container_algorithm_internal::c_end(result), - std::forward(comp)); -} - -// c_is_sorted_until() -// -// Container-based version of the `std::is_sorted_until()` function -// to return the first element within a container that is not sorted in -// ascending order as an iterator. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 - container_algorithm_internal::ContainerIter - c_is_sorted_until(C& c) { - return std::is_sorted_until(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c)); -} - -// Overload of c_is_sorted_until() for performing a `comp` comparison other than -// the default `operator<`. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 - container_algorithm_internal::ContainerIter - c_is_sorted_until(C& c, LessThan&& comp) { - return std::is_sorted_until(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(comp)); -} - -// c_nth_element() -// -// Container-based version of the `std::nth_element()` function -// to rearrange the elements within a container such that the `nth` element -// would be in that position in an ordered sequence; other elements may be in -// any order, except that all preceding `nth` will be less than that element, -// and all following `nth` will be greater than that element. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_nth_element( - RandomAccessContainer& sequence, - container_algorithm_internal::ContainerIter nth) { - std::nth_element(container_algorithm_internal::c_begin(sequence), nth, - container_algorithm_internal::c_end(sequence)); -} - -// Overload of c_nth_element() for performing a `comp` comparison other than -// the default `operator<`. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_nth_element( - RandomAccessContainer& sequence, - container_algorithm_internal::ContainerIter nth, - LessThan&& comp) { - std::nth_element(container_algorithm_internal::c_begin(sequence), nth, - container_algorithm_internal::c_end(sequence), - std::forward(comp)); -} - -//------------------------------------------------------------------------------ -// Binary Search -//------------------------------------------------------------------------------ - -// c_lower_bound() -// -// Container-based version of the `std::lower_bound()` function -// to return an iterator pointing to the first element in a sorted container -// which does not compare less than `value`. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 - container_algorithm_internal::ContainerIter - c_lower_bound(Sequence& sequence, const T& value) { - return std::lower_bound(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), value); -} - -// Overload of c_lower_bound() for performing a `comp` comparison other than -// the default `operator<`. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 - container_algorithm_internal::ContainerIter - c_lower_bound(Sequence& sequence, const T& value, LessThan&& comp) { - return std::lower_bound(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), value, - std::forward(comp)); -} - -// c_upper_bound() -// -// Container-based version of the `std::upper_bound()` function -// to return an iterator pointing to the first element in a sorted container -// which is greater than `value`. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 - container_algorithm_internal::ContainerIter - c_upper_bound(Sequence& sequence, const T& value) { - return std::upper_bound(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), value); -} - -// Overload of c_upper_bound() for performing a `comp` comparison other than -// the default `operator<`. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 - container_algorithm_internal::ContainerIter - c_upper_bound(Sequence& sequence, const T& value, LessThan&& comp) { - return std::upper_bound(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), value, - std::forward(comp)); -} - -// c_equal_range() -// -// Container-based version of the `std::equal_range()` function -// to return an iterator pair pointing to the first and last elements in a -// sorted container which compare equal to `value`. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 - container_algorithm_internal::ContainerIterPairType - c_equal_range(Sequence& sequence, const T& value) { - return std::equal_range(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), value); -} - -// Overload of c_equal_range() for performing a `comp` comparison other than -// the default `operator<`. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 - container_algorithm_internal::ContainerIterPairType - c_equal_range(Sequence& sequence, const T& value, LessThan&& comp) { - return std::equal_range(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), value, - std::forward(comp)); -} - -// c_binary_search() -// -// Container-based version of the `std::binary_search()` function -// to test if any element in the sorted container contains a value equivalent to -// 'value'. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_binary_search( - const Sequence& sequence, const T& value) { - return std::binary_search(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - value); -} - -// Overload of c_binary_search() for performing a `comp` comparison other than -// the default `operator<`. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_binary_search( - const Sequence& sequence, const T& value, LessThan&& comp) { - return std::binary_search(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - value, std::forward(comp)); -} - -//------------------------------------------------------------------------------ -// Merge functions -//------------------------------------------------------------------------------ - -// c_merge() -// -// Container-based version of the `std::merge()` function -// to merge two sorted containers into a single sorted iterator. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator -c_merge(const C1& c1, const C2& c2, OutputIterator result) { - return std::merge(container_algorithm_internal::c_begin(c1), - container_algorithm_internal::c_end(c1), - container_algorithm_internal::c_begin(c2), - container_algorithm_internal::c_end(c2), result); -} - -// Overload of c_merge() for performing a `comp` comparison other than -// the default `operator<`. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator -c_merge(const C1& c1, const C2& c2, OutputIterator result, LessThan&& comp) { - return std::merge(container_algorithm_internal::c_begin(c1), - container_algorithm_internal::c_end(c1), - container_algorithm_internal::c_begin(c2), - container_algorithm_internal::c_end(c2), result, - std::forward(comp)); -} - -// c_inplace_merge() -// -// Container-based version of the `std::inplace_merge()` function -// to merge a supplied iterator `middle` into a container. -template -void c_inplace_merge(C& c, - container_algorithm_internal::ContainerIter middle) { - std::inplace_merge(container_algorithm_internal::c_begin(c), middle, - container_algorithm_internal::c_end(c)); -} - -// Overload of c_inplace_merge() for performing a merge using a `comp` other -// than `operator<`. -template -void c_inplace_merge(C& c, - container_algorithm_internal::ContainerIter middle, - LessThan&& comp) { - std::inplace_merge(container_algorithm_internal::c_begin(c), middle, - container_algorithm_internal::c_end(c), - std::forward(comp)); -} - -// c_includes() -// -// Container-based version of the `std::includes()` function -// to test whether a sorted container `c1` entirely contains another sorted -// container `c2`. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_includes(const C1& c1, - const C2& c2) { - return std::includes(container_algorithm_internal::c_begin(c1), - container_algorithm_internal::c_end(c1), - container_algorithm_internal::c_begin(c2), - container_algorithm_internal::c_end(c2)); -} - -// Overload of c_includes() for performing a merge using a `comp` other than -// `operator<`. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_includes(const C1& c1, const C2& c2, - LessThan&& comp) { - return std::includes(container_algorithm_internal::c_begin(c1), - container_algorithm_internal::c_end(c1), - container_algorithm_internal::c_begin(c2), - container_algorithm_internal::c_end(c2), - std::forward(comp)); -} - -// c_set_union() -// -// Container-based version of the `std::set_union()` function -// to return an iterator containing the union of two containers; duplicate -// values are not copied into the output. -template ::value, - void>::type, - typename = typename std::enable_if< - !container_algorithm_internal::IsUnorderedContainer::value, - void>::type> -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator -c_set_union(const C1& c1, const C2& c2, OutputIterator output) { - return std::set_union(container_algorithm_internal::c_begin(c1), - container_algorithm_internal::c_end(c1), - container_algorithm_internal::c_begin(c2), - container_algorithm_internal::c_end(c2), output); -} - -// Overload of c_set_union() for performing a merge using a `comp` other than -// `operator<`. -template ::value, - void>::type, - typename = typename std::enable_if< - !container_algorithm_internal::IsUnorderedContainer::value, - void>::type> -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator c_set_union( - const C1& c1, const C2& c2, OutputIterator output, LessThan&& comp) { - return std::set_union(container_algorithm_internal::c_begin(c1), - container_algorithm_internal::c_end(c1), - container_algorithm_internal::c_begin(c2), - container_algorithm_internal::c_end(c2), output, - std::forward(comp)); -} - -// c_set_intersection() -// -// Container-based version of the `std::set_intersection()` function -// to return an iterator containing the intersection of two sorted containers. -template ::value, - void>::type, - typename = typename std::enable_if< - !container_algorithm_internal::IsUnorderedContainer::value, - void>::type> -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator -c_set_intersection(const C1& c1, const C2& c2, OutputIterator output) { - // In debug builds, ensure that both containers are sorted with respect to the - // default comparator. std::set_intersection requires the containers be sorted - // using operator<. - ABSL_ASSERT(absl::c_is_sorted(c1)); - ABSL_ASSERT(absl::c_is_sorted(c2)); - return std::set_intersection(container_algorithm_internal::c_begin(c1), - container_algorithm_internal::c_end(c1), - container_algorithm_internal::c_begin(c2), - container_algorithm_internal::c_end(c2), output); -} - -// Overload of c_set_intersection() for performing a merge using a `comp` other -// than `operator<`. -template ::value, - void>::type, - typename = typename std::enable_if< - !container_algorithm_internal::IsUnorderedContainer::value, - void>::type> -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator c_set_intersection( - const C1& c1, const C2& c2, OutputIterator output, LessThan&& comp) { - // In debug builds, ensure that both containers are sorted with respect to the - // default comparator. std::set_intersection requires the containers be sorted - // using the same comparator. - ABSL_ASSERT(absl::c_is_sorted(c1, comp)); - ABSL_ASSERT(absl::c_is_sorted(c2, comp)); - return std::set_intersection(container_algorithm_internal::c_begin(c1), - container_algorithm_internal::c_end(c1), - container_algorithm_internal::c_begin(c2), - container_algorithm_internal::c_end(c2), output, - std::forward(comp)); -} - -// c_set_difference() -// -// Container-based version of the `std::set_difference()` function -// to return an iterator containing elements present in the first container but -// not in the second. -template ::value, - void>::type, - typename = typename std::enable_if< - !container_algorithm_internal::IsUnorderedContainer::value, - void>::type> -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator -c_set_difference(const C1& c1, const C2& c2, OutputIterator output) { - return std::set_difference(container_algorithm_internal::c_begin(c1), - container_algorithm_internal::c_end(c1), - container_algorithm_internal::c_begin(c2), - container_algorithm_internal::c_end(c2), output); -} - -// Overload of c_set_difference() for performing a merge using a `comp` other -// than `operator<`. -template ::value, - void>::type, - typename = typename std::enable_if< - !container_algorithm_internal::IsUnorderedContainer::value, - void>::type> -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator c_set_difference( - const C1& c1, const C2& c2, OutputIterator output, LessThan&& comp) { - return std::set_difference(container_algorithm_internal::c_begin(c1), - container_algorithm_internal::c_end(c1), - container_algorithm_internal::c_begin(c2), - container_algorithm_internal::c_end(c2), output, - std::forward(comp)); -} - -// c_set_symmetric_difference() -// -// Container-based version of the `std::set_symmetric_difference()` -// function to return an iterator containing elements present in either one -// container or the other, but not both. -template ::value, - void>::type, - typename = typename std::enable_if< - !container_algorithm_internal::IsUnorderedContainer::value, - void>::type> -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator -c_set_symmetric_difference(const C1& c1, const C2& c2, OutputIterator output) { - return std::set_symmetric_difference( - container_algorithm_internal::c_begin(c1), - container_algorithm_internal::c_end(c1), - container_algorithm_internal::c_begin(c2), - container_algorithm_internal::c_end(c2), output); -} - -// Overload of c_set_symmetric_difference() for performing a merge using a -// `comp` other than `operator<`. -template ::value, - void>::type, - typename = typename std::enable_if< - !container_algorithm_internal::IsUnorderedContainer::value, - void>::type> -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator c_set_symmetric_difference( - const C1& c1, const C2& c2, OutputIterator output, LessThan&& comp) { - return std::set_symmetric_difference( - container_algorithm_internal::c_begin(c1), - container_algorithm_internal::c_end(c1), - container_algorithm_internal::c_begin(c2), - container_algorithm_internal::c_end(c2), output, - std::forward(comp)); -} - -//------------------------------------------------------------------------------ -// Heap functions -//------------------------------------------------------------------------------ - -// c_push_heap() -// -// Container-based version of the `std::push_heap()` function -// to push a value onto a container heap. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_push_heap( - RandomAccessContainer& sequence) { - std::push_heap(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence)); -} - -// Overload of c_push_heap() for performing a push operation on a heap using a -// `comp` other than `operator<`. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_push_heap( - RandomAccessContainer& sequence, LessThan&& comp) { - std::push_heap(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - std::forward(comp)); -} - -// c_pop_heap() -// -// Container-based version of the `std::pop_heap()` function -// to pop a value from a heap container. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_pop_heap( - RandomAccessContainer& sequence) { - std::pop_heap(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence)); -} - -// Overload of c_pop_heap() for performing a pop operation on a heap using a -// `comp` other than `operator<`. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_pop_heap( - RandomAccessContainer& sequence, LessThan&& comp) { - std::pop_heap(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - std::forward(comp)); -} - -// c_make_heap() -// -// Container-based version of the `std::make_heap()` function -// to make a container a heap. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_make_heap( - RandomAccessContainer& sequence) { - std::make_heap(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence)); -} - -// Overload of c_make_heap() for performing heap comparisons using a -// `comp` other than `operator<` -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_make_heap( - RandomAccessContainer& sequence, LessThan&& comp) { - std::make_heap(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - std::forward(comp)); -} - -// c_sort_heap() -// -// Container-based version of the `std::sort_heap()` function -// to sort a heap into ascending order (after which it is no longer a heap). -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_sort_heap( - RandomAccessContainer& sequence) { - std::sort_heap(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence)); -} - -// Overload of c_sort_heap() for performing heap comparisons using a -// `comp` other than `operator<` -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_sort_heap( - RandomAccessContainer& sequence, LessThan&& comp) { - std::sort_heap(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - std::forward(comp)); -} - -// c_is_heap() -// -// Container-based version of the `std::is_heap()` function -// to check whether the given container is a heap. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_is_heap( - const RandomAccessContainer& sequence) { - return std::is_heap(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence)); -} - -// Overload of c_is_heap() for performing heap comparisons using a -// `comp` other than `operator<` -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_is_heap( - const RandomAccessContainer& sequence, LessThan&& comp) { - return std::is_heap(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - std::forward(comp)); -} - -// c_is_heap_until() -// -// Container-based version of the `std::is_heap_until()` function -// to find the first element in a given container which is not in heap order. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 - container_algorithm_internal::ContainerIter - c_is_heap_until(RandomAccessContainer& sequence) { - return std::is_heap_until(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence)); -} - -// Overload of c_is_heap_until() for performing heap comparisons using a -// `comp` other than `operator<` -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 - container_algorithm_internal::ContainerIter - c_is_heap_until(RandomAccessContainer& sequence, LessThan&& comp) { - return std::is_heap_until(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - std::forward(comp)); -} - -//------------------------------------------------------------------------------ -// Min/max -//------------------------------------------------------------------------------ - -// c_min_element() -// -// Container-based version of the `std::min_element()` function -// to return an iterator pointing to the element with the smallest value, using -// `operator<` to make the comparisons. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX17 - container_algorithm_internal::ContainerIter - c_min_element(Sequence& sequence) { - return std::min_element(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence)); -} - -// Overload of c_min_element() for performing a `comp` comparison other than -// `operator<`. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX17 - container_algorithm_internal::ContainerIter - c_min_element(Sequence& sequence, LessThan&& comp) { - return std::min_element(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - std::forward(comp)); -} - -// c_max_element() -// -// Container-based version of the `std::max_element()` function -// to return an iterator pointing to the element with the largest value, using -// `operator<` to make the comparisons. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX17 - container_algorithm_internal::ContainerIter - c_max_element(Sequence& sequence) { - return std::max_element(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence)); -} - -// Overload of c_max_element() for performing a `comp` comparison other than -// `operator<`. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX17 - container_algorithm_internal::ContainerIter - c_max_element(Sequence& sequence, LessThan&& comp) { - return std::max_element(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - std::forward(comp)); -} - -// c_minmax_element() -// -// Container-based version of the `std::minmax_element()` function -// to return a pair of iterators pointing to the elements containing the -// smallest and largest values, respectively, using `operator<` to make the -// comparisons. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX17 - container_algorithm_internal::ContainerIterPairType - c_minmax_element(C& c) { - return std::minmax_element(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c)); -} - -// Overload of c_minmax_element() for performing `comp` comparisons other than -// `operator<`. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX17 - container_algorithm_internal::ContainerIterPairType - c_minmax_element(C& c, LessThan&& comp) { - return std::minmax_element(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(comp)); -} - -//------------------------------------------------------------------------------ -// Lexicographical Comparisons -//------------------------------------------------------------------------------ - -// c_lexicographical_compare() -// -// Container-based version of the `std::lexicographical_compare()` -// function to lexicographically compare (e.g. sort words alphabetically) two -// container sequences. The comparison is performed using `operator<`. Note -// that capital letters ("A-Z") have ASCII values less than lowercase letters -// ("a-z"). -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_lexicographical_compare( - const Sequence1& sequence1, const Sequence2& sequence2) { - return std::lexicographical_compare( - container_algorithm_internal::c_begin(sequence1), - container_algorithm_internal::c_end(sequence1), - container_algorithm_internal::c_begin(sequence2), - container_algorithm_internal::c_end(sequence2)); -} - -// Overload of c_lexicographical_compare() for performing a lexicographical -// comparison using a `comp` operator instead of `operator<`. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_lexicographical_compare( - const Sequence1& sequence1, const Sequence2& sequence2, LessThan&& comp) { - return std::lexicographical_compare( - container_algorithm_internal::c_begin(sequence1), - container_algorithm_internal::c_end(sequence1), - container_algorithm_internal::c_begin(sequence2), - container_algorithm_internal::c_end(sequence2), - std::forward(comp)); -} - -// c_next_permutation() -// -// Container-based version of the `std::next_permutation()` function -// to rearrange a container's elements into the next lexicographically greater -// permutation. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_next_permutation(C& c) { - return std::next_permutation(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c)); -} - -// Overload of c_next_permutation() for performing a lexicographical -// comparison using a `comp` operator instead of `operator<`. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_next_permutation(C& c, - LessThan&& comp) { - return std::next_permutation(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(comp)); -} - -// c_prev_permutation() -// -// Container-based version of the `std::prev_permutation()` function -// to rearrange a container's elements into the next lexicographically lesser -// permutation. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_prev_permutation(C& c) { - return std::prev_permutation(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c)); -} - -// Overload of c_prev_permutation() for performing a lexicographical -// comparison using a `comp` operator instead of `operator<`. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_prev_permutation(C& c, - LessThan&& comp) { - return std::prev_permutation(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(comp)); -} - -//------------------------------------------------------------------------------ -// algorithms -//------------------------------------------------------------------------------ - -// c_iota() -// -// Container-based version of the `std::iota()` function -// to compute successive values of `value`, as if incremented with `++value` -// after each element is written, and write them to the container. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_iota(Sequence& sequence, - const T& value) { - std::iota(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), value); -} - -// c_accumulate() -// -// Container-based version of the `std::accumulate()` function -// to accumulate the element values of a container to `init` and return that -// accumulation by value. -// -// Note: Due to a language technicality this function has return type -// absl::decay_t. As a user of this function you can casually read -// this as "returns T by value" and assume it does the right thing. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 decay_t c_accumulate( - const Sequence& sequence, T&& init) { - return std::accumulate(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - std::forward(init)); -} - -// Overload of c_accumulate() for using a binary operations other than -// addition for computing the accumulation. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 decay_t c_accumulate( - const Sequence& sequence, T&& init, BinaryOp&& binary_op) { - return std::accumulate(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - std::forward(init), - std::forward(binary_op)); -} - -// c_inner_product() -// -// Container-based version of the `std::inner_product()` function -// to compute the cumulative inner product of container element pairs. -// -// Note: Due to a language technicality this function has return type -// absl::decay_t. As a user of this function you can casually read -// this as "returns T by value" and assume it does the right thing. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 decay_t c_inner_product( - const Sequence1& factors1, const Sequence2& factors2, T&& sum) { - return std::inner_product(container_algorithm_internal::c_begin(factors1), - container_algorithm_internal::c_end(factors1), - container_algorithm_internal::c_begin(factors2), - std::forward(sum)); -} - -// Overload of c_inner_product() for using binary operations other than -// `operator+` (for computing the accumulation) and `operator*` (for computing -// the product between the two container's element pair). -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 decay_t c_inner_product( - const Sequence1& factors1, const Sequence2& factors2, T&& sum, - BinaryOp1&& op1, BinaryOp2&& op2) { - return std::inner_product(container_algorithm_internal::c_begin(factors1), - container_algorithm_internal::c_end(factors1), - container_algorithm_internal::c_begin(factors2), - std::forward(sum), std::forward(op1), - std::forward(op2)); -} - -// c_adjacent_difference() -// -// Container-based version of the `std::adjacent_difference()` -// function to compute the difference between each element and the one preceding -// it and write it to an iterator. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIt -c_adjacent_difference(const InputSequence& input, OutputIt output_first) { - return std::adjacent_difference(container_algorithm_internal::c_begin(input), - container_algorithm_internal::c_end(input), - output_first); -} - -// Overload of c_adjacent_difference() for using a binary operation other than -// subtraction to compute the adjacent difference. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIt c_adjacent_difference( - const InputSequence& input, OutputIt output_first, BinaryOp&& op) { - return std::adjacent_difference(container_algorithm_internal::c_begin(input), - container_algorithm_internal::c_end(input), - output_first, std::forward(op)); -} - -// c_partial_sum() -// -// Container-based version of the `std::partial_sum()` function -// to compute the partial sum of the elements in a sequence and write them -// to an iterator. The partial sum is the sum of all element values so far in -// the sequence. -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIt -c_partial_sum(const InputSequence& input, OutputIt output_first) { - return std::partial_sum(container_algorithm_internal::c_begin(input), - container_algorithm_internal::c_end(input), - output_first); -} - -// Overload of c_partial_sum() for using a binary operation other than addition -// to compute the "partial sum". -template -ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIt c_partial_sum( - const InputSequence& input, OutputIt output_first, BinaryOp&& op) { - return std::partial_sum(container_algorithm_internal::c_begin(input), - container_algorithm_internal::c_end(input), - output_first, std::forward(op)); -} - -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_ALGORITHM_CONTAINER_H_ diff --git a/3rdparty/dawn/third_party/abseil-cpp/absl/base/attributes.h b/3rdparty/dawn/third_party/abseil-cpp/absl/base/attributes.h deleted file mode 100644 index 33b2c2849..000000000 --- a/3rdparty/dawn/third_party/abseil-cpp/absl/base/attributes.h +++ /dev/null @@ -1,1077 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// This header file defines macros for declaring attributes for functions, -// types, and variables. -// -// These macros are used within Abseil and allow the compiler to optimize, where -// applicable, certain function calls. -// -// Most macros here are exposing GCC or Clang features, and are stubbed out for -// other compilers. -// -// GCC attributes documentation: -// https://gcc.gnu.org/onlinedocs/gcc-4.7.0/gcc/Function-Attributes.html -// https://gcc.gnu.org/onlinedocs/gcc-4.7.0/gcc/Variable-Attributes.html -// https://gcc.gnu.org/onlinedocs/gcc-4.7.0/gcc/Type-Attributes.html -// -// Most attributes in this file are already supported by GCC 4.7. However, some -// of them are not supported in older version of Clang. Thus, we check -// `__has_attribute()` first. If the check fails, we check if we are on GCC and -// assume the attribute exists on GCC (which is verified on GCC 4.7). - -// SKIP_ABSL_INLINE_NAMESPACE_CHECK - -#ifndef ABSL_BASE_ATTRIBUTES_H_ -#define ABSL_BASE_ATTRIBUTES_H_ - -#include "absl/base/config.h" - -// ABSL_HAVE_ATTRIBUTE -// -// A function-like feature checking macro that is a wrapper around -// `__has_attribute`, which is defined by GCC 5+ and Clang and evaluates to a -// nonzero constant integer if the attribute is supported or 0 if not. -// -// It evaluates to zero if `__has_attribute` is not defined by the compiler. -// -// GCC: https://gcc.gnu.org/gcc-5/changes.html -// Clang: https://clang.llvm.org/docs/LanguageExtensions.html -#ifdef __has_attribute -#define ABSL_HAVE_ATTRIBUTE(x) __has_attribute(x) -#else -#define ABSL_HAVE_ATTRIBUTE(x) 0 -#endif - -// ABSL_HAVE_CPP_ATTRIBUTE -// -// A function-like feature checking macro that accepts C++11 style attributes. -// It's a wrapper around `__has_cpp_attribute`, defined by ISO C++ SD-6 -// (https://en.cppreference.com/w/cpp/experimental/feature_test). If we don't -// find `__has_cpp_attribute`, will evaluate to 0. -#if defined(__cplusplus) && defined(__has_cpp_attribute) -// NOTE: requiring __cplusplus above should not be necessary, but -// works around https://bugs.llvm.org/show_bug.cgi?id=23435. -#define ABSL_HAVE_CPP_ATTRIBUTE(x) __has_cpp_attribute(x) -#else -#define ABSL_HAVE_CPP_ATTRIBUTE(x) 0 -#endif - -// ----------------------------------------------------------------------------- -// Function Attributes -// ----------------------------------------------------------------------------- -// -// GCC: https://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html -// Clang: https://clang.llvm.org/docs/AttributeReference.html - -// ABSL_PRINTF_ATTRIBUTE -// ABSL_SCANF_ATTRIBUTE -// -// Tells the compiler to perform `printf` format string checking if the -// compiler supports it; see the 'format' attribute in -// . -// -// Note: As the GCC manual states, "[s]ince non-static C++ methods -// have an implicit 'this' argument, the arguments of such methods -// should be counted from two, not one." -#if ABSL_HAVE_ATTRIBUTE(format) || (defined(__GNUC__) && !defined(__clang__)) -#define ABSL_PRINTF_ATTRIBUTE(string_index, first_to_check) \ - __attribute__((__format__(__printf__, string_index, first_to_check))) -#define ABSL_SCANF_ATTRIBUTE(string_index, first_to_check) \ - __attribute__((__format__(__scanf__, string_index, first_to_check))) -#else -#define ABSL_PRINTF_ATTRIBUTE(string_index, first_to_check) -#define ABSL_SCANF_ATTRIBUTE(string_index, first_to_check) -#endif - -// ABSL_ATTRIBUTE_ALWAYS_INLINE -// ABSL_ATTRIBUTE_NOINLINE -// -// Forces functions to either inline or not inline. Introduced in gcc 3.1. -#if ABSL_HAVE_ATTRIBUTE(always_inline) || \ - (defined(__GNUC__) && !defined(__clang__)) -#define ABSL_ATTRIBUTE_ALWAYS_INLINE __attribute__((always_inline)) -#define ABSL_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 -#else -#define ABSL_ATTRIBUTE_ALWAYS_INLINE -#endif - -#if ABSL_HAVE_ATTRIBUTE(noinline) || (defined(__GNUC__) && !defined(__clang__)) -#define ABSL_ATTRIBUTE_NOINLINE __attribute__((noinline)) -#define ABSL_HAVE_ATTRIBUTE_NOINLINE 1 -#else -#define ABSL_ATTRIBUTE_NOINLINE -#endif - -// ABSL_ATTRIBUTE_NO_TAIL_CALL -// -// Prevents the compiler from optimizing away stack frames for functions which -// end in a call to another function. -#if ABSL_HAVE_ATTRIBUTE(disable_tail_calls) -#define ABSL_HAVE_ATTRIBUTE_NO_TAIL_CALL 1 -#define ABSL_ATTRIBUTE_NO_TAIL_CALL __attribute__((disable_tail_calls)) -#elif defined(__GNUC__) && !defined(__clang__) && !defined(__e2k__) -#define ABSL_HAVE_ATTRIBUTE_NO_TAIL_CALL 1 -#define ABSL_ATTRIBUTE_NO_TAIL_CALL \ - __attribute__((optimize("no-optimize-sibling-calls"))) -#else -#define ABSL_ATTRIBUTE_NO_TAIL_CALL -#define ABSL_HAVE_ATTRIBUTE_NO_TAIL_CALL 0 -#endif - -// ABSL_ATTRIBUTE_WEAK -// -// Tags a function as weak for the purposes of compilation and linking. -// Weak attributes did not work properly in LLVM's Windows backend before -// 9.0.0, so disable them there. See https://bugs.llvm.org/show_bug.cgi?id=37598 -// for further information. Weak attributes do not work across DLL boundary. -// The MinGW compiler doesn't complain about the weak attribute until the link -// step, presumably because Windows doesn't use ELF binaries. -#if (ABSL_HAVE_ATTRIBUTE(weak) || \ - (defined(__GNUC__) && !defined(__clang__))) && \ - (!defined(_WIN32) || \ - (defined(__clang__) && __clang_major__ >= 9 && \ - !defined(ABSL_BUILD_DLL) && !defined(ABSL_CONSUME_DLL))) && \ - !defined(__MINGW32__) -#undef ABSL_ATTRIBUTE_WEAK -#define ABSL_ATTRIBUTE_WEAK __attribute__((weak)) -#define ABSL_HAVE_ATTRIBUTE_WEAK 1 -#else -#define ABSL_ATTRIBUTE_WEAK -#define ABSL_HAVE_ATTRIBUTE_WEAK 0 -#endif - -// ABSL_ATTRIBUTE_NONNULL -// -// Tells the compiler either (a) that a particular function parameter -// should be a non-null pointer, or (b) that all pointer arguments should -// be non-null. -// -// Note: As the GCC manual states, "[s]ince non-static C++ methods -// have an implicit 'this' argument, the arguments of such methods -// should be counted from two, not one." -// -// Args are indexed starting at 1. -// -// For non-static class member functions, the implicit `this` argument -// is arg 1, and the first explicit argument is arg 2. For static class member -// functions, there is no implicit `this`, and the first explicit argument is -// arg 1. -// -// Example: -// -// /* arg_a cannot be null, but arg_b can */ -// void Function(void* arg_a, void* arg_b) ABSL_ATTRIBUTE_NONNULL(1); -// -// class C { -// /* arg_a cannot be null, but arg_b can */ -// void Method(void* arg_a, void* arg_b) ABSL_ATTRIBUTE_NONNULL(2); -// -// /* arg_a cannot be null, but arg_b can */ -// static void StaticMethod(void* arg_a, void* arg_b) -// ABSL_ATTRIBUTE_NONNULL(1); -// }; -// -// If no arguments are provided, then all pointer arguments should be non-null. -// -// /* No pointer arguments may be null. */ -// void Function(void* arg_a, void* arg_b, int arg_c) ABSL_ATTRIBUTE_NONNULL(); -// -// NOTE: The GCC nonnull attribute actually accepts a list of arguments, but -// ABSL_ATTRIBUTE_NONNULL does not. -#if ABSL_HAVE_ATTRIBUTE(nonnull) || (defined(__GNUC__) && !defined(__clang__)) -#define ABSL_ATTRIBUTE_NONNULL(arg_index) __attribute__((nonnull(arg_index))) -#else -#define ABSL_ATTRIBUTE_NONNULL(...) -#endif - -// ABSL_ATTRIBUTE_NORETURN -// -// Tells the compiler that a given function never returns. -// -// Deprecated: Prefer the `[[noreturn]]` attribute standardized by C++11 over -// this macro. -#if ABSL_HAVE_ATTRIBUTE(noreturn) || (defined(__GNUC__) && !defined(__clang__)) -#define ABSL_ATTRIBUTE_NORETURN __attribute__((noreturn)) -#elif defined(_MSC_VER) -#define ABSL_ATTRIBUTE_NORETURN __declspec(noreturn) -#else -#define ABSL_ATTRIBUTE_NORETURN -#endif - -// ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS -// -// Tells the AddressSanitizer (or other memory testing tools) to ignore a given -// function. Useful for cases when a function reads random locations on stack, -// calls _exit from a cloned subprocess, deliberately accesses buffer -// out of bounds or does other scary things with memory. -// NOTE: GCC supports AddressSanitizer(asan) since 4.8. -// https://gcc.gnu.org/gcc-4.8/changes.html -#if defined(ABSL_HAVE_ADDRESS_SANITIZER) && \ - ABSL_HAVE_ATTRIBUTE(no_sanitize_address) -#define ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS __attribute__((no_sanitize_address)) -#elif defined(ABSL_HAVE_ADDRESS_SANITIZER) && defined(_MSC_VER) && \ - _MSC_VER >= 1928 -// https://docs.microsoft.com/en-us/cpp/cpp/no-sanitize-address -#define ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS __declspec(no_sanitize_address) -#elif defined(ABSL_HAVE_HWADDRESS_SANITIZER) && ABSL_HAVE_ATTRIBUTE(no_sanitize) -// HWAddressSanitizer is a sanitizer similar to AddressSanitizer, which uses CPU -// features to detect similar bugs with less CPU and memory overhead. -// NOTE: GCC supports HWAddressSanitizer(hwasan) since 11. -// https://gcc.gnu.org/gcc-11/changes.html -#define ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS \ - __attribute__((no_sanitize("hwaddress"))) -#else -#define ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS -#endif - -// ABSL_ATTRIBUTE_NO_SANITIZE_MEMORY -// -// Tells the MemorySanitizer to relax the handling of a given function. All "Use -// of uninitialized value" warnings from such functions will be suppressed, and -// all values loaded from memory will be considered fully initialized. This -// attribute is similar to the ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS attribute -// above, but deals with initialized-ness rather than addressability issues. -// NOTE: MemorySanitizer(msan) is supported by Clang but not GCC. -#if ABSL_HAVE_ATTRIBUTE(no_sanitize_memory) -#define ABSL_ATTRIBUTE_NO_SANITIZE_MEMORY __attribute__((no_sanitize_memory)) -#else -#define ABSL_ATTRIBUTE_NO_SANITIZE_MEMORY -#endif - -// ABSL_ATTRIBUTE_NO_SANITIZE_THREAD -// -// Tells the ThreadSanitizer to not instrument a given function. -// NOTE: GCC supports ThreadSanitizer(tsan) since 4.8. -// https://gcc.gnu.org/gcc-4.8/changes.html -#if ABSL_HAVE_ATTRIBUTE(no_sanitize_thread) -#define ABSL_ATTRIBUTE_NO_SANITIZE_THREAD __attribute__((no_sanitize_thread)) -#else -#define ABSL_ATTRIBUTE_NO_SANITIZE_THREAD -#endif - -// ABSL_ATTRIBUTE_NO_SANITIZE_UNDEFINED -// -// Tells the UndefinedSanitizer to ignore a given function. Useful for cases -// where certain behavior (eg. division by zero) is being used intentionally. -// NOTE: GCC supports UndefinedBehaviorSanitizer(ubsan) since 4.9. -// https://gcc.gnu.org/gcc-4.9/changes.html -#if ABSL_HAVE_ATTRIBUTE(no_sanitize_undefined) -#define ABSL_ATTRIBUTE_NO_SANITIZE_UNDEFINED \ - __attribute__((no_sanitize_undefined)) -#elif ABSL_HAVE_ATTRIBUTE(no_sanitize) -#define ABSL_ATTRIBUTE_NO_SANITIZE_UNDEFINED \ - __attribute__((no_sanitize("undefined"))) -#else -#define ABSL_ATTRIBUTE_NO_SANITIZE_UNDEFINED -#endif - -// ABSL_ATTRIBUTE_NO_SANITIZE_CFI -// -// Tells the ControlFlowIntegrity sanitizer to not instrument a given function. -// See https://clang.llvm.org/docs/ControlFlowIntegrity.html for details. -#if ABSL_HAVE_ATTRIBUTE(no_sanitize) && defined(__llvm__) -#define ABSL_ATTRIBUTE_NO_SANITIZE_CFI __attribute__((no_sanitize("cfi"))) -#else -#define ABSL_ATTRIBUTE_NO_SANITIZE_CFI -#endif - -// ABSL_ATTRIBUTE_NO_SANITIZE_SAFESTACK -// -// Tells the SafeStack to not instrument a given function. -// See https://clang.llvm.org/docs/SafeStack.html for details. -#if ABSL_HAVE_ATTRIBUTE(no_sanitize) -#define ABSL_ATTRIBUTE_NO_SANITIZE_SAFESTACK \ - __attribute__((no_sanitize("safe-stack"))) -#else -#define ABSL_ATTRIBUTE_NO_SANITIZE_SAFESTACK -#endif - -// ABSL_ATTRIBUTE_RETURNS_NONNULL -// -// Tells the compiler that a particular function never returns a null pointer. -#if ABSL_HAVE_ATTRIBUTE(returns_nonnull) -#define ABSL_ATTRIBUTE_RETURNS_NONNULL __attribute__((returns_nonnull)) -#else -#define ABSL_ATTRIBUTE_RETURNS_NONNULL -#endif - -// ABSL_HAVE_ATTRIBUTE_SECTION -// -// Indicates whether labeled sections are supported. Weak symbol support is -// a prerequisite. Labeled sections are not supported on Darwin/iOS. -#ifdef ABSL_HAVE_ATTRIBUTE_SECTION -#error ABSL_HAVE_ATTRIBUTE_SECTION cannot be directly set -#elif (ABSL_HAVE_ATTRIBUTE(section) || \ - (defined(__GNUC__) && !defined(__clang__))) && \ - !defined(__APPLE__) && ABSL_HAVE_ATTRIBUTE_WEAK -#define ABSL_HAVE_ATTRIBUTE_SECTION 1 - -// ABSL_ATTRIBUTE_SECTION -// -// Tells the compiler/linker to put a given function into a section and define -// `__start_ ## name` and `__stop_ ## name` symbols to bracket the section. -// This functionality is supported by GNU linker. Any function annotated with -// `ABSL_ATTRIBUTE_SECTION` must not be inlined, or it will be placed into -// whatever section its caller is placed into. -// -#ifndef ABSL_ATTRIBUTE_SECTION -#define ABSL_ATTRIBUTE_SECTION(name) \ - __attribute__((section(#name))) __attribute__((noinline)) -#endif - -// ABSL_ATTRIBUTE_SECTION_VARIABLE -// -// Tells the compiler/linker to put a given variable into a section and define -// `__start_ ## name` and `__stop_ ## name` symbols to bracket the section. -// This functionality is supported by GNU linker. -#ifndef ABSL_ATTRIBUTE_SECTION_VARIABLE -#ifdef _AIX -// __attribute__((section(#name))) on AIX is achieved by using the `.csect` -// pseudo op which includes an additional integer as part of its syntax -// indicating alignment. If data fall under different alignments then you might -// get a compilation error indicating a `Section type conflict`. -#define ABSL_ATTRIBUTE_SECTION_VARIABLE(name) -#else -#define ABSL_ATTRIBUTE_SECTION_VARIABLE(name) __attribute__((section(#name))) -#endif -#endif - -// ABSL_DECLARE_ATTRIBUTE_SECTION_VARS -// -// A weak section declaration to be used as a global declaration -// for ABSL_ATTRIBUTE_SECTION_START|STOP(name) to compile and link -// even without functions with ABSL_ATTRIBUTE_SECTION(name). -// ABSL_DEFINE_ATTRIBUTE_SECTION should be in the exactly one file; it's -// a no-op on ELF but not on Mach-O. -// -#ifndef ABSL_DECLARE_ATTRIBUTE_SECTION_VARS -#define ABSL_DECLARE_ATTRIBUTE_SECTION_VARS(name) \ - extern char __start_##name[] ABSL_ATTRIBUTE_WEAK; \ - extern char __stop_##name[] ABSL_ATTRIBUTE_WEAK -#endif -#ifndef ABSL_DEFINE_ATTRIBUTE_SECTION_VARS -#define ABSL_INIT_ATTRIBUTE_SECTION_VARS(name) -#define ABSL_DEFINE_ATTRIBUTE_SECTION_VARS(name) -#endif - -// ABSL_ATTRIBUTE_SECTION_START -// -// Returns `void*` pointers to start/end of a section of code with -// functions having ABSL_ATTRIBUTE_SECTION(name). -// Returns 0 if no such functions exist. -// One must ABSL_DECLARE_ATTRIBUTE_SECTION_VARS(name) for this to compile and -// link. -// -#define ABSL_ATTRIBUTE_SECTION_START(name) \ - (reinterpret_cast(__start_##name)) -#define ABSL_ATTRIBUTE_SECTION_STOP(name) \ - (reinterpret_cast(__stop_##name)) - -#else // !ABSL_HAVE_ATTRIBUTE_SECTION - -#define ABSL_HAVE_ATTRIBUTE_SECTION 0 - -// provide dummy definitions -#define ABSL_ATTRIBUTE_SECTION(name) -#define ABSL_ATTRIBUTE_SECTION_VARIABLE(name) -#define ABSL_INIT_ATTRIBUTE_SECTION_VARS(name) -#define ABSL_DEFINE_ATTRIBUTE_SECTION_VARS(name) -#define ABSL_DECLARE_ATTRIBUTE_SECTION_VARS(name) -#define ABSL_ATTRIBUTE_SECTION_START(name) (reinterpret_cast(0)) -#define ABSL_ATTRIBUTE_SECTION_STOP(name) (reinterpret_cast(0)) - -#endif // ABSL_ATTRIBUTE_SECTION - -// ABSL_ATTRIBUTE_STACK_ALIGN_FOR_OLD_LIBC -// -// Support for aligning the stack on 32-bit x86. -#if ABSL_HAVE_ATTRIBUTE(force_align_arg_pointer) || \ - (defined(__GNUC__) && !defined(__clang__)) -#if defined(__i386__) -#define ABSL_ATTRIBUTE_STACK_ALIGN_FOR_OLD_LIBC \ - __attribute__((force_align_arg_pointer)) -#define ABSL_REQUIRE_STACK_ALIGN_TRAMPOLINE (0) -#elif defined(__x86_64__) -#define ABSL_REQUIRE_STACK_ALIGN_TRAMPOLINE (1) -#define ABSL_ATTRIBUTE_STACK_ALIGN_FOR_OLD_LIBC -#else // !__i386__ && !__x86_64 -#define ABSL_REQUIRE_STACK_ALIGN_TRAMPOLINE (0) -#define ABSL_ATTRIBUTE_STACK_ALIGN_FOR_OLD_LIBC -#endif // __i386__ -#else -#define ABSL_ATTRIBUTE_STACK_ALIGN_FOR_OLD_LIBC -#define ABSL_REQUIRE_STACK_ALIGN_TRAMPOLINE (0) -#endif - -// ABSL_MUST_USE_RESULT -// -// Tells the compiler to warn about unused results. -// -// For code or headers that are assured to only build with C++17 and up, prefer -// just using the standard `[[nodiscard]]` directly over this macro. -// -// When annotating a function, it must appear as the first part of the -// declaration or definition. The compiler will warn if the return value from -// such a function is unused: -// -// ABSL_MUST_USE_RESULT Sprocket* AllocateSprocket(); -// AllocateSprocket(); // Triggers a warning. -// -// When annotating a class, it is equivalent to annotating every function which -// returns an instance. -// -// class ABSL_MUST_USE_RESULT Sprocket {}; -// Sprocket(); // Triggers a warning. -// -// Sprocket MakeSprocket(); -// MakeSprocket(); // Triggers a warning. -// -// Note that references and pointers are not instances: -// -// Sprocket* SprocketPointer(); -// SprocketPointer(); // Does *not* trigger a warning. -// -// ABSL_MUST_USE_RESULT allows using cast-to-void to suppress the unused result -// warning. For that, warn_unused_result is used only for clang but not for gcc. -// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425 -// -// Note: past advice was to place the macro after the argument list. -// -// TODO(b/176172494): Use ABSL_HAVE_CPP_ATTRIBUTE(nodiscard) when all code is -// compliant with the stricter [[nodiscard]]. -#if defined(__clang__) && ABSL_HAVE_ATTRIBUTE(warn_unused_result) -#define ABSL_MUST_USE_RESULT __attribute__((warn_unused_result)) -#else -#define ABSL_MUST_USE_RESULT -#endif - -// ABSL_ATTRIBUTE_HOT, ABSL_ATTRIBUTE_COLD -// -// Tells GCC that a function is hot or cold. GCC can use this information to -// improve static analysis, i.e. a conditional branch to a cold function -// is likely to be not-taken. -// This annotation is used for function declarations. -// -// Example: -// -// int foo() ABSL_ATTRIBUTE_HOT; -#if ABSL_HAVE_ATTRIBUTE(hot) || (defined(__GNUC__) && !defined(__clang__)) -#define ABSL_ATTRIBUTE_HOT __attribute__((hot)) -#else -#define ABSL_ATTRIBUTE_HOT -#endif - -#if ABSL_HAVE_ATTRIBUTE(cold) || (defined(__GNUC__) && !defined(__clang__)) -#define ABSL_ATTRIBUTE_COLD __attribute__((cold)) -#else -#define ABSL_ATTRIBUTE_COLD -#endif - -// ABSL_XRAY_ALWAYS_INSTRUMENT, ABSL_XRAY_NEVER_INSTRUMENT, ABSL_XRAY_LOG_ARGS -// -// We define the ABSL_XRAY_ALWAYS_INSTRUMENT and ABSL_XRAY_NEVER_INSTRUMENT -// macro used as an attribute to mark functions that must always or never be -// instrumented by XRay. Currently, this is only supported in Clang/LLVM. -// -// For reference on the LLVM XRay instrumentation, see -// http://llvm.org/docs/XRay.html. -// -// A function with the XRAY_ALWAYS_INSTRUMENT macro attribute in its declaration -// will always get the XRay instrumentation sleds. These sleds may introduce -// some binary size and runtime overhead and must be used sparingly. -// -// These attributes only take effect when the following conditions are met: -// -// * The file/target is built in at least C++11 mode, with a Clang compiler -// that supports XRay attributes. -// * The file/target is built with the -fxray-instrument flag set for the -// Clang/LLVM compiler. -// * The function is defined in the translation unit (the compiler honors the -// attribute in either the definition or the declaration, and must match). -// -// There are cases when, even when building with XRay instrumentation, users -// might want to control specifically which functions are instrumented for a -// particular build using special-case lists provided to the compiler. These -// special case lists are provided to Clang via the -// -fxray-always-instrument=... and -fxray-never-instrument=... flags. The -// attributes in source take precedence over these special-case lists. -// -// To disable the XRay attributes at build-time, users may define -// ABSL_NO_XRAY_ATTRIBUTES. Do NOT define ABSL_NO_XRAY_ATTRIBUTES on specific -// packages/targets, as this may lead to conflicting definitions of functions at -// link-time. -// -// XRay isn't currently supported on Android: -// https://github.com/android/ndk/issues/368 -#if ABSL_HAVE_CPP_ATTRIBUTE(clang::xray_always_instrument) && \ - !defined(ABSL_NO_XRAY_ATTRIBUTES) && !defined(__ANDROID__) -#define ABSL_XRAY_ALWAYS_INSTRUMENT [[clang::xray_always_instrument]] -#define ABSL_XRAY_NEVER_INSTRUMENT [[clang::xray_never_instrument]] -#if ABSL_HAVE_CPP_ATTRIBUTE(clang::xray_log_args) -#define ABSL_XRAY_LOG_ARGS(N) \ - [[clang::xray_always_instrument, clang::xray_log_args(N)]] -#else -#define ABSL_XRAY_LOG_ARGS(N) [[clang::xray_always_instrument]] -#endif -#else -#define ABSL_XRAY_ALWAYS_INSTRUMENT -#define ABSL_XRAY_NEVER_INSTRUMENT -#define ABSL_XRAY_LOG_ARGS(N) -#endif - -// ABSL_ATTRIBUTE_REINITIALIZES -// -// Indicates that a member function reinitializes the entire object to a known -// state, independent of the previous state of the object. -// -// The clang-tidy check bugprone-use-after-move allows member functions marked -// with this attribute to be called on objects that have been moved from; -// without the attribute, this would result in a use-after-move warning. -#if ABSL_HAVE_CPP_ATTRIBUTE(clang::reinitializes) -#define ABSL_ATTRIBUTE_REINITIALIZES [[clang::reinitializes]] -#else -#define ABSL_ATTRIBUTE_REINITIALIZES -#endif - -// ----------------------------------------------------------------------------- -// Variable Attributes -// ----------------------------------------------------------------------------- - -// ABSL_ATTRIBUTE_UNUSED -// -// Prevents the compiler from complaining about variables that appear unused. -// -// Deprecated: Use the standard C++17 `[[maybe_unused]]` instead. -// -// Due to differences in positioning requirements between the old, compiler -// specific __attribute__ syntax and the now standard `[[maybe_unused]]`, this -// macro does not attempt to take advantage of `[[maybe_unused]]`. -#if ABSL_HAVE_ATTRIBUTE(unused) || (defined(__GNUC__) && !defined(__clang__)) -#undef ABSL_ATTRIBUTE_UNUSED -#define ABSL_ATTRIBUTE_UNUSED __attribute__((__unused__)) -#else -#define ABSL_ATTRIBUTE_UNUSED -#endif - -// ABSL_ATTRIBUTE_INITIAL_EXEC -// -// Tells the compiler to use "initial-exec" mode for a thread-local variable. -// See http://people.redhat.com/drepper/tls.pdf for the gory details. -#if ABSL_HAVE_ATTRIBUTE(tls_model) || (defined(__GNUC__) && !defined(__clang__)) -#define ABSL_ATTRIBUTE_INITIAL_EXEC __attribute__((tls_model("initial-exec"))) -#else -#define ABSL_ATTRIBUTE_INITIAL_EXEC -#endif - -// ABSL_ATTRIBUTE_PACKED -// -// Instructs the compiler not to use natural alignment for a tagged data -// structure, but instead to reduce its alignment to 1. -// -// Therefore, DO NOT APPLY THIS ATTRIBUTE TO STRUCTS CONTAINING ATOMICS. Doing -// so can cause atomic variables to be mis-aligned and silently violate -// atomicity on x86. -// -// This attribute can either be applied to members of a structure or to a -// structure in its entirety. Applying this attribute (judiciously) to a -// structure in its entirety to optimize the memory footprint of very -// commonly-used structs is fine. Do not apply this attribute to a structure in -// its entirety if the purpose is to control the offsets of the members in the -// structure. Instead, apply this attribute only to structure members that need -// it. -// -// When applying ABSL_ATTRIBUTE_PACKED only to specific structure members the -// natural alignment of structure members not annotated is preserved. Aligned -// member accesses are faster than non-aligned member accesses even if the -// targeted microprocessor supports non-aligned accesses. -#if ABSL_HAVE_ATTRIBUTE(packed) || (defined(__GNUC__) && !defined(__clang__)) -#define ABSL_ATTRIBUTE_PACKED __attribute__((__packed__)) -#else -#define ABSL_ATTRIBUTE_PACKED -#endif - -// ABSL_ATTRIBUTE_FUNC_ALIGN -// -// Tells the compiler to align the function start at least to certain -// alignment boundary -#if ABSL_HAVE_ATTRIBUTE(aligned) || (defined(__GNUC__) && !defined(__clang__)) -#define ABSL_ATTRIBUTE_FUNC_ALIGN(bytes) __attribute__((aligned(bytes))) -#else -#define ABSL_ATTRIBUTE_FUNC_ALIGN(bytes) -#endif - -// ABSL_FALLTHROUGH_INTENDED -// -// Annotates implicit fall-through between switch labels, allowing a case to -// indicate intentional fallthrough and turn off warnings about any lack of a -// `break` statement. The ABSL_FALLTHROUGH_INTENDED macro should be followed by -// a semicolon and can be used in most places where `break` can, provided that -// no statements exist between it and the next switch label. -// -// Example: -// -// switch (x) { -// case 40: -// case 41: -// if (truth_is_out_there) { -// ++x; -// ABSL_FALLTHROUGH_INTENDED; // Use instead of/along with annotations -// // in comments -// } else { -// return x; -// } -// case 42: -// ... -// -// Notes: When supported, GCC and Clang can issue a warning on switch labels -// with unannotated fallthrough using the warning `-Wimplicit-fallthrough`. See -// clang documentation on language extensions for details: -// https://clang.llvm.org/docs/AttributeReference.html#fallthrough-clang-fallthrough -// -// When used with unsupported compilers, the ABSL_FALLTHROUGH_INTENDED macro has -// no effect on diagnostics. In any case this macro has no effect on runtime -// behavior and performance of code. - -#ifdef ABSL_FALLTHROUGH_INTENDED -#error "ABSL_FALLTHROUGH_INTENDED should not be defined." -#elif ABSL_HAVE_CPP_ATTRIBUTE(fallthrough) -#define ABSL_FALLTHROUGH_INTENDED [[fallthrough]] -#elif ABSL_HAVE_CPP_ATTRIBUTE(clang::fallthrough) -#define ABSL_FALLTHROUGH_INTENDED [[clang::fallthrough]] -#elif ABSL_HAVE_CPP_ATTRIBUTE(gnu::fallthrough) -#define ABSL_FALLTHROUGH_INTENDED [[gnu::fallthrough]] -#else -#define ABSL_FALLTHROUGH_INTENDED \ - do { \ - } while (0) -#endif - -// ABSL_DEPRECATED() -// -// Marks a deprecated class, struct, enum, function, method and variable -// declarations. The macro argument is used as a custom diagnostic message (e.g. -// suggestion of a better alternative). -// -// For code or headers that are assured to only build with C++14 and up, prefer -// just using the standard `[[deprecated("message")]]` directly over this macro. -// -// Examples: -// -// class ABSL_DEPRECATED("Use Bar instead") Foo {...}; -// -// ABSL_DEPRECATED("Use Baz() instead") void Bar() {...} -// -// template -// ABSL_DEPRECATED("Use DoThat() instead") -// void DoThis(); -// -// enum FooEnum { -// kBar ABSL_DEPRECATED("Use kBaz instead"), -// }; -// -// Every usage of a deprecated entity will trigger a warning when compiled with -// GCC/Clang's `-Wdeprecated-declarations` option. Google's production toolchain -// turns this warning off by default, instead relying on clang-tidy to report -// new uses of deprecated code. -#if ABSL_HAVE_ATTRIBUTE(deprecated) -#define ABSL_DEPRECATED(message) __attribute__((deprecated(message))) -#else -#define ABSL_DEPRECATED(message) -#endif - -// When deprecating Abseil code, it is sometimes necessary to turn off the -// warning within Abseil, until the deprecated code is actually removed. The -// deprecated code can be surrounded with these directives to achieve that -// result. -// -// class ABSL_DEPRECATED("Use Bar instead") Foo; -// -// ABSL_INTERNAL_DISABLE_DEPRECATED_DECLARATION_WARNING -// Baz ComputeBazFromFoo(Foo f); -// ABSL_INTERNAL_RESTORE_DEPRECATED_DECLARATION_WARNING -#if defined(__GNUC__) || defined(__clang__) -// Clang also supports these GCC pragmas. -#define ABSL_INTERNAL_DISABLE_DEPRECATED_DECLARATION_WARNING \ - _Pragma("GCC diagnostic push") \ - _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") -#define ABSL_INTERNAL_RESTORE_DEPRECATED_DECLARATION_WARNING \ - _Pragma("GCC diagnostic pop") -#elif defined(_MSC_VER) -#define ABSL_INTERNAL_DISABLE_DEPRECATED_DECLARATION_WARNING \ - _Pragma("warning(push)") _Pragma("warning(disable: 4996)") -#define ABSL_INTERNAL_RESTORE_DEPRECATED_DECLARATION_WARNING \ - _Pragma("warning(pop)") -#else -#define ABSL_INTERNAL_DISABLE_DEPRECATED_DECLARATION_WARNING -#define ABSL_INTERNAL_RESTORE_DEPRECATED_DECLARATION_WARNING -#endif // defined(__GNUC__) || defined(__clang__) - -// ABSL_CONST_INIT -// -// A variable declaration annotated with the `ABSL_CONST_INIT` attribute will -// not compile (on supported platforms) unless the variable has a constant -// initializer. This is useful for variables with static and thread storage -// duration, because it guarantees that they will not suffer from the so-called -// "static init order fiasco". -// -// This attribute must be placed on the initializing declaration of the -// variable. Some compilers will give a -Wmissing-constinit warning when this -// attribute is placed on some other declaration but missing from the -// initializing declaration. -// -// In some cases (notably with thread_local variables), `ABSL_CONST_INIT` can -// also be used in a non-initializing declaration to tell the compiler that a -// variable is already initialized, reducing overhead that would otherwise be -// incurred by a hidden guard variable. Thus annotating all declarations with -// this attribute is recommended to potentially enhance optimization. -// -// Example: -// -// class MyClass { -// public: -// ABSL_CONST_INIT static MyType my_var; -// }; -// -// ABSL_CONST_INIT MyType MyClass::my_var = MakeMyType(...); -// -// For code or headers that are assured to only build with C++20 and up, prefer -// just using the standard `constinit` keyword directly over this macro. -// -// Note that this attribute is redundant if the variable is declared constexpr. -#if defined(__cpp_constinit) && __cpp_constinit >= 201907L -#define ABSL_CONST_INIT constinit -#elif ABSL_HAVE_CPP_ATTRIBUTE(clang::require_constant_initialization) -#define ABSL_CONST_INIT [[clang::require_constant_initialization]] -#else -#define ABSL_CONST_INIT -#endif - -// ABSL_REQUIRE_EXPLICIT_INIT -// -// ABSL_REQUIRE_EXPLICIT_INIT is placed *after* the data members of an aggregate -// type to indicate that the annotated member must be explicitly initialized by -// the user whenever the aggregate is constructed. For example: -// -// struct Coord { -// int x ABSL_REQUIRE_EXPLICIT_INIT; -// int y ABSL_REQUIRE_EXPLICIT_INIT; -// }; -// Coord coord = {1}; // warning: field 'y' is not explicitly initialized -// -// Note that usage on C arrays is not supported in C++. -// Use a struct (such as std::array) to wrap the array member instead. -// -// Avoid applying this attribute to the members of non-aggregate types. -// The behavior within non-aggregates is unspecified and subject to change. -// -// Do NOT attempt to suppress or demote the error generated by this attribute. -// Just like with a missing function argument, it is a hard error by design. -// -// See the upstream documentation for more details: -// https://clang.llvm.org/docs/AttributeReference.html#require-explicit-initialization -#ifdef __cplusplus -#if ABSL_HAVE_CPP_ATTRIBUTE(clang::require_explicit_initialization) -// clang-format off -#define ABSL_REQUIRE_EXPLICIT_INIT \ - [[clang::require_explicit_initialization]] = \ - AbslInternal_YouForgotToExplicitlyInitializeAField::v -#else -#define ABSL_REQUIRE_EXPLICIT_INIT \ - = AbslInternal_YouForgotToExplicitlyInitializeAField::v -#endif -// clang-format on -#else -// clang-format off -#if ABSL_HAVE_ATTRIBUTE(require_explicit_initialization) -#define ABSL_REQUIRE_EXPLICIT_INIT \ - __attribute__((require_explicit_initialization)) -#else -#define ABSL_REQUIRE_EXPLICIT_INIT \ - /* No portable fallback for C is available */ -#endif -// clang-format on -#endif - -#ifdef __cplusplus -struct AbslInternal_YouForgotToExplicitlyInitializeAField { - // A portable version of [[clang::require_explicit_initialization]] that - // never builds, as a last resort for all toolchains. - // The error messages are poor, so we don't rely on this unless we have to. - template -#if !defined(SWIG) - constexpr -#endif - operator T() const /* NOLINT */ { - const void *volatile deliberately_volatile_ptr = nullptr; - // Infinite loop to prevent constexpr compilation - for (;;) { - // This assignment ensures the 'this' pointer is not optimized away, so - // that linking always fails. - deliberately_volatile_ptr = this; // Deliberately not constexpr - (void)deliberately_volatile_ptr; - } - } - // This is deliberately left undefined to prevent linking - static AbslInternal_YouForgotToExplicitlyInitializeAField v; -}; -#endif - -// ABSL_ATTRIBUTE_PURE_FUNCTION -// -// ABSL_ATTRIBUTE_PURE_FUNCTION is used to annotate declarations of "pure" -// functions. A function is pure if its return value is only a function of its -// arguments. The pure attribute prohibits a function from modifying the state -// of the program that is observable by means other than inspecting the -// function's return value. Declaring such functions with the pure attribute -// allows the compiler to avoid emitting some calls in repeated invocations of -// the function with the same argument values. -// -// Example: -// -// ABSL_ATTRIBUTE_PURE_FUNCTION std::string FormatTime(Time t); -#if ABSL_HAVE_CPP_ATTRIBUTE(gnu::pure) -#define ABSL_ATTRIBUTE_PURE_FUNCTION [[gnu::pure]] -#elif ABSL_HAVE_ATTRIBUTE(pure) -#define ABSL_ATTRIBUTE_PURE_FUNCTION __attribute__((pure)) -#else -// If the attribute isn't defined, we'll fallback to ABSL_MUST_USE_RESULT since -// pure functions are useless if its return is ignored. -#define ABSL_ATTRIBUTE_PURE_FUNCTION ABSL_MUST_USE_RESULT -#endif - -// ABSL_ATTRIBUTE_CONST_FUNCTION -// -// ABSL_ATTRIBUTE_CONST_FUNCTION is used to annotate declarations of "const" -// functions. A const function is similar to a pure function, with one -// exception: Pure functions may return value that depend on a non-volatile -// object that isn't provided as a function argument, while the const function -// is guaranteed to return the same result given the same arguments. -// -// Example: -// -// ABSL_ATTRIBUTE_CONST_FUNCTION int64_t ToInt64Milliseconds(Duration d); -#if defined(_MSC_VER) && !defined(__clang__) -// Put the MSVC case first since MSVC seems to parse const as a C++ keyword. -#define ABSL_ATTRIBUTE_CONST_FUNCTION ABSL_ATTRIBUTE_PURE_FUNCTION -#elif ABSL_HAVE_CPP_ATTRIBUTE(gnu::const) -#define ABSL_ATTRIBUTE_CONST_FUNCTION [[gnu::const]] -#elif ABSL_HAVE_ATTRIBUTE(const) -#define ABSL_ATTRIBUTE_CONST_FUNCTION __attribute__((const)) -#else -// Since const functions are more restrictive pure function, we'll fallback to a -// pure function if the const attribute is not handled. -#define ABSL_ATTRIBUTE_CONST_FUNCTION ABSL_ATTRIBUTE_PURE_FUNCTION -#endif - -// ABSL_ATTRIBUTE_LIFETIME_BOUND indicates that a resource owned by a function -// parameter or implicit object parameter is retained by the return value of the -// annotated function (or, for a parameter of a constructor, in the value of the -// constructed object). This attribute causes warnings to be produced if a -// temporary object does not live long enough. -// -// When applied to a reference parameter, the referenced object is assumed to be -// retained by the return value of the function. When applied to a non-reference -// parameter (for example, a pointer or a class type), all temporaries -// referenced by the parameter are assumed to be retained by the return value of -// the function. -// -// See also the upstream documentation: -// https://clang.llvm.org/docs/AttributeReference.html#lifetimebound -// https://learn.microsoft.com/en-us/cpp/code-quality/c26816?view=msvc-170 -#if ABSL_HAVE_CPP_ATTRIBUTE(clang::lifetimebound) -#define ABSL_ATTRIBUTE_LIFETIME_BOUND [[clang::lifetimebound]] -#elif ABSL_HAVE_CPP_ATTRIBUTE(msvc::lifetimebound) -#define ABSL_ATTRIBUTE_LIFETIME_BOUND [[msvc::lifetimebound]] -#elif ABSL_HAVE_ATTRIBUTE(lifetimebound) -#define ABSL_ATTRIBUTE_LIFETIME_BOUND __attribute__((lifetimebound)) -#else -#define ABSL_ATTRIBUTE_LIFETIME_BOUND -#endif - -// Internal attribute; name and documentation TBD. -// -// See the upstream documentation: -// https://clang.llvm.org/docs/AttributeReference.html#lifetime_capture_by -#if ABSL_HAVE_CPP_ATTRIBUTE(clang::lifetime_capture_by) -#define ABSL_INTERNAL_ATTRIBUTE_CAPTURED_BY(Owner) \ - [[clang::lifetime_capture_by(Owner)]] -#else -#define ABSL_INTERNAL_ATTRIBUTE_CAPTURED_BY(Owner) -#endif - -// ABSL_ATTRIBUTE_VIEW indicates that a type is solely a "view" of data that it -// points to, similarly to a span, string_view, or other non-owning reference -// type. -// This enables diagnosing certain lifetime issues similar to those enabled by -// ABSL_ATTRIBUTE_LIFETIME_BOUND, such as: -// -// struct ABSL_ATTRIBUTE_VIEW StringView { -// template -// StringView(const R&); -// }; -// -// StringView f(std::string s) { -// return s; // warning: address of stack memory returned -// } -// -// We disable this on Clang versions < 13 because of the following -// false-positive: -// -// absl::string_view f(absl::optional sv) { return *sv; } -// -// See the following links for details: -// https://reviews.llvm.org/D64448 -// https://lists.llvm.org/pipermail/cfe-dev/2018-November/060355.html -#if ABSL_HAVE_CPP_ATTRIBUTE(gsl::Pointer) && \ - (!defined(__clang_major__) || __clang_major__ >= 13) -#define ABSL_ATTRIBUTE_VIEW [[gsl::Pointer]] -#else -#define ABSL_ATTRIBUTE_VIEW -#endif - -// ABSL_ATTRIBUTE_OWNER indicates that a type is a container, smart pointer, or -// similar class that owns all the data that it points to. -// This enables diagnosing certain lifetime issues similar to those enabled by -// ABSL_ATTRIBUTE_LIFETIME_BOUND, such as: -// -// struct ABSL_ATTRIBUTE_VIEW StringView { -// template -// StringView(const R&); -// }; -// -// struct ABSL_ATTRIBUTE_OWNER String {}; -// -// StringView f(String s) { -// return s; // warning: address of stack memory returned -// } -// -// We disable this on Clang versions < 13 because of the following -// false-positive: -// -// absl::string_view f(absl::optional sv) { return *sv; } -// -// See the following links for details: -// https://reviews.llvm.org/D64448 -// https://lists.llvm.org/pipermail/cfe-dev/2018-November/060355.html -#if ABSL_HAVE_CPP_ATTRIBUTE(gsl::Owner) && \ - (!defined(__clang_major__) || __clang_major__ >= 13) -#define ABSL_ATTRIBUTE_OWNER [[gsl::Owner]] -#else -#define ABSL_ATTRIBUTE_OWNER -#endif - -// ABSL_ATTRIBUTE_TRIVIAL_ABI -// Indicates that a type is "trivially relocatable" -- meaning it can be -// relocated without invoking the constructor/destructor, using a form of move -// elision. -// -// From a memory safety point of view, putting aside destructor ordering, it's -// safe to apply ABSL_ATTRIBUTE_TRIVIAL_ABI if an object's location -// can change over the course of its lifetime: if a constructor can be run one -// place, and then the object magically teleports to another place where some -// methods are run, and then the object teleports to yet another place where it -// is destroyed. This is notably not true for self-referential types, where the -// move-constructor must keep the self-reference up to date. If the type changed -// location without invoking the move constructor, it would have a dangling -// self-reference. -// -// The use of this teleporting machinery means that the number of paired -// move/destroy operations can change, and so it is a bad idea to apply this to -// a type meant to count the number of moves. -// -// Warning: applying this can, rarely, break callers. Objects passed by value -// will be destroyed at the end of the call, instead of the end of the -// full-expression containing the call. In addition, it changes the ABI -// of functions accepting this type by value (e.g. to pass in registers). -// -// See also the upstream documentation: -// https://clang.llvm.org/docs/AttributeReference.html#trivial-abi -// -// b/321691395 - This is currently disabled in open-source builds since -// compiler support differs. If system libraries compiled with GCC are mixed -// with libraries compiled with Clang, types will have different ideas about -// their ABI, leading to hard to debug crashes. -#define ABSL_ATTRIBUTE_TRIVIAL_ABI - -// ABSL_ATTRIBUTE_NO_UNIQUE_ADDRESS -// -// Indicates a data member can be optimized to occupy no space (if it is empty) -// and/or its tail padding can be used for other members. -// -// For code that is assured to only build with C++20 or later, prefer using -// the standard attribute `[[no_unique_address]]` directly instead of this -// macro. -// -// https://devblogs.microsoft.com/cppblog/msvc-cpp20-and-the-std-cpp20-switch/#c20-no_unique_address -// Current versions of MSVC have disabled `[[no_unique_address]]` since it -// breaks ABI compatibility, but offers `[[msvc::no_unique_address]]` for -// situations when it can be assured that it is desired. Since Abseil does not -// claim ABI compatibility in mixed builds, we can offer it unconditionally. -#if defined(_MSC_VER) && _MSC_VER >= 1929 -#define ABSL_ATTRIBUTE_NO_UNIQUE_ADDRESS [[msvc::no_unique_address]] -#elif ABSL_HAVE_CPP_ATTRIBUTE(no_unique_address) -#define ABSL_ATTRIBUTE_NO_UNIQUE_ADDRESS [[no_unique_address]] -#else -#define ABSL_ATTRIBUTE_NO_UNIQUE_ADDRESS -#endif - -// ABSL_ATTRIBUTE_UNINITIALIZED -// -// GCC and Clang support a flag `-ftrivial-auto-var-init=