//
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// @generated by protoc-gen-es v2.2.2 with parameter "target=ts"
// @generated from file protos/perfetto/trace/gpu/vulkan_api_event.proto (package perfetto.protos, syntax proto2)
/* eslint-disable */

import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1";
import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1";
import type { Message } from "@bufbuild/protobuf";

/**
 * Describes the file protos/perfetto/trace/gpu/vulkan_api_event.proto.
 */
export const file_protos_perfetto_trace_gpu_vulkan_api_event: GenFile = /*@__PURE__*/
  fileDesc("CjBwcm90b3MvcGVyZmV0dG8vdHJhY2UvZ3B1L3Z1bGthbl9hcGlfZXZlbnQucHJvdG8SD3BlcmZldHRvLnByb3RvcyK7AwoOVnVsa2FuQXBpRXZlbnQSXAoadmtfZGVidWdfdXRpbHNfb2JqZWN0X25hbWUYASABKAsyNi5wZXJmZXR0by5wcm90b3MuVnVsa2FuQXBpRXZlbnQuVmtEZWJ1Z1V0aWxzT2JqZWN0TmFtZUgAEkgKD3ZrX3F1ZXVlX3N1Ym1pdBgCIAEoCzItLnBlcmZldHRvLnByb3Rvcy5WdWxrYW5BcGlFdmVudC5Wa1F1ZXVlU3VibWl0SAAacgoWVmtEZWJ1Z1V0aWxzT2JqZWN0TmFtZRILCgNwaWQYASABKA0SEQoJdmtfZGV2aWNlGAIgASgEEhMKC29iamVjdF90eXBlGAMgASgFEg4KBm9iamVjdBgEIAEoBBITCgtvYmplY3RfbmFtZRgFIAEoCRqDAQoNVmtRdWV1ZVN1Ym1pdBITCgtkdXJhdGlvbl9ucxgBIAEoBBILCgNwaWQYAiABKA0SCwoDdGlkGAMgASgNEhAKCHZrX3F1ZXVlGAQgASgEEhoKEnZrX2NvbW1hbmRfYnVmZmVycxgFIAMoBBIVCg1zdWJtaXNzaW9uX2lkGAYgASgNQgcKBWV2ZW50");

/**
 * Message for recording the Vulkan call.
 *
 * @generated from message perfetto.protos.VulkanApiEvent
 */
export type VulkanApiEvent = Message<"perfetto.protos.VulkanApiEvent"> & {
  /**
   * @generated from oneof perfetto.protos.VulkanApiEvent.event
   */
  event: {
    /**
     * @generated from field: perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName vk_debug_utils_object_name = 1;
     */
    value: VulkanApiEvent_VkDebugUtilsObjectName;
    case: "vkDebugUtilsObjectName";
  } | {
    /**
     * @generated from field: perfetto.protos.VulkanApiEvent.VkQueueSubmit vk_queue_submit = 2;
     */
    value: VulkanApiEvent_VkQueueSubmit;
    case: "vkQueueSubmit";
  } | { case: undefined; value?: undefined };
};

/**
 * Describes the message perfetto.protos.VulkanApiEvent.
 * Use `create(VulkanApiEventSchema)` to create a new message.
 */
export const VulkanApiEventSchema: GenMessage<VulkanApiEvent> = /*@__PURE__*/
  messageDesc(file_protos_perfetto_trace_gpu_vulkan_api_event, 0);

/**
 * For recording vkSetDebugUtilsObjectNameEXT and
 * vkDebugMarkerSetObjectNameEXT
 *
 * @generated from message perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName
 */
export type VulkanApiEvent_VkDebugUtilsObjectName = Message<"perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName"> & {
  /**
   * @generated from field: optional uint32 pid = 1;
   */
  pid: number;

  /**
   * @generated from field: optional uint64 vk_device = 2;
   */
  vkDevice: bigint;

  /**
   * VkObjectType.  Value must match
   * https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/VkObjectType.html.
   *
   * @generated from field: optional int32 object_type = 3;
   */
  objectType: number;

  /**
   * @generated from field: optional uint64 object = 4;
   */
  object: bigint;

  /**
   * @generated from field: optional string object_name = 5;
   */
  objectName: string;
};

/**
 * Describes the message perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName.
 * Use `create(VulkanApiEvent_VkDebugUtilsObjectNameSchema)` to create a new message.
 */
export const VulkanApiEvent_VkDebugUtilsObjectNameSchema: GenMessage<VulkanApiEvent_VkDebugUtilsObjectName> = /*@__PURE__*/
  messageDesc(file_protos_perfetto_trace_gpu_vulkan_api_event, 0, 0);

/**
 * For recording vkQueueSubmit call.
 *
 * @generated from message perfetto.protos.VulkanApiEvent.VkQueueSubmit
 */
export type VulkanApiEvent_VkQueueSubmit = Message<"perfetto.protos.VulkanApiEvent.VkQueueSubmit"> & {
  /**
   * @generated from field: optional uint64 duration_ns = 1;
   */
  durationNs: bigint;

  /**
   * @generated from field: optional uint32 pid = 2;
   */
  pid: number;

  /**
   * @generated from field: optional uint32 tid = 3;
   */
  tid: number;

  /**
   * @generated from field: optional uint64 vk_queue = 4;
   */
  vkQueue: bigint;

  /**
   * @generated from field: repeated uint64 vk_command_buffers = 5;
   */
  vkCommandBuffers: bigint[];

  /**
   * Submission ID.  An identifier unique to each vkQueueSubmit call.  This
   * submission_id must match GpuRenderStageEvent.submission_id if the
   * GpuRenderStageEvent is created due to this vkQueueSubmit.
   *
   * @generated from field: optional uint32 submission_id = 6;
   */
  submissionId: number;
};

/**
 * Describes the message perfetto.protos.VulkanApiEvent.VkQueueSubmit.
 * Use `create(VulkanApiEvent_VkQueueSubmitSchema)` to create a new message.
 */
export const VulkanApiEvent_VkQueueSubmitSchema: GenMessage<VulkanApiEvent_VkQueueSubmit> = /*@__PURE__*/
  messageDesc(file_protos_perfetto_trace_gpu_vulkan_api_event, 0, 1);

