r300: use ARRAY_SIZE macro

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Eric Engestrom 2017-09-06 11:20:46 +01:00
parent 440ab62341
commit db8c5ae853
1 changed files with 3 additions and 1 deletions

View File

@ -35,6 +35,8 @@
#include <stdio.h>
#include "util/macros.h"
#include "r300_reg.h"
#include "radeon_compiler.h"
@ -61,7 +63,7 @@ static const struct swizzle_data native_swizzles[] = {
{MAKE_SWZ3(HALF, HALF, HALF), R300_ALU_ARGC_HALF, 0, 0}
};
static const int num_native_swizzles = sizeof(native_swizzles)/sizeof(native_swizzles[0]);
static const int num_native_swizzles = ARRAY_SIZE(native_swizzles);
/**
* Find a native RGB swizzle that matches the given swizzle.