From f6908a766dce645d610ff04bb49eaa8c5ee9e65a Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 28 Mar 2008 18:18:55 -0600 Subject: [PATCH] gallium: added an (int) cast in setup_bitmap_vertex_data() to fix a signed/unsigned arithmetic problem Negative values became very large uints. --- src/mesa/state_tracker/st_cb_bitmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c index 464e22d576b..b600b92dc6e 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); -- 2.30.2