Skip to content
Permalink
Browse files
Updated counts.sh to give only mismatched counts.
  • Loading branch information
icculus committed Feb 12, 2009
1 parent ad463a6 commit 479e4b1b9c174d039baf34bdde953ee1d1da2459
Showing with 9 additions and 5 deletions.
  1. +9 −5 counts.sh
@@ -1,9 +1,13 @@
#!/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#;'
# !!! 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/;'`
MINE=`./cmake-build/testparse glsl $feh |grep "INSTRUCTION COUNT: " |perl -w -p -e 's/\AINSTRUCTION COUNT: //;'`
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
done

0 comments on commit 479e4b1

Please sign in to comment.