gallium: Dual source support in blend_factor_to_shader
authorIcecream95 <ixn@keemail.me>
Thu, 25 Jun 2020 10:50:15 +0000 (22:50 +1200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 15 Jul 2020 01:30:00 +0000 (01:30 +0000)
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5620>

src/gallium/auxiliary/util/u_blend.h

index ed3f7589345d4ce949c4d145480b728df22f7e04..d5f9050bc32458dc6aecd2c0e51eaecd7e96e00f 100644 (file)
@@ -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");