From 77d4e30edad86c0dd3c2774139450850050fecb0 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 14 Apr 2016 18:35:14 -0400 Subject: [PATCH] GLSL grammar update. * Add names to operands. * Fix capability requirements for UnpackDouble2x32. * Fix operands list error for NClamp. --- source/extinst.glsl.std.450.grammar.json | 242 ++++++++++++++++--------------- 1 file changed, 122 insertions(+), 120 deletions(-) diff --git a/source/extinst.glsl.std.450.grammar.json b/source/extinst.glsl.std.450.grammar.json index b39142f..3d9f39e 100644 --- a/source/extinst.glsl.std.450.grammar.json +++ b/source/extinst.glsl.std.450.grammar.json @@ -31,439 +31,439 @@ "opname" : "Round", "opcode" : 1, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" } ] }, { "opname" : "RoundEven", "opcode" : 2, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" } ] }, { "opname" : "Trunc", "opcode" : 3, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" } ] }, { "opname" : "FAbs", "opcode" : 4, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" } ] }, { "opname" : "SAbs", "opcode" : 5, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" } ] }, { "opname" : "FSign", "opcode" : 6, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" } ] }, { "opname" : "SSign", "opcode" : 7, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" } ] }, { "opname" : "Floor", "opcode" : 8, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" } ] }, { "opname" : "Ceil", "opcode" : 9, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" } ] }, { "opname" : "Fract", "opcode" : 10, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" } ] }, { "opname" : "Radians", "opcode" : 11, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'degrees'" } ] }, { "opname" : "Degrees", "opcode" : 12, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'radians'" } ] }, { "opname" : "Sin", "opcode" : 13, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" } ] }, { "opname" : "Cos", "opcode" : 14, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" } ] }, { "opname" : "Tan", "opcode" : 15, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" } ] }, { "opname" : "Asin", "opcode" : 16, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" } ] }, { "opname" : "Acos", "opcode" : 17, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" } ] }, { "opname" : "Atan", "opcode" : 18, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'y_over_x'" } ] }, { "opname" : "Sinh", "opcode" : 19, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" } ] }, { "opname" : "Cosh", "opcode" : 20, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" } ] }, { "opname" : "Tanh", "opcode" : 21, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" } ] }, { "opname" : "Asinh", "opcode" : 22, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" } ] }, { "opname" : "Acosh", "opcode" : 23, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" } ] }, { "opname" : "Atanh", "opcode" : 24, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" } ] }, { "opname" : "Atan2", "opcode" : 25, "operands" : [ - { "kind" : "IdRef" }, - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'y'" }, + { "kind" : "IdRef", "name" : "'x'" } ] }, { "opname" : "Pow", "opcode" : 26, "operands" : [ - { "kind" : "IdRef" }, - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } ] }, { "opname" : "Exp", "opcode" : 27, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" } ] }, { "opname" : "Log", "opcode" : 28, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" } ] }, { "opname" : "Exp2", "opcode" : 29, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" } ] }, { "opname" : "Log2", "opcode" : 30, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" } ] }, { "opname" : "Sqrt", "opcode" : 31, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" } ] }, { "opname" : "InverseSqrt", "opcode" : 32, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" } ] }, { "opname" : "Determinant", "opcode" : 33, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" } ] }, { "opname" : "MatrixInverse", "opcode" : 34, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" } ] }, { "opname" : "Modf", "opcode" : 35, "operands" : [ - { "kind" : "IdRef" }, - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'i'" } ] }, { "opname" : "ModfStruct", "opcode" : 36, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" } ] }, { "opname" : "FMin", "opcode" : 37, "operands" : [ - { "kind" : "IdRef" }, - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } ] }, { "opname" : "UMin", "opcode" : 38, "operands" : [ - { "kind" : "IdRef" }, - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } ] }, { "opname" : "SMin", "opcode" : 39, "operands" : [ - { "kind" : "IdRef" }, - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } ] }, { "opname" : "FMax", "opcode" : 40, "operands" : [ - { "kind" : "IdRef" }, - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } ] }, { "opname" : "UMax", "opcode" : 41, "operands" : [ - { "kind" : "IdRef" }, - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } ] }, { "opname" : "SMax", "opcode" : 42, "operands" : [ - { "kind" : "IdRef" }, - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } ] }, { "opname" : "FClamp", "opcode" : 43, "operands" : [ - { "kind" : "IdRef" }, - { "kind" : "IdRef" }, - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'minVal'" }, + { "kind" : "IdRef", "name" : "'maxVal'" } ] }, { "opname" : "UClamp", "opcode" : 44, "operands" : [ - { "kind" : "IdRef" }, - { "kind" : "IdRef" }, - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'minVal'" }, + { "kind" : "IdRef", "name" : "'maxVal'" } ] }, { "opname" : "SClamp", "opcode" : 45, "operands" : [ - { "kind" : "IdRef" }, - { "kind" : "IdRef" }, - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'minVal'" }, + { "kind" : "IdRef", "name" : "'maxVal'" } ] }, { "opname" : "FMix", "opcode" : 46, "operands" : [ - { "kind" : "IdRef" }, - { "kind" : "IdRef" }, - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" }, + { "kind" : "IdRef", "name" : "'a'" } ] }, { "opname" : "IMix", "opcode" : 47, "operands" : [ - { "kind" : "IdRef" }, - { "kind" : "IdRef" }, - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" }, + { "kind" : "IdRef", "name" : "'a'" } ] }, { "opname" : "Step", "opcode" : 48, "operands" : [ - { "kind" : "IdRef" }, - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'edge'" }, + { "kind" : "IdRef", "name" : "'x'" } ] }, { "opname" : "SmoothStep", "opcode" : 49, "operands" : [ - { "kind" : "IdRef" }, - { "kind" : "IdRef" }, - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'edge0'" }, + { "kind" : "IdRef", "name" : "'edge1'" }, + { "kind" : "IdRef", "name" : "'x'" } ] }, { "opname" : "Fma", "opcode" : 50, "operands" : [ - { "kind" : "IdRef" }, - { "kind" : "IdRef" }, - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'a'" }, + { "kind" : "IdRef", "name" : "'b'" }, + { "kind" : "IdRef", "name" : "'c'" } ] }, { "opname" : "Frexp", "opcode" : 51, "operands" : [ - { "kind" : "IdRef" }, - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'exp'" } ] }, { "opname" : "FrexpStruct", "opcode" : 52, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" } ] }, { "opname" : "Ldexp", "opcode" : 53, "operands" : [ - { "kind" : "IdRef" }, - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'exp'" } ] }, { "opname" : "PackSnorm4x8", "opcode" : 54, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'v'" } ] }, { "opname" : "PackUnorm4x8", "opcode" : 55, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'v'" } ] }, { "opname" : "PackSnorm2x16", "opcode" : 56, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'v'" } ] }, { "opname" : "PackUnorm2x16", "opcode" : 57, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'v'" } ] }, { "opname" : "PackHalf2x16", "opcode" : 58, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'v'" } ] }, { "opname" : "PackDouble2x32", "opcode" : 59, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'v'" } ], "capabilities" : [ "Float64" ] }, @@ -471,126 +471,127 @@ "opname" : "UnpackSnorm2x16", "opcode" : 60, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'p'" } ] }, { "opname" : "UnpackUnorm2x16", "opcode" : 61, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'p'" } ] }, { "opname" : "UnpackHalf2x16", "opcode" : 62, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'v'" } ] }, { "opname" : "UnpackSnorm4x8", "opcode" : 63, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'p'" } ] }, { "opname" : "UnpackUnorm4x8", "opcode" : 64, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'p'" } ] }, { "opname" : "UnpackDouble2x32", "opcode" : 65, "operands" : [ - { "kind" : "IdRef" } - ] + { "kind" : "IdRef", "name" : "'v'" } + ], + "capabilities" : [ "Float64" ] }, { "opname" : "Length", "opcode" : 66, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" } ] }, { "opname" : "Distance", "opcode" : 67, "operands" : [ - { "kind" : "IdRef" }, - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'p0'" }, + { "kind" : "IdRef", "name" : "'p1'" } ] }, { "opname" : "Cross", "opcode" : 68, "operands" : [ - { "kind" : "IdRef" }, - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } ] }, { "opname" : "Normalize", "opcode" : 69, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" } ] }, { "opname" : "FaceForward", "opcode" : 70, "operands" : [ - { "kind" : "IdRef" }, - { "kind" : "IdRef" }, - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'N'" }, + { "kind" : "IdRef", "name" : "'I'" }, + { "kind" : "IdRef", "name" : "'Nref'" } ] }, { "opname" : "Reflect", "opcode" : 71, "operands" : [ - { "kind" : "IdRef" }, - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'I'" }, + { "kind" : "IdRef", "name" : "'N'" } ] }, { "opname" : "Refract", "opcode" : 72, "operands" : [ - { "kind" : "IdRef" }, - { "kind" : "IdRef" }, - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'I'" }, + { "kind" : "IdRef", "name" : "'N'" }, + { "kind" : "IdRef", "name" : "'eta'" } ] }, { "opname" : "FindILsb", "opcode" : 73, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'Value'" } ] }, { "opname" : "FindSMsb", "opcode" : 74, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'Value'" } ] }, { "opname" : "FindUMsb", "opcode" : 75, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'Value'" } ] }, { "opname" : "InterpolateAtCentroid", "opcode" : 76, "operands" : [ - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'interpolant'" } ], "capabilities" : [ "InterpolationFunction" ] }, @@ -598,8 +599,8 @@ "opname" : "InterpolateAtSample", "opcode" : 77, "operands" : [ - { "kind" : "IdRef" }, - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'interpolant'" }, + { "kind" : "IdRef", "name" : "'sample'" } ], "capabilities" : [ "InterpolationFunction" ] }, @@ -607,8 +608,8 @@ "opname" : "InterpolateAtOffset", "opcode" : 78, "operands" : [ - { "kind" : "IdRef" }, - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'interpolant'" }, + { "kind" : "IdRef", "name" : "'offset'" } ], "capabilities" : [ "InterpolationFunction" ] }, @@ -616,24 +617,25 @@ "opname" : "NMin", "opcode" : 79, "operands" : [ - { "kind" : "IdRef" }, - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } ] }, { "opname" : "NMax", "opcode" : 80, "operands" : [ - { "kind" : "IdRef" }, - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } ] }, { "opname" : "NClamp", "opcode" : 81, "operands" : [ - { "kind" : "IdRef" }, - { "kind" : "IdRef" } + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'minVal'" }, + { "kind" : "IdRef", "name" : "'maxVal'" } ] } ] -- 2.7.4