Modified source engine (2017) developed by valve and leaked in 2020. Not for commercial purporses
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

27 lines
456 B

if( scalar( @ARGV ) != 1 )
{
die "Usage: playback_numprims.pl frame.txt\n";
}
open INPUT, shift || die;
$numprims = 0;
$numcalls = 0;
while( <INPUT> )
{
if( /DrawIndexedPrimitive.*numPrimitives:\s*(\d+)\s*$/i )
{
$numprims += $1;
if( $1 > 85 )
{
$numfreeprims += $1;
}
else
{
$numfreeprims += 85;
}
$numcalls++;
}
}
close INPUT;
print "$numprims primitives\n";
print "$numfreeprims freeprimitives\n";
print "$numcalls calls\n";