counts.sh
changeset 591 20a0ac14babf
parent 357 4b267433af82
child 593 cce8924a022e
equal deleted inserted replaced
590:dd8b3ca93e9f 591:20a0ac14babf
     1 #!/bin/sh
     1 #!/bin/sh
     2 
     2 
     3 for feh in ??_?_?/*.bytecode ; do
     3 # !!! FIXME: use this to correct our estimates some day.
     4     echo -n "$feh "
     4 
     5     echo -n `./testparse glsl $feh |grep "INSTRUCTION COUNT: " |perl -w -p -e 's/\AINSTRUCTION COUNT://;'`
     5 for feh in shaders/??_?_?/*.bytecode ; do
     6     echo -n " vs. "
     6     DISASM=`echo $feh |perl -w -p -e 's/bytecode\Z/disasm/;'`
     7     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#;'
     7     MINE=`./cmake-build/testparse glsl $feh |grep "INSTRUCTION COUNT: " |perl -w -p -e 's/\AINSTRUCTION COUNT: //;'`
       
     8     THEIRS=`grep "instruction slots used" $DISASM |perl -w -p -e 's#\A// approximately (\d+) instruction slots used .*?\Z#$1#;'`
       
     9     if [ "x$MINE" != "x$THEIRS" ]; then
       
    10         echo "$feh $MINE vs. $THEIRS"
       
    11     fi
     8 done
    12 done
     9 
    13