aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/etnaviv/etnaviv_state.c
diff options
context:
space:
mode:
authorLucas Stach <[email protected]>2017-06-05 21:11:02 +0200
committerChristian Gmeiner <[email protected]>2017-06-21 07:45:15 +0200
commit629003b5b841380ccad1b369507924c9946bb00a (patch)
tree28d8106cf180119588c3dc8721dd94c736759487 /src/gallium/drivers/etnaviv/etnaviv_state.c
parent1bd0acab21c250b263604a52ca6694941a6f02e0 (diff)
etnaviv: fix blend color for RB swapped rendertargets
Same as with the colormasks, the blend color needs to be swizzled according to the rendertarget format. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
Diffstat (limited to 'src/gallium/drivers/etnaviv/etnaviv_state.c')
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_state.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_state.c b/src/gallium/drivers/etnaviv/etnaviv_state.c
index fb7bb0f4c50..fc3d9f108fa 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_state.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_state.c
@@ -43,20 +43,6 @@
#include "util/u_memory.h"
static void
-etna_set_blend_color(struct pipe_context *pctx, const struct pipe_blend_color *bc)
-{
- struct etna_context *ctx = etna_context(pctx);
- struct compiled_blend_color *cs = &ctx->blend_color;
-
- cs->PE_ALPHA_BLEND_COLOR =
- VIVS_PE_ALPHA_BLEND_COLOR_R(etna_cfloat_to_uint8(bc->color[0])) |
- VIVS_PE_ALPHA_BLEND_COLOR_G(etna_cfloat_to_uint8(bc->color[1])) |
- VIVS_PE_ALPHA_BLEND_COLOR_B(etna_cfloat_to_uint8(bc->color[2])) |
- VIVS_PE_ALPHA_BLEND_COLOR_A(etna_cfloat_to_uint8(bc->color[3]));
- ctx->dirty |= ETNA_DIRTY_BLEND_COLOR;
-}
-
-static void
etna_set_stencil_ref(struct pipe_context *pctx, const struct pipe_stencil_ref *sr)
{
struct etna_context *ctx = etna_context(pctx);
@@ -600,6 +586,9 @@ static const struct etna_state_updater etna_state_updates[] = {
},
{
etna_update_blend, ETNA_DIRTY_BLEND | ETNA_DIRTY_FRAMEBUFFER
+ },
+ {
+ etna_update_blend_color, ETNA_DIRTY_BLEND_COLOR | ETNA_DIRTY_FRAMEBUFFER,
}
};