- dsa->stencil[0].func = st_compare_func_to_pipe(st->ctx->Stencil.Function[0]);
- dsa->stencil[0].fail_op = gl_stencil_op_to_pipe(st->ctx->Stencil.FailFunc[0]);
- dsa->stencil[0].zfail_op = gl_stencil_op_to_pipe(st->ctx->Stencil.ZFailFunc[0]);
- dsa->stencil[0].zpass_op = gl_stencil_op_to_pipe(st->ctx->Stencil.ZPassFunc[0]);
- dsa->stencil[0].ref_value = st->ctx->Stencil.Ref[0] & 0xff;
- dsa->stencil[0].value_mask = st->ctx->Stencil.ValueMask[0] & 0xff;
- dsa->stencil[0].write_mask = st->ctx->Stencil.WriteMask[0] & 0xff;
-
- if (st->ctx->Stencil._TestTwoSide) {
+ dsa->stencil[0].func = st_compare_func_to_pipe(ctx->Stencil.Function[0]);
+ dsa->stencil[0].fail_op = gl_stencil_op_to_pipe(ctx->Stencil.FailFunc[0]);
+ dsa->stencil[0].zfail_op = gl_stencil_op_to_pipe(ctx->Stencil.ZFailFunc[0]);
+ dsa->stencil[0].zpass_op = gl_stencil_op_to_pipe(ctx->Stencil.ZPassFunc[0]);
+ dsa->stencil[0].valuemask = ctx->Stencil.ValueMask[0] & 0xff;
+ dsa->stencil[0].writemask = ctx->Stencil.WriteMask[0] & 0xff;
+ sr.ref_value[0] = ctx->Stencil.Ref[0] & 0xff;
+
+ if (ctx->Stencil._TestTwoSide) {
+ const GLuint back = ctx->Stencil._BackFace;