summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2008-03-28 18:18:55 -0600
committerBrian <brian.paul@tungstengraphics.com>2008-03-28 18:18:55 -0600
commitf6908a766dce645d610ff04bb49eaa8c5ee9e65a (patch)
treee851e1c3873426e1d9be0a30261a9369729a5998
parentcbfe6ee5d58e7342012392a8ead7ae373625c00a (diff)
gallium: added an (int) cast in setup_bitmap_vertex_data() to fix a signed/unsigned arithmetic problem
Negative values became very large uints.
-rw-r--r--src/mesa/state_tracker/st_cb_bitmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c
index 464e22d576..b600b92dc6 100644
--- a/src/mesa/state_tracker/st_cb_bitmap.c
+++ b/src/mesa/state_tracker/st_cb_bitmap.c
@@ -351,7 +351,7 @@ setup_bitmap_vertex_data(struct st_context *st,
const GLboolean invert = (st_fb_orientation(fb) == Y_0_TOP);
const GLfloat x0 = x;
const GLfloat x1 = x + width;
- const GLfloat y0 = invert ? (fb->Height - y - height) : y;
+ const GLfloat y0 = invert ? ((int) fb->Height - y - height) : y;
const GLfloat y1 = invert ? (y0 + height) : y + height;
const GLfloat bias = st->bitmap_texcoord_bias;
const GLfloat xBias = bias / (x1-x0);