[Mesa-dev] [PATCH 4/7] st: add blend states from AMD_blend_minmax_factor

Maxence Le Doré maxence.ledore at gmail.com
Thu Jan 2 17:18:23 PST 2014


---
 src/mesa/state_tracker/st_atom_blend.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/mesa/state_tracker/st_atom_blend.c b/src/mesa/state_tracker/st_atom_blend.c
index dea50af..7453053 100644
--- a/src/mesa/state_tracker/st_atom_blend.c
+++ b/src/mesa/state_tracker/st_atom_blend.c
@@ -56,9 +56,15 @@ translate_blend(GLenum blend)
       return PIPE_BLEND_SUBTRACT;
    case GL_FUNC_REVERSE_SUBTRACT:
       return PIPE_BLEND_REVERSE_SUBTRACT;
+   /* GLenum blend token is checked to care GL_MIN/GL_MAX cases
+    * at update_blend() call. In these two cases
+    * Src and Dst factors will be both set to PIPE_BLENDFACTOR_ONE.
+    */
    case GL_MIN:
+   case GL_FACTOR_MIN_AMD:
       return PIPE_BLEND_MIN;
    case GL_MAX:
+   case GL_FACTOR_MAX_AMD:
       return PIPE_BLEND_MAX;
 
    /* blend factors */
-- 
1.8.5.2



More information about the mesa-dev mailing list