xref: /aosp_15_r20/external/mesa3d/src/gallium/drivers/freedreno/a3xx/fd3_blend.h (revision 6104692788411f58d303aa86923a9ff6ecaded22)
1 /*
2  * Copyright © 2013 Rob Clark <[email protected]>
3  * SPDX-License-Identifier: MIT
4  *
5  * Authors:
6  *    Rob Clark <[email protected]>
7  */
8 
9 #ifndef FD3_BLEND_H_
10 #define FD3_BLEND_H_
11 
12 #include "pipe/p_context.h"
13 #include "pipe/p_state.h"
14 
15 #include "freedreno_util.h"
16 
17 struct fd3_blend_stateobj {
18    struct pipe_blend_state base;
19    uint32_t rb_render_control;
20    struct {
21       uint32_t blend_control;
22       uint32_t control;
23    } rb_mrt[A3XX_MAX_RENDER_TARGETS];
24 };
25 
26 static inline struct fd3_blend_stateobj *
fd3_blend_stateobj(struct pipe_blend_state * blend)27 fd3_blend_stateobj(struct pipe_blend_state *blend)
28 {
29    return (struct fd3_blend_stateobj *)blend;
30 }
31 
32 void *fd3_blend_state_create(struct pipe_context *pctx,
33                              const struct pipe_blend_state *cso);
34 
35 #endif /* FD3_BLEND_H_ */
36