Home | History | Annotate | Download | only in SPIRV-Tools
      1 filegroup {
      2     name: "deqp_spirv.debuginfo.grammar.json",
      3     srcs: ["source/extinst.debuginfo.grammar.json"],
      4 }
      5 
      6 genrule {
      7     name: "deqp_gen_spvtools_grammar_tables_1.0",
      8     out: [
      9         "core.insts-1.0.inc",
     10         "operand.kinds-1.0.inc",
     11         "glsl.std.450.insts.inc",
     12         "opencl.std.insts.inc",
     13     ],
     14     srcs: [
     15         ":deqp_spirv.core.grammar.json-1.0",
     16         ":deqp_spirv.glsl.grammar.json",
     17         ":deqp_spirv.opencl.grammar.json",
     18         ":deqp_spirv.debuginfo.grammar.json",
     19     ],
     20     tool_files: ["utils/generate_grammar_tables.py"],
     21     cmd: "$(location) --spirv-core-grammar=$(location :deqp_spirv.core.grammar.json-1.0) "+
     22          "--extinst-glsl-grammar=$(location :deqp_spirv.glsl.grammar.json) "+
     23          "--extinst-opencl-grammar=$(location :deqp_spirv.opencl.grammar.json) "+
     24          "--extinst-debuginfo-grammar=$(location :deqp_spirv.debuginfo.grammar.json) "+
     25          "--core-insts-output=$(location core.insts-1.0.inc) "+
     26          "--glsl-insts-output=$(location glsl.std.450.insts.inc) "+
     27          "--opencl-insts-output=$(location opencl.std.insts.inc) "+
     28          "--operand-kinds-output=$(location operand.kinds-1.0.inc)",
     29 }
     30 
     31 genrule {
     32     name: "deqp_gen_spvtools_grammar_tables_1.1",
     33     out: [
     34         "core.insts-1.1.inc",
     35         "operand.kinds-1.1.inc",
     36     ],
     37     srcs: [
     38         ":deqp_spirv.core.grammar.json-1.1",
     39         ":deqp_spirv.debuginfo.grammar.json",
     40     ],
     41     tool_files: ["utils/generate_grammar_tables.py"],
     42     cmd: "$(location) --spirv-core-grammar=$(location :deqp_spirv.core.grammar.json-1.1) "+
     43          "--extinst-debuginfo-grammar=$(location :deqp_spirv.debuginfo.grammar.json) "+
     44          "--core-insts-output=$(location core.insts-1.1.inc) "+
     45          "--operand-kinds-output=$(location operand.kinds-1.1.inc)",
     46 }
     47 
     48 genrule {
     49     name: "deqp_gen_spvtools_grammar_tables_1.2",
     50     out: [
     51         "core.insts-1.2.inc",
     52         "operand.kinds-1.2.inc",
     53     ],
     54     srcs: [
     55         ":deqp_spirv.core.grammar.json-1.2",
     56         ":deqp_spirv.debuginfo.grammar.json",
     57     ],
     58     tool_files: ["utils/generate_grammar_tables.py"],
     59     cmd: "$(location) --spirv-core-grammar=$(location :deqp_spirv.core.grammar.json-1.2) "+
     60          "--extinst-debuginfo-grammar=$(location :deqp_spirv.debuginfo.grammar.json) "+
     61          "--core-insts-output=$(location core.insts-1.2.inc) "+
     62          "--operand-kinds-output=$(location operand.kinds-1.2.inc)",
     63 }
     64 
     65 genrule {
     66     name: "deqp_gen_spvtools_grammar_tables_unified1",
     67     out: [
     68         "core.insts-unified1.inc",
     69         "operand.kinds-unified1.inc",
     70     ],
     71     srcs: [
     72         ":deqp_spirv.core.grammar.json-unified1",
     73         ":deqp_spirv.debuginfo.grammar.json",
     74     ],
     75     tool_files: ["utils/generate_grammar_tables.py"],
     76     cmd: "$(location) --spirv-core-grammar=$(location :deqp_spirv.core.grammar.json-unified1) "+
     77          "--extinst-debuginfo-grammar=$(location :deqp_spirv.debuginfo.grammar.json) "+
     78          "--core-insts-output=$(location core.insts-unified1.inc) "+
     79          "--operand-kinds-output=$(location operand.kinds-unified1.inc)",
     80 }
     81 
     82 genrule {
     83     name: "deqp_gen_spvtools_grammar_tables_debuginfo",
     84     out: [
     85         "debuginfo.insts.inc",
     86     ],
     87     srcs: [
     88         ":deqp_spirv.debuginfo.grammar.json",
     89     ],
     90     tool_files: ["utils/generate_grammar_tables.py"],
     91     cmd: "$(location) --extinst-vendor-grammar=$(in) "+
     92          "--vendor-insts-output=$(out)"
     93 }
     94 
     95 genrule {
     96     name: "deqp_gen_spvtools_grammar_tables_amd-gcn-shader",
     97     out: [
     98         "spv-amd-gcn-shader.insts.inc",
     99     ],
    100     srcs: [
    101         "source/extinst.spv-amd-gcn-shader.grammar.json",
    102     ],
    103     tool_files: ["utils/generate_grammar_tables.py"],
    104     cmd: "$(location) --extinst-vendor-grammar=$(in) "+
    105          "--vendor-insts-output=$(out)"
    106 }
    107 
    108 genrule {
    109     name: "deqp_gen_spvtools_grammar_tables_amd-shader-ballot",
    110     out: [
    111         "spv-amd-shader-ballot.insts.inc",
    112     ],
    113     srcs: [
    114         "source/extinst.spv-amd-shader-ballot.grammar.json",
    115     ],
    116     tool_files: ["utils/generate_grammar_tables.py"],
    117     cmd: "$(location) --extinst-vendor-grammar=$(in) "+
    118          "--vendor-insts-output=$(out)"
    119 }
    120 
    121 genrule {
    122     name: "deqp_gen_spvtools_grammar_tables_amd-shader-explicit-vertex-parameter",
    123     out: [
    124         "spv-amd-shader-explicit-vertex-parameter.insts.inc",
    125     ],
    126     srcs: [
    127         "source/extinst.spv-amd-shader-explicit-vertex-parameter.grammar.json",
    128     ],
    129     tool_files: ["utils/generate_grammar_tables.py"],
    130     cmd: "$(location) --extinst-vendor-grammar=$(in) "+
    131          "--vendor-insts-output=$(out)"
    132 }
    133 
    134 genrule {
    135     name: "deqp_gen_spvtools_grammar_tables_amd-shader-trinary-minmax",
    136     out: [
    137         "spv-amd-shader-trinary-minmax.insts.inc",
    138     ],
    139     srcs: [
    140         "source/extinst.spv-amd-shader-trinary-minmax.grammar.json",
    141     ],
    142     tool_files: ["utils/generate_grammar_tables.py"],
    143     cmd: "$(location) --extinst-vendor-grammar=$(in) "+
    144          "--vendor-insts-output=$(out)"
    145 }
    146 
    147 genrule {
    148     name: "deqp_gen_spvtools_lang_headers",
    149     out: [
    150         "DebugInfo.h",
    151     ],
    152     srcs: [
    153         ":deqp_spirv.debuginfo.grammar.json",
    154     ],
    155     tool_files: ["utils/generate_language_headers.py"],
    156     cmd: "$(location) --extinst-name=DebugInfo "+
    157          "--extinst-grammar=$(location :deqp_spirv.debuginfo.grammar.json) "+
    158          "--extinst-output-base=$$(dirname $(location DebugInfo.h))/DebugInfo",
    159 }
    160 
    161 genrule {
    162     name: "deqp_gen_spvtools_enum_string_mapping",
    163     out: [
    164         "extension_enum.inc",
    165         "enum_string_mapping.inc",
    166     ],
    167     srcs: [
    168         ":deqp_spirv.core.grammar.json-unified1",
    169         ":deqp_spirv.debuginfo.grammar.json",
    170     ],
    171     tool_files: ["utils/generate_grammar_tables.py"],
    172     cmd: "$(location) --spirv-core-grammar=$(location :deqp_spirv.core.grammar.json-unified1) "+
    173          "--extinst-debuginfo-grammar=$(location :deqp_spirv.debuginfo.grammar.json) "+
    174          "--extension-enum-output=$(location extension_enum.inc) "+
    175          "--enum-string-mapping-output=$(location enum_string_mapping.inc) "
    176 }
    177 
    178 genrule {
    179     name: "deqp_gen_spvtools_generators_inc",
    180     out: [
    181         "generators.inc"
    182     ],
    183     srcs: [
    184         ":deqp_spirv.registry.xml"
    185     ],
    186     tool_files: ["utils/generate_registry_tables.py"],
    187     cmd: "$(location) --xml=$(location :deqp_spirv.registry.xml) --generator-output=$(location generators.inc)",
    188 }
    189 
    190 genrule { // FIXME this relies on `git` which is no good on build machines
    191     name: "deqp_gen_spvtools_build_version_inc",
    192     out: ["build-version.inc"],
    193     srcs: ["CHANGES"],
    194     tool_files: ["utils/update_build_version.py"],
    195     cmd: "$(location) $$(dirname $(location CHANGES)) " +
    196          "$(location build-version.inc)",
    197 }
    198 
    199 cc_library {
    200     name: "deqp_spirv-tools",
    201     sdk_version: "27",
    202     srcs: [
    203         "source/*.cpp",
    204         "source/util/*.cpp",
    205         "source/val/*.cpp",
    206         "source/opt/*.cpp",
    207     ],
    208     local_include_dirs: [
    209         "source",
    210     ],
    211     export_include_dirs: [
    212         "include",
    213     ],
    214     include_dirs: [
    215         "external/deqp-deps/SPIRV-Headers/include"
    216     ],
    217     generated_headers: [
    218         "deqp_gen_spvtools_grammar_tables_1.0",
    219         "deqp_gen_spvtools_grammar_tables_1.1",
    220         "deqp_gen_spvtools_grammar_tables_1.2",
    221         "deqp_gen_spvtools_grammar_tables_unified1",
    222         "deqp_gen_spvtools_grammar_tables_debuginfo",
    223         "deqp_gen_spvtools_grammar_tables_amd-gcn-shader",
    224         "deqp_gen_spvtools_grammar_tables_amd-shader-ballot",
    225         "deqp_gen_spvtools_grammar_tables_amd-shader-explicit-vertex-parameter",
    226         "deqp_gen_spvtools_grammar_tables_amd-shader-trinary-minmax",
    227         "deqp_gen_spvtools_enum_string_mapping",
    228         "deqp_gen_spvtools_generators_inc",
    229         "deqp_gen_spvtools_build_version_inc",
    230         "deqp_gen_spvtools_lang_headers",
    231     ],
    232     stl: "libc++_static",
    233     cppflags: [
    234         "-Wno-implicit-fallthrough"
    235     ],
    236 }
    237