From eea1be2072a1c980871d80df71d3e39a67fdfb0a Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Fri, 31 May 2013 16:11:38 +0800 Subject: ilo: introduce blend CSO Introduce ilo_blend_cso and initialize it in create_blend_state(). This saves us from having to construct hardware blend states in draw_vbo(). --- src/gallium/drivers/ilo/ilo_gpe.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'src/gallium/drivers/ilo/ilo_gpe.h') diff --git a/src/gallium/drivers/ilo/ilo_gpe.h b/src/gallium/drivers/ilo/ilo_gpe.h index 467a6b3a216..dc4e80eb97e 100644 --- a/src/gallium/drivers/ilo/ilo_gpe.h +++ b/src/gallium/drivers/ilo/ilo_gpe.h @@ -107,8 +107,23 @@ struct ilo_dsa_state { struct pipe_depth_stencil_alpha_state state; }; +struct ilo_blend_cso { + /* BLEND_STATE */ + uint32_t payload[2]; + + uint32_t dw_blend; + uint32_t dw_blend_dst_alpha_forced_one; + + uint32_t dw_logicop; + uint32_t dw_alpha_mod; +}; + struct ilo_blend_state { - struct pipe_blend_state state; + struct ilo_blend_cso cso[ILO_MAX_DRAW_BUFFERS]; + + bool independent_blend_enable; + bool dual_blend; + bool alpha_to_coverage; }; struct ilo_sampler_cso { @@ -191,6 +206,11 @@ void ilo_gpe_set_scissor_null(const struct ilo_dev_info *dev, struct ilo_scissor_state *scissor); +void +ilo_gpe_init_blend(const struct ilo_dev_info *dev, + const struct pipe_blend_state *state, + struct ilo_blend_state *blend); + void ilo_gpe_init_sampler_cso(const struct ilo_dev_info *dev, const struct pipe_sampler_state *state, -- cgit v1.2.3