1 /* 2 * Copyright © 2016 Rob Clark <[email protected]> 3 * SPDX-License-Identifier: MIT 4 * 5 * Authors: 6 * Rob Clark <[email protected]> 7 */ 8 9 #ifndef FD5_BLEND_H_ 10 #define FD5_BLEND_H_ 11 12 #include "pipe/p_context.h" 13 #include "pipe/p_state.h" 14 15 #include "freedreno_util.h" 16 17 struct fd5_blend_stateobj { 18 struct pipe_blend_state base; 19 20 struct { 21 uint32_t control; 22 uint32_t buf_info; 23 uint32_t blend_control; 24 } rb_mrt[A5XX_MAX_RENDER_TARGETS]; 25 uint32_t rb_blend_cntl; 26 uint32_t sp_blend_cntl; 27 bool lrz_write; 28 }; 29 30 static inline struct fd5_blend_stateobj * fd5_blend_stateobj(struct pipe_blend_state * blend)31fd5_blend_stateobj(struct pipe_blend_state *blend) 32 { 33 return (struct fd5_blend_stateobj *)blend; 34 } 35 36 void *fd5_blend_state_create(struct pipe_context *pctx, 37 const struct pipe_blend_state *cso); 38 39 #endif /* FD5_BLEND_H_ */ 40