diff options
Diffstat (limited to 'mesalib/src/gallium/auxiliary/util/u_format.c')
-rw-r--r-- | mesalib/src/gallium/auxiliary/util/u_format.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_format.c b/mesalib/src/gallium/auxiliary/util/u_format.c index 8228de1f2..18456371c 100644 --- a/mesalib/src/gallium/auxiliary/util/u_format.c +++ b/mesalib/src/gallium/auxiliary/util/u_format.c @@ -63,17 +63,14 @@ util_format_is_float(enum pipe_format format) /** Test if the format contains RGB, but not alpha */ boolean -util_format_is_rgb_no_alpha(enum pipe_format format) +util_format_has_alpha(enum pipe_format format) { const struct util_format_description *desc = util_format_description(format); - if ((desc->colorspace == UTIL_FORMAT_COLORSPACE_RGB || - desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB) && - desc->swizzle[3] == UTIL_FORMAT_SWIZZLE_1) { - return TRUE; - } - return FALSE; + return (desc->colorspace == UTIL_FORMAT_COLORSPACE_RGB || + desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB) && + desc->swizzle[3] != UTIL_FORMAT_SWIZZLE_1; } |