1 // Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT.
2 
3 #ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_GPU_VULKAN_MEMORY_CONFIG_PROTO_H_
4 #define PERFETTO_PROTOS_PROTOS_PERFETTO_CONFIG_GPU_VULKAN_MEMORY_CONFIG_PROTO_H_
5 
6 #include <stddef.h>
7 #include <stdint.h>
8 
9 #include "perfetto/protozero/field_writer.h"
10 #include "perfetto/protozero/message.h"
11 #include "perfetto/protozero/packed_repeated_fields.h"
12 #include "perfetto/protozero/proto_decoder.h"
13 #include "perfetto/protozero/proto_utils.h"
14 
15 
16 namespace perfetto {
17 namespace protos {
18 namespace pbzero {
19 
20 class VulkanMemoryConfig_Decoder : public ::protozero::TypedProtoDecoder</*MAX_FIELD_ID=*/2, /*HAS_NONPACKED_REPEATED_FIELDS=*/false> {
21  public:
VulkanMemoryConfig_Decoder(const uint8_t * data,size_t len)22   VulkanMemoryConfig_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {}
VulkanMemoryConfig_Decoder(const std::string & raw)23   explicit VulkanMemoryConfig_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast<const uint8_t*>(raw.data()), raw.size()) {}
VulkanMemoryConfig_Decoder(const::protozero::ConstBytes & raw)24   explicit VulkanMemoryConfig_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {}
has_track_driver_memory_usage()25   bool has_track_driver_memory_usage() const { return at<1>().valid(); }
track_driver_memory_usage()26   bool track_driver_memory_usage() const { return at<1>().as_bool(); }
has_track_device_memory_usage()27   bool has_track_device_memory_usage() const { return at<2>().valid(); }
track_device_memory_usage()28   bool track_device_memory_usage() const { return at<2>().as_bool(); }
29 };
30 
31 class VulkanMemoryConfig : public ::protozero::Message {
32  public:
33   using Decoder = VulkanMemoryConfig_Decoder;
34   enum : int32_t {
35     kTrackDriverMemoryUsageFieldNumber = 1,
36     kTrackDeviceMemoryUsageFieldNumber = 2,
37   };
GetName()38   static constexpr const char* GetName() { return ".perfetto.protos.VulkanMemoryConfig"; }
39 
40 
41   using FieldMetadata_TrackDriverMemoryUsage =
42     ::protozero::proto_utils::FieldMetadata<
43       1,
44       ::protozero::proto_utils::RepetitionType::kNotRepeated,
45       ::protozero::proto_utils::ProtoSchemaType::kBool,
46       bool,
47       VulkanMemoryConfig>;
48 
49   static constexpr FieldMetadata_TrackDriverMemoryUsage kTrackDriverMemoryUsage{};
set_track_driver_memory_usage(bool value)50   void set_track_driver_memory_usage(bool value) {
51     static constexpr uint32_t field_id = FieldMetadata_TrackDriverMemoryUsage::kFieldId;
52     // Call the appropriate protozero::Message::Append(field_id, ...)
53     // method based on the type of the field.
54     ::protozero::internal::FieldWriter<
55       ::protozero::proto_utils::ProtoSchemaType::kBool>
56         ::Append(*this, field_id, value);
57   }
58 
59   using FieldMetadata_TrackDeviceMemoryUsage =
60     ::protozero::proto_utils::FieldMetadata<
61       2,
62       ::protozero::proto_utils::RepetitionType::kNotRepeated,
63       ::protozero::proto_utils::ProtoSchemaType::kBool,
64       bool,
65       VulkanMemoryConfig>;
66 
67   static constexpr FieldMetadata_TrackDeviceMemoryUsage kTrackDeviceMemoryUsage{};
set_track_device_memory_usage(bool value)68   void set_track_device_memory_usage(bool value) {
69     static constexpr uint32_t field_id = FieldMetadata_TrackDeviceMemoryUsage::kFieldId;
70     // Call the appropriate protozero::Message::Append(field_id, ...)
71     // method based on the type of the field.
72     ::protozero::internal::FieldWriter<
73       ::protozero::proto_utils::ProtoSchemaType::kBool>
74         ::Append(*this, field_id, value);
75   }
76 };
77 
78 } // Namespace.
79 } // Namespace.
80 } // Namespace.
81 #endif  // Include guard.
82