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_ZSA_H_ 10 #define FD2_ZSA_H_ 11 12 #include "pipe/p_context.h" 13 #include "pipe/p_state.h" 14 15 #include "freedreno_util.h" 16 17 struct fd2_zsa_stateobj { 18 struct pipe_depth_stencil_alpha_state base; 19 uint32_t rb_depthcontrol; 20 uint32_t rb_colorcontrol; /* must be OR'd w/ blend->rb_colorcontrol */ 21 uint32_t rb_alpha_ref; 22 uint32_t rb_stencilrefmask; 23 uint32_t rb_stencilrefmask_bf; 24 }; 25 26 static inline struct fd2_zsa_stateobj * fd2_zsa_stateobj(struct pipe_depth_stencil_alpha_state * zsa)27fd2_zsa_stateobj(struct pipe_depth_stencil_alpha_state *zsa) 28 { 29 return (struct fd2_zsa_stateobj *)zsa; 30 } 31 32 void *fd2_zsa_state_create(struct pipe_context *pctx, 33 const struct pipe_depth_stencil_alpha_state *cso); 34 35 #endif /* FD2_ZSA_H_ */ 36