summaryrefslogtreecommitdiff
path: root/lib/mesa/src/gallium/drivers/swr/rasterizer/archrast/events_private.proto
blob: b57d5c4284f22dfcc004d6090c23ee1f58d86e7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
# Copyright (C) 2018 Intel Corporation.   All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice (including the next
# paragraph) shall be included in all copies or substantial portions of the
# Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
#
# Provides definitions for private internal events that are only used internally
# to rasty for communicating information between Rasty and Archrast. One goal for
# ArchRast is to not pollute the Rasty code with lots of calculations, etc. that
# are needed to compute per draw statistics, etc.

event PipelineStats::EarlyDepthStencilInfoSingleSample
{
    uint64_t depthPassMask;
    uint64_t stencilPassMask;
    uint64_t coverageMask;
};

event PipelineStats::EarlyDepthStencilInfoSampleRate
{
    uint64_t depthPassMask;
    uint64_t stencilPassMask;
    uint64_t coverageMask;
};

event PipelineStats::EarlyDepthStencilInfoNullPS
{
    uint64_t depthPassMask;
    uint64_t stencilPassMask;
    uint64_t coverageMask;
};

event PipelineStats::LateDepthStencilInfoSingleSample
{
    uint64_t depthPassMask;
    uint64_t stencilPassMask;
    uint64_t coverageMask;
};

event PipelineStats::LateDepthStencilInfoSampleRate
{
    uint64_t depthPassMask;
    uint64_t stencilPassMask;
    uint64_t coverageMask;
};

event PipelineStats::LateDepthStencilInfoNullPS
{
    uint64_t depthPassMask;
    uint64_t stencilPassMask;
    uint64_t coverageMask;
};

event PipelineStats::EarlyDepthInfoPixelRate
{
    uint64_t depthPassCount;
    uint64_t activeLanes;
};


event PipelineStats::LateDepthInfoPixelRate
{
    uint64_t depthPassCount;
    uint64_t activeLanes;
};


event PipelineStats::BackendDrawEndEvent
{
    uint32_t drawId;
};

event PipelineStats::FrontendDrawEndEvent
{
    uint32_t drawId;
};

event Memory::MemoryAccessEvent
{
    uint32_t drawId;
    uint64_t tsc;
    uint64_t ptr;
    uint32_t size;
    uint8_t isRead;
    uint8_t client;
};

event Memory::MemoryStatsEndEvent
{
    uint32_t drawId;
};

event PipelineStats::TessPrimCount
{
    uint64_t primCount;
};

event PipelineStats::RasterTileCount
{
    uint32_t drawId;
    uint64_t rasterTiles;
};

event PipelineStats::GSPrimInfo
{
    uint64_t inputPrimCount;
    uint64_t primGeneratedCount;
    uint64_t vertsInput;
};

// validMask is primitives that still need to be clipped. They weren't rejected due to trivial reject or nan.
// clipMask is primitives that need to be clipped. So trivial accepts will be 0 while validMask for that is 1.
// Trivial reject is numInvocations - pop_cnt32(validMask)
// Trivial accept is validMask & ~clipMask
// Must clip count is pop_cnt32(clipMask)
event PipelineStats::ClipInfoEvent
{
    uint32_t numInvocations;
    uint32_t validMask;
    uint32_t clipMask;
};

event PipelineStats::CullInfoEvent
{
    uint32_t drawId;
    uint64_t degeneratePrimMask;
    uint64_t backfacePrimMask;
    uint32_t validMask;
};

event PipelineStats::AlphaInfoEvent
{
    uint32_t drawId;
    uint32_t alphaTestEnable;
    uint32_t alphaBlendEnable;
};

event PipelineStats::DrawInstancedEvent
{
    uint32_t drawId;
    uint32_t topology;
    uint32_t numVertices;
    int32_t  startVertex;
    uint32_t numInstances;
    uint32_t startInstance;
    uint32_t tsEnable;
    uint32_t gsEnable;
    uint32_t soEnable;
    uint32_t soTopology;
    uint32_t splitId; // Split draw count or id.
};

event PipelineStats::DrawIndexedInstancedEvent
{
    uint32_t drawId;
    uint32_t topology;
    uint32_t numIndices;
    int32_t  indexOffset;
    int32_t  baseVertex;
    uint32_t numInstances;
    uint32_t startInstance;
    uint32_t tsEnable;
    uint32_t gsEnable;
    uint32_t soEnable;
    uint32_t soTopology;
    uint32_t splitId; // Split draw count or id.
};

event ShaderStats::VSStats
{
    HANDLE hStats;      // SWR_SHADER_STATS
};

event ShaderStats::HSStats
{
    HANDLE hStats;      // SWR_SHADER_STATS
};

event ShaderStats::DSStats
{
    HANDLE hStats;      // SWR_SHADER_STATS
};

event ShaderStats::GSStats
{
    HANDLE hStats;      // SWR_SHADER_STATS
};

event ShaderStats::PSStats
{
    HANDLE hStats;      // SWR_SHADER_STATS
};

event ShaderStats::CSStats
{
    HANDLE hStats;      // SWR_SHADER_STATS
};