SPIRV-Tools: Update Android.bp to fix build.

Mirror the rather significant changes in Android.mk from:
https://github.com/KhronosGroup/SPIRV-Tools/commit/64f36ea5296ec023f65f75d72196d3ff7ae7c7b2?diff=split

Bug: b/123642959
Change-Id: Iaf82487e768dd0062a97cfe8ebff4e7f85816141
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/39876
Reviewed-by: Chris Forbes <chrisforbes@google.com>
Tested-by: Ben Clayton <bclayton@google.com>
diff --git a/third_party/SPIRV-Tools/Android.bp b/third_party/SPIRV-Tools/Android.bp
index 6a10a28..64502f4 100644
--- a/third_party/SPIRV-Tools/Android.bp
+++ b/third_party/SPIRV-Tools/Android.bp
@@ -21,79 +21,36 @@
     srcs: ["source/extinst.debuginfo.grammar.json"],
 }
 
-genrule {
-    name: "swiftshader_gen_spvtools_grammar_tables_1.0",
-    out: [
-        "core.insts-1.0.inc",
-        "operand.kinds-1.0.inc",
-        "glsl.std.450.insts.inc",
-        "opencl.std.insts.inc",
-    ],
-    srcs: [
-        ":swiftshader_spirv.core.grammar.json-1.0",
-        ":swiftshader_spirv.glsl.grammar.json",
-        ":swiftshader_spirv.opencl.grammar.json",
-        ":swiftshader_spirv.debuginfo.grammar.json",
-    ],
-    tool_files: ["utils/generate_grammar_tables.py"],
-    cmd: "$(location) --spirv-core-grammar=$(location :swiftshader_spirv.core.grammar.json-1.0) "+
-         "--extinst-glsl-grammar=$(location :swiftshader_spirv.glsl.grammar.json) "+
-         "--extinst-opencl-grammar=$(location :swiftshader_spirv.opencl.grammar.json) "+
-         "--extinst-debuginfo-grammar=$(location :swiftshader_spirv.debuginfo.grammar.json) "+
-         "--core-insts-output=$(location core.insts-1.0.inc) "+
-         "--glsl-insts-output=$(location glsl.std.450.insts.inc) "+
-         "--opencl-insts-output=$(location opencl.std.insts.inc) "+
-         "--operand-kinds-output=$(location operand.kinds-1.0.inc)",
-}
-
-genrule {
-    name: "swiftshader_gen_spvtools_grammar_tables_1.1",
-    out: [
-        "core.insts-1.1.inc",
-        "operand.kinds-1.1.inc",
-    ],
-    srcs: [
-        ":swiftshader_spirv.core.grammar.json-1.1",
-        ":swiftshader_spirv.debuginfo.grammar.json",
-    ],
-    tool_files: ["utils/generate_grammar_tables.py"],
-    cmd: "$(location) --spirv-core-grammar=$(location :swiftshader_spirv.core.grammar.json-1.1) "+
-         "--extinst-debuginfo-grammar=$(location :swiftshader_spirv.debuginfo.grammar.json) "+
-         "--core-insts-output=$(location core.insts-1.1.inc) "+
-         "--operand-kinds-output=$(location operand.kinds-1.1.inc)",
-}
-
-genrule {
-    name: "swiftshader_gen_spvtools_grammar_tables_1.2",
-    out: [
-        "core.insts-1.2.inc",
-        "operand.kinds-1.2.inc",
-    ],
-    srcs: [
-        ":swiftshader_spirv.core.grammar.json-1.2",
-        ":swiftshader_spirv.debuginfo.grammar.json",
-    ],
-    tool_files: ["utils/generate_grammar_tables.py"],
-    cmd: "$(location) --spirv-core-grammar=$(location :swiftshader_spirv.core.grammar.json-1.2) "+
-         "--extinst-debuginfo-grammar=$(location :swiftshader_spirv.debuginfo.grammar.json) "+
-         "--core-insts-output=$(location core.insts-1.2.inc) "+
-         "--operand-kinds-output=$(location operand.kinds-1.2.inc)",
+filegroup {
+    name: "swiftshader_spirv.extinst.opencl.debuginfo.100.grammar.json",
+    srcs: ["source/extinst.opencl.debuginfo.100.grammar.json"],
 }
 
 genrule {
     name: "swiftshader_gen_spvtools_grammar_tables_unified1",
     out: [
         "core.insts-unified1.inc",
+        "glsl.std.450.insts.inc",
+        "opencl.std.insts.inc",
         "operand.kinds-unified1.inc",
     ],
     srcs: [
         ":swiftshader_spirv.core.grammar.json-unified1",
+        ":swiftshader_spirv.glsl.grammar.json",
+        ":swiftshader_spirv.opencl.grammar.json",
         ":swiftshader_spirv.debuginfo.grammar.json",
+        ":swiftshader_spirv.extinst.opencl.debuginfo.100.grammar.json",
     ],
     tool_files: ["utils/generate_grammar_tables.py"],
-    cmd: "$(location) --spirv-core-grammar=$(location :swiftshader_spirv.core.grammar.json-unified1) "+
+    cmd: "$(location) "+
+         "--spirv-core-grammar=$(location :swiftshader_spirv.core.grammar.json-unified1) "+
+         "--extinst-glsl-grammar=$(location :swiftshader_spirv.glsl.grammar.json) "+
+         "--extinst-opencl-grammar=$(location :swiftshader_spirv.opencl.grammar.json) "+
          "--extinst-debuginfo-grammar=$(location :swiftshader_spirv.debuginfo.grammar.json) "+
+         "--extinst-cldebuginfo100-grammar=$(location :swiftshader_spirv.extinst.opencl.debuginfo.100.grammar.json) "+
          "--core-insts-output=$(location core.insts-unified1.inc) "+
+         "--glsl-insts-output=$(location glsl.std.450.insts.inc) "+
+         "--opencl-insts-output=$(location opencl.std.insts.inc) "+
          "--operand-kinds-output=$(location operand.kinds-unified1.inc)",
 }
 
@@ -111,6 +68,20 @@
 }
 
 genrule {
+    name: "swiftshader_gen_spvtools_grammar_tables_opencl_debuginfo_100",
+    out: [
+        "opencl.debuginfo.100.insts.inc",
+    ],
+    srcs: [
+        ":swiftshader_spirv.extinst.opencl.debuginfo.100.grammar.json",
+    ],
+    tool_files: ["utils/generate_grammar_tables.py"],
+    cmd: "$(location) --extinst-vendor-grammar=$(in) "+
+         "--vendor-insts-output=$(out) "+
+         "--vendor-operand-kind-prefix=CLDEBUG100_"
+}
+
+genrule {
     name: "swiftshader_gen_spvtools_grammar_tables_amd-gcn-shader",
     out: [
         "spv-amd-gcn-shader.insts.inc",
@@ -185,10 +156,12 @@
     srcs: [
         ":swiftshader_spirv.core.grammar.json-unified1",
         ":swiftshader_spirv.debuginfo.grammar.json",
+        ":swiftshader_spirv.extinst.opencl.debuginfo.100.grammar.json",
     ],
     tool_files: ["utils/generate_grammar_tables.py"],
     cmd: "$(location) --spirv-core-grammar=$(location :swiftshader_spirv.core.grammar.json-unified1) "+
          "--extinst-debuginfo-grammar=$(location :swiftshader_spirv.debuginfo.grammar.json) "+
+         "--extinst-cldebuginfo100-grammar=$(location :swiftshader_spirv.extinst.opencl.debuginfo.100.grammar.json) "+
          "--extension-enum-output=$(location extension_enum.inc) "+
          "--enum-string-mapping-output=$(location enum_string_mapping.inc) "
 }
@@ -233,11 +206,9 @@
         "external/swiftshader/third_party/SPIRV-Headers/include"
     ],
     generated_headers: [
-        "swiftshader_gen_spvtools_grammar_tables_1.0",
-        "swiftshader_gen_spvtools_grammar_tables_1.1",
-        "swiftshader_gen_spvtools_grammar_tables_1.2",
         "swiftshader_gen_spvtools_grammar_tables_unified1",
         "swiftshader_gen_spvtools_grammar_tables_debuginfo",
+        "swiftshader_gen_spvtools_grammar_tables_opencl_debuginfo_100",
         "swiftshader_gen_spvtools_grammar_tables_amd-gcn-shader",
         "swiftshader_gen_spvtools_grammar_tables_amd-shader-ballot",
         "swiftshader_gen_spvtools_grammar_tables_amd-shader-explicit-vertex-parameter",