fprintf(fp,
"%s\t%s\t%s\t",
- blend->rgb_func != blend->alpha_func ? "true" : "false",
- blend->rgb_src_factor != blend->alpha_src_factor ? "true" : "false",
- blend->rgb_dst_factor != blend->alpha_dst_factor ? "true" : "false");
+ blend->rt[0].rgb_func != blend->rt[0].alpha_func ? "true" : "false",
+ blend->rt[0].rgb_src_factor != blend->rt[0].alpha_src_factor ? "true" : "false",
+ blend->rt[0].rgb_dst_factor != blend->rt[0].alpha_dst_factor ? "true" : "false");
fprintf(fp,
"%s\t%s\t%s\t%s\t%s\t%s\n",
- debug_dump_blend_func(blend->rgb_func, TRUE),
- debug_dump_blend_factor(blend->rgb_src_factor, TRUE),
- debug_dump_blend_factor(blend->rgb_dst_factor, TRUE),
- debug_dump_blend_func(blend->alpha_func, TRUE),
- debug_dump_blend_factor(blend->alpha_src_factor, TRUE),
- debug_dump_blend_factor(blend->alpha_dst_factor, TRUE));
+ debug_dump_blend_func(blend->rt[0].rgb_func, TRUE),
+ debug_dump_blend_factor(blend->rt[0].rgb_src_factor, TRUE),
+ debug_dump_blend_factor(blend->rt[0].rgb_dst_factor, TRUE),
+ debug_dump_blend_func(blend->rt[0].alpha_func, TRUE),
+ debug_dump_blend_factor(blend->rt[0].alpha_src_factor, TRUE),
+ debug_dump_blend_factor(blend->rt[0].alpha_dst_factor, TRUE));
fflush(fp);
}
fprintf(fp,
" %s=%s %s=%s %s=%s %s=%s %s=%s %s=%s",
- "rgb_func", debug_dump_blend_func(blend->rgb_func, TRUE),
- "rgb_src_factor", debug_dump_blend_factor(blend->rgb_src_factor, TRUE),
- "rgb_dst_factor", debug_dump_blend_factor(blend->rgb_dst_factor, TRUE),
- "alpha_func", debug_dump_blend_func(blend->alpha_func, TRUE),
- "alpha_src_factor", debug_dump_blend_factor(blend->alpha_src_factor, TRUE),
- "alpha_dst_factor", debug_dump_blend_factor(blend->alpha_dst_factor, TRUE));
+ "rgb_func", debug_dump_blend_func(blend->rt[0].rgb_func, TRUE),
+ "rgb_src_factor", debug_dump_blend_factor(blend->rt[0].rgb_src_factor, TRUE),
+ "rgb_dst_factor", debug_dump_blend_factor(blend->rt[0].rgb_dst_factor, TRUE),
+ "alpha_func", debug_dump_blend_func(blend->rt[0].alpha_func, TRUE),
+ "alpha_src_factor", debug_dump_blend_factor(blend->rt[0].alpha_src_factor, TRUE),
+ "alpha_dst_factor", debug_dump_blend_factor(blend->rt[0].alpha_dst_factor, TRUE));
fprintf(fp, " ...\n");
fflush(fp);
double src_term[4];
double dst_term[4];
- compute_blend_ref_term(blend->rgb_src_factor, blend->alpha_src_factor, src, src, dst, con, src_term);
- compute_blend_ref_term(blend->rgb_dst_factor, blend->alpha_dst_factor, dst, src, dst, con, dst_term);
+ compute_blend_ref_term(blend->rt[0].rgb_src_factor, blend->rt[0].alpha_src_factor,
+ src, src, dst, con, src_term);
+ compute_blend_ref_term(blend->rt[0].rgb_dst_factor, blend->rt[0].alpha_dst_factor,
+ dst, src, dst, con, dst_term);
/*
* Combine RGB terms
*/
- switch (blend->rgb_func) {
+ switch (blend->rt[0].rgb_func) {
case PIPE_BLEND_ADD:
ADD_SAT(res[0], src_term[0], dst_term[0]); /* R */
ADD_SAT(res[1], src_term[1], dst_term[1]); /* G */
/*
* Combine A terms
*/
- switch (blend->alpha_func) {
+ switch (blend->rt[0].alpha_func) {
case PIPE_BLEND_ADD:
ADD_SAT(res[3], src_term[3], dst_term[3]); /* A */
break;
continue;
memset(&blend, 0, sizeof blend);
- blend.blend_enable = 1;
- blend.rgb_func = *rgb_func;
- blend.rgb_src_factor = *rgb_src_factor;
- blend.rgb_dst_factor = *rgb_dst_factor;
- blend.alpha_func = *alpha_func;
- blend.alpha_src_factor = *alpha_src_factor;
- blend.alpha_dst_factor = *alpha_dst_factor;
- blend.colormask = PIPE_MASK_RGBA;
+ blend.rt[0].blend_enable = 1;
+ blend.rt[0].rgb_func = *rgb_func;
+ blend.rt[0].rgb_src_factor = *rgb_src_factor;
+ blend.rt[0].rgb_dst_factor = *rgb_dst_factor;
+ blend.rt[0].alpha_func = *alpha_func;
+ blend.rt[0].alpha_src_factor = *alpha_src_factor;
+ blend.rt[0].alpha_dst_factor = *alpha_dst_factor;
+ blend.rt[0].colormask = PIPE_MASK_RGBA;
if(!test_one(verbose, fp, &blend, mode, *type))
success = FALSE;
type = &blend_types[rand() % num_types];
memset(&blend, 0, sizeof blend);
- blend.blend_enable = 1;
- blend.rgb_func = *rgb_func;
- blend.rgb_src_factor = *rgb_src_factor;
- blend.rgb_dst_factor = *rgb_dst_factor;
- blend.alpha_func = *alpha_func;
- blend.alpha_src_factor = *alpha_src_factor;
- blend.alpha_dst_factor = *alpha_dst_factor;
- blend.colormask = PIPE_MASK_RGBA;
+ blend.rt[0].blend_enable = 1;
+ blend.rt[0].rgb_func = *rgb_func;
+ blend.rt[0].rgb_src_factor = *rgb_src_factor;
+ blend.rt[0].rgb_dst_factor = *rgb_dst_factor;
+ blend.rt[0].alpha_func = *alpha_func;
+ blend.rt[0].alpha_src_factor = *alpha_src_factor;
+ blend.rt[0].alpha_dst_factor = *alpha_dst_factor;
+ blend.rt[0].colormask = PIPE_MASK_RGBA;
if(!test_one(verbose, fp, &blend, mode, *type))
success = FALSE;