diff options
| author | Ellie Hermaszewska <ellieh@nvidia.com> | 2023-02-09 13:16:30 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-09 13:16:30 +0800 |
| commit | fbe31ada800b3417d10a24f6c0481d3cb6b161e4 (patch) | |
| tree | 5d1e91706ecee08bcd5bc4763f2ad836a4c17815 /source/slang/slang-lookup-glslstd450.cpp | |
| parent | 6bbd67390e9693d6a60221a030270d5ab67edfb9 (diff) | |
Use stable sort in generation of lookup tables (#2638)
* Add Slang::List::stableSort
* Use stable sort in generation of lookup tables
* Disable newline translation when writing lookup tables
Diffstat (limited to 'source/slang/slang-lookup-glslstd450.cpp')
| -rw-r--r-- | source/slang/slang-lookup-glslstd450.cpp | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/source/slang/slang-lookup-glslstd450.cpp b/source/slang/slang-lookup-glslstd450.cpp index 46d683dbb..cd9172cf0 100644 --- a/source/slang/slang-lookup-glslstd450.cpp +++ b/source/slang/slang-lookup-glslstd450.cpp @@ -13,12 +13,12 @@ namespace Slang { static const unsigned tableSalt[81] ={ - 2, 1, 5, 1, 1, 0, 1, 0, 3, 0, 3, 0, 0, 4, 6, 3, - 7, 8, 10, 32, 0, 0, 0, 1, 0, 21, 1, 0, 0, 66, 1, 18, - 2, 0, 0, 2, 0, 1, 0, 0, 3, 1, 1, 0, 0, 0, 0, 1, - 4, 2, 2, 0, 2, 0, 0, 2, 0, 2, 3, 0, 0, 1, 5, 4, - 0, 0, 0, 5, 4, 2, 1, 1, 0, 7, 5, 0, 14, 4, 10, 4, - 5 + 1, 1, 1, 1, 4, 0, 1, 0, 10, 0, 3, 0, 0, 13, 4, 1, + 5, 1, 5, 4, 0, 0, 0, 1, 0, 9, 1, 0, 0, 1, 1, 8, + 2, 0, 0, 2, 0, 1, 0, 0, 2, 1, 1, 0, 0, 0, 0, 1, + 4, 3, 9, 0, 26, 0, 0, 2, 0, 2, 8, 0, 0, 17, 20, 5, + 0, 0, 0, 5, 4, 9, 4, 23, 0, 1, 7, 0, 24, 43, 10, 41, + 6 }; struct KV @@ -35,78 +35,78 @@ static const KV words[81] = {"Normalize", GLSLstd450Normalize}, {"Pow", GLSLstd450Pow}, {"Ceil", GLSLstd450Ceil}, - {"InterpolateAtSample", GLSLstd450InterpolateAtSample}, + {"PackUnorm4x8", GLSLstd450PackUnorm4x8}, {"Cosh", GLSLstd450Cosh}, - {"SMax", GLSLstd450SMax}, + {"Frexp", GLSLstd450Frexp}, {"PackUnorm2x16", GLSLstd450PackUnorm2x16}, - {"ModfStruct", GLSLstd450ModfStruct}, - {"IMix", GLSLstd450IMix}, + {"Atan2", GLSLstd450Atan2}, + {"Exp", GLSLstd450Exp}, {"Ldexp", GLSLstd450Ldexp}, - {"Atan", GLSLstd450Atan}, - {"Round", GLSLstd450Round}, - {"Cos", GLSLstd450Cos}, + {"NClamp", GLSLstd450NClamp}, + {"PackHalf2x16", GLSLstd450PackHalf2x16}, + {"Trunc", GLSLstd450Trunc}, {"UMin", GLSLstd450UMin}, {"FClamp", GLSLstd450FClamp}, - {"PackHalf2x16", GLSLstd450PackHalf2x16}, - {"SAbs", GLSLstd450SAbs}, + {"SMin", GLSLstd450SMin}, + {"IMix", GLSLstd450IMix}, {"FindUMsb", GLSLstd450FindUMsb}, - {"PackUnorm4x8", GLSLstd450PackUnorm4x8}, - {"UnpackDouble2x32", GLSLstd450UnpackDouble2x32}, + {"Cos", GLSLstd450Cos}, + {"UnpackUnorm4x8", GLSLstd450UnpackUnorm4x8}, {"Fma", GLSLstd450Fma}, {"RoundEven", GLSLstd450RoundEven}, - {"SmoothStep", GLSLstd450SmoothStep}, + {"Log", GLSLstd450Log}, {"Refract", GLSLstd450Refract}, - {"UnpackUnorm4x8", GLSLstd450UnpackUnorm4x8}, - {"NClamp", GLSLstd450NClamp}, - {"Trunc", GLSLstd450Trunc}, - {"Sin", GLSLstd450Sin}, - {"Asinh", GLSLstd450Asinh}, - {"Atanh", GLSLstd450Atanh}, - {"Length", GLSLstd450Length}, + {"Distance", GLSLstd450Distance}, + {"UMax", GLSLstd450UMax}, + {"ModfStruct", GLSLstd450ModfStruct}, + {"PackSnorm4x8", GLSLstd450PackSnorm4x8}, + {"Determinant", GLSLstd450Determinant}, + {"SmoothStep", GLSLstd450SmoothStep}, + {"Reflect", GLSLstd450Reflect}, {"Fract", GLSLstd450Fract}, {"Asin", GLSLstd450Asin}, - {"Determinant", GLSLstd450Determinant}, - {"Floor", GLSLstd450Floor}, - {"SMin", GLSLstd450SMin}, + {"Tanh", GLSLstd450Tanh}, + {"Degrees", GLSLstd450Degrees}, + {"Sqrt", GLSLstd450Sqrt}, {"MatrixInverse", GLSLstd450MatrixInverse}, {"Exp2", GLSLstd450Exp2}, - {"PackSnorm2x16", GLSLstd450PackSnorm2x16}, + {"Cross", GLSLstd450Cross}, {"FindILsb", GLSLstd450FindILsb}, {"FMax", GLSLstd450FMax}, {"NMin", GLSLstd450NMin}, - {"Frexp", GLSLstd450Frexp}, + {"SMax", GLSLstd450SMax}, {"InverseSqrt", GLSLstd450InverseSqrt}, - {"Atan2", GLSLstd450Atan2}, - {"InterpolateAtCentroid", GLSLstd450InterpolateAtCentroid}, + {"Length", GLSLstd450Length}, + {"SAbs", GLSLstd450SAbs}, {"UClamp", GLSLstd450UClamp}, {"FMix", GLSLstd450FMix}, {"FaceForward", GLSLstd450FaceForward}, {"Tan", GLSLstd450Tan}, {"Modf", GLSLstd450Modf}, - {"Exp", GLSLstd450Exp}, - {"PackSnorm4x8", GLSLstd450PackSnorm4x8}, + {"PackSnorm2x16", GLSLstd450PackSnorm2x16}, + {"Round", GLSLstd450Round}, {"UnpackUnorm2x16", GLSLstd450UnpackUnorm2x16}, - {"UMax", GLSLstd450UMax}, + {"Atan", GLSLstd450Atan}, {"FSign", GLSLstd450FSign}, - {"Distance", GLSLstd450Distance}, + {"Sin", GLSLstd450Sin}, {"UnpackSnorm2x16", GLSLstd450UnpackSnorm2x16}, - {"Log", GLSLstd450Log}, + {"Radians", GLSLstd450Radians}, {"PackDouble2x32", GLSLstd450PackDouble2x32}, {"Sinh", GLSLstd450Sinh}, {"UnpackSnorm4x8", GLSLstd450UnpackSnorm4x8}, - {"Cross", GLSLstd450Cross}, + {"InterpolateAtCentroid", GLSLstd450InterpolateAtCentroid}, {"NMax", GLSLstd450NMax}, {"Acosh", GLSLstd450Acosh}, - {"Reflect", GLSLstd450Reflect}, - {"Degrees", GLSLstd450Degrees}, {"Acos", GLSLstd450Acos}, - {"Radians", GLSLstd450Radians}, - {"Sqrt", GLSLstd450Sqrt}, - {"Tanh", GLSLstd450Tanh}, + {"UnpackDouble2x32", GLSLstd450UnpackDouble2x32}, + {"FrexpStruct", GLSLstd450FrexpStruct}, + {"Atanh", GLSLstd450Atanh}, + {"Floor", GLSLstd450Floor}, + {"Asinh", GLSLstd450Asinh}, {"InterpolateAtOffset", GLSLstd450InterpolateAtOffset}, {"Step", GLSLstd450Step}, {"FAbs", GLSLstd450FAbs}, - {"FrexpStruct", GLSLstd450FrexpStruct}, + {"InterpolateAtSample", GLSLstd450InterpolateAtSample}, {"Log2", GLSLstd450Log2}, {"SSign", GLSLstd450SSign}, {"FMin", GLSLstd450FMin}, |
