counts.sh
author Ryan C. Gordon <icculus@icculus.org>
Thu, 03 Jul 2008 12:09:26 -0400
branchtrunk
changeset 421 bfd3d95273ec
parent 357 4b267433af82
child 591 20a0ac14babf
permissions -rwxr-xr-x
First piece of work on nv3 profile.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
357
4b267433af82 Added a temp shell script to compare our instruction counts vs. Microsoft's.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     1
#!/bin/sh
4b267433af82 Added a temp shell script to compare our instruction counts vs. Microsoft's.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     2
4b267433af82 Added a temp shell script to compare our instruction counts vs. Microsoft's.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     3
for feh in ??_?_?/*.bytecode ; do
4b267433af82 Added a temp shell script to compare our instruction counts vs. Microsoft's.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     4
    echo -n "$feh "
4b267433af82 Added a temp shell script to compare our instruction counts vs. Microsoft's.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     5
    echo -n `./testparse glsl $feh |grep "INSTRUCTION COUNT: " |perl -w -p -e 's/\AINSTRUCTION COUNT://;'`
4b267433af82 Added a temp shell script to compare our instruction counts vs. Microsoft's.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     6
    echo -n " vs. "
4b267433af82 Added a temp shell script to compare our instruction counts vs. Microsoft's.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     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#;'
4b267433af82 Added a temp shell script to compare our instruction counts vs. Microsoft's.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     8
done
4b267433af82 Added a temp shell script to compare our instruction counts vs. Microsoft's.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     9