summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_depth.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2002-04-19 00:38:27 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2002-04-19 00:38:27 +0000
commita670c1280b78e6da3b298b61f623e4c733c6be94 (patch)
tree803a29169de7fe25f7e193dfe6a2de85128c4591 /src/mesa/swrast/s_depth.c
parentdb07de057f10ab7ab5be84352b674b200a0a9e22 (diff)
casts to fix GLint/GLuint mismatches
Diffstat (limited to 'src/mesa/swrast/s_depth.c')
-rw-r--r--src/mesa/swrast/s_depth.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mesa/swrast/s_depth.c b/src/mesa/swrast/s_depth.c
index 6b1646b7a0..0c0a5b6fe1 100644
--- a/src/mesa/swrast/s_depth.c
+++ b/src/mesa/swrast/s_depth.c
@@ -1,4 +1,4 @@
-/* $Id: s_depth.c,v 1.21 2002/04/18 14:57:00 brianp Exp $ */
+/* $Id: s_depth.c,v 1.22 2002/04/19 00:38:27 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -1378,8 +1378,8 @@ _mesa_read_depth_span( GLcontext *ctx,
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
- if (y < 0 || y >= ctx->DrawBuffer->Height ||
- x + (GLint) n <= 0 || x >= ctx->DrawBuffer->Width) {
+ if (y < 0 || y >= (GLint) ctx->DrawBuffer->Height ||
+ x + (GLint) n <= 0 || x >= (GLint) ctx->DrawBuffer->Width) {
/* span is completely outside framebuffer */
GLint i;
for (i = 0; i < n; i++)
@@ -1396,8 +1396,8 @@ _mesa_read_depth_span( GLcontext *ctx,
n -= dx;
depth += dx;
}
- if (x + n > ctx->DrawBuffer->Width) {
- GLint dx = x + n - ctx->DrawBuffer->Width;
+ if (x + n > (GLint) ctx->DrawBuffer->Width) {
+ GLint dx = x + n - (GLint) ctx->DrawBuffer->Width;
GLint i;
for (i = 0; i < dx; i++)
depth[n - i - 1] = 0;
@@ -1452,8 +1452,8 @@ _mesa_read_depth_span_float( GLcontext *ctx,
SWcontext *swrast = SWRAST_CONTEXT(ctx);
const GLfloat scale = 1.0F / ctx->DepthMaxF;
- if (y < 0 || y >= ctx->DrawBuffer->Height ||
- x + (GLint) n <= 0 || x >= ctx->DrawBuffer->Width) {
+ if (y < 0 || y >= (GLint) ctx->DrawBuffer->Height ||
+ x + (GLint) n <= 0 || x >= (GLint) ctx->DrawBuffer->Width) {
/* span is completely outside framebuffer */
GLint i;
for (i = 0; i < n; i++)
@@ -1469,8 +1469,8 @@ _mesa_read_depth_span_float( GLcontext *ctx,
n -= dx;
x = 0;
}
- if (x + n > ctx->DrawBuffer->Width) {
- GLint dx = x + n - ctx->DrawBuffer->Width;
+ if (x + n > (GLint) ctx->DrawBuffer->Width) {
+ GLint dx = x + n - (GLint) ctx->DrawBuffer->Width;
GLint i;
for (i = 0; i < dx; i++)
depth[n - i - 1] = 0.0F;