mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 11:38:05 +02:00
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>
(cherry picked from commit 003dd8adf3)
This commit is contained in:
parent
d7a4eb331b
commit
867fdbd36d
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue