mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-27 20:40:24 +01:00
use GLubyte for stencil ref/mask/clear
This commit is contained in:
parent
008fb50174
commit
cbe4dbef8e
2 changed files with 11 additions and 11 deletions
|
|
@ -131,10 +131,10 @@ struct softpipe_stencil_state {
|
|||
GLuint back_fail_op:3;
|
||||
GLuint back_zpass_op:3;
|
||||
GLuint back_zfail_op:3;
|
||||
GLint ref_value[2]; /**< [0] = front, [1] = back */
|
||||
GLuint value_mask[2];
|
||||
GLuint write_mask[2];
|
||||
GLuint clear_value;
|
||||
GLubyte ref_value[2]; /**< [0] = front, [1] = back */
|
||||
GLubyte value_mask[2];
|
||||
GLubyte write_mask[2];
|
||||
GLubyte clear_value;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -102,20 +102,20 @@ update_stencil( struct st_context *st )
|
|||
stencil.front_fail_op = gl_stencil_op_to_sp(st->ctx->Stencil.FailFunc[0]);
|
||||
stencil.front_zfail_op = gl_stencil_op_to_sp(st->ctx->Stencil.ZFailFunc[0]);
|
||||
stencil.front_zpass_op = gl_stencil_op_to_sp(st->ctx->Stencil.ZPassFunc[0]);
|
||||
stencil.ref_value[0] = st->ctx->Stencil.Ref[0];
|
||||
stencil.value_mask[0] = st->ctx->Stencil.ValueMask[0];
|
||||
stencil.write_mask[0] = st->ctx->Stencil.WriteMask[0];
|
||||
stencil.ref_value[0] = st->ctx->Stencil.Ref[0] & 0xff;
|
||||
stencil.value_mask[0] = st->ctx->Stencil.ValueMask[0] & 0xff;
|
||||
stencil.write_mask[0] = st->ctx->Stencil.WriteMask[0] & 0xff;
|
||||
if (st->ctx->Stencil.TestTwoSide) {
|
||||
stencil.back_enabled = 1;
|
||||
stencil.back_func = gl_stencil_func_to_sp(st->ctx->Stencil.Function[1]);
|
||||
stencil.back_fail_op = gl_stencil_op_to_sp(st->ctx->Stencil.FailFunc[1]);
|
||||
stencil.back_zfail_op = gl_stencil_op_to_sp(st->ctx->Stencil.ZFailFunc[1]);
|
||||
stencil.back_zpass_op = gl_stencil_op_to_sp(st->ctx->Stencil.ZPassFunc[1]);
|
||||
stencil.ref_value[1] = st->ctx->Stencil.Ref[1];
|
||||
stencil.value_mask[1] = st->ctx->Stencil.ValueMask[1];
|
||||
stencil.write_mask[1] = st->ctx->Stencil.WriteMask[1];
|
||||
stencil.ref_value[1] = st->ctx->Stencil.Ref[1] & 0xff;
|
||||
stencil.value_mask[1] = st->ctx->Stencil.ValueMask[1] & 0xff;
|
||||
stencil.write_mask[1] = st->ctx->Stencil.WriteMask[1] & 0xff;
|
||||
}
|
||||
stencil.clear_value = st->ctx->Stencil.Clear;
|
||||
stencil.clear_value = st->ctx->Stencil.Clear & 0xff;
|
||||
}
|
||||
|
||||
if (memcmp(&stencil, &st->state.stencil, sizeof(stencil)) != 0) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue