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 &&
{
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 *
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;
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];
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;
}
/*
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);
/* 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;
/* 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;
* 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);
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;
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) ||
/* 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;
texImage->Height, format,
type);
GLuint depth;
- int i;
+ GLuint i;
GLubyte *dest;
/* Map */
}
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: