diff options
author | Erkin Bahceci <erkinbah@gmail.com> | 2007-05-14 11:22:13 -0500 |
---|---|---|
committer | Erkin Bahceci <erkinbah@gmail.com> | 2007-05-14 11:22:13 -0500 |
commit | ade3d3f6e95929ebc3d8cc7d0d8b439452bc0c46 (patch) | |
tree | a22e22ec3b9079af2573d6699dbd37a955f9b7bd | |
parent | 59cd151aa43fd424526c0e7c90d4fd22f60567da (diff) | |
download | beryl-premerge-ade3d3f6e95929ebc3d8cc7d0d8b439452bc0c46.tar.gz beryl-premerge-ade3d3f6e95929ebc3d8cc7d0d8b439452bc0c46.tar.bz2 |
Reflex: Speed up by eliminating 3 fragment ops.
-rw-r--r-- | src/reflex.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/reflex.c b/src/reflex.c index cb46ff4..f426762 100644 --- a/src/reflex.c +++ b/src/reflex.c @@ -107,15 +107,14 @@ getReflexFragmentFunction (CompScreen * s, CompTexture * texture, ok &= addTempHeaderOpToFunctionData (data, "image"); ok &= addTempHeaderOpToFunctionData (data, "coord"); - ok &= addTempHeaderOpToFunctionData (data, "div"); ok &= addTempHeaderOpToFunctionData (data, "mask"); ok &= addFetchOpToFunctionData (data, "output", NULL, target); ok &= addColorOpToFunctionData (data, "output", "output"); snprintf (str, 1024, - "MUL coord, fragment.position, program.env[%d];" - "ADD coord, coord, program.env[%d];", param, param + 1); + "MAD coord, fragment.position, program.env[%d]," + " program.env[%d];", param, param + 1); ok &= addDataOpToFunctionData (data, str); snprintf (str, 1024, @@ -124,10 +123,8 @@ getReflexFragmentFunction (CompScreen * s, CompTexture * texture, snprintf (str, 1024, "MUL_SAT mask, output.a, program.env[%d].r;" - "SUB div.a, 1.0, output.a;" - "MUL image, image, div.a;" - "MUL image, image, mask.a;" - "ADD output, output, image;", param + 2); + "MAD image, -output.a, image, image;" + "MAD output, image, mask.a, output;", param + 2); ok &= addDataOpToFunctionData (data, str); if (!ok) |