From 83b0f109411c68d859ac4f9952632527f7be90e0 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 7 Dec 2022 14:56:02 -0700 Subject: [PATCH] gallivm: s/unsigned/enum util_format_type/ in lp_build_sample_common() Use the actual type here for easier debugging. Signed-off-by: Brian Paul Part-of: --- src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c index 5e4eadd..3234f43 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c @@ -2590,11 +2590,11 @@ lp_build_sample_common(struct lp_build_sample_context *bld, * too or do some other tricks to make it work). */ const struct util_format_description *format_desc = bld->format_desc; - unsigned chan_type; /* not entirely sure we couldn't end up with non-valid swizzle here */ - chan_type = format_desc->swizzle[0] <= PIPE_SWIZZLE_W ? - format_desc->channel[format_desc->swizzle[0]].type : - UTIL_FORMAT_TYPE_FLOAT; + const enum util_format_type chan_type = + format_desc->swizzle[0] <= PIPE_SWIZZLE_W + ? format_desc->channel[format_desc->swizzle[0]].type + : UTIL_FORMAT_TYPE_FLOAT; if (chan_type != UTIL_FORMAT_TYPE_FLOAT) { coords[4] = lp_build_clamp(&bld->coord_bld, coords[4], bld->coord_bld.zero, bld->coord_bld.one); -- 2.7.4