summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/mipmap.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2012-01-12 09:55:40 -0700
committerBrian Paul <brianp@vmware.com>2012-01-12 13:02:55 -0700
commit003dd8adf39c964d8c7beb86955a61ceb3706ebc (patch)
treea2da1696fe1c05ad09141267e04195d69028817d /src/mesa/main/mipmap.c
parent706400f0a7a59bba89eca8e97a1ada45445ee6df (diff)
downloadexternal_mesa3d-003dd8adf39c964d8c7beb86955a61ceb3706ebc.zip
external_mesa3d-003dd8adf39c964d8c7beb86955a61ceb3706ebc.tar.gz
external_mesa3d-003dd8adf39c964d8c7beb86955a61ceb3706ebc.tar.bz2
mesa: remove incorrect (float) cast in mipmap do_row()
The array holds GLuint values so remove the float cast. Note, however, that to compute the average of four GLuints we really want to do (a+b+c+d)/4 but that could overflow. This change doesn't address that for now. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: José Fonseca <jfonseca@vmware.com>
Diffstat (limited to 'src/mesa/main/mipmap.c')
-rw-r--r--src/mesa/main/mipmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c
index 867506c..03ce536 100644
--- a/src/mesa/main/mipmap.c
+++ b/src/mesa/main/mipmap.c
@@ -476,7 +476,7 @@ do_row(GLenum datatype, GLuint comps, GLint srcWidth,
GLuint *dst = (GLuint *) dstRow;
for (i = j = 0, k = k0; i < (GLuint) dstWidth;
i++, j += colStride, k += colStride) {
- dst[i] = (GLfloat)(rowA[j] / 4 + rowA[k] / 4 + rowB[j] / 4 + rowB[k] / 4);
+ dst[i] = rowA[j] / 4 + rowA[k] / 4 + rowB[j] / 4 + rowB[k] / 4;
}
}