• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..27-Oct-2020-

android_test/H27-Oct-2020-4222

build_overrides/H27-Oct-2020-9984

docs/H27-Oct-2020-337279

examples/cpp-interface/H03-May-2022-6636

external/H03-May-2022-

include/H27-Oct-2020-4,7873,174

source/H03-May-2022-114,78377,227

test/H03-May-2022-228,911191,166

utils/H27-Oct-2020-2,7461,972

.appveyor.ymlH A D27-Oct-20202.8 KiB9073

.clang-formatH A D27-Oct-202092 76

.gitignoreH A D27-Oct-2020421 3229

.gnH A D27-Oct-2020706 2118

Android.mkH A D27-Oct-202015.3 KiB360331

BUILD.gnH A D27-Oct-202031 KiB1,022947

CHANGESH A D27-Oct-202047.5 KiB966936

CONTRIBUTING.mdH A D27-Oct-20207.8 KiB193149

DEPSH A D27-Oct-2020762 2719

LICENSEH A D27-Oct-202011.1 KiB203169

PRESUBMIT.pyH A D27-Oct-20201.2 KiB4121

README.mdH A D27-Oct-202024.2 KiB621464

codereview.settingsH A D27-Oct-2020101 32

README.md

1# SPIR-V Tools
2
3## Overview
4
5The SPIR-V Tools project provides an API and commands for processing SPIR-V
6modules.
7
8The project includes an assembler, binary module parser, disassembler,
9validator, and optimizer for SPIR-V. Except for the optimizer, all are based
10on a common static library.  The library contains all of the implementation
11details, and is used in the standalone tools whilst also enabling integration
12into other code bases directly. The optimizer implementation resides in its
13own library, which depends on the core library.
14
15The interfaces have stabilized:
16We don't anticipate making a breaking change for existing features.
17
18SPIR-V is defined by the Khronos Group Inc.
19See the [SPIR-V Registry][spirv-registry] for the SPIR-V specification,
20headers, and XML registry.
21
22## Downloads
23
24[![Build status](https://ci.appveyor.com/api/projects/status/gpue87cesrx3pi0d/branch/master?svg=true)](https://ci.appveyor.com/project/Khronoswebmaster/spirv-tools/branch/master)
25<img alt="Linux" src="kokoro/img/linux.png" width="20px" height="20px" hspace="2px"/>[![Linux Build Status](https://storage.googleapis.com/spirv-tools/badges/build_status_linux_clang_release.svg)](https://storage.googleapis.com/spirv-tools/badges/build_link_linux_clang_release.html)
26<img alt="MacOS" src="kokoro/img/macos.png" width="20px" height="20px" hspace="2px"/>[![MacOS Build Status](https://storage.googleapis.com/spirv-tools/badges/build_status_macos_clang_release.svg)](https://storage.googleapis.com/spirv-tools/badges/build_link_macos_clang_release.html)
27<img alt="Windows" src="kokoro/img/windows.png" width="20px" height="20px" hspace="2px"/>[![Windows Build Status](https://storage.googleapis.com/spirv-tools/badges/build_status_windows_release.svg)](https://storage.googleapis.com/spirv-tools/badges/build_link_windows_vs2017_release.html)
28
29[More downloads](docs/downloads.md)
30
31## Versioning SPIRV-Tools
32
33See [`CHANGES`](CHANGES) for a high level summary of recent changes, by version.
34
35SPIRV-Tools project version numbers are of the form `v`*year*`.`*index* and with
36an optional `-dev` suffix to indicate work in progress.  For exampe, the
37following versions are ordered from oldest to newest:
38
39* `v2016.0`
40* `v2016.1-dev`
41* `v2016.1`
42* `v2016.2-dev`
43* `v2016.2`
44
45Use the `--version` option on each command line tool to see the software
46version.  An API call reports the software version as a C-style string.
47
48## Supported features
49
50### Assembler, binary parser, and disassembler
51
52* Support for SPIR-V 1.0, 1.1, 1.2, and 1.3
53  * Based on SPIR-V syntax described by JSON grammar files in the
54    [SPIRV-Headers](https://github.com/KhronosGroup/SPIRV-Headers) repository.
55* Support for extended instruction sets:
56  * GLSL std450 version 1.0 Rev 3
57  * OpenCL version 1.0 Rev 2
58* Assembler only does basic syntax checking.  No cross validation of
59  IDs or types is performed, except to check literal arguments to
60  `OpConstant`, `OpSpecConstant`, and `OpSwitch`.
61
62See [`docs/syntax.md`](docs/syntax.md) for the assembly language syntax.
63
64### Validator
65
66The validator checks validation rules described by the SPIR-V specification.
67
68Khronos recommends that tools that create or transform SPIR-V modules use the
69validator to ensure their outputs are valid, and that tools that consume SPIR-V
70modules optionally use the validator to protect themselves from bad inputs.
71This is especially encouraged for debug and development scenarios.
72
73The validator has one-sided error: it will only return an error when it has
74implemented a rule check and the module violates that rule.
75
76The validator is incomplete.
77See the [CHANGES](CHANGES) file for reports on completed work, and
78the [Validator
79sub-project](https://github.com/KhronosGroup/SPIRV-Tools/projects/1) for planned
80and in-progress work.
81
82*Note*: The validator checks some Universal Limits, from section 2.17 of the SPIR-V spec.
83The validator will fail on a module that exceeds those minimum upper bound limits.
84It is [future work](https://github.com/KhronosGroup/SPIRV-Tools/projects/1#card-1052403)
85to parameterize the validator to allow larger
86limits accepted by a more than minimally capable SPIR-V consumer.
87
88
89### Optimizer
90
91*Note:* The optimizer is still under development.
92
93Currently supported optimizations:
94* General
95  * Strip debug info
96* Specialization Constants
97  * Set spec constant default value
98  * Freeze spec constant
99  * Fold `OpSpecConstantOp` and `OpSpecConstantComposite`
100  * Unify constants
101  * Eliminate dead constant
102* Code Reduction
103  * Inline all function calls exhaustively
104  * Convert local access chains to inserts/extracts
105  * Eliminate local load/store in single block
106  * Eliminate local load/store with single store
107  * Eliminate local load/store with multiple stores
108  * Eliminate local extract from insert
109  * Eliminate dead instructions (aggressive)
110  * Eliminate dead branches
111  * Merge single successor / single predecessor block pairs
112  * Eliminate common uniform loads
113  * Remove duplicates: Capabilities, extended instruction imports, types, and
114    decorations.
115
116For the latest list with detailed documentation, please refer to
117[`include/spirv-tools/optimizer.hpp`](include/spirv-tools/optimizer.hpp).
118
119For suggestions on using the code reduction options, please refer to this [white paper](https://www.lunarg.com/shader-compiler-technologies/white-paper-spirv-opt/).
120
121
122### Linker
123
124*Note:* The linker is still under development.
125
126Current features:
127* Combine multiple SPIR-V binary modules together.
128* Combine into a library (exports are retained) or an executable (no symbols
129  are exported).
130
131See the [CHANGES](CHANGES) file for reports on completed work, and the [General
132sub-project](https://github.com/KhronosGroup/SPIRV-Tools/projects/2) for
133planned and in-progress work.
134
135
136### Reducer
137
138*Note:* The reducer is still under development.
139
140The reducer simplifies and shrinks a SPIR-V module with respect to a
141user-supplied *interestingness function*.  For example, given a large
142SPIR-V module that cause some SPIR-V compiler to fail with a given
143fatal error message, the reducer could be used to look for a smaller
144version of the module that causes the compiler to fail with the same
145fatal error message.
146
147To suggest an additional capability for the reducer, [file an
148issue](https://github.com/KhronosGroup/SPIRV-Tools/issues]) with
149"Reducer:" as the start of its title.
150
151
152### Extras
153
154* [Utility filters](#utility-filters)
155* Build target `spirv-tools-vimsyntax` generates file `spvasm.vim`.
156  Copy that file into your `$HOME/.vim/syntax` directory to get SPIR-V assembly syntax
157  highlighting in Vim.  This build target is not built by default.
158
159## Contributing
160
161The SPIR-V Tools project is maintained by members of the The Khronos Group Inc.,
162and is hosted at https://github.com/KhronosGroup/SPIRV-Tools.
163
164Consider joining the `public_spirv_tools_dev@khronos.org` mailing list, via
165[https://www.khronos.org/spir/spirv-tools-mailing-list/](https://www.khronos.org/spir/spirv-tools-mailing-list/).
166The mailing list is used to discuss development plans for the SPIRV-Tools as an open source project.
167Once discussion is resolved,
168specific work is tracked via issues and sometimes in one of the
169[projects][spirv-tools-projects].
170
171(To provide feedback on the SPIR-V _specification_, file an issue on the
172[SPIRV-Headers][spirv-headers] GitHub repository.)
173
174See [`docs/projects.md`](docs/projects.md) to see how we use the
175[GitHub Project
176feature](https://help.github.com/articles/tracking-the-progress-of-your-work-with-projects/)
177to organize planned and in-progress work.
178
179Contributions via merge request are welcome. Changes should:
180* Be provided under the [Apache 2.0](#license).
181* You'll be prompted with a one-time "click-through"
182  [Khronos Open Source Contributor License Agreement][spirv-tools-cla]
183  (CLA) dialog as part of submitting your pull request or
184  other contribution to GitHub.
185* Include tests to cover updated functionality.
186* C++ code should follow the [Google C++ Style Guide][cpp-style-guide].
187* Code should be formatted with `clang-format`.
188  [kokoro/check-format/build.sh](kokoro/check-format/build.sh)
189  shows how to download it. Note that we currently use
190  `clang-format version 5.0.0` for SPIRV-Tools. Settings are defined by
191  the included [.clang-format](.clang-format) file.
192
193We intend to maintain a linear history on the GitHub `master` branch.
194
195### Source code organization
196
197* `example`: demo code of using SPIRV-Tools APIs
198* `external/googletest`: Intended location for the
199  [googletest][googletest] sources, not provided
200* `external/effcee`: Location of [Effcee][effcee] sources, if the `effcee` library
201  is not already configured by an enclosing project.
202* `external/re2`: Location of [RE2][re2] sources, if the `re2` library is not already
203  configured by an enclosing project.
204  (The Effcee project already requires RE2.)
205* `include/`: API clients should add this directory to the include search path
206* `external/spirv-headers`: Intended location for
207  [SPIR-V headers][spirv-headers], not provided
208* `include/spirv-tools/libspirv.h`: C API public interface
209* `source/`: API implementation
210* `test/`: Tests, using the [googletest][googletest] framework
211* `tools/`: Command line executables
212
213Example of getting sources, assuming SPIRV-Tools is configured as a standalone project:
214
215    git clone https://github.com/KhronosGroup/SPIRV-Tools.git   spirv-tools
216    git clone https://github.com/KhronosGroup/SPIRV-Headers.git spirv-tools/external/spirv-headers
217    git clone https://github.com/google/googletest.git          spirv-tools/external/googletest
218    git clone https://github.com/google/effcee.git              spirv-tools/external/effcee
219    git clone https://github.com/google/re2.git                 spirv-tools/external/re2
220
221### Tests
222
223The project contains a number of tests, used to drive development
224and ensure correctness.  The tests are written using the
225[googletest][googletest] framework.  The `googletest`
226source is not provided with this project.  There are two ways to enable
227tests:
228* If SPIR-V Tools is configured as part of an enclosing project, then the
229  enclosing project should configure `googletest` before configuring SPIR-V Tools.
230* If SPIR-V Tools is configured as a standalone project, then download the
231  `googletest` source into the `<spirv-dir>/external/googletest` directory before
232  configuring and building the project.
233
234*Note*: You must use a version of googletest that includes
235[a fix][googletest-pull-612] for [googletest issue 610][googletest-issue-610].
236The fix is included on the googletest master branch any time after 2015-11-10.
237In particular, googletest must be newer than version 1.7.0.
238
239### Dependency on Effcee
240
241Some tests depend on the [Effcee][effcee] library for stateful matching.
242Effcee itself depends on [RE2][re2].
243
244* If SPIRV-Tools is configured as part of a larger project that already uses
245  Effcee, then that project should include Effcee before SPIRV-Tools.
246* Otherwise, SPIRV-Tools expects Effcee sources to appear in `external/effcee`
247  and RE2 sources to appear in `external/re2`.
248
249
250## Build
251
252Instead of building manually, you can also download the binaries for your
253platform directly from the [master-tot release][master-tot-release] on GitHub.
254Those binaries are automatically uploaded by the buildbots after successful
255testing and they always reflect the current top of the tree of the master
256branch.
257
258In order to build the code, you first need to sync the external repositories
259that it depends on. Assume that `<spirv-dir>` is the root directory of the
260checked out code:
261
262```sh
263cd <spirv-dir>
264git clone https://github.com/KhronosGroup/SPIRV-Headers.git external/spirv-headers
265git clone https://github.com/google/effcee.git external/effcee
266git clone https://github.com/google/re2.git external/re2
267git clone https://github.com/google/googletest.git external/googletest # optional
268
269```
270
271*Note*:
272The script `utils/git-sync-deps` can be used to checkout and/or update the
273contents of the repos under `external/` instead of manually maintaining them.
274
275### Build using CMake
276You can build The project using [CMake][cmake] to generate platform-specific
277build configurations.
278
279```sh
280cd <spirv-dir>
281mkdir build && cd build
282cmake [-G <platform-generator>] <spirv-dir>
283```
284
285Once the build files have been generated, build using your preferred
286development environment.
287
288### Build using Bazel
289You can also use [Bazel](https://bazel.build/) to build the project.
290```sh
291cd <spirv-dir>
292bazel build :all
293```
294
295### Tools you'll need
296
297For building and testing SPIRV-Tools, the following tools should be
298installed regardless of your OS:
299
300- [CMake](http://www.cmake.org/): if using CMake for generating compilation
301targets, you need to install CMake Version 2.8.12 or later.
302- [Python 3](http://www.python.org/): for utility scripts and running the test
303suite.
304- [Bazel](https://baze.build/) (optional): if building the source with Bazel,
305you need to install Bazel Version 0.29.1 on your machine. Other versions may
306also work, but are not verified.
307
308SPIRV-Tools is regularly tested with the the following compilers:
309
310On Linux
311- GCC version 4.8.5
312- Clang version 3.8
313
314On MacOS
315- AppleClang 10.0
316
317On Windows
318- Visual Studio 2015
319- Visual Studio 2017
320
321Other compilers or later versions may work, but they are not tested.
322
323### CMake options
324
325The following CMake options are supported:
326
327* `SPIRV_COLOR_TERMINAL={ON|OFF}`, default `ON` - Enables color console output.
328* `SPIRV_SKIP_TESTS={ON|OFF}`, default `OFF`- Build only the library and
329  the command line tools.  This will prevent the tests from being built.
330* `SPIRV_SKIP_EXECUTABLES={ON|OFF}`, default `OFF`- Build only the library, not
331  the command line tools and tests.
332* `SPIRV_USE_SANITIZER=<sanitizer>`, default is no sanitizing - On UNIX
333  platforms with an appropriate version of `clang` this option enables the use
334  of the sanitizers documented [here][clang-sanitizers].
335  This should only be used with a debug build.
336* `SPIRV_WARN_EVERYTHING={ON|OFF}`, default `OFF` - On UNIX platforms enable
337  more strict warnings.  The code might not compile with this option enabled.
338  For Clang, enables `-Weverything`.  For GCC, enables `-Wpedantic`.
339  See [`CMakeLists.txt`](CMakeLists.txt) for details.
340* `SPIRV_WERROR={ON|OFF}`, default `ON` - Forces a compilation error on any
341  warnings encountered by enabling the compiler-specific compiler front-end
342  option.  No compiler front-end options are enabled when this option is OFF.
343
344Additionally, you can pass additional C preprocessor definitions to SPIRV-Tools
345via setting `SPIRV_TOOLS_EXTRA_DEFINITIONS`. For example, by setting it to
346`/D_ITERATOR_DEBUG_LEVEL=0` on Windows, you can disable checked iterators and
347iterator debugging.
348
349### Android
350
351SPIR-V Tools supports building static libraries `libSPIRV-Tools.a` and
352`libSPIRV-Tools-opt.a` for Android:
353
354```
355cd <spirv-dir>
356
357export ANDROID_NDK=/path/to/your/ndk
358
359mkdir build && cd build
360mkdir libs
361mkdir app
362
363$ANDROID_NDK/ndk-build -C ../android_test     \
364                      NDK_PROJECT_PATH=.      \
365                      NDK_LIBS_OUT=`pwd`/libs \
366                      NDK_APP_OUT=`pwd`/app
367```
368
369### Updating DEPS
370Occasionally the entries in DEPS will need to be updated. This is done on demand
371when there is a request to do this, often due to downstream breakages. There is
372a script `utils/roll_deps.sh` provided, which will generate a patch with the
373updated DEPS values. This will still need to be tested in your checkout to
374confirm that there are no integration issues that need to be resolved.
375
376## Library
377
378### Usage
379
380The internals of the library use C++11 features, and are exposed via both a C
381and C++ API.
382
383In order to use the library from an application, the include path should point
384to `<spirv-dir>/include`, which will enable the application to include the
385header `<spirv-dir>/include/spirv-tools/libspirv.h{|pp}` then linking against
386the static library in `<spirv-build-dir>/source/libSPIRV-Tools.a` or
387`<spirv-build-dir>/source/SPIRV-Tools.lib`.
388For optimization, the header file is
389`<spirv-dir>/include/spirv-tools/optimizer.hpp`, and the static library is
390`<spirv-build-dir>/source/libSPIRV-Tools-opt.a` or
391`<spirv-build-dir>/source/SPIRV-Tools-opt.lib`.
392
393* `SPIRV-Tools` CMake target: Creates the static library:
394  * `<spirv-build-dir>/source/libSPIRV-Tools.a` on Linux and OS X.
395  * `<spirv-build-dir>/source/libSPIRV-Tools.lib` on Windows.
396* `SPIRV-Tools-opt` CMake target: Creates the static library:
397  * `<spirv-build-dir>/source/libSPIRV-Tools-opt.a` on Linux and OS X.
398  * `<spirv-build-dir>/source/libSPIRV-Tools-opt.lib` on Windows.
399
400#### Entry points
401
402The interfaces are still under development, and are expected to change.
403
404There are five main entry points into the library in the C interface:
405
406* `spvTextToBinary`: An assembler, translating text to a binary SPIR-V module.
407* `spvBinaryToText`: A disassembler, translating a binary SPIR-V module to
408  text.
409* `spvBinaryParse`: The entry point to a binary parser API.  It issues callbacks
410  for the header and each parsed instruction.  The disassembler is implemented
411  as a client of `spvBinaryParse`.
412* `spvValidate` implements the validator functionality. *Incomplete*
413* `spvValidateBinary` implements the validator functionality. *Incomplete*
414
415The C++ interface is comprised of three classes, `SpirvTools`, `Optimizer` and
416`Linker`, all in the `spvtools` namespace.
417* `SpirvTools` provides `Assemble`, `Disassemble`, and `Validate` methods.
418* `Optimizer` provides methods for registering and running optimization passes.
419* `Linker` provides methods for combining together multiple binaries.
420
421## Command line tools
422
423Command line tools, which wrap the above library functions, are provided to
424assemble or disassemble shader files.  It's a convention to name SPIR-V
425assembly and binary files with suffix `.spvasm` and `.spv`, respectively.
426
427### Assembler tool
428
429The assembler reads the assembly language text, and emits the binary form.
430
431The standalone assembler is the exectuable called `spirv-as`, and is located in
432`<spirv-build-dir>/tools/spirv-as`.  The functionality of the assembler is implemented
433by the `spvTextToBinary` library function.
434
435* `spirv-as` - the standalone assembler
436  * `<spirv-dir>/tools/as`
437
438Use option `-h` to print help.
439
440### Disassembler tool
441
442The disassembler reads the binary form, and emits assembly language text.
443
444The standalone disassembler is the executable called `spirv-dis`, and is located in
445`<spirv-build-dir>/tools/spirv-dis`. The functionality of the disassembler is implemented
446by the `spvBinaryToText` library function.
447
448* `spirv-dis` - the standalone disassembler
449  * `<spirv-dir>/tools/dis`
450
451Use option `-h` to print help.
452
453The output includes syntax colouring when printing to the standard output stream,
454on Linux, Windows, and OS X.
455
456### Linker tool
457
458The linker combines multiple SPIR-V binary modules together, resulting in a single
459binary module as output.
460
461This is a work in progress.
462The linker does not support OpenCL program linking options related to math
463flags. (See section 5.6.5.2 in OpenCL 1.2)
464
465* `spirv-link` - the standalone linker
466  * `<spirv-dir>/tools/link`
467
468### Optimizer tool
469
470The optimizer processes a SPIR-V binary module, applying transformations
471in the specified order.
472
473This is a work in progress, with initially only few available transformations.
474
475* `spirv-opt` - the standalone optimizer
476  * `<spirv-dir>/tools/opt`
477
478### Validator tool
479
480*Warning:* This functionality is under development, and is incomplete.
481
482The standalone validator is the executable called `spirv-val`, and is located in
483`<spirv-build-dir>/tools/spirv-val`. The functionality of the validator is implemented
484by the `spvValidate` library function.
485
486The validator operates on the binary form.
487
488* `spirv-val` - the standalone validator
489  * `<spirv-dir>/tools/val`
490
491### Reducer tool
492
493The reducer shrinks a SPIR-V binary module, guided by a user-supplied
494*interestingness test*.
495
496This is a work in progress, with initially only shrinks a module in a few ways.
497
498* `spirv-reduce` - the standalone reducer
499  * `<spirv-dir>/tools/reduce`
500
501Run `spirv-reduce --help` to see how to specify interestingness.
502
503### Control flow dumper tool
504
505The control flow dumper prints the control flow graph for a SPIR-V module as a
506[GraphViz](http://www.graphviz.org/) graph.
507
508This is experimental.
509
510* `spirv-cfg` - the control flow graph dumper
511  * `<spirv-dir>/tools/cfg`
512
513### Utility filters
514
515* `spirv-lesspipe.sh` - Automatically disassembles `.spv` binary files for the
516  `less` program, on compatible systems.  For example, set the `LESSOPEN`
517  environment variable as follows, assuming both `spirv-lesspipe.sh` and
518  `spirv-dis` are on your executable search path:
519  ```
520   export LESSOPEN='| spirv-lesspipe.sh "%s"'
521  ```
522  Then you page through a disassembled module as follows:
523  ```
524  less foo.spv
525  ```
526  * The `spirv-lesspipe.sh` script will pass through any extra arguments to
527    `spirv-dis`.  So, for example, you can turn off colours and friendly ID
528    naming as follows:
529    ```
530    export LESSOPEN='| spirv-lesspipe.sh "%s" --no-color --raw-id'
531    ```
532
533* [vim-spirv](https://github.com/kbenzie/vim-spirv) - A vim plugin which
534  supports automatic disassembly of `.spv` files using the `:edit` command and
535  assembly using the `:write` command. The plugin also provides additional
536  features which include; syntax highlighting; highlighting of all ID's matching
537  the ID under the cursor; and highlighting errors where the `Instruction`
538  operand of `OpExtInst` is used without an appropriate `OpExtInstImport`.
539
540* `50spirv-tools.el` - Automatically disassembles '.spv' binary files when
541  loaded into the emacs text editor, and re-assembles them when saved,
542  provided any modifications to the file are valid.  This functionality
543  must be explicitly requested by defining the symbol
544  SPIRV_TOOLS_INSTALL_EMACS_HELPERS as follows:
545  ```
546  cmake -DSPIRV_TOOLS_INSTALL_EMACS_HELPERS=true ...
547  ```
548
549  In addition, this helper is only installed if the directory /etc/emacs/site-start.d
550  exists, which is typically true if emacs is installed on the system.
551
552  Note that symbol IDs are not currently preserved through a load/edit/save operation.
553  This may change if the ability is added to spirv-as.
554
555
556### Tests
557
558Tests are only built when googletest is found. Use `ctest` to run all the
559tests.
560
561## Future Work
562<a name="future"></a>
563
564_See the [projects pages](https://github.com/KhronosGroup/SPIRV-Tools/projects)
565for more information._
566
567### Assembler and disassembler
568
569* The disassembler could emit helpful annotations in comments.  For example:
570  * Use variable name information from debug instructions to annotate
571    key operations on variables.
572  * Show control flow information by annotating `OpLabel` instructions with
573    that basic block's predecessors.
574* Error messages could be improved.
575
576### Validator
577
578This is a work in progress.
579
580### Linker
581
582* The linker could accept math transformations such as allowing MADs, or other
583  math flags passed at linking-time in OpenCL.
584* Linkage attributes can not be applied through a group.
585* Check decorations of linked functions attributes.
586* Remove dead instructions, such as OpName targeting imported symbols.
587
588## Licence
589<a name="license"></a>
590Full license terms are in [LICENSE](LICENSE)
591```
592Copyright (c) 2015-2016 The Khronos Group Inc.
593
594Licensed under the Apache License, Version 2.0 (the "License");
595you may not use this file except in compliance with the License.
596You may obtain a copy of the License at
597
598    http://www.apache.org/licenses/LICENSE-2.0
599
600Unless required by applicable law or agreed to in writing, software
601distributed under the License is distributed on an "AS IS" BASIS,
602WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
603See the License for the specific language governing permissions and
604limitations under the License.
605```
606
607[spirv-tools-cla]: https://cla-assistant.io/KhronosGroup/SPIRV-Tools
608[spirv-tools-projects]: https://github.com/KhronosGroup/SPIRV-Tools/projects
609[spirv-tools-mailing-list]: https://www.khronos.org/spir/spirv-tools-mailing-list
610[spirv-registry]: https://www.khronos.org/registry/spir-v/
611[spirv-headers]: https://github.com/KhronosGroup/SPIRV-Headers
612[googletest]: https://github.com/google/googletest
613[googletest-pull-612]: https://github.com/google/googletest/pull/612
614[googletest-issue-610]: https://github.com/google/googletest/issues/610
615[effcee]: https://github.com/google/effcee
616[re2]: https://github.com/google/re2
617[CMake]: https://cmake.org/
618[cpp-style-guide]: https://google.github.io/styleguide/cppguide.html
619[clang-sanitizers]: http://clang.llvm.org/docs/UsersManual.html#controlling-code-generation
620[master-tot-release]: https://github.com/KhronosGroup/SPIRV-Tools/releases/tag/master-tot
621