On 12 November 2010 21:08, Travis Athougies <iammisc(a)gmail.com> wrote:
> + static struct hlsl_probe_info sin_probes[] =
This should be const. As a general rule, try to pay attention to at
least other patches to the same module. I fixed a couple of these
about two weeks ago. Same goes for calculating the probe count.
> + {
> + {0, 0, {0.5000f, 0.0f, 0.0f, 0.0f}, 0.001f, "sin test failed"},
> + {1, 0, {0.5975f, 0.0f, 0.0f, 0.0f}, 0.001f, "sin test failed"},
> + {2, 0, {0.6913f, 0.0f, 0.0f, 0.0f}, 0.001f, "sin test failed"},
> + {3, 0, {0.7778f, 0.0f, 0.0f, 0.0f}, 0.001f, "sin test failed"},
> + {4, 0, {0.8536f, 0.0f, 0.0f, 0.0f}, 0.001f, "sin test failed"},
> + {5, 0, {0.9157f, 0.0f, 0.0f, 0.0f}, 0.001f, "sin test failed"},
> + {6, 0, {0.9620f, 0.0f, 0.0f, 0.0f}, 0.001f, "sin test failed"},
> + {7, 0, {0.9904f, 0.0f, 0.0f, 0.0f}, 0.001f, "sin test failed"},
> + {8, 0, {1.0000f, 0.0f, 0.0f, 0.0f}, 0.001f, "sin test failed"},
> + {9, 0, {0.9904f, 0.0f, 0.0f, 0.0f}, 0.001f, "sin test failed"},
> + {10, 0, {0.9619f, 0.0f, 0.0f, 0.0f}, 0.001f, "sin test failed"},
> + {11, 0, {0.9157f, 0.0f, 0.0f, 0.0f}, 0.001f, "sin test failed"},
> + {12, 0, {0.8536f, 0.0f, 0.0f, 0.0f}, 0.001f, "sin test failed"},
> + {13, 0, {0.7778f, 0.0f, 0.0f, 0.0f}, 0.001f, "sin test failed"},
> + {14, 0, {0.6913f, 0.0f, 0.0f, 0.0f}, 0.001f, "sin test failed"},
> + {15, 0, {0.5975f, 0.0f, 0.0f, 0.0f}, 0.001f, "sin test failed"},
> + {16, 0, {0.5000f, 0.0f, 0.0f, 0.0f}, 0.001f, "sin test failed"},
> + {17, 0, {0.4025f, 0.0f, 0.0f, 0.0f}, 0.001f, "sin test failed"},
> + {18, 0, {0.3087f, 0.0f, 0.0f, 0.0f}, 0.001f, "sin test failed"},
> + {19, 0, {0.2222f, 0.0f, 0.0f, 0.0f}, 0.001f, "sin test failed"},
> + {20, 0, {0.1464f, 0.0f, 0.0f, 0.0f}, 0.001f, "sin test failed"},
> + {21, 0, {0.0843f, 0.0f, 0.0f, 0.0f}, 0.001f, "sin test failed"},
> + {22, 0, {0.0381f, 0.0f, 0.0f, 0.0f}, 0.001f, "sin test failed"},
> + {23, 0, {0.0096f, 0.0f, 0.0f, 0.0f}, 0.001f, "sin test failed"},
> + {24, 0, {0.0000f, 0.0f, 0.0f, 0.0f}, 0.001f, "sin test failed"},
> + {25, 0, {0.0096f, 0.0f, 0.0f, 0.0f}, 0.001f, "sin test failed"},
> + {26, 0, {0.0381f, 0.0f, 0.0f, 0.0f}, 0.001f, "sin test failed"},
> + {27, 0, {0.0843f, 0.0f, 0.0f, 0.0f}, 0.001f, "sin test failed"},
> + {28, 0, {0.1464f, 0.0f, 0.0f, 0.0f}, 0.001f, "sin test failed"},
> + {29, 0, {0.2222f, 0.0f, 0.0f, 0.0f}, 0.001f, "sin test failed"},
> + {30, 0, {0.3087f, 0.0f, 0.0f, 0.0f}, 0.001f, "sin test failed"},
> + {31, 0, {0.4025f, 0.0f, 0.0f, 0.0f}, 0.001f, "sin test failed"},
> + };
> +
32 probes is probably a bit excessive, but I guess it's not a major
problem. Note that you can easily return the cosine results in the .y
component though, instead of duplicating the complete test.