diff options
author | Michal Krol <[email protected]> | 2008-07-15 11:26:38 +0200 |
---|---|---|
committer | Michal Krol <[email protected]> | 2008-07-15 11:48:59 +0200 |
commit | 6c534b830c6f5427c391c5225c34561141c201ba (patch) | |
tree | 1302142c7904316f2c1bc5a46e7f23b49a55081d /src/mesa | |
parent | 090e212c0c5e54156c3c33f7eecdfe01398a7222 (diff) |
st: Silence compiler warnings on Windows.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_atom_framebuffer.c | 2 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_atom_rasterizer.c | 2 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_atom_viewport.c | 6 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_accum.c | 2 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_clear.c | 14 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_drawpixels.c | 12 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_rasterpos.c | 2 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_texture.c | 8 |
8 files changed, 24 insertions, 24 deletions
diff --git a/src/mesa/state_tracker/st_atom_framebuffer.c b/src/mesa/state_tracker/st_atom_framebuffer.c index d46c3ee16c5..80df3b0506d 100644 --- a/src/mesa/state_tracker/st_atom_framebuffer.c +++ b/src/mesa/state_tracker/st_atom_framebuffer.c @@ -59,7 +59,7 @@ update_renderbuffer_surface(struct st_context *st, strb->surface->texture != texture || strb->surface->width != rtt_width || strb->surface->height != rtt_height) { - int level; + GLuint level; /* find matching mipmap level size */ for (level = 0; level <= texture->last_level; level++) { if (texture->width[level] == rtt_width && diff --git a/src/mesa/state_tracker/st_atom_rasterizer.c b/src/mesa/state_tracker/st_atom_rasterizer.c index ff40bb43124..9f4e1c1c696 100644 --- a/src/mesa/state_tracker/st_atom_rasterizer.c +++ b/src/mesa/state_tracker/st_atom_rasterizer.c @@ -188,7 +188,7 @@ static void update_raster_state( struct st_context *st ) { GLfloat mrd = (ctx->DrawBuffer ? ctx->DrawBuffer->_MRD : - 1.0); + 1.0f); raster->offset_units = ctx->Polygon.OffsetFactor * mrd; raster->offset_scale = (ctx->Polygon.OffsetUnits * mrd * diff --git a/src/mesa/state_tracker/st_atom_viewport.c b/src/mesa/state_tracker/st_atom_viewport.c index b105909e96b..8b9f1abda4b 100644 --- a/src/mesa/state_tracker/st_atom_viewport.c +++ b/src/mesa/state_tracker/st_atom_viewport.c @@ -62,9 +62,9 @@ update_viewport( struct st_context *st ) GLfloat x = (GLfloat)ctx->Viewport.X; GLfloat y = (GLfloat)ctx->Viewport.Y; GLfloat z = ctx->Viewport.Near; - GLfloat half_width = (GLfloat)ctx->Viewport.Width / 2.0; - GLfloat half_height = (GLfloat)ctx->Viewport.Height / 2.0; - GLfloat half_depth = (GLfloat)(ctx->Viewport.Far - ctx->Viewport.Near) / 2.0; + GLfloat half_width = (GLfloat)ctx->Viewport.Width / 2.0f; + GLfloat half_height = (GLfloat)ctx->Viewport.Height / 2.0f; + GLfloat half_depth = (GLfloat)(ctx->Viewport.Far - ctx->Viewport.Near) / 2.0f; st->state.viewport.scale[0] = half_width; st->state.viewport.scale[1] = half_height * yScale; diff --git a/src/mesa/state_tracker/st_cb_accum.c b/src/mesa/state_tracker/st_cb_accum.c index c0e8c6bf33e..a992e08ff68 100644 --- a/src/mesa/state_tracker/st_cb_accum.c +++ b/src/mesa/state_tracker/st_cb_accum.c @@ -290,7 +290,7 @@ accum_return(GLcontext *ctx, GLfloat value, for (ch = 0; ch < 4; ch++) { if (colormask[ch]) { GLfloat val = abuf[i * 4 + ch] * value; - abuf[i * 4 + ch] = CLAMP(val, 0.0, 1.0); + abuf[i * 4 + ch] = CLAMP(val, 0.0f, 1.0f); } else { abuf[i * 4 + ch] = cbuf[i * 4 + ch]; diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c index cdfcdcee72c..e475f022d34 100644 --- a/src/mesa/state_tracker/st_cb_clear.c +++ b/src/mesa/state_tracker/st_cb_clear.c @@ -203,17 +203,17 @@ clear_with_quad(GLcontext *ctx, GLboolean color, GLboolean depth, GLboolean stencil) { struct st_context *st = ctx->st; - const GLfloat x0 = ctx->DrawBuffer->_Xmin; - const GLfloat x1 = ctx->DrawBuffer->_Xmax; + const GLfloat x0 = (GLfloat) ctx->DrawBuffer->_Xmin; + const GLfloat x1 = (GLfloat) ctx->DrawBuffer->_Xmax; GLfloat y0, y1; if (st_fb_orientation(ctx->DrawBuffer) == Y_0_TOP) { - y0 = ctx->DrawBuffer->Height - ctx->DrawBuffer->_Ymax; - y1 = ctx->DrawBuffer->Height - ctx->DrawBuffer->_Ymin; + y0 = (GLfloat) (ctx->DrawBuffer->Height - ctx->DrawBuffer->_Ymax); + y1 = (GLfloat) (ctx->DrawBuffer->Height - ctx->DrawBuffer->_Ymin); } else { - y0 = ctx->DrawBuffer->_Ymin; - y1 = ctx->DrawBuffer->_Ymax; + y0 = (GLfloat) ctx->DrawBuffer->_Ymin; + y1 = (GLfloat) ctx->DrawBuffer->_Ymax; } /* @@ -286,7 +286,7 @@ clear_with_quad(GLcontext *ctx, cso_set_vertex_shader_handle(st->cso_context, st->clear.vs); /* draw quad matching scissor rect (XXX verify coord round-off) */ - draw_quad(ctx, x0, y0, x1, y1, ctx->Depth.Clear, ctx->Color.ClearColor); + draw_quad(ctx, x0, y0, x1, y1, (GLfloat) ctx->Depth.Clear, ctx->Color.ClearColor); /* Restore pipe state */ cso_restore_blend(st->cso_context); diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c index 6b0137dcf87..2ebfcaf82b1 100644 --- a/src/mesa/state_tracker/st_cb_drawpixels.c +++ b/src/mesa/state_tracker/st_cb_drawpixels.c @@ -423,8 +423,8 @@ draw_quad(GLcontext *ctx, GLfloat x0, GLfloat y0, GLfloat z, /* setup vertex data */ { const struct gl_framebuffer *fb = st->ctx->DrawBuffer; - const GLfloat fb_width = fb->Width; - const GLfloat fb_height = fb->Height; + const GLfloat fb_width = (GLfloat) fb->Width; + const GLfloat fb_height = (GLfloat) fb->Height; const GLfloat clip_x0 = x0 / fb_width * 2.0f - 1.0f; const GLfloat clip_y0 = y0 / fb_height * 2.0f - 1.0f; const GLfloat clip_x1 = x1 / fb_width * 2.0f - 1.0f; @@ -571,8 +571,8 @@ draw_textured_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z, /* viewport state: viewport matching window dims */ { - const float width = ctx->DrawBuffer->Width; - const float height = ctx->DrawBuffer->Height; + const float width = (float) ctx->DrawBuffer->Width; + const float height = (float) ctx->DrawBuffer->Height; struct pipe_viewport_state vp; vp.scale[0] = 0.5f * width; vp.scale[1] = -0.5f * height; @@ -600,9 +600,9 @@ draw_textured_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z, * Recall that these coords are transformed by the current * vertex shader and viewport transformation. */ - x0 = x; + x0 = (GLfloat) x; x1 = x + width * ctx->Pixel.ZoomX; - y0 = y; + y0 = (GLfloat) y; y1 = y + height * ctx->Pixel.ZoomY; //if(!color) draw_quad(ctx, x0, y0, z, x1, y1, color, invertTex); diff --git a/src/mesa/state_tracker/st_cb_rasterpos.c b/src/mesa/state_tracker/st_cb_rasterpos.c index 3cb7b68bea5..3b30c2a61b5 100644 --- a/src/mesa/state_tracker/st_cb_rasterpos.c +++ b/src/mesa/state_tracker/st_cb_rasterpos.c @@ -135,7 +135,7 @@ rastpos_point(struct draw_stage *stage, struct prim_header *prim) struct rastpos_stage *rs = rastpos_stage(stage); GLcontext *ctx = rs->ctx; struct st_context *st = ctx->st; - const GLfloat height = ctx->DrawBuffer->Height; + const GLfloat height = (GLfloat) ctx->DrawBuffer->Height; const GLuint *outputMapping = st->vertex_result_to_slot; const GLfloat *pos; GLuint i; diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 73f8b8f7880..de782e8232e 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -285,7 +285,7 @@ guess_and_alloc_texture(struct st_context *st, assert(!stObj->pt); if (stObj->pt && - stImage->level > stObj->base.BaseLevel && + (GLint) stImage->level > stObj->base.BaseLevel && (stImage->base.Width == 1 || (stObj->base.Target != GL_TEXTURE_1D && stImage->base.Height == 1) || @@ -296,7 +296,7 @@ guess_and_alloc_texture(struct st_context *st, /* If this image disrespects BaseLevel, allocate from level zero. * Usually BaseLevel == 0, so it's unlikely to happen. */ - if (stImage->level < stObj->base.BaseLevel) + if ((GLint) stImage->level < stObj->base.BaseLevel) firstLevel = 0; else firstLevel = stObj->base.BaseLevel; @@ -810,7 +810,7 @@ st_get_tex_image(GLcontext * ctx, GLenum target, GLint level, texImage->Height, format, type); GLuint depth; - int i; + GLuint i; GLubyte *dest; /* Map */ @@ -1383,7 +1383,7 @@ calculate_first_last_level(struct st_texture_object *stObj) } else { firstLevel = 0; - lastLevel = MIN2(tObj->MaxLevel, tObj->Image[0][tObj->BaseLevel]->WidthLog2); + lastLevel = MIN2(tObj->MaxLevel, (int) tObj->Image[0][tObj->BaseLevel]->WidthLog2); } break; case GL_TEXTURE_RECTANGLE_NV: |