Lines Matching refs:Blend
45 * Convert GLenum blend tokens to pipe tokens.
46 * Both blend factors and blend funcs are accepted.
49 translate_blend(GLenum blend)
51 switch (blend) {
52 /* blend functions */
64 /* blend factors */
172 * Figure out if blend enables/state are different per rt.
192 struct pipe_blend_state *blend = &st->state.blend;
197 memset(blend, 0, sizeof(*blend));
201 blend->independent_blend_enable = 1;
205 blend->logicop_enable = 1;
206 blend->logicop_func = translate_logicop(ctx->Color.LogicOp);
212 blend->rt[i].blend_enable = (ctx->Color.BlendEnabled >> i) & 0x1;
217 blend->rt[i].rgb_func =
218 translate_blend(ctx->Color.Blend[j].EquationRGB);
220 if (ctx->Color.Blend[i].EquationRGB == GL_MIN ||
221 ctx->Color.Blend[i].EquationRGB == GL_MAX) {
223 blend->rt[i].rgb_src_factor = PIPE_BLENDFACTOR_ONE;
224 blend->rt[i].rgb_dst_factor = PIPE_BLENDFACTOR_ONE;
227 blend->rt[i].rgb_src_factor =
228 translate_blend(ctx->Color.Blend[j].SrcRGB);
229 blend->rt[i].rgb_dst_factor =
230 translate_blend(ctx->Color.Blend[j].DstRGB);
233 blend->rt[i].alpha_func =
234 translate_blend(ctx->Color.Blend[j].EquationA);
236 if (ctx->Color.Blend[i].EquationA == GL_MIN ||
237 ctx->Color.Blend[i].EquationA == GL_MAX) {
239 blend->rt[i].alpha_src_factor = PIPE_BLENDFACTOR_ONE;
240 blend->rt[i].alpha_dst_factor = PIPE_BLENDFACTOR_ONE;
243 blend->rt[i].alpha_src_factor =
244 translate_blend(ctx->Color.Blend[j].SrcA);
245 blend->rt[i].alpha_dst_factor =
246 translate_blend(ctx->Color.Blend[j].DstA);
257 blend->rt[i].colormask |= PIPE_MASK_R;
259 blend->rt[i].colormask |= PIPE_MASK_G;
261 blend->rt[i].colormask |= PIPE_MASK_B;
263 blend->rt[i].colormask |= PIPE_MASK_A;
267 blend->dither = 1;
273 blend->alpha_to_coverage = 1;
275 blend->alpha_to_one = 1;
278 cso_set_blend(st->cso_context, blend);