From: Rob Clark Date: Sun, 17 Jul 2022 18:17:47 +0000 (-0700) Subject: util: Fix c++ enum casting pickiness X-Git-Tag: upstream/22.3.5~5358 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1dd5dd9765a7e88383116f8c3b4b2cf6114768cd;p=platform%2Fupstream%2Fmesa.git util: Fix c++ enum casting pickiness Fix problems when included from c++ Signed-off-by: Rob Clark Reviewed-by: Chia-I Wu Part-of: --- diff --git a/src/gallium/auxiliary/util/u_blend.h b/src/gallium/auxiliary/util/u_blend.h index 7fccdb2..e9308b5 100644 --- a/src/gallium/auxiliary/util/u_blend.h +++ b/src/gallium/auxiliary/util/u_blend.h @@ -136,8 +136,8 @@ static inline bool util_blend_uses_dest(struct pipe_rt_blend_state rt) { return rt.blend_enable && - (util_blend_factor_uses_dest(rt.rgb_src_factor, false) || - util_blend_factor_uses_dest(rt.alpha_src_factor, true) || + (util_blend_factor_uses_dest((enum pipe_blendfactor)rt.rgb_src_factor, false) || + util_blend_factor_uses_dest((enum pipe_blendfactor)rt.alpha_src_factor, true) || rt.rgb_dst_factor != PIPE_BLENDFACTOR_ZERO || rt.alpha_dst_factor != PIPE_BLENDFACTOR_ZERO); }