Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit of auto-generation code. This auto-generates C# code t…
…o build into compute shaders for rapid testing and comparison between CPU & GPU backends. Added ToMemorySize() to TestUtils for nicer test output. Created outline structure for new way to create test data and test CPU implementations. Now creates test data, and a result set based on executing on the CPU. Added TestTimer to make it easier to output timing message during long running tests. Runs test on all backends and does naive byte wise comparison of results to show rate of inconsistency. Added some more utilities methods to improve test output. Corrrected format in TestTimer overloads to only show 2 decimal places. Improved formatting of TestBuiltins test output. Move code into AutoGenerated folder, and split out classes to improve readability. Renamed Mappings.Methods to Mappings.MethodMaps and changed Methods to count field. Major refactor to make more OO and easier to understand. Failure analysis now gives much more insightful information by grouping results together, making it much easier to see where a failure is occuring. Added more flexible equality that is based on float comparison where possible. Added float generation control, and float comparison control, to provide more control over tests. Removed old ShaderBuiltinTests code and cleanedup ready for pull request. Added new 'AddCheck' methods to known functions implementations. This makes it easier to implement a check that runs for each element in a vector. Added ShaderBuiltins.FMod. Mod made consistent across backends (as distinct from FMod), by implementing correctly in HLSL (and CPU). Made Pow and Cbrt implementations consistent by using Abs of 1st parameter. This is how Vulkan does it, whereas the other backends all return NaN. As we can't consistently return NaN on backends, I've adopted Vulkan's approach. Corrected CPU Clamp, Lerp and SmoothStep implementations by removing checks (makes consistent with GPU implementations). Corrected CPU Clamp implementation. A failure to compile a backend will not cause the test set to be skipped from analysis (before it would cause it to show as different), allowing the tests to continue if at least two backends can be compared. Fixed issues with Open GL ES floats, and support for MathF.Pow overloads. Minor tweaks as requested in GH-80 Fixed issue with Open GL ES float cast bracket position. Correct to only pass method name into execution code, as per GH-80 comments. Removed resources file as per GH-80 request. Also removed DoCS method as CS is now not called from code directly. Fixed atanh implementaion in HLSL. Fixed bug with extracting thread ID in compute shader. Fixed packed vector accesor logic in AddCheck on Metal. Ensure waithandles are disposed after process by changing using order. Wrapped waithandle set's in try..catch to prevent occasional race condition. Add Metal mod operator.
- Loading branch information