counts.sh
author Ryan C. Gordon <icculus@icculus.org>
Wed, 11 Feb 2009 21:28:48 -0500
changeset 564 c669568326fb
parent 357 4b267433af82
child 591 20a0ac14babf
permissions -rwxr-xr-x
Reworked preprocessor newline management. My thought about the semicolon and assembly comments was a brain fart, newlines will have to go through to the assembler, and we'll just mirror Direct3D's preprocessor output behaviour in MOJOSHADER_preprocess() instead. This gets rid of the nasty insert_token nonsense, as an added benefit.

#!/bin/sh

for feh in ??_?_?/*.bytecode ; do
    echo -n "$feh "
    echo -n `./testparse glsl $feh |grep "INSTRUCTION COUNT: " |perl -w -p -e 's/\AINSTRUCTION COUNT://;'`
    echo -n " vs. "
    grep "instruction slots used" `echo $feh |perl -w -p -e 's/bytecode\Z/disasm/;'` |perl -w -p -e 's#\A// approximately (\d+) instruction slots used .*?\Z#$1#;'
done