aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_cb_drawpixels.c')
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_drawpixels.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c b/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
index ff8a9dc43..c944b81f6 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -568,9 +568,8 @@ draw_quad(struct gl_context *ctx, GLfloat x0, GLfloat y0, GLfloat z,
struct pipe_resource *buf = NULL;
unsigned offset;
- u_upload_alloc(st->uploader, 0, 4 * sizeof(verts[0]), &offset, &buf,
- (void**)&verts);
- if (!buf) {
+ if (u_upload_alloc(st->uploader, 0, 4 * sizeof(verts[0]), &offset,
+ &buf, (void **) &verts) != PIPE_OK) {
return;
}
@@ -795,7 +794,7 @@ draw_textured_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
y1 = y + height * ctx->Pixel.ZoomY;
/* convert Z from [0,1] to [-1,-1] to match viewport Z scale/bias */
- z = z * 2.0 - 1.0;
+ z = z * 2.0f - 1.0f;
draw_quad(ctx, x0, y0, z, x1, y1, color, invertTex,
normalized ? ((GLfloat) width / sv[0]->texture->width0) : (GLfloat)width,
@@ -1063,7 +1062,7 @@ static void
clamp_size(struct pipe_context *pipe, GLsizei *width, GLsizei *height,
struct gl_pixelstore_attrib *unpack)
{
- const unsigned maxSize =
+ const int maxSize =
1 << (pipe->screen->get_param(pipe->screen,
PIPE_CAP_MAX_TEXTURE_2D_LEVELS) - 1);