xref: /aosp_15_r20/external/mesa3d/src/gallium/drivers/freedreno/a2xx/fd2_blend.h (revision 6104692788411f58d303aa86923a9ff6ecaded22)
1 /*
2  * Copyright © 2012-2013 Rob Clark <[email protected]>
3  * SPDX-License-Identifier: MIT
4  *
5  * Authors:
6  *    Rob Clark <[email protected]>
7  */
8 
9 #ifndef FD2_BLEND_H_
10 #define FD2_BLEND_H_
11 
12 #include "pipe/p_context.h"
13 #include "pipe/p_state.h"
14 
15 struct fd2_blend_stateobj {
16    struct pipe_blend_state base;
17    uint32_t rb_blendcontrol;
18    uint32_t rb_colorcontrol; /* must be OR'd w/ zsa->rb_colorcontrol */
19    uint32_t rb_colormask;
20 };
21 
22 static inline struct fd2_blend_stateobj *
fd2_blend_stateobj(struct pipe_blend_state * blend)23 fd2_blend_stateobj(struct pipe_blend_state *blend)
24 {
25    return (struct fd2_blend_stateobj *)blend;
26 }
27 
28 void *fd2_blend_state_create(struct pipe_context *pctx,
29                              const struct pipe_blend_state *cso);
30 
31 #endif /* FD2_BLEND_H_ */
32