diff options
author | Ilia Mirkin <[email protected]> | 2015-09-13 19:50:45 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2015-09-16 15:42:54 -0400 |
commit | ee6b95c82c3dbfad07e75ecdfd993e60fec2ac4f (patch) | |
tree | 54d951f375f0ad3bbd3c24dd57f96357b3c69df1 /src/gallium/drivers/freedreno/freedreno_state.c | |
parent | cfa980f49356eb2d94178f8cc9d67d01b4e3d695 (diff) |
freedreno/a3xx: add support for dual-source blending
Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_state.c')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_state.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_state.c b/src/gallium/drivers/freedreno/freedreno_state.c index e75865a9387..685d3a75659 100644 --- a/src/gallium/drivers/freedreno/freedreno_state.c +++ b/src/gallium/drivers/freedreno/freedreno_state.c @@ -27,6 +27,7 @@ */ #include "pipe/p_state.h" +#include "util/u_dual_blend.h" #include "util/u_string.h" #include "util/u_memory.h" #include "util/u_helpers.h" @@ -225,8 +226,17 @@ static void fd_blend_state_bind(struct pipe_context *pctx, void *hwcso) { struct fd_context *ctx = fd_context(pctx); + struct pipe_blend_state *cso = hwcso; + bool old_is_dual = ctx->blend ? + ctx->blend->rt[0].blend_enable && util_blend_state_is_dual(ctx->blend, 0) : + false; + bool new_is_dual = cso ? + cso->rt[0].blend_enable && util_blend_state_is_dual(cso, 0) : + false; ctx->blend = hwcso; ctx->dirty |= FD_DIRTY_BLEND; + if (old_is_dual != new_is_dual) + ctx->dirty |= FD_DIRTY_BLEND_DUAL; } static void |