From: Icecream95 Date: Thu, 25 Jun 2020 10:50:15 +0000 (+1200) Subject: gallium: Dual source support in blend_factor_to_shader X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=58c0e1d00564f46a8264b2ce3275920890dd8b14;p=mesa.git gallium: Dual source support in blend_factor_to_shader Reviewed-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/gallium/auxiliary/util/u_blend.h b/src/gallium/auxiliary/util/u_blend.h index ed3f7589345..d5f9050bc32 100644 --- a/src/gallium/auxiliary/util/u_blend.h +++ b/src/gallium/auxiliary/util/u_blend.h @@ -82,12 +82,12 @@ util_blend_factor_to_shader(enum pipe_blendfactor factor) return BLEND_FACTOR_CONSTANT_ALPHA; case PIPE_BLENDFACTOR_SRC1_COLOR: - case PIPE_BLENDFACTOR_SRC1_ALPHA: case PIPE_BLENDFACTOR_INV_SRC1_COLOR: + return BLEND_FACTOR_SRC1_COLOR; + case PIPE_BLENDFACTOR_INV_SRC1_ALPHA: - /* unimplemented */ - assert(0); - return BLEND_FACTOR_ZERO; + case PIPE_BLENDFACTOR_SRC1_ALPHA: + return BLEND_FACTOR_SRC1_ALPHA; default: unreachable("Invalid factor");