Fix to lowlevel-blt-bench
authorBen Avison <bavison@riscosopen.org>
Wed, 6 Feb 2013 00:39:12 +0000 (00:39 +0000)
committerSøren Sandmann Pedersen <ssp@redhat.com>
Wed, 13 Feb 2013 07:24:34 +0000 (02:24 -0500)
commit5e207f825bd1ed3142a623bcbceca00508907c5e
tree024e175e6ec9d64429ca0d85d28480d535897971
parentd26f922dc1a605dae00fa0540198707485ba1f08
Fix to lowlevel-blt-bench

The source, mask and destination buffers are initialised to 0xCC just after
they are allocated. Between each benchmark, there are a pair of memcpys,
from the destination buffer to the source buffer and back again (there are
no explanatory comments, but presumably this is an effort to flush the
caches). However, it has an unintended consequence, which is to change the
contents of the buffers on entry to subsequent benchmarks. This means it is
not a fair test: for example, with over_n_8888 (featured in the following
patches) it reports L2 and even M tests as being faster than the L1 test,
because after the L1 test, the source buffer is filled with fully opaque
pixels, for which over_n_8888 has a shortcut.

The fix here is simply to reverse the order of the memcpys, so src and
destination are both filled with 0xCC on entry to all tests.
test/lowlevel-blt-bench.c