summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2017-10-02 17:05:24 -0700
committerEric Anholt <[email protected]>2017-10-10 11:42:06 -0700
commitf2e6e1bbc381ad6a7575e9940248362f8cb0adac (patch)
tree40411396385b1662effc7d75956fb19352e36921 /src/gallium
parent476db7e66b5c2b4cade87c7c8de4bea25ea9eb43 (diff)
broadcom/vc5: Fix color masks for non-independent blending.
This gets fbo-mrt-alphatest working except for the second RT's clear color.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/vc5/vc5_emit.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/gallium/drivers/vc5/vc5_emit.c b/src/gallium/drivers/vc5/vc5_emit.c
index 475db7bc868..dd055d49208 100644
--- a/src/gallium/drivers/vc5/vc5_emit.c
+++ b/src/gallium/drivers/vc5/vc5_emit.c
@@ -336,14 +336,22 @@ vc5_emit_state(struct pipe_context *pctx)
}
cl_emit(&job->bcl, COLOUR_WRITE_MASKS, mask) {
- mask.render_target_0_per_colour_component_write_masks =
- (~blend->rt[0].colormask) & 0xf;
- mask.render_target_1_per_colour_component_write_masks =
- (~blend->rt[1].colormask) & 0xf;
- mask.render_target_2_per_colour_component_write_masks =
- (~blend->rt[2].colormask) & 0xf;
- mask.render_target_3_per_colour_component_write_masks =
- (~blend->rt[3].colormask) & 0xf;
+ if (blend->independent_blend_enable) {
+ mask.render_target_0_per_colour_component_write_masks =
+ (~blend->rt[0].colormask) & 0xf;
+ mask.render_target_1_per_colour_component_write_masks =
+ (~blend->rt[1].colormask) & 0xf;
+ mask.render_target_2_per_colour_component_write_masks =
+ (~blend->rt[2].colormask) & 0xf;
+ mask.render_target_3_per_colour_component_write_masks =
+ (~blend->rt[3].colormask) & 0xf;
+ } else {
+ uint8_t colormask = (~blend->rt[0].colormask) & 0xf;
+ mask.render_target_0_per_colour_component_write_masks = colormask;
+ mask.render_target_1_per_colour_component_write_masks = colormask;
+ mask.render_target_2_per_colour_component_write_masks = colormask;
+ mask.render_target_3_per_colour_component_write_masks = colormask;
+ }
}
}