diff options
author | Roland Scheidegger <sroland@vmware.com> | 2010-01-25 16:52:14 +0100 |
---|---|---|
committer | Roland Scheidegger <sroland@vmware.com> | 2010-01-25 16:52:14 +0100 |
commit | 0d3a6a505d537b879f31be0ed14fa8577717efaf (patch) | |
tree | 8c76d097724044c597cb1b146fc76ae688191b6e /src/gallium | |
parent | dbc0e24ab866ce8bdd974b52e050dd022620b146 (diff) |
vega: don't enable blending if not necessary
In some places blending was enabled even though it wasn't necessary.
Also remove a (bogus) reenabling of color writes, which wasn't really used.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/state_trackers/vega/api_filters.c | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/vega/mask.c | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/vega/vg_context.c | 6 |
3 files changed, 4 insertions, 6 deletions
diff --git a/src/gallium/state_trackers/vega/api_filters.c b/src/gallium/state_trackers/vega/api_filters.c index 555d3bd7f9..cf4a11bb14 100644 --- a/src/gallium/state_trackers/vega/api_filters.c +++ b/src/gallium/state_trackers/vega/api_filters.c @@ -139,7 +139,7 @@ static void setup_blend() blend.rt[0].colormask |= PIPE_MASK_B; if (ctx->state.vg.filter_channel_mask & VG_ALPHA) blend.rt[0].colormask |= PIPE_MASK_A; - blend.rt[0].blend_enable = 1; /* XXX why? */ + blend.rt[0].blend_enable = 0; cso_set_blend(ctx->cso_context, &blend); } diff --git a/src/gallium/state_trackers/vega/mask.c b/src/gallium/state_trackers/vega/mask.c index d94fa47da6..ba8ecef1d2 100644 --- a/src/gallium/state_trackers/vega/mask.c +++ b/src/gallium/state_trackers/vega/mask.c @@ -354,7 +354,7 @@ static void setup_mask_blend() struct pipe_blend_state blend; memset(&blend, 0, sizeof(struct pipe_blend_state)); - blend.rt[0].blend_enable = 1; /* XXX why? */ + blend.rt[0].blend_enable = 0; blend.rt[0].colormask = PIPE_MASK_RGBA; blend.rt[0].rgb_src_factor = PIPE_BLENDFACTOR_ONE; blend.rt[0].alpha_src_factor = PIPE_BLENDFACTOR_ONE; diff --git a/src/gallium/state_trackers/vega/vg_context.c b/src/gallium/state_trackers/vega/vg_context.c index f05a5e68c6..64207d97ba 100644 --- a/src/gallium/state_trackers/vega/vg_context.c +++ b/src/gallium/state_trackers/vega/vg_context.c @@ -286,8 +286,6 @@ static void update_clip_state(struct vg_context *ctx) renderer_draw_quad(ctx->renderer, minx, miny, maxx, maxy, 0.0f); } - blend->rt[0].colormask = PIPE_MASK_R; /*enable colorwrites*/ - /* XXX really only for red channel? */ cso_restore_blend(ctx->cso_context); cso_restore_fragment_shader(ctx->cso_context); @@ -311,7 +309,7 @@ void vg_validate_state(struct vg_context *ctx) 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; - /* could disable blending ? */ + blend->rt[0].blend_enable = 0; break; case VG_BLEND_SRC_OVER: blend->rt[0].rgb_src_factor = PIPE_BLENDFACTOR_SRC_ALPHA; @@ -345,7 +343,7 @@ void vg_validate_state(struct vg_context *ctx) 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; - /* could disable blending ? */ + blend->rt[0].blend_enable = 0; break; case VG_BLEND_ADDITIVE: blend->rt[0].rgb_src_factor = PIPE_BLENDFACTOR_ONE; |