counts.sh
changeset 593 cce8924a022e
parent 591 20a0ac14babf
equal deleted inserted replaced
592:ef8b7cc469da 593:cce8924a022e
     2 
     2 
     3 # !!! FIXME: use this to correct our estimates some day.
     3 # !!! FIXME: use this to correct our estimates some day.
     4 
     4 
     5 for feh in shaders/??_?_?/*.bytecode ; do
     5 for feh in shaders/??_?_?/*.bytecode ; do
     6     DISASM=`echo $feh |perl -w -p -e 's/bytecode\Z/disasm/;'`
     6     DISASM=`echo $feh |perl -w -p -e 's/bytecode\Z/disasm/;'`
     7     MINE=`./cmake-build/testparse glsl $feh |grep "INSTRUCTION COUNT: " |perl -w -p -e 's/\AINSTRUCTION COUNT: //;'`
     7     MINE=`./cmake-build/testparse d3d $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#;'`
     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
     9     if [ "x$MINE" != "x$THEIRS" ]; then
    10         echo "$feh $MINE vs. $THEIRS"
    10         echo "$feh $MINE vs. $THEIRS"
    11     fi
    11     fi
    12 done
    12 done