1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: protos/perfetto/trace/gpu/vulkan_api_event.proto
3 
4 #include "protos/perfetto/trace/gpu/vulkan_api_event.pb.h"
5 
6 #include <algorithm>
7 #include <cstdint>
8 
9 #include <google/protobuf/io/coded_stream.h>
10 #include <google/protobuf/extension_set.h>
11 #include <google/protobuf/wire_format_lite.h>
12 #include <google/protobuf/io/zero_copy_stream_impl_lite.h>
13 // @@protoc_insertion_point(includes)
14 #include <google/protobuf/port_def.inc>
15 
16 PROTOBUF_PRAGMA_INIT_SEG
17 
18 namespace _pb = ::PROTOBUF_NAMESPACE_ID;
19 namespace _pbi = _pb::internal;
20 
21 namespace perfetto {
22 namespace protos {
VulkanApiEvent_VkDebugUtilsObjectName(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR VulkanApiEvent_VkDebugUtilsObjectName::VulkanApiEvent_VkDebugUtilsObjectName(
24     ::_pbi::ConstantInitialized): _impl_{
25     /*decltype(_impl_._has_bits_)*/{}
26   , /*decltype(_impl_._cached_size_)*/{}
27   , /*decltype(_impl_.object_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
28   , /*decltype(_impl_.vk_device_)*/::uint64_t{0u}
29   , /*decltype(_impl_.pid_)*/0u
30   , /*decltype(_impl_.object_type_)*/0
31   , /*decltype(_impl_.object_)*/::uint64_t{0u}} {}
32 struct VulkanApiEvent_VkDebugUtilsObjectNameDefaultTypeInternal {
VulkanApiEvent_VkDebugUtilsObjectNameDefaultTypeInternalperfetto::protos::VulkanApiEvent_VkDebugUtilsObjectNameDefaultTypeInternal33   PROTOBUF_CONSTEXPR VulkanApiEvent_VkDebugUtilsObjectNameDefaultTypeInternal()
34       : _instance(::_pbi::ConstantInitialized{}) {}
~VulkanApiEvent_VkDebugUtilsObjectNameDefaultTypeInternalperfetto::protos::VulkanApiEvent_VkDebugUtilsObjectNameDefaultTypeInternal35   ~VulkanApiEvent_VkDebugUtilsObjectNameDefaultTypeInternal() {}
36   union {  // NOLINT(misc-non-private-member-variables-in-classes)
37     VulkanApiEvent_VkDebugUtilsObjectName _instance;
38   };
39 };
40 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 VulkanApiEvent_VkDebugUtilsObjectNameDefaultTypeInternal _VulkanApiEvent_VkDebugUtilsObjectName_default_instance_;
VulkanApiEvent_VkQueueSubmit(::_pbi::ConstantInitialized)41 PROTOBUF_CONSTEXPR VulkanApiEvent_VkQueueSubmit::VulkanApiEvent_VkQueueSubmit(
42     ::_pbi::ConstantInitialized): _impl_{
43     /*decltype(_impl_._has_bits_)*/{}
44   , /*decltype(_impl_._cached_size_)*/{}
45   , /*decltype(_impl_.vk_command_buffers_)*/{}
46   , /*decltype(_impl_.duration_ns_)*/::uint64_t{0u}
47   , /*decltype(_impl_.pid_)*/0u
48   , /*decltype(_impl_.tid_)*/0u
49   , /*decltype(_impl_.vk_queue_)*/::uint64_t{0u}
50   , /*decltype(_impl_.submission_id_)*/0u} {}
51 struct VulkanApiEvent_VkQueueSubmitDefaultTypeInternal {
VulkanApiEvent_VkQueueSubmitDefaultTypeInternalperfetto::protos::VulkanApiEvent_VkQueueSubmitDefaultTypeInternal52   PROTOBUF_CONSTEXPR VulkanApiEvent_VkQueueSubmitDefaultTypeInternal()
53       : _instance(::_pbi::ConstantInitialized{}) {}
~VulkanApiEvent_VkQueueSubmitDefaultTypeInternalperfetto::protos::VulkanApiEvent_VkQueueSubmitDefaultTypeInternal54   ~VulkanApiEvent_VkQueueSubmitDefaultTypeInternal() {}
55   union {  // NOLINT(misc-non-private-member-variables-in-classes)
56     VulkanApiEvent_VkQueueSubmit _instance;
57   };
58 };
59 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 VulkanApiEvent_VkQueueSubmitDefaultTypeInternal _VulkanApiEvent_VkQueueSubmit_default_instance_;
VulkanApiEvent(::_pbi::ConstantInitialized)60 PROTOBUF_CONSTEXPR VulkanApiEvent::VulkanApiEvent(
61     ::_pbi::ConstantInitialized): _impl_{
62     /*decltype(_impl_.event_)*/{}
63   , /*decltype(_impl_._cached_size_)*/{}
64   , /*decltype(_impl_._oneof_case_)*/{}} {}
65 struct VulkanApiEventDefaultTypeInternal {
VulkanApiEventDefaultTypeInternalperfetto::protos::VulkanApiEventDefaultTypeInternal66   PROTOBUF_CONSTEXPR VulkanApiEventDefaultTypeInternal()
67       : _instance(::_pbi::ConstantInitialized{}) {}
~VulkanApiEventDefaultTypeInternalperfetto::protos::VulkanApiEventDefaultTypeInternal68   ~VulkanApiEventDefaultTypeInternal() {}
69   union {  // NOLINT(misc-non-private-member-variables-in-classes)
70     VulkanApiEvent _instance;
71   };
72 };
73 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 VulkanApiEventDefaultTypeInternal _VulkanApiEvent_default_instance_;
74 }  // namespace protos
75 }  // namespace perfetto
76 namespace perfetto {
77 namespace protos {
78 
79 // ===================================================================
80 
81 class VulkanApiEvent_VkDebugUtilsObjectName::_Internal {
82  public:
83   using HasBits = decltype(std::declval<VulkanApiEvent_VkDebugUtilsObjectName>()._impl_._has_bits_);
set_has_pid(HasBits * has_bits)84   static void set_has_pid(HasBits* has_bits) {
85     (*has_bits)[0] |= 4u;
86   }
set_has_vk_device(HasBits * has_bits)87   static void set_has_vk_device(HasBits* has_bits) {
88     (*has_bits)[0] |= 2u;
89   }
set_has_object_type(HasBits * has_bits)90   static void set_has_object_type(HasBits* has_bits) {
91     (*has_bits)[0] |= 8u;
92   }
set_has_object(HasBits * has_bits)93   static void set_has_object(HasBits* has_bits) {
94     (*has_bits)[0] |= 16u;
95   }
set_has_object_name(HasBits * has_bits)96   static void set_has_object_name(HasBits* has_bits) {
97     (*has_bits)[0] |= 1u;
98   }
99 };
100 
VulkanApiEvent_VkDebugUtilsObjectName(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)101 VulkanApiEvent_VkDebugUtilsObjectName::VulkanApiEvent_VkDebugUtilsObjectName(::PROTOBUF_NAMESPACE_ID::Arena* arena,
102                          bool is_message_owned)
103   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
104   SharedCtor(arena, is_message_owned);
105   // @@protoc_insertion_point(arena_constructor:perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName)
106 }
VulkanApiEvent_VkDebugUtilsObjectName(const VulkanApiEvent_VkDebugUtilsObjectName & from)107 VulkanApiEvent_VkDebugUtilsObjectName::VulkanApiEvent_VkDebugUtilsObjectName(const VulkanApiEvent_VkDebugUtilsObjectName& from)
108   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
109   VulkanApiEvent_VkDebugUtilsObjectName* const _this = this; (void)_this;
110   new (&_impl_) Impl_{
111       decltype(_impl_._has_bits_){from._impl_._has_bits_}
112     , /*decltype(_impl_._cached_size_)*/{}
113     , decltype(_impl_.object_name_){}
114     , decltype(_impl_.vk_device_){}
115     , decltype(_impl_.pid_){}
116     , decltype(_impl_.object_type_){}
117     , decltype(_impl_.object_){}};
118 
119   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
120   _impl_.object_name_.InitDefault();
121   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
122     _impl_.object_name_.Set("", GetArenaForAllocation());
123   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
124   if (from._internal_has_object_name()) {
125     _this->_impl_.object_name_.Set(from._internal_object_name(),
126       _this->GetArenaForAllocation());
127   }
128   ::memcpy(&_impl_.vk_device_, &from._impl_.vk_device_,
129     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.object_) -
130     reinterpret_cast<char*>(&_impl_.vk_device_)) + sizeof(_impl_.object_));
131   // @@protoc_insertion_point(copy_constructor:perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName)
132 }
133 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)134 inline void VulkanApiEvent_VkDebugUtilsObjectName::SharedCtor(
135     ::_pb::Arena* arena, bool is_message_owned) {
136   (void)arena;
137   (void)is_message_owned;
138   new (&_impl_) Impl_{
139       decltype(_impl_._has_bits_){}
140     , /*decltype(_impl_._cached_size_)*/{}
141     , decltype(_impl_.object_name_){}
142     , decltype(_impl_.vk_device_){::uint64_t{0u}}
143     , decltype(_impl_.pid_){0u}
144     , decltype(_impl_.object_type_){0}
145     , decltype(_impl_.object_){::uint64_t{0u}}
146   };
147   _impl_.object_name_.InitDefault();
148   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
149     _impl_.object_name_.Set("", GetArenaForAllocation());
150   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
151 }
152 
~VulkanApiEvent_VkDebugUtilsObjectName()153 VulkanApiEvent_VkDebugUtilsObjectName::~VulkanApiEvent_VkDebugUtilsObjectName() {
154   // @@protoc_insertion_point(destructor:perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName)
155   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
156   (void)arena;
157     return;
158   }
159   SharedDtor();
160 }
161 
SharedDtor()162 inline void VulkanApiEvent_VkDebugUtilsObjectName::SharedDtor() {
163   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
164   _impl_.object_name_.Destroy();
165 }
166 
SetCachedSize(int size) const167 void VulkanApiEvent_VkDebugUtilsObjectName::SetCachedSize(int size) const {
168   _impl_._cached_size_.Set(size);
169 }
170 
Clear()171 void VulkanApiEvent_VkDebugUtilsObjectName::Clear() {
172 // @@protoc_insertion_point(message_clear_start:perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName)
173   ::uint32_t cached_has_bits = 0;
174   // Prevent compiler warnings about cached_has_bits being unused
175   (void) cached_has_bits;
176 
177   cached_has_bits = _impl_._has_bits_[0];
178   if (cached_has_bits & 0x00000001u) {
179     _impl_.object_name_.ClearNonDefaultToEmpty();
180   }
181   if (cached_has_bits & 0x0000001eu) {
182     ::memset(&_impl_.vk_device_, 0, static_cast<size_t>(
183         reinterpret_cast<char*>(&_impl_.object_) -
184         reinterpret_cast<char*>(&_impl_.vk_device_)) + sizeof(_impl_.object_));
185   }
186   _impl_._has_bits_.Clear();
187   _internal_metadata_.Clear<std::string>();
188 }
189 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)190 const char* VulkanApiEvent_VkDebugUtilsObjectName::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
191 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
192   _Internal::HasBits has_bits{};
193   while (!ctx->Done(&ptr)) {
194     ::uint32_t tag;
195     ptr = ::_pbi::ReadTag(ptr, &tag);
196     switch (tag >> 3) {
197       // optional uint32 pid = 1;
198       case 1:
199         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
200           _Internal::set_has_pid(&has_bits);
201           _impl_.pid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
202           CHK_(ptr);
203         } else {
204           goto handle_unusual;
205         }
206         continue;
207       // optional uint64 vk_device = 2;
208       case 2:
209         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
210           _Internal::set_has_vk_device(&has_bits);
211           _impl_.vk_device_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
212           CHK_(ptr);
213         } else {
214           goto handle_unusual;
215         }
216         continue;
217       // optional int32 object_type = 3;
218       case 3:
219         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
220           _Internal::set_has_object_type(&has_bits);
221           _impl_.object_type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
222           CHK_(ptr);
223         } else {
224           goto handle_unusual;
225         }
226         continue;
227       // optional uint64 object = 4;
228       case 4:
229         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
230           _Internal::set_has_object(&has_bits);
231           _impl_.object_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
232           CHK_(ptr);
233         } else {
234           goto handle_unusual;
235         }
236         continue;
237       // optional string object_name = 5;
238       case 5:
239         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
240           auto str = _internal_mutable_object_name();
241           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
242           CHK_(ptr);
243         } else {
244           goto handle_unusual;
245         }
246         continue;
247       default:
248         goto handle_unusual;
249     }  // switch
250   handle_unusual:
251     if ((tag == 0) || ((tag & 7) == 4)) {
252       CHK_(ptr);
253       ctx->SetLastTag(tag);
254       goto message_done;
255     }
256     ptr = UnknownFieldParse(
257         tag,
258         _internal_metadata_.mutable_unknown_fields<std::string>(),
259         ptr, ctx);
260     CHK_(ptr != nullptr);
261   }  // while
262 message_done:
263   _impl_._has_bits_.Or(has_bits);
264   return ptr;
265 failure:
266   ptr = nullptr;
267   goto message_done;
268 #undef CHK_
269 }
270 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const271 ::uint8_t* VulkanApiEvent_VkDebugUtilsObjectName::_InternalSerialize(
272     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
273   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName)
274   ::uint32_t cached_has_bits = 0;
275   (void) cached_has_bits;
276 
277   cached_has_bits = _impl_._has_bits_[0];
278   // optional uint32 pid = 1;
279   if (cached_has_bits & 0x00000004u) {
280     target = stream->EnsureSpace(target);
281     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_pid(), target);
282   }
283 
284   // optional uint64 vk_device = 2;
285   if (cached_has_bits & 0x00000002u) {
286     target = stream->EnsureSpace(target);
287     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_vk_device(), target);
288   }
289 
290   // optional int32 object_type = 3;
291   if (cached_has_bits & 0x00000008u) {
292     target = stream->EnsureSpace(target);
293     target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_object_type(), target);
294   }
295 
296   // optional uint64 object = 4;
297   if (cached_has_bits & 0x00000010u) {
298     target = stream->EnsureSpace(target);
299     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(4, this->_internal_object(), target);
300   }
301 
302   // optional string object_name = 5;
303   if (cached_has_bits & 0x00000001u) {
304     target = stream->WriteStringMaybeAliased(
305         5, this->_internal_object_name(), target);
306   }
307 
308   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
309     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
310         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
311   }
312   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName)
313   return target;
314 }
315 
ByteSizeLong() const316 size_t VulkanApiEvent_VkDebugUtilsObjectName::ByteSizeLong() const {
317 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName)
318   size_t total_size = 0;
319 
320   ::uint32_t cached_has_bits = 0;
321   // Prevent compiler warnings about cached_has_bits being unused
322   (void) cached_has_bits;
323 
324   cached_has_bits = _impl_._has_bits_[0];
325   if (cached_has_bits & 0x0000001fu) {
326     // optional string object_name = 5;
327     if (cached_has_bits & 0x00000001u) {
328       total_size += 1 +
329         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
330           this->_internal_object_name());
331     }
332 
333     // optional uint64 vk_device = 2;
334     if (cached_has_bits & 0x00000002u) {
335       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_vk_device());
336     }
337 
338     // optional uint32 pid = 1;
339     if (cached_has_bits & 0x00000004u) {
340       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_pid());
341     }
342 
343     // optional int32 object_type = 3;
344     if (cached_has_bits & 0x00000008u) {
345       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_object_type());
346     }
347 
348     // optional uint64 object = 4;
349     if (cached_has_bits & 0x00000010u) {
350       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_object());
351     }
352 
353   }
354   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
355     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
356   }
357   int cached_size = ::_pbi::ToCachedSize(total_size);
358   SetCachedSize(cached_size);
359   return total_size;
360 }
361 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)362 void VulkanApiEvent_VkDebugUtilsObjectName::CheckTypeAndMergeFrom(
363     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
364   MergeFrom(*::_pbi::DownCast<const VulkanApiEvent_VkDebugUtilsObjectName*>(
365       &from));
366 }
367 
MergeFrom(const VulkanApiEvent_VkDebugUtilsObjectName & from)368 void VulkanApiEvent_VkDebugUtilsObjectName::MergeFrom(const VulkanApiEvent_VkDebugUtilsObjectName& from) {
369   VulkanApiEvent_VkDebugUtilsObjectName* const _this = this;
370   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName)
371   GOOGLE_DCHECK_NE(&from, _this);
372   ::uint32_t cached_has_bits = 0;
373   (void) cached_has_bits;
374 
375   cached_has_bits = from._impl_._has_bits_[0];
376   if (cached_has_bits & 0x0000001fu) {
377     if (cached_has_bits & 0x00000001u) {
378       _this->_internal_set_object_name(from._internal_object_name());
379     }
380     if (cached_has_bits & 0x00000002u) {
381       _this->_impl_.vk_device_ = from._impl_.vk_device_;
382     }
383     if (cached_has_bits & 0x00000004u) {
384       _this->_impl_.pid_ = from._impl_.pid_;
385     }
386     if (cached_has_bits & 0x00000008u) {
387       _this->_impl_.object_type_ = from._impl_.object_type_;
388     }
389     if (cached_has_bits & 0x00000010u) {
390       _this->_impl_.object_ = from._impl_.object_;
391     }
392     _this->_impl_._has_bits_[0] |= cached_has_bits;
393   }
394   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
395 }
396 
CopyFrom(const VulkanApiEvent_VkDebugUtilsObjectName & from)397 void VulkanApiEvent_VkDebugUtilsObjectName::CopyFrom(const VulkanApiEvent_VkDebugUtilsObjectName& from) {
398 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName)
399   if (&from == this) return;
400   Clear();
401   MergeFrom(from);
402 }
403 
IsInitialized() const404 bool VulkanApiEvent_VkDebugUtilsObjectName::IsInitialized() const {
405   return true;
406 }
407 
InternalSwap(VulkanApiEvent_VkDebugUtilsObjectName * other)408 void VulkanApiEvent_VkDebugUtilsObjectName::InternalSwap(VulkanApiEvent_VkDebugUtilsObjectName* other) {
409   using std::swap;
410   auto* lhs_arena = GetArenaForAllocation();
411   auto* rhs_arena = other->GetArenaForAllocation();
412   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
413   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
414   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
415       &_impl_.object_name_, lhs_arena,
416       &other->_impl_.object_name_, rhs_arena
417   );
418   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
419       PROTOBUF_FIELD_OFFSET(VulkanApiEvent_VkDebugUtilsObjectName, _impl_.object_)
420       + sizeof(VulkanApiEvent_VkDebugUtilsObjectName::_impl_.object_)  // NOLINT
421       - PROTOBUF_FIELD_OFFSET(VulkanApiEvent_VkDebugUtilsObjectName, _impl_.vk_device_)>(
422           reinterpret_cast<char*>(&_impl_.vk_device_),
423           reinterpret_cast<char*>(&other->_impl_.vk_device_));
424 }
425 
GetTypeName() const426 std::string VulkanApiEvent_VkDebugUtilsObjectName::GetTypeName() const {
427   return "perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName";
428 }
429 
430 
431 // ===================================================================
432 
433 class VulkanApiEvent_VkQueueSubmit::_Internal {
434  public:
435   using HasBits = decltype(std::declval<VulkanApiEvent_VkQueueSubmit>()._impl_._has_bits_);
set_has_duration_ns(HasBits * has_bits)436   static void set_has_duration_ns(HasBits* has_bits) {
437     (*has_bits)[0] |= 1u;
438   }
set_has_pid(HasBits * has_bits)439   static void set_has_pid(HasBits* has_bits) {
440     (*has_bits)[0] |= 2u;
441   }
set_has_tid(HasBits * has_bits)442   static void set_has_tid(HasBits* has_bits) {
443     (*has_bits)[0] |= 4u;
444   }
set_has_vk_queue(HasBits * has_bits)445   static void set_has_vk_queue(HasBits* has_bits) {
446     (*has_bits)[0] |= 8u;
447   }
set_has_submission_id(HasBits * has_bits)448   static void set_has_submission_id(HasBits* has_bits) {
449     (*has_bits)[0] |= 16u;
450   }
451 };
452 
VulkanApiEvent_VkQueueSubmit(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)453 VulkanApiEvent_VkQueueSubmit::VulkanApiEvent_VkQueueSubmit(::PROTOBUF_NAMESPACE_ID::Arena* arena,
454                          bool is_message_owned)
455   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
456   SharedCtor(arena, is_message_owned);
457   // @@protoc_insertion_point(arena_constructor:perfetto.protos.VulkanApiEvent.VkQueueSubmit)
458 }
VulkanApiEvent_VkQueueSubmit(const VulkanApiEvent_VkQueueSubmit & from)459 VulkanApiEvent_VkQueueSubmit::VulkanApiEvent_VkQueueSubmit(const VulkanApiEvent_VkQueueSubmit& from)
460   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
461   VulkanApiEvent_VkQueueSubmit* const _this = this; (void)_this;
462   new (&_impl_) Impl_{
463       decltype(_impl_._has_bits_){from._impl_._has_bits_}
464     , /*decltype(_impl_._cached_size_)*/{}
465     , decltype(_impl_.vk_command_buffers_){from._impl_.vk_command_buffers_}
466     , decltype(_impl_.duration_ns_){}
467     , decltype(_impl_.pid_){}
468     , decltype(_impl_.tid_){}
469     , decltype(_impl_.vk_queue_){}
470     , decltype(_impl_.submission_id_){}};
471 
472   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
473   ::memcpy(&_impl_.duration_ns_, &from._impl_.duration_ns_,
474     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.submission_id_) -
475     reinterpret_cast<char*>(&_impl_.duration_ns_)) + sizeof(_impl_.submission_id_));
476   // @@protoc_insertion_point(copy_constructor:perfetto.protos.VulkanApiEvent.VkQueueSubmit)
477 }
478 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)479 inline void VulkanApiEvent_VkQueueSubmit::SharedCtor(
480     ::_pb::Arena* arena, bool is_message_owned) {
481   (void)arena;
482   (void)is_message_owned;
483   new (&_impl_) Impl_{
484       decltype(_impl_._has_bits_){}
485     , /*decltype(_impl_._cached_size_)*/{}
486     , decltype(_impl_.vk_command_buffers_){arena}
487     , decltype(_impl_.duration_ns_){::uint64_t{0u}}
488     , decltype(_impl_.pid_){0u}
489     , decltype(_impl_.tid_){0u}
490     , decltype(_impl_.vk_queue_){::uint64_t{0u}}
491     , decltype(_impl_.submission_id_){0u}
492   };
493 }
494 
~VulkanApiEvent_VkQueueSubmit()495 VulkanApiEvent_VkQueueSubmit::~VulkanApiEvent_VkQueueSubmit() {
496   // @@protoc_insertion_point(destructor:perfetto.protos.VulkanApiEvent.VkQueueSubmit)
497   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
498   (void)arena;
499     return;
500   }
501   SharedDtor();
502 }
503 
SharedDtor()504 inline void VulkanApiEvent_VkQueueSubmit::SharedDtor() {
505   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
506   _impl_.vk_command_buffers_.~RepeatedField();
507 }
508 
SetCachedSize(int size) const509 void VulkanApiEvent_VkQueueSubmit::SetCachedSize(int size) const {
510   _impl_._cached_size_.Set(size);
511 }
512 
Clear()513 void VulkanApiEvent_VkQueueSubmit::Clear() {
514 // @@protoc_insertion_point(message_clear_start:perfetto.protos.VulkanApiEvent.VkQueueSubmit)
515   ::uint32_t cached_has_bits = 0;
516   // Prevent compiler warnings about cached_has_bits being unused
517   (void) cached_has_bits;
518 
519   _impl_.vk_command_buffers_.Clear();
520   cached_has_bits = _impl_._has_bits_[0];
521   if (cached_has_bits & 0x0000001fu) {
522     ::memset(&_impl_.duration_ns_, 0, static_cast<size_t>(
523         reinterpret_cast<char*>(&_impl_.submission_id_) -
524         reinterpret_cast<char*>(&_impl_.duration_ns_)) + sizeof(_impl_.submission_id_));
525   }
526   _impl_._has_bits_.Clear();
527   _internal_metadata_.Clear<std::string>();
528 }
529 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)530 const char* VulkanApiEvent_VkQueueSubmit::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
531 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
532   _Internal::HasBits has_bits{};
533   while (!ctx->Done(&ptr)) {
534     ::uint32_t tag;
535     ptr = ::_pbi::ReadTag(ptr, &tag);
536     switch (tag >> 3) {
537       // optional uint64 duration_ns = 1;
538       case 1:
539         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
540           _Internal::set_has_duration_ns(&has_bits);
541           _impl_.duration_ns_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
542           CHK_(ptr);
543         } else {
544           goto handle_unusual;
545         }
546         continue;
547       // optional uint32 pid = 2;
548       case 2:
549         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
550           _Internal::set_has_pid(&has_bits);
551           _impl_.pid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
552           CHK_(ptr);
553         } else {
554           goto handle_unusual;
555         }
556         continue;
557       // optional uint32 tid = 3;
558       case 3:
559         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
560           _Internal::set_has_tid(&has_bits);
561           _impl_.tid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
562           CHK_(ptr);
563         } else {
564           goto handle_unusual;
565         }
566         continue;
567       // optional uint64 vk_queue = 4;
568       case 4:
569         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
570           _Internal::set_has_vk_queue(&has_bits);
571           _impl_.vk_queue_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
572           CHK_(ptr);
573         } else {
574           goto handle_unusual;
575         }
576         continue;
577       // repeated uint64 vk_command_buffers = 5;
578       case 5:
579         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
580           ptr -= 1;
581           do {
582             ptr += 1;
583             _internal_add_vk_command_buffers(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
584             CHK_(ptr);
585             if (!ctx->DataAvailable(ptr)) break;
586           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<40>(ptr));
587         } else if (static_cast<::uint8_t>(tag) == 42) {
588           ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt64Parser(_internal_mutable_vk_command_buffers(), ptr, ctx);
589           CHK_(ptr);
590         } else {
591           goto handle_unusual;
592         }
593         continue;
594       // optional uint32 submission_id = 6;
595       case 6:
596         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
597           _Internal::set_has_submission_id(&has_bits);
598           _impl_.submission_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
599           CHK_(ptr);
600         } else {
601           goto handle_unusual;
602         }
603         continue;
604       default:
605         goto handle_unusual;
606     }  // switch
607   handle_unusual:
608     if ((tag == 0) || ((tag & 7) == 4)) {
609       CHK_(ptr);
610       ctx->SetLastTag(tag);
611       goto message_done;
612     }
613     ptr = UnknownFieldParse(
614         tag,
615         _internal_metadata_.mutable_unknown_fields<std::string>(),
616         ptr, ctx);
617     CHK_(ptr != nullptr);
618   }  // while
619 message_done:
620   _impl_._has_bits_.Or(has_bits);
621   return ptr;
622 failure:
623   ptr = nullptr;
624   goto message_done;
625 #undef CHK_
626 }
627 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const628 ::uint8_t* VulkanApiEvent_VkQueueSubmit::_InternalSerialize(
629     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
630   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.VulkanApiEvent.VkQueueSubmit)
631   ::uint32_t cached_has_bits = 0;
632   (void) cached_has_bits;
633 
634   cached_has_bits = _impl_._has_bits_[0];
635   // optional uint64 duration_ns = 1;
636   if (cached_has_bits & 0x00000001u) {
637     target = stream->EnsureSpace(target);
638     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_duration_ns(), target);
639   }
640 
641   // optional uint32 pid = 2;
642   if (cached_has_bits & 0x00000002u) {
643     target = stream->EnsureSpace(target);
644     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_pid(), target);
645   }
646 
647   // optional uint32 tid = 3;
648   if (cached_has_bits & 0x00000004u) {
649     target = stream->EnsureSpace(target);
650     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_tid(), target);
651   }
652 
653   // optional uint64 vk_queue = 4;
654   if (cached_has_bits & 0x00000008u) {
655     target = stream->EnsureSpace(target);
656     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(4, this->_internal_vk_queue(), target);
657   }
658 
659   // repeated uint64 vk_command_buffers = 5;
660   for (int i = 0, n = this->_internal_vk_command_buffers_size(); i < n; i++) {
661     target = stream->EnsureSpace(target);
662     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(5, this->_internal_vk_command_buffers(i), target);
663   }
664 
665   // optional uint32 submission_id = 6;
666   if (cached_has_bits & 0x00000010u) {
667     target = stream->EnsureSpace(target);
668     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(6, this->_internal_submission_id(), target);
669   }
670 
671   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
672     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
673         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
674   }
675   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.VulkanApiEvent.VkQueueSubmit)
676   return target;
677 }
678 
ByteSizeLong() const679 size_t VulkanApiEvent_VkQueueSubmit::ByteSizeLong() const {
680 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.VulkanApiEvent.VkQueueSubmit)
681   size_t total_size = 0;
682 
683   ::uint32_t cached_has_bits = 0;
684   // Prevent compiler warnings about cached_has_bits being unused
685   (void) cached_has_bits;
686 
687   // repeated uint64 vk_command_buffers = 5;
688   {
689     size_t data_size = ::_pbi::WireFormatLite::
690       UInt64Size(this->_impl_.vk_command_buffers_);
691     total_size += 1 *
692                   ::_pbi::FromIntSize(this->_internal_vk_command_buffers_size());
693     total_size += data_size;
694   }
695 
696   cached_has_bits = _impl_._has_bits_[0];
697   if (cached_has_bits & 0x0000001fu) {
698     // optional uint64 duration_ns = 1;
699     if (cached_has_bits & 0x00000001u) {
700       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_duration_ns());
701     }
702 
703     // optional uint32 pid = 2;
704     if (cached_has_bits & 0x00000002u) {
705       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_pid());
706     }
707 
708     // optional uint32 tid = 3;
709     if (cached_has_bits & 0x00000004u) {
710       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_tid());
711     }
712 
713     // optional uint64 vk_queue = 4;
714     if (cached_has_bits & 0x00000008u) {
715       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_vk_queue());
716     }
717 
718     // optional uint32 submission_id = 6;
719     if (cached_has_bits & 0x00000010u) {
720       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_submission_id());
721     }
722 
723   }
724   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
725     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
726   }
727   int cached_size = ::_pbi::ToCachedSize(total_size);
728   SetCachedSize(cached_size);
729   return total_size;
730 }
731 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)732 void VulkanApiEvent_VkQueueSubmit::CheckTypeAndMergeFrom(
733     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
734   MergeFrom(*::_pbi::DownCast<const VulkanApiEvent_VkQueueSubmit*>(
735       &from));
736 }
737 
MergeFrom(const VulkanApiEvent_VkQueueSubmit & from)738 void VulkanApiEvent_VkQueueSubmit::MergeFrom(const VulkanApiEvent_VkQueueSubmit& from) {
739   VulkanApiEvent_VkQueueSubmit* const _this = this;
740   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.VulkanApiEvent.VkQueueSubmit)
741   GOOGLE_DCHECK_NE(&from, _this);
742   ::uint32_t cached_has_bits = 0;
743   (void) cached_has_bits;
744 
745   _this->_impl_.vk_command_buffers_.MergeFrom(from._impl_.vk_command_buffers_);
746   cached_has_bits = from._impl_._has_bits_[0];
747   if (cached_has_bits & 0x0000001fu) {
748     if (cached_has_bits & 0x00000001u) {
749       _this->_impl_.duration_ns_ = from._impl_.duration_ns_;
750     }
751     if (cached_has_bits & 0x00000002u) {
752       _this->_impl_.pid_ = from._impl_.pid_;
753     }
754     if (cached_has_bits & 0x00000004u) {
755       _this->_impl_.tid_ = from._impl_.tid_;
756     }
757     if (cached_has_bits & 0x00000008u) {
758       _this->_impl_.vk_queue_ = from._impl_.vk_queue_;
759     }
760     if (cached_has_bits & 0x00000010u) {
761       _this->_impl_.submission_id_ = from._impl_.submission_id_;
762     }
763     _this->_impl_._has_bits_[0] |= cached_has_bits;
764   }
765   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
766 }
767 
CopyFrom(const VulkanApiEvent_VkQueueSubmit & from)768 void VulkanApiEvent_VkQueueSubmit::CopyFrom(const VulkanApiEvent_VkQueueSubmit& from) {
769 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.VulkanApiEvent.VkQueueSubmit)
770   if (&from == this) return;
771   Clear();
772   MergeFrom(from);
773 }
774 
IsInitialized() const775 bool VulkanApiEvent_VkQueueSubmit::IsInitialized() const {
776   return true;
777 }
778 
InternalSwap(VulkanApiEvent_VkQueueSubmit * other)779 void VulkanApiEvent_VkQueueSubmit::InternalSwap(VulkanApiEvent_VkQueueSubmit* other) {
780   using std::swap;
781   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
782   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
783   _impl_.vk_command_buffers_.InternalSwap(&other->_impl_.vk_command_buffers_);
784   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
785       PROTOBUF_FIELD_OFFSET(VulkanApiEvent_VkQueueSubmit, _impl_.submission_id_)
786       + sizeof(VulkanApiEvent_VkQueueSubmit::_impl_.submission_id_)  // NOLINT
787       - PROTOBUF_FIELD_OFFSET(VulkanApiEvent_VkQueueSubmit, _impl_.duration_ns_)>(
788           reinterpret_cast<char*>(&_impl_.duration_ns_),
789           reinterpret_cast<char*>(&other->_impl_.duration_ns_));
790 }
791 
GetTypeName() const792 std::string VulkanApiEvent_VkQueueSubmit::GetTypeName() const {
793   return "perfetto.protos.VulkanApiEvent.VkQueueSubmit";
794 }
795 
796 
797 // ===================================================================
798 
799 class VulkanApiEvent::_Internal {
800  public:
801   static const ::perfetto::protos::VulkanApiEvent_VkDebugUtilsObjectName& vk_debug_utils_object_name(const VulkanApiEvent* msg);
802   static const ::perfetto::protos::VulkanApiEvent_VkQueueSubmit& vk_queue_submit(const VulkanApiEvent* msg);
803 };
804 
805 const ::perfetto::protos::VulkanApiEvent_VkDebugUtilsObjectName&
vk_debug_utils_object_name(const VulkanApiEvent * msg)806 VulkanApiEvent::_Internal::vk_debug_utils_object_name(const VulkanApiEvent* msg) {
807   return *msg->_impl_.event_.vk_debug_utils_object_name_;
808 }
809 const ::perfetto::protos::VulkanApiEvent_VkQueueSubmit&
vk_queue_submit(const VulkanApiEvent * msg)810 VulkanApiEvent::_Internal::vk_queue_submit(const VulkanApiEvent* msg) {
811   return *msg->_impl_.event_.vk_queue_submit_;
812 }
set_allocated_vk_debug_utils_object_name(::perfetto::protos::VulkanApiEvent_VkDebugUtilsObjectName * vk_debug_utils_object_name)813 void VulkanApiEvent::set_allocated_vk_debug_utils_object_name(::perfetto::protos::VulkanApiEvent_VkDebugUtilsObjectName* vk_debug_utils_object_name) {
814   ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
815   clear_event();
816   if (vk_debug_utils_object_name) {
817     ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
818       ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(vk_debug_utils_object_name);
819     if (message_arena != submessage_arena) {
820       vk_debug_utils_object_name = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
821           message_arena, vk_debug_utils_object_name, submessage_arena);
822     }
823     set_has_vk_debug_utils_object_name();
824     _impl_.event_.vk_debug_utils_object_name_ = vk_debug_utils_object_name;
825   }
826   // @@protoc_insertion_point(field_set_allocated:perfetto.protos.VulkanApiEvent.vk_debug_utils_object_name)
827 }
set_allocated_vk_queue_submit(::perfetto::protos::VulkanApiEvent_VkQueueSubmit * vk_queue_submit)828 void VulkanApiEvent::set_allocated_vk_queue_submit(::perfetto::protos::VulkanApiEvent_VkQueueSubmit* vk_queue_submit) {
829   ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
830   clear_event();
831   if (vk_queue_submit) {
832     ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
833       ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(vk_queue_submit);
834     if (message_arena != submessage_arena) {
835       vk_queue_submit = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
836           message_arena, vk_queue_submit, submessage_arena);
837     }
838     set_has_vk_queue_submit();
839     _impl_.event_.vk_queue_submit_ = vk_queue_submit;
840   }
841   // @@protoc_insertion_point(field_set_allocated:perfetto.protos.VulkanApiEvent.vk_queue_submit)
842 }
VulkanApiEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)843 VulkanApiEvent::VulkanApiEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena,
844                          bool is_message_owned)
845   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
846   SharedCtor(arena, is_message_owned);
847   // @@protoc_insertion_point(arena_constructor:perfetto.protos.VulkanApiEvent)
848 }
VulkanApiEvent(const VulkanApiEvent & from)849 VulkanApiEvent::VulkanApiEvent(const VulkanApiEvent& from)
850   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
851   VulkanApiEvent* const _this = this; (void)_this;
852   new (&_impl_) Impl_{
853       decltype(_impl_.event_){}
854     , /*decltype(_impl_._cached_size_)*/{}
855     , /*decltype(_impl_._oneof_case_)*/{}};
856 
857   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
858   clear_has_event();
859   switch (from.event_case()) {
860     case kVkDebugUtilsObjectName: {
861       _this->_internal_mutable_vk_debug_utils_object_name()->::perfetto::protos::VulkanApiEvent_VkDebugUtilsObjectName::MergeFrom(
862           from._internal_vk_debug_utils_object_name());
863       break;
864     }
865     case kVkQueueSubmit: {
866       _this->_internal_mutable_vk_queue_submit()->::perfetto::protos::VulkanApiEvent_VkQueueSubmit::MergeFrom(
867           from._internal_vk_queue_submit());
868       break;
869     }
870     case EVENT_NOT_SET: {
871       break;
872     }
873   }
874   // @@protoc_insertion_point(copy_constructor:perfetto.protos.VulkanApiEvent)
875 }
876 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)877 inline void VulkanApiEvent::SharedCtor(
878     ::_pb::Arena* arena, bool is_message_owned) {
879   (void)arena;
880   (void)is_message_owned;
881   new (&_impl_) Impl_{
882       decltype(_impl_.event_){}
883     , /*decltype(_impl_._cached_size_)*/{}
884     , /*decltype(_impl_._oneof_case_)*/{}
885   };
886   clear_has_event();
887 }
888 
~VulkanApiEvent()889 VulkanApiEvent::~VulkanApiEvent() {
890   // @@protoc_insertion_point(destructor:perfetto.protos.VulkanApiEvent)
891   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
892   (void)arena;
893     return;
894   }
895   SharedDtor();
896 }
897 
SharedDtor()898 inline void VulkanApiEvent::SharedDtor() {
899   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
900   if (has_event()) {
901     clear_event();
902   }
903 }
904 
SetCachedSize(int size) const905 void VulkanApiEvent::SetCachedSize(int size) const {
906   _impl_._cached_size_.Set(size);
907 }
908 
clear_event()909 void VulkanApiEvent::clear_event() {
910 // @@protoc_insertion_point(one_of_clear_start:perfetto.protos.VulkanApiEvent)
911   switch (event_case()) {
912     case kVkDebugUtilsObjectName: {
913       if (GetArenaForAllocation() == nullptr) {
914         delete _impl_.event_.vk_debug_utils_object_name_;
915       }
916       break;
917     }
918     case kVkQueueSubmit: {
919       if (GetArenaForAllocation() == nullptr) {
920         delete _impl_.event_.vk_queue_submit_;
921       }
922       break;
923     }
924     case EVENT_NOT_SET: {
925       break;
926     }
927   }
928   _impl_._oneof_case_[0] = EVENT_NOT_SET;
929 }
930 
931 
Clear()932 void VulkanApiEvent::Clear() {
933 // @@protoc_insertion_point(message_clear_start:perfetto.protos.VulkanApiEvent)
934   ::uint32_t cached_has_bits = 0;
935   // Prevent compiler warnings about cached_has_bits being unused
936   (void) cached_has_bits;
937 
938   clear_event();
939   _internal_metadata_.Clear<std::string>();
940 }
941 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)942 const char* VulkanApiEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
943 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
944   while (!ctx->Done(&ptr)) {
945     ::uint32_t tag;
946     ptr = ::_pbi::ReadTag(ptr, &tag);
947     switch (tag >> 3) {
948       // .perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName vk_debug_utils_object_name = 1;
949       case 1:
950         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
951           ptr = ctx->ParseMessage(_internal_mutable_vk_debug_utils_object_name(), ptr);
952           CHK_(ptr);
953         } else {
954           goto handle_unusual;
955         }
956         continue;
957       // .perfetto.protos.VulkanApiEvent.VkQueueSubmit vk_queue_submit = 2;
958       case 2:
959         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
960           ptr = ctx->ParseMessage(_internal_mutable_vk_queue_submit(), ptr);
961           CHK_(ptr);
962         } else {
963           goto handle_unusual;
964         }
965         continue;
966       default:
967         goto handle_unusual;
968     }  // switch
969   handle_unusual:
970     if ((tag == 0) || ((tag & 7) == 4)) {
971       CHK_(ptr);
972       ctx->SetLastTag(tag);
973       goto message_done;
974     }
975     ptr = UnknownFieldParse(
976         tag,
977         _internal_metadata_.mutable_unknown_fields<std::string>(),
978         ptr, ctx);
979     CHK_(ptr != nullptr);
980   }  // while
981 message_done:
982   return ptr;
983 failure:
984   ptr = nullptr;
985   goto message_done;
986 #undef CHK_
987 }
988 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const989 ::uint8_t* VulkanApiEvent::_InternalSerialize(
990     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
991   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.VulkanApiEvent)
992   ::uint32_t cached_has_bits = 0;
993   (void) cached_has_bits;
994 
995   switch (event_case()) {
996     case kVkDebugUtilsObjectName: {
997       target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
998         InternalWriteMessage(1, _Internal::vk_debug_utils_object_name(this),
999           _Internal::vk_debug_utils_object_name(this).GetCachedSize(), target, stream);
1000       break;
1001     }
1002     case kVkQueueSubmit: {
1003       target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1004         InternalWriteMessage(2, _Internal::vk_queue_submit(this),
1005           _Internal::vk_queue_submit(this).GetCachedSize(), target, stream);
1006       break;
1007     }
1008     default: ;
1009   }
1010   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1011     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1012         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1013   }
1014   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.VulkanApiEvent)
1015   return target;
1016 }
1017 
ByteSizeLong() const1018 size_t VulkanApiEvent::ByteSizeLong() const {
1019 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.VulkanApiEvent)
1020   size_t total_size = 0;
1021 
1022   switch (event_case()) {
1023     // .perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName vk_debug_utils_object_name = 1;
1024     case kVkDebugUtilsObjectName: {
1025       total_size += 1 +
1026         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1027           *_impl_.event_.vk_debug_utils_object_name_);
1028       break;
1029     }
1030     // .perfetto.protos.VulkanApiEvent.VkQueueSubmit vk_queue_submit = 2;
1031     case kVkQueueSubmit: {
1032       total_size += 1 +
1033         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1034           *_impl_.event_.vk_queue_submit_);
1035       break;
1036     }
1037     case EVENT_NOT_SET: {
1038       break;
1039     }
1040   }
1041   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1042     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1043   }
1044   int cached_size = ::_pbi::ToCachedSize(total_size);
1045   SetCachedSize(cached_size);
1046   return total_size;
1047 }
1048 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1049 void VulkanApiEvent::CheckTypeAndMergeFrom(
1050     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1051   MergeFrom(*::_pbi::DownCast<const VulkanApiEvent*>(
1052       &from));
1053 }
1054 
MergeFrom(const VulkanApiEvent & from)1055 void VulkanApiEvent::MergeFrom(const VulkanApiEvent& from) {
1056   VulkanApiEvent* const _this = this;
1057   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.VulkanApiEvent)
1058   GOOGLE_DCHECK_NE(&from, _this);
1059   ::uint32_t cached_has_bits = 0;
1060   (void) cached_has_bits;
1061 
1062   switch (from.event_case()) {
1063     case kVkDebugUtilsObjectName: {
1064       _this->_internal_mutable_vk_debug_utils_object_name()->::perfetto::protos::VulkanApiEvent_VkDebugUtilsObjectName::MergeFrom(
1065           from._internal_vk_debug_utils_object_name());
1066       break;
1067     }
1068     case kVkQueueSubmit: {
1069       _this->_internal_mutable_vk_queue_submit()->::perfetto::protos::VulkanApiEvent_VkQueueSubmit::MergeFrom(
1070           from._internal_vk_queue_submit());
1071       break;
1072     }
1073     case EVENT_NOT_SET: {
1074       break;
1075     }
1076   }
1077   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1078 }
1079 
CopyFrom(const VulkanApiEvent & from)1080 void VulkanApiEvent::CopyFrom(const VulkanApiEvent& from) {
1081 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.VulkanApiEvent)
1082   if (&from == this) return;
1083   Clear();
1084   MergeFrom(from);
1085 }
1086 
IsInitialized() const1087 bool VulkanApiEvent::IsInitialized() const {
1088   return true;
1089 }
1090 
InternalSwap(VulkanApiEvent * other)1091 void VulkanApiEvent::InternalSwap(VulkanApiEvent* other) {
1092   using std::swap;
1093   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1094   swap(_impl_.event_, other->_impl_.event_);
1095   swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
1096 }
1097 
GetTypeName() const1098 std::string VulkanApiEvent::GetTypeName() const {
1099   return "perfetto.protos.VulkanApiEvent";
1100 }
1101 
1102 
1103 // @@protoc_insertion_point(namespace_scope)
1104 }  // namespace protos
1105 }  // namespace perfetto
1106 PROTOBUF_NAMESPACE_OPEN
1107 template<> PROTOBUF_NOINLINE ::perfetto::protos::VulkanApiEvent_VkDebugUtilsObjectName*
CreateMaybeMessage(Arena * arena)1108 Arena::CreateMaybeMessage< ::perfetto::protos::VulkanApiEvent_VkDebugUtilsObjectName >(Arena* arena) {
1109   return Arena::CreateMessageInternal< ::perfetto::protos::VulkanApiEvent_VkDebugUtilsObjectName >(arena);
1110 }
1111 template<> PROTOBUF_NOINLINE ::perfetto::protos::VulkanApiEvent_VkQueueSubmit*
CreateMaybeMessage(Arena * arena)1112 Arena::CreateMaybeMessage< ::perfetto::protos::VulkanApiEvent_VkQueueSubmit >(Arena* arena) {
1113   return Arena::CreateMessageInternal< ::perfetto::protos::VulkanApiEvent_VkQueueSubmit >(arena);
1114 }
1115 template<> PROTOBUF_NOINLINE ::perfetto::protos::VulkanApiEvent*
CreateMaybeMessage(Arena * arena)1116 Arena::CreateMaybeMessage< ::perfetto::protos::VulkanApiEvent >(Arena* arena) {
1117   return Arena::CreateMessageInternal< ::perfetto::protos::VulkanApiEvent >(arena);
1118 }
1119 PROTOBUF_NAMESPACE_CLOSE
1120 
1121 // @@protoc_insertion_point(global_scope)
1122 #include <google/protobuf/port_undef.inc>
1123