1/* 2 * Copyright (C) 2019 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17syntax = "proto2"; 18 19package perfetto.protos; 20 21// next id: 13 22message GpuRenderStageEvent { 23 // required. Unique ID for the event. 24 optional uint64 event_id = 1; 25 26 // optional. Duration of the event. This should be in the same clock domain as 27 // the timestamp of the packet. If unset, this is a single time point event. 28 optional uint64 duration = 2; 29 30 // required. ID to a hardware queue description in the specifications. 31 optional int32 hw_queue_id = 3; 32 33 // required. ID to a render stage description in the specifications. 34 optional int32 stage_id = 4; 35 36 // required. GL context/VK device. 37 optional uint64 context = 5; 38 39 // optional. The render target for this event. 40 optional uint64 render_target_handle = 8; 41 42 // optional. The Vulkan render pass handle. 43 optional uint64 render_pass_handle = 9; 44 45 // optional. The Vulkan command buffer handle. 46 optional uint64 command_buffer_handle = 12; 47 48 // optional. Submission ID generated by the UMD. Should map 1:1 with a 49 // vkQueueSubmit. 50 optional uint32 submission_id = 10; 51 52 // optional. Additional data for the user. This may include attribs for 53 // the event like resource ids, shaders etc 54 message ExtraData { 55 optional string name = 1; 56 optional string value = 2; 57 } 58 repeated ExtraData extra_data = 6; 59 60 // The first trace packet of each session should include a Specifications 61 // to enumerate *all* IDs that will be used. The timestamp of this packet 62 // must be earlier than all other packets. Only one packet with Specifications 63 // is expected. 64 message Specifications { 65 message ContextSpec { 66 optional uint64 context = 1; 67 optional int32 pid = 2; 68 } 69 optional ContextSpec context_spec = 1; 70 71 message Description { 72 optional string name = 1; 73 optional string description = 2; 74 } 75 76 // Labels to categorize the hw Queue this event goes on. 77 repeated Description hw_queue = 2; 78 79 // Labels to categorize render stage(binning, render, compute etc). 80 repeated Description stage = 3; 81 } 82 optional Specifications specifications = 7; 83 84 // optional. Identifier for GPU in a multi-gpu device. 85 optional int32 gpu_id = 11; 86 87 // Extension for vendor's custom proto. 88 extensions 100; 89} 90