From bef610f693266c338b99511b4d1eea5d5b97644e Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Wed, 20 Jan 2010 18:26:49 +0100 Subject: gallium: prepare for per-rendertarget blend enables, writemasks, blend funcs GL 3.0 (EXT_draw_buffers2) and other APIs allow independent blend enables and write masks per render target, ARB_draw_buffers_blend (and other APIs) also allow independent blend functions. Things like dithering, logic ops however are not extended to be per rendertarget, that might be conceptually possible however it doesn't look like any API wants to expose this. --- src/gallium/include/pipe/p_state.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/gallium/include/pipe/p_state.h') diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index fdd29ed449..3c217645ab 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h @@ -217,7 +217,7 @@ struct pipe_depth_stencil_alpha_state }; -struct pipe_blend_state +struct pipe_rt_blend_state { unsigned blend_enable:1; @@ -229,11 +229,16 @@ struct pipe_blend_state unsigned alpha_src_factor:5; /**< PIPE_BLENDFACTOR_x */ unsigned alpha_dst_factor:5; /**< PIPE_BLENDFACTOR_x */ + unsigned colormask:4; /**< bitmask of PIPE_MASK_R/G/B/A */ +}; + +struct pipe_blend_state +{ + unsigned independent_blend_enable:1; unsigned logicop_enable:1; unsigned logicop_func:4; /**< PIPE_LOGICOP_x */ - - unsigned colormask:4; /**< bitmask of PIPE_MASK_R/G/B/A */ unsigned dither:1; + struct pipe_rt_blend_state rt[PIPE_MAX_COLOR_BUFS]; }; -- cgit v1.2.3