summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_stencil.c
diff options
context:
space:
mode:
authorBrian <brian@yutani.localnet.net>2007-02-22 08:53:33 -0700
committerBrian <brian@yutani.localnet.net>2007-02-22 08:53:33 -0700
commit29c471aafc6a3fef23d553e31a555d1782854a77 (patch)
tree335385fd55d510118346136c6feb4daa707988b6 /src/mesa/swrast/s_stencil.c
parent6d4cf6be4e79c3a6ab18272577df17389e3834a6 (diff)
parenta4b344baa2484c65a1618f3cce3a94c91dea8ef7 (diff)
Merge branch 'origin' into glsl-compiler-1
Conflicts: src/mesa/main/state.c src/mesa/shader/program.c src/mesa/shader/program.h src/mesa/shader/programopt.c src/mesa/shader/slang/slang_execute.c src/mesa/sources src/mesa/swrast/s_arbshader.c src/mesa/swrast/s_context.c src/mesa/swrast/s_span.c src/mesa/swrast/s_zoom.c src/mesa/tnl/t_context.c src/mesa/tnl/t_save_api.c src/mesa/tnl/t_vb_arbprogram.c src/mesa/tnl/t_vp_build.c src/mesa/tnl/t_vtx_eval.c
Diffstat (limited to 'src/mesa/swrast/s_stencil.c')
-rw-r--r--src/mesa/swrast/s_stencil.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mesa/swrast/s_stencil.c b/src/mesa/swrast/s_stencil.c
index dbab6b3c20..a8aa1d4b6d 100644
--- a/src/mesa/swrast/s_stencil.c
+++ b/src/mesa/swrast/s_stencil.c
@@ -1062,7 +1062,8 @@ void
_swrast_read_stencil_span(GLcontext *ctx, struct gl_renderbuffer *rb,
GLint n, GLint x, GLint y, GLstencil stencil[])
{
- if (y < 0 || y >= rb->Height || x + n <= 0 || x >= rb->Width) {
+ if (y < 0 || y >= (GLint) rb->Height ||
+ x + n <= 0 || x >= (GLint) rb->Width) {
/* span is completely outside framebuffer */
return; /* undefined values OK */
}
@@ -1073,7 +1074,7 @@ _swrast_read_stencil_span(GLcontext *ctx, struct gl_renderbuffer *rb,
n -= dx;
stencil += dx;
}
- if (x + n > rb->Width) {
+ if (x + n > (GLint) rb->Width) {
GLint dx = x + n - rb->Width;
n -= dx;
}
@@ -1103,7 +1104,8 @@ _swrast_write_stencil_span(GLcontext *ctx, GLint n, GLint x, GLint y,
const GLuint stencilMax = (1 << fb->Visual.stencilBits) - 1;
const GLuint stencilMask = ctx->Stencil.WriteMask[0];
- if (y < 0 || y >= rb->Height || x + n <= 0 || x >= rb->Width) {
+ if (y < 0 || y >= (GLint) rb->Height ||
+ x + n <= 0 || x >= (GLint) rb->Width) {
/* span is completely outside framebuffer */
return; /* undefined values OK */
}
@@ -1113,7 +1115,7 @@ _swrast_write_stencil_span(GLcontext *ctx, GLint n, GLint x, GLint y,
n -= dx;
stencil += dx;
}
- if (x + n > rb->Width) {
+ if (x + n > (GLint) rb->Width) {
GLint dx = x + n - rb->Width;
n -= dx;
}
@@ -1191,7 +1193,7 @@ _swrast_clear_stencil_buffer( GLcontext *ctx, struct gl_renderbuffer *rb )
}
else {
/* no bit masking */
- if (width == rb->Width && rb->DataType == GL_UNSIGNED_BYTE) {
+ if (width == (GLint) rb->Width && rb->DataType == GL_UNSIGNED_BYTE) {
/* optimized case */
/* Note: bottom-to-top raster assumed! */
GLubyte *stencil = (GLubyte *) rb->GetPointer(ctx, rb, x, y);