diff options
author | Eric Engestrom <[email protected]> | 2017-09-06 11:20:46 +0100 |
---|---|---|
committer | Eric Engestrom <[email protected]> | 2017-09-08 10:29:40 +0100 |
commit | db8c5ae853ea34f17ef94c5a873c0cca8231f353 (patch) | |
tree | 3a46488811bf6ca57f752130139c1435d787d2c3 | |
parent | 440ab623417d1b03865fde7e3a008166fdf1ecd4 (diff) |
r300: use ARRAY_SIZE macro
Signed-off-by: Eric Engestrom <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
-rw-r--r-- | src/gallium/drivers/r300/compiler/r300_fragprog_swizzle.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/r300/compiler/r300_fragprog_swizzle.c b/src/gallium/drivers/r300/compiler/r300_fragprog_swizzle.c index 075eac50f7d..3ec5a42c72e 100644 --- a/src/gallium/drivers/r300/compiler/r300_fragprog_swizzle.c +++ b/src/gallium/drivers/r300/compiler/r300_fragprog_swizzle.c @@ -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. |