summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian <[email protected]>2008-04-01 16:20:29 -0600
committerBrian <[email protected]>2008-04-01 16:20:29 -0600
commit7f40115a52ce8f9b5883bd9241707b9e603db0e3 (patch)
tree52d2e5e9f5e8bcbc806414248e15812cf8d566d0
parent792d524aed23f1b15c3e0e16e23ea2b815f79087 (diff)
mesa: added a cast to avoid int overflow, plus rename texels->pixels
-rw-r--r--progs/tests/fillrate.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/progs/tests/fillrate.c b/progs/tests/fillrate.c
index dd25de2360f..8fe636c364b 100644
--- a/progs/tests/fillrate.c
+++ b/progs/tests/fillrate.c
@@ -61,7 +61,7 @@ RunTest(GLenum shading, GLuint numTextures, GLenum texFilter)
{
const GLdouble minPeriod = 2.0;
GLdouble t0, t1;
- GLdouble texels, rate;
+ GLdouble pixels, rate;
GLint i, iters;
glActiveTexture(GL_TEXTURE0);
@@ -104,9 +104,9 @@ RunTest(GLenum shading, GLuint numTextures, GLenum texFilter)
glutSwapBuffers();
- texels = iters * (Width - 10) * (Height - 10);
- rate = texels / (t1 - t0);
- rate /= 1000000.0; /* megatexels/second */
+ pixels = (double) iters * (Width - 10) * (Height - 10);
+ rate = pixels / (t1 - t0);
+ rate /= 1000000.0; /* megapixels/second */
printf("%s ", shading == GL_FLAT ? "GL_FLAT" : "GL_SMOOTH");
printf("Textures=%u ", numTextures);