Module: Mesa
Branch: master
Commit: 36057ff12a148f401490f82fce8c6670cadb039e
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=36057ff12a148f401490f82fce8c6670cadb039e

Author: Marek Olšák <marek.ol...@amd.com>
Date:   Tue Aug  9 13:26:23 2016 +0200

radeonsi: disallow MIN/MAX blend equations for dual source blending

Reviewed-by: Michel Dänzer <michel.daen...@amd.com>
Reviewed-by: Edward O'Callaghan <funfunc...@folklore1984.net>

---

 src/gallium/drivers/radeonsi/si_state.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/gallium/drivers/radeonsi/si_state.c 
b/src/gallium/drivers/radeonsi/si_state.c
index f5b2330..8f7203e 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -464,6 +464,16 @@ static void *si_create_blend_state_mode(struct 
pipe_context *ctx,
                if (i >= 1 && blend->dual_src_blend)
                        continue;
 
+               /* Only addition and subtraction equations are supported with
+                * dual source blending.
+                */
+               if (blend->dual_src_blend &&
+                   (eqRGB == PIPE_BLEND_MIN || eqRGB == PIPE_BLEND_MAX ||
+                    eqA == PIPE_BLEND_MIN || eqA == PIPE_BLEND_MAX)) {
+                       assert(!"Unsupported equation for dual source 
blending");
+                       continue;
+               }
+
                if (!state->rt[j].colormask)
                        continue;
 

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to