test: Only compute the masked pixel value if depth!=32

Minor saving for when we use a8r8g8b8.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2014-05-30 10:31:37 +01:00
parent 961139f587
commit 3dac734bb0
1 changed files with 5 additions and 9 deletions

View File

@ -52,15 +52,11 @@ int pixel_difference(uint32_t a, uint32_t b);
static inline int pixel_equal(int depth, uint32_t a, uint32_t b)
{
uint32_t mask;
if (depth == 32)
mask = 0xffffffff;
else
mask = (1 << depth) - 1;
a &= mask;
b &= mask;
if (depth != 32) {
uint32_t mask = (1 << depth) - 1;
a &= mask;
b &= mask;
}
if (a == b)
return 1;