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