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_ZSA_H_ 10 #define FD5_ZSA_H_ 11 12 #include "pipe/p_context.h" 13 #include "pipe/p_state.h" 14 15 #include "freedreno_util.h" 16 17 struct fd5_zsa_stateobj { 18 struct pipe_depth_stencil_alpha_state base; 19 20 uint32_t rb_alpha_control; 21 uint32_t rb_depth_cntl; 22 uint32_t rb_stencil_control; 23 uint32_t rb_stencilrefmask; 24 uint32_t rb_stencilrefmask_bf; 25 uint32_t gras_lrz_cntl; 26 bool lrz_write; 27 }; 28 29 static inline struct fd5_zsa_stateobj * fd5_zsa_stateobj(struct pipe_depth_stencil_alpha_state * zsa)30fd5_zsa_stateobj(struct pipe_depth_stencil_alpha_state *zsa) 31 { 32 return (struct fd5_zsa_stateobj *)zsa; 33 } 34 35 void *fd5_zsa_state_create(struct pipe_context *pctx, 36 const struct pipe_depth_stencil_alpha_state *cso); 37 38 #endif /* FD5_ZSA_H_ */ 39