Lines Matching refs:so
38 const struct pipe_depth_stencil_alpha_state *so) in etna_zsa_state_create() argument
46 cs->base = *so; in etna_zsa_state_create()
51 (!so->depth.enabled || so->depth.func == PIPE_FUNC_ALWAYS) && in etna_zsa_state_create()
52 !so->depth.writemask; in etna_zsa_state_create()
62 if(so->stencil[i].writemask == 0) in etna_zsa_state_create()
64 … so->stencil[i].fail_op = so->stencil[i].zfail_op = so->stencil[i].zpass_op = PIPE_STENCIL_OP_KEEP; in etna_zsa_state_create()
71 if (so->stencil[0].enabled) { in etna_zsa_state_create()
72 if (so->stencil[0].func != PIPE_FUNC_ALWAYS || in etna_zsa_state_create()
73 (so->stencil[1].enabled && so->stencil[1].func != PIPE_FUNC_ALWAYS)) in etna_zsa_state_create()
76 if (so->stencil[0].fail_op != PIPE_STENCIL_OP_KEEP || in etna_zsa_state_create()
77 so->stencil[0].zfail_op != PIPE_STENCIL_OP_KEEP || in etna_zsa_state_create()
78 so->stencil[0].zpass_op != PIPE_STENCIL_OP_KEEP) { in etna_zsa_state_create()
80 } else if (so->stencil[1].enabled) { in etna_zsa_state_create()
81 if (so->stencil[1].fail_op != PIPE_STENCIL_OP_KEEP || in etna_zsa_state_create()
82 so->stencil[1].zfail_op != PIPE_STENCIL_OP_KEEP || in etna_zsa_state_create()
83 so->stencil[1].zpass_op != PIPE_STENCIL_OP_KEEP) { in etna_zsa_state_create()
92 if (so->depth.enabled == false || so->depth.func == PIPE_FUNC_ALWAYS) in etna_zsa_state_create()
97 VIVS_PE_DEPTH_CONFIG_DEPTH_FUNC(so->depth.enabled ? so->depth.func in etna_zsa_state_create()
99 COND(so->depth.writemask, VIVS_PE_DEPTH_CONFIG_WRITE_ENABLE) | in etna_zsa_state_create()
104 COND(so->alpha.enabled, VIVS_PE_ALPHA_OP_ALPHA_TEST) | in etna_zsa_state_create()
105 VIVS_PE_ALPHA_OP_ALPHA_FUNC(so->alpha.func) | in etna_zsa_state_create()
106 VIVS_PE_ALPHA_OP_ALPHA_REF(etna_cfloat_to_uint8(so->alpha.ref_value)); in etna_zsa_state_create()
108 VIVS_PE_STENCIL_OP_FUNC_FRONT(so->stencil[0].func) | in etna_zsa_state_create()
109 VIVS_PE_STENCIL_OP_FUNC_BACK(so->stencil[1].func) | in etna_zsa_state_create()
110 VIVS_PE_STENCIL_OP_FAIL_FRONT(translate_stencil_op(so->stencil[0].fail_op)) | in etna_zsa_state_create()
111 VIVS_PE_STENCIL_OP_FAIL_BACK(translate_stencil_op(so->stencil[1].fail_op)) | in etna_zsa_state_create()
112 VIVS_PE_STENCIL_OP_DEPTH_FAIL_FRONT(translate_stencil_op(so->stencil[0].zfail_op)) | in etna_zsa_state_create()
113 VIVS_PE_STENCIL_OP_DEPTH_FAIL_BACK(translate_stencil_op(so->stencil[1].zfail_op)) | in etna_zsa_state_create()
114 VIVS_PE_STENCIL_OP_PASS_FRONT(translate_stencil_op(so->stencil[0].zpass_op)) | in etna_zsa_state_create()
115 VIVS_PE_STENCIL_OP_PASS_BACK(translate_stencil_op(so->stencil[1].zpass_op)); in etna_zsa_state_create()
117 translate_stencil_mode(so->stencil[0].enabled, so->stencil[1].enabled) | in etna_zsa_state_create()
118 VIVS_PE_STENCIL_CONFIG_MASK_FRONT(so->stencil[0].valuemask) | in etna_zsa_state_create()
119 VIVS_PE_STENCIL_CONFIG_WRITE_MASK_FRONT(so->stencil[0].writemask); in etna_zsa_state_create()