• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright © 2013 Rob Clark <robclark@freedesktop.org>
3  * SPDX-License-Identifier: MIT
4  *
5  * Authors:
6  *    Rob Clark <robclark@freedesktop.org>
7  */
8 
9 #ifndef FD3_ZSA_H_
10 #define FD3_ZSA_H_
11 
12 #include "pipe/p_context.h"
13 #include "pipe/p_state.h"
14 
15 #include "freedreno_util.h"
16 
17 struct fd3_zsa_stateobj {
18    struct pipe_depth_stencil_alpha_state base;
19    uint32_t rb_render_control;
20    uint32_t rb_alpha_ref;
21    uint32_t rb_depth_control;
22    uint32_t rb_stencil_control;
23    uint32_t rb_stencilrefmask;
24    uint32_t rb_stencilrefmask_bf;
25 };
26 
27 static inline struct fd3_zsa_stateobj *
fd3_zsa_stateobj(struct pipe_depth_stencil_alpha_state * zsa)28 fd3_zsa_stateobj(struct pipe_depth_stencil_alpha_state *zsa)
29 {
30    return (struct fd3_zsa_stateobj *)zsa;
31 }
32 
33 void *fd3_zsa_state_create(struct pipe_context *pctx,
34                            const struct pipe_depth_stencil_alpha_state *cso);
35 
36 #endif /* FD3_ZSA_H_ */
37