program: Use exp2(x) instead of pow(2.0, x).
authorMatt Turner <mattst88@gmail.com>
Mon, 13 Jul 2015 22:19:33 +0000 (15:19 -0700)
committerMatt Turner <mattst88@gmail.com>
Wed, 29 Jul 2015 16:34:51 +0000 (09:34 -0700)
src/mesa/program/prog_execute.c

index 46260b5488242897045971c7a956482fb4eaed8a..77274e2cccc49c39a74134d7cba4d8f872c003b0 100644 (file)
@@ -723,7 +723,7 @@ _mesa_execute_program(struct gl_context * ctx,
                 * result.z = result.x * APPX(result.y)
                 * We do what the ARB extension says.
                 */
-               q[2] = (GLfloat) pow(2.0, t[0]);
+               q[2] = exp2f(t[0]);
             }
             q[1] = t[0] - floor_t0;
             q[3] = 1.0F;
@@ -734,7 +734,7 @@ _mesa_execute_program(struct gl_context * ctx,
          {
             GLfloat a[4], result[4], val;
             fetch_vector1(&inst->SrcReg[0], machine, a);
-            val = (GLfloat) pow(2.0, a[0]);
+            val = exp2f(a[0]);
             /*
             if (IS_INF_OR_NAN(val))
                val = 1.0e10;