summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_cb_bitmap.c16
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c24
2 files changed, 20 insertions, 20 deletions
diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c
index 9e32ee2eb4..6fa3cbd533 100644
--- a/src/mesa/state_tracker/st_cb_bitmap.c
+++ b/src/mesa/state_tracker/st_cb_bitmap.c
@@ -494,14 +494,14 @@ draw_bitmap_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z,
const GLfloat width = (GLfloat)fb->Width;
const GLfloat height = (GLfloat)fb->Height;
struct pipe_viewport_state vp;
- vp.scale[0] = 0.5 * width;
- vp.scale[1] = (GLfloat)(height * (invert ? -0.5 : 0.5));
- vp.scale[2] = 1.0;
- vp.scale[3] = 1.0;
- vp.translate[0] = (GLfloat)(0.5 * width);
- vp.translate[1] = (GLfloat)(0.5 * height);
- vp.translate[2] = 0.0;
- vp.translate[3] = 0.0;
+ vp.scale[0] = 0.5f * width;
+ vp.scale[1] = height * (invert ? -0.5f : 0.5f);
+ vp.scale[2] = 1.0f;
+ vp.scale[3] = 1.0f;
+ vp.translate[0] = 0.5f * width;
+ vp.translate[1] = 0.5f * height;
+ vp.translate[2] = 0.0f;
+ vp.translate[3] = 0.0f;
cso_set_viewport(cso, &vp);
}
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index 8fdeb5c380..d8f1d2367c 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -425,12 +425,12 @@ draw_quad(GLcontext *ctx, GLfloat x0, GLfloat y0, GLfloat z,
const struct gl_framebuffer *fb = st->ctx->DrawBuffer;
const GLfloat fb_width = fb->Width;
const GLfloat fb_height = fb->Height;
- const GLfloat clip_x0 = x0 / fb_width * 2.0 - 1.0;
- const GLfloat clip_y0 = y0 / fb_height * 2.0 - 1.0;
- const GLfloat clip_x1 = x1 / fb_width * 2.0 - 1.0;
- const GLfloat clip_y1 = y1 / fb_height * 2.0 - 1.0;
- const GLfloat sLeft = 0.0F, sRight = 1.0F;
- const GLfloat tTop = invertTex, tBot = 1.0 - tTop;
+ 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;
+ const GLfloat clip_y1 = y1 / fb_height * 2.0f - 1.0f;
+ const GLfloat sLeft = 0.0f, sRight = 1.0f;
+ const GLfloat tTop = invertTex, tBot = 1.0f - tTop;
GLuint tex, i;
/* upper-left */
@@ -463,21 +463,21 @@ draw_quad(GLcontext *ctx, GLfloat x0, GLfloat y0, GLfloat z,
if (color) {
for (i = 0; i < 4; i++) {
verts[i][0][2] = z; /*Z*/
- verts[i][0][3] = 1.0; /*W*/
+ verts[i][0][3] = 1.0f; /*W*/
verts[i][1][0] = color[0];
verts[i][1][1] = color[1];
verts[i][1][2] = color[2];
verts[i][1][3] = color[3];
- verts[i][2][2] = 0.0; /*R*/
- verts[i][2][3] = 1.0; /*Q*/
+ verts[i][2][2] = 0.0f; /*R*/
+ verts[i][2][3] = 1.0f; /*Q*/
}
}
else {
for (i = 0; i < 4; i++) {
verts[i][0][2] = z; /*Z*/
- verts[i][0][3] = 1.0; /*W*/
- verts[i][1][2] = 0.0; /*R*/
- verts[i][1][3] = 1.0; /*Q*/
+ verts[i][0][3] = 1.0f; /*W*/
+ verts[i][1][2] = 0.0f; /*R*/
+ verts[i][1][3] = 1.0f; /*Q*/
}
}
}