summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-05-24 22:16:26 -0600
committerBrian <[email protected]>2007-05-24 22:16:26 -0600
commitcbe4dbef8e8e9ff29d64ca588e81c2bb079d99f1 (patch)
tree1ef989a614cb565b957f2f0e837d53723f1c1c8f /src
parent008fb50174fb6717f3b71836427bc6be4e44613c (diff)
use GLubyte for stencil ref/mask/clear
Diffstat (limited to 'src')
-rw-r--r--src/mesa/softpipe/sp_state.h8
-rw-r--r--src/mesa/softpipe/state_tracker/st_atom_stencil.c14
2 files changed, 11 insertions, 11 deletions
diff --git a/src/mesa/softpipe/sp_state.h b/src/mesa/softpipe/sp_state.h
index 73ed7a619cd..f7d904bffec 100644
--- a/src/mesa/softpipe/sp_state.h
+++ b/src/mesa/softpipe/sp_state.h
@@ -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;
};
diff --git a/src/mesa/softpipe/state_tracker/st_atom_stencil.c b/src/mesa/softpipe/state_tracker/st_atom_stencil.c
index ac8de03702d..32610c3d24d 100644
--- a/src/mesa/softpipe/state_tracker/st_atom_stencil.c
+++ b/src/mesa/softpipe/state_tracker/st_atom_stencil.c
@@ -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) {