~mmach/netext73/mesa-haswell

« back to all changes in this revision

Viewing changes to src/gallium/auxiliary/util/u_dual_blend.h

  • Committer: mmach
  • Date: 2022-09-22 19:56:13 UTC
  • Revision ID: netbit73@gmail.com-20220922195613-wtik9mmy20tmor0i
2022-09-22 21:17:09

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef U_DUAL_BLEND_H
2
 
#define U_DUAL_BLEND_H
3
 
 
4
 
#include "pipe/p_state.h"
5
 
 
6
 
static inline boolean util_blend_factor_is_dual_src(int factor)
7
 
{
8
 
   return (factor == PIPE_BLENDFACTOR_SRC1_COLOR) ||
9
 
          (factor == PIPE_BLENDFACTOR_SRC1_ALPHA) ||
10
 
          (factor == PIPE_BLENDFACTOR_INV_SRC1_COLOR) ||
11
 
          (factor == PIPE_BLENDFACTOR_INV_SRC1_ALPHA);
12
 
}
13
 
 
14
 
static inline boolean util_blend_state_is_dual(const struct pipe_blend_state *blend, 
15
 
                                  int index)
16
 
{
17
 
   if (util_blend_factor_is_dual_src(blend->rt[index].rgb_src_factor) ||
18
 
       util_blend_factor_is_dual_src(blend->rt[index].alpha_src_factor) ||
19
 
       util_blend_factor_is_dual_src(blend->rt[index].rgb_dst_factor) ||
20
 
       util_blend_factor_is_dual_src(blend->rt[index].alpha_dst_factor))
21
 
      return true;
22
 
   return false;
23
 
}
24
 
 
25
 
 
26
 
#endif