/
counts.sh
executable file
·13 lines (10 loc) · 509 Bytes
1
2
#!/bin/sh
3
4
5
6
# !!! FIXME: use this to correct our estimates some day.
for feh in shaders/??_?_?/*.bytecode ; do
DISASM=`echo $feh |perl -w -p -e 's/bytecode\Z/disasm/;'`
7
MINE=`./cmake-build/testparse d3d $feh |grep "INSTRUCTION COUNT: " |perl -w -p -e 's/\AINSTRUCTION COUNT: //;'`
8
9
10
11
THEIRS=`grep "instruction slots used" $DISASM |perl -w -p -e 's#\A// approximately (\d+) instruction slots used .*?\Z#$1#;'`
if [ "x$MINE" != "x$THEIRS" ]; then
echo "$feh $MINE vs. $THEIRS"
fi
12
done