swr/rast: Consolidate archrast Draw events
[mesa.git] / src / gallium / drivers / swr / rasterizer / archrast / events_private.proto
1 # Copyright (C) 2018 Intel Corporation. All Rights Reserved.
2 #
3 # Permission is hereby granted, free of charge, to any person obtaining a
4 # copy of this software and associated documentation files (the "Software"),
5 # to deal in the Software without restriction, including without limitation
6 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
7 # and/or sell copies of the Software, and to permit persons to whom the
8 # Software is furnished to do so, subject to the following conditions:
9 #
10 # The above copyright notice and this permission notice (including the next
11 # paragraph) shall be included in all copies or substantial portions of the
12 # Software.
13 #
14 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20 # IN THE SOFTWARE.
21 #
22 # Provides definitions for private internal events that are only used internally
23 # to rasty for communicating information between Rasty and Archrast. One goal for
24 # ArchRast is to not pollute the Rasty code with lots of calculations, etc. that
25 # are needed to compute per draw statistics, etc.
26
27 event EarlyDepthStencilInfoSingleSample
28 {
29 uint64_t depthPassMask;
30 uint64_t stencilPassMask;
31 uint64_t coverageMask;
32 };
33
34 event EarlyDepthStencilInfoSampleRate
35 {
36 uint64_t depthPassMask;
37 uint64_t stencilPassMask;
38 uint64_t coverageMask;
39 };
40
41 event EarlyDepthStencilInfoNullPS
42 {
43 uint64_t depthPassMask;
44 uint64_t stencilPassMask;
45 uint64_t coverageMask;
46 };
47
48 event LateDepthStencilInfoSingleSample
49 {
50 uint64_t depthPassMask;
51 uint64_t stencilPassMask;
52 uint64_t coverageMask;
53 };
54
55 event LateDepthStencilInfoSampleRate
56 {
57 uint64_t depthPassMask;
58 uint64_t stencilPassMask;
59 uint64_t coverageMask;
60 };
61
62 event LateDepthStencilInfoNullPS
63 {
64 uint64_t depthPassMask;
65 uint64_t stencilPassMask;
66 uint64_t coverageMask;
67 };
68
69 event EarlyDepthInfoPixelRate
70 {
71 uint64_t depthPassCount;
72 uint64_t activeLanes;
73 };
74
75
76 event LateDepthInfoPixelRate
77 {
78 uint64_t depthPassCount;
79 uint64_t activeLanes;
80 };
81
82
83 event BackendDrawEndEvent
84 {
85 uint32_t drawId;
86 };
87
88 event FrontendDrawEndEvent
89 {
90 uint32_t drawId;
91 };
92
93 event TessPrimCount
94 {
95 uint64_t primCount;
96 };
97
98 event GSPrimInfo
99 {
100 uint64_t inputPrimCount;
101 uint64_t primGeneratedCount;
102 uint64_t vertsInput;
103 };
104
105 // validMask is primitives that still need to be clipped. They weren't rejected due to trivial reject or nan.
106 // clipMask is primitives that need to be clipped. So trivial accepts will be 0 while validMask for that is 1.
107 // Trivial reject is numInvocations - pop_cnt32(validMask)
108 // Trivial accept is validMask & ~clipMask
109 // Must clip count is pop_cnt32(clipMask)
110 event ClipInfoEvent
111 {
112 uint32_t numInvocations;
113 uint32_t validMask;
114 uint32_t clipMask;
115 };
116
117 event DrawInstancedEvent
118 {
119 uint32_t drawId;
120 AR_DRAW_TYPE type;
121 uint32_t topology;
122 uint32_t numVertices;
123 int32_t startVertex;
124 uint32_t numInstances;
125 uint32_t startInstance;
126 };
127
128 event DrawIndexedInstancedEvent
129 {
130 uint32_t drawId;
131 AR_DRAW_TYPE type;
132 uint32_t topology;
133 uint32_t numIndices;
134 int32_t indexOffset;
135 int32_t baseVertex;
136 uint32_t numInstances;
137 uint32_t startInstance;
138 };
139
140 ///@brief API Stat: Split draw event for DrawInstanced. In certain cases, Rasty can split draws up into smaller draws.
141 event DrawInstancedSplitEvent
142 {
143 uint32_t drawId;
144 AR_DRAW_TYPE type;
145 };
146
147 ///@brief API Stat: Split draw event for DrawIndexedInstanced.
148 event DrawIndexedInstancedSplitEvent
149 {
150 uint32_t drawId;
151 AR_DRAW_TYPE type;
152 };