r600/compute: add support for TGSI compute shaders. (v1.1)
[mesa.git] / src / gallium / drivers / svga / svga_pipe_blend.c
index 0ba9313fd5e3f8b3fe7306961a452080112b2adf..a29fbd3ac28e6fab6b2cec3e4da1bf03c5e56f47 100644 (file)
@@ -37,6 +37,9 @@
 static inline unsigned
 svga_translate_blend_factor(const struct svga_context *svga, unsigned factor)
 {
+   /* Note: there is no SVGA3D_BLENDOP_[INV]BLENDFACTORALPHA so
+    * we can't translate PIPE_BLENDFACTOR_[INV_]CONST_ALPHA properly.
+    */
    switch (factor) {
    case PIPE_BLENDFACTOR_ZERO:            return SVGA3D_BLENDOP_ZERO;
    case PIPE_BLENDFACTOR_SRC_ALPHA:       return SVGA3D_BLENDOP_SRCALPHA;
@@ -328,12 +331,15 @@ svga_create_blend_state(struct pipe_context *pipe,
    blend->independent_blend_enable = templ->independent_blend_enable;
 
    blend->alpha_to_coverage = templ->alpha_to_coverage;
+   blend->alpha_to_one = templ->alpha_to_one;
 
    if (svga_have_vgpu10(svga)) {
       define_blend_state_object(svga, blend);
    }
 
-   svga->hud.num_state_objects++;
+   svga->hud.num_blend_objects++;
+   SVGA_STATS_COUNT_INC(svga_screen(svga->pipe.screen)->sws,
+                        SVGA_STATS_COUNT_BLENDSTATE);
 
    return blend;
 }
@@ -373,7 +379,7 @@ static void svga_delete_blend_state(struct pipe_context *pipe,
    }
 
    FREE(blend);
-   svga->hud.num_state_objects--;
+   svga->hud.num_blend_objects--;
 }
 
 static void svga_set_blend_color( struct pipe_context *pipe,