// Copyright (C) 2025 Rivos Inc.
//
// 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.

// Autogenerated by the ProtoZero Rust compiler plugin.
// Invoked by contrib/rust-sdk/tools/gen_rust_protos
// DO NOT EDIT.

use crate::pb_enum;
use crate::pb_msg;

pb_enum!(InternedGpuRenderStageSpecificationRenderStageCategory {
    OTHER: 0,
    GRAPHICS: 1,
    COMPUTE: 2,
});

pb_enum!(InternedGraphicsContextApi {
    UNDEFINED: 0,
    OPEN_GL: 1,
    VULKAN: 2,
    OPEN_CL: 3,
    CUDA: 4,
    HIP: 5,
});

pb_msg!(InternedComputeArgName {
    iid: u64, primitive, 1,
    name: String, primitive, 2,
});

pb_msg!(InternedComputeKernel {
    iid: u64, primitive, 1,
    name: String, primitive, 2,
    demangled_name: String, primitive, 3,
    arch: String, primitive, 4,
    args: GpuRenderStageEventExtraComputeArg, msg, 5,
});

pb_msg!(InternedGpuRenderStageSpecification {
    iid: u64, primitive, 1,
    name: String, primitive, 2,
    description: String, primitive, 3,
    category: InternedGpuRenderStageSpecificationRenderStageCategory, enum, 4,
});

pb_msg!(InternedGraphicsContext {
    iid: u64, primitive, 1,
    pid: i32, primitive, 2,
    api: InternedGraphicsContextApi, enum, 3,
});

pb_msg!(GpuRenderStageEvent {
    event_id: u64, primitive, 1,
    duration: u64, primitive, 2,
    hw_queue_iid: u64, primitive, 13,
    stage_iid: u64, primitive, 14,
    gpu_id: i32, primitive, 11,
    context: u64, primitive, 5,
    render_target_handle: u64, primitive, 8,
    submission_id: u32, primitive, 10,
    extra_data: GpuRenderStageEventExtraData, msg, 6,
    render_pass_handle: u64, primitive, 9,
    render_pass_instance_id: u64, primitive, 16,
    render_subpass_index_mask: u64, primitive, 15,
    command_buffer_handle: u64, primitive, 12,
    name: String, primitive, 17,
    name_iid: u64, primitive, 20,
    event_wait_ids: u64, primitive, 18,
    kernel_iid: u64, primitive, 19,
    launch: GpuRenderStageEventComputeKernelLaunch, msg, 21,
    specifications: GpuRenderStageEventSpecifications, msg, 7,
    hw_queue_id: i32, primitive, 3,
    stage_id: i32, primitive, 4,
});

pb_msg!(GpuRenderStageEventSpecifications {
    context_spec: GpuRenderStageEventSpecificationsContextSpec, msg, 1,
    hw_queue: GpuRenderStageEventSpecificationsDescription, msg, 2,
    stage: GpuRenderStageEventSpecificationsDescription, msg, 3,
});

pb_msg!(GpuRenderStageEventSpecificationsDescription {
    name: String, primitive, 1,
    description: String, primitive, 2,
});

pb_msg!(GpuRenderStageEventSpecificationsContextSpec {
    context: u64, primitive, 1,
    pid: i32, primitive, 2,
});

pb_msg!(GpuRenderStageEventComputeKernelLaunch {
    grid_size: GpuRenderStageEventDim3, msg, 1,
    workgroup_size: GpuRenderStageEventDim3, msg, 2,
    args: GpuRenderStageEventExtraComputeArg, msg, 3,
});

pb_msg!(GpuRenderStageEventExtraComputeArg {
    name_iid: u64, primitive, 1,
    name: String, primitive, 2,
    int_value: i64, primitive, 3,
    uint_value: u64, primitive, 4,
    double_value: f64, primitive, 5,
    string_value: String, primitive, 6,
    string_value_iid: u64, primitive, 7,
});

pb_msg!(GpuRenderStageEventDim3 {
    x: u32, primitive, 1,
    y: u32, primitive, 2,
    z: u32, primitive, 3,
});

pb_msg!(GpuRenderStageEventExtraData {
    name: String, primitive, 1,
    value: String, primitive, 2,
});
