Tally objects are able to measure events on the GPU. Tallies can measure three types of things:
time- measures elapsed GPU time.
pixel- measures how many pixels were rendered, which can be used for occlusion culling.
shader- measure how many times shaders were run.
Tally objects can be created with up to 4096 slots. Each slot can hold a single measurement value.
Pass:tick is used to begin a measurement, storing the result in one of the slots. All commands recorded on the Pass will be measured until
Pass:tock is called with the same tally and slot.
The measurement value stored in the slots can be copied to a
Pass:copy, or they can be read back to Lua using
|lovr.graphics.newTally||Create a new Tally.|
|Tally:getCount||Get the number of slots in the Tally.|
|Tally:getType||Get the type of the Tally.|
|Tally:getViewCount||Get the number of render Pass views the Tally is configured for.|