mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02:00
st: Silence compiler warnings on Windows.
This commit is contained in:
parent
090e212c0c
commit
6c534b830c
8 changed files with 24 additions and 24 deletions
|
|
@ -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 &&
|
||||
|
|
|
|||
|
|
@ -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 *
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue