Game Development Reference
In-Depth Information
structdrawArraysIndirectCommand
{
GLuint Count;
GLuint InstanceCount;
GLuint First;
GLuint BaseInstance;
GLuint DrawID;
};
Listing 2.5. User-defined draw indirect structure with interleaved DrawID.
way the compute shader stage can write all the draw parameters into a
single buffer, but using a stride parameter larger than the size of the draw
indirect structure will cost performance on AMD hardware.
2.5
Side Effects of the Software Design
2.5.1 Reaching the Primitive Peak Rate
Our quest for higher scene complexity involves performing more draws with less
triangles per draw. However, reducing the number of triangles per object too
much will have a significant performance hit because the draws wouldn't be able
to reach the primitive peak rate of the GPU. To evaluate the minimum number
of triangles we should submit per draw, we built a test giving us the performance
chart in Figure 2.10.
1.8
1.6
1.4
1.2
1
Instances
Draws
0.8
0.6
0.4
0.2
0
20
80
320
1,280
5,120
20,480
Figure 2.10. Evaluation of the minimum number of primitive to reach the GPU primi-
tive peak rate.
 
 
Search Nedrilad ::




Custom Search