gallium: added an (int) cast in setup_bitmap_vertex_data() to fix a signed/unsigned arithmetic problem

Negative values became very large uints.
This commit is contained in:
Brian 2008-03-28 18:18:55 -06:00
parent cbfe6ee5d5
commit f6908a766d

View file

@ -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);