xorg: adapt to blend changes
authorRoland Scheidegger <sroland@vmware.com>
Mon, 25 Jan 2010 15:32:18 +0000 (16:32 +0100)
committerRoland Scheidegger <sroland@vmware.com>
Mon, 25 Jan 2010 15:32:18 +0000 (16:32 +0100)
src/gallium/state_trackers/xorg/xorg_composite.c
src/gallium/state_trackers/xorg/xorg_renderer.c
src/gallium/state_trackers/xorg/xorg_xv.c

index 1c248a629e681e24625a98125bb6d0323492d761..66f83f566c5ac5833f86ed5b8623c72fa9e464c3 100644 (file)
@@ -220,13 +220,13 @@ bind_blend_state(struct exa_context *exa, int op,
    blend_for_op(&blend_opt, op, pSrcPicture, pMaskPicture, pDstPicture);
 
    memset(&blend, 0, sizeof(struct pipe_blend_state));
-   blend.blend_enable = 1;
-   blend.colormask |= PIPE_MASK_RGBA;
+   blend.rt[0].blend_enable = 1;
+   blend.rt[0].colormask = PIPE_MASK_RGBA;
 
-   blend.rgb_src_factor   = blend_opt.rgb_src;
-   blend.alpha_src_factor = blend_opt.rgb_src;
-   blend.rgb_dst_factor   = blend_opt.rgb_dst;
-   blend.alpha_dst_factor = blend_opt.rgb_dst;
+   blend.rt[0].rgb_src_factor   = blend_opt.rgb_src;
+   blend.rt[0].alpha_src_factor = blend_opt.rgb_src;
+   blend.rt[0].rgb_dst_factor   = blend_opt.rgb_dst;
+   blend.rt[0].alpha_dst_factor = blend_opt.rgb_dst;
 
    cso_set_blend(exa->renderer->cso, &blend);
 }
index 8f729b565b1ae52e00f19fb473a0720372f9ac25..0b6600da6f5b50575903badb8ab120173862ae2b 100644 (file)
@@ -445,11 +445,11 @@ void renderer_copy_prepare(struct xorg_renderer *r,
    {
       struct pipe_blend_state blend;
       memset(&blend, 0, sizeof(blend));
-      blend.rgb_src_factor = PIPE_BLENDFACTOR_ONE;
-      blend.alpha_src_factor = PIPE_BLENDFACTOR_ONE;
-      blend.rgb_dst_factor = PIPE_BLENDFACTOR_ZERO;
-      blend.alpha_dst_factor = PIPE_BLENDFACTOR_ZERO;
-      blend.colormask = PIPE_MASK_RGBA;
+      blend.rt[0].rgb_src_factor = PIPE_BLENDFACTOR_ONE;
+      blend.rt[0].alpha_src_factor = PIPE_BLENDFACTOR_ONE;
+      blend.rt[0].rgb_dst_factor = PIPE_BLENDFACTOR_ZERO;
+      blend.rt[0].alpha_dst_factor = PIPE_BLENDFACTOR_ZERO;
+      blend.rt[0].colormask = PIPE_MASK_RGBA;
       cso_set_blend(r->cso, &blend);
    }
 
index 5bf0e94b62797a6440bebb987e06e4575e4b5235..c4580935c32c221ed869ddb151746d33798454a7 100644 (file)
@@ -403,14 +403,14 @@ bind_blend_state(struct xorg_xv_port_priv *port)
    struct pipe_blend_state blend;
 
    memset(&blend, 0, sizeof(struct pipe_blend_state));
-   blend.blend_enable = 1;
-   blend.colormask |= PIPE_MASK_RGBA;
+   blend.rt[0].blend_enable = 1; /* XXX why? */
+   blend.rt[0].colormask = PIPE_MASK_RGBA;
 
    /* porter&duff src */
-   blend.rgb_src_factor   = PIPE_BLENDFACTOR_ONE;
-   blend.alpha_src_factor = PIPE_BLENDFACTOR_ONE;
-   blend.rgb_dst_factor   = PIPE_BLENDFACTOR_ZERO;
-   blend.alpha_dst_factor = PIPE_BLENDFACTOR_ZERO;
+   blend.rt[0].rgb_src_factor   = PIPE_BLENDFACTOR_ONE;
+   blend.rt[0].alpha_src_factor = PIPE_BLENDFACTOR_ONE;
+   blend.rt[0].rgb_dst_factor   = PIPE_BLENDFACTOR_ZERO;
+   blend.rt[0].alpha_dst_factor = PIPE_BLENDFACTOR_ZERO;
 
    cso_set_blend(port->r->cso, &blend);
 }