commit | 55d7069ce6dae98c5e872ab433b6fa95a7855aca | [log] [tgz] |
---|---|---|
author | David Neto <dneto@google.com> | Tue Apr 17 18:13:59 2018 -0400 |
committer | David Neto <dneto@google.com> | Tue Apr 17 18:14:33 2018 -0400 |
tree | 3116550620911b4cc7b1c594178e79e2cee612ba | |
parent | 1e3e33068116971fb27357ef5d167ac09667b7d1 [diff] | |
parent | 3a4dbdde9a9b2cf23736694ba70262dce27fbeaa [diff] |
Merge remote-tracking branch 'aosp/upstream-master' into update-shaderc Includes: 3a4dbdd Merge pull request #68 from dneto0/hlsl-decorate-string 14e335f SPV_GOOGLE_hlsl_functionality1 includes all of SPV_GOOGLE_decorate_string 12f8de9 Add tokens for SPV_EXT_descriptor_indexing. 757bcc0 Merge pull request #67 from jeffbolznv/partition_missing_extension 28c3ed1 Add missing 'extensions' for OpGroupNonUniformPartitionNV 567cf2f Add SPV_NV_shader_subgroup_partitioned to SPIR-V JSON 80b0a0c Merge pull request #66 from bashbaug/intel_enum_block 10335f3 reserve 2x SPIR-V enum blocks for upcoming Intel extensions b13b3be Merge pull request #64 from antiagainst/add-extensions edd0440 Add missing extensions on some symbols 9a97861 Merge pull request #63 from antiagainst/add-missing-extensions 728eb3f Add missing extensions for several symbols 9f6846f Merge pull request #62 from antiagainst/fix-extensions 4ece4a4 Add missing extension/capability requirements for some symbols Change-Id: Ib2531d3e9d52ca58f51e91cdda1ce3c9533054cd Testing: checkbuild.py on Linux; unit tests on Windows
This repository contains machine-readable files for the SPIR-V Registry. This includes:
Headers are provided in the include directory, with up-to-date headers in the unified1
subdirectory. Older headers are provided according to their version.
In contrast, the XML registry file has a linear history, so it is not tied to SPIR-V specification versions.
When a new version or revision of the SPIR-V specification is published, the SPIR-V Working Group will push new commits onto master, updating the files under include.
The SPIR-V XML registry file is updated by Khronos whenever a new enum range is allocated.
Pull requests can be made to
mkdir build cd build cmake .. # Linux cmake --build . --target install-headers # Windows cmake --build . --config Debug --target install-headers
Then, for example, you will have /usr/local/include/spirv/unified1/spirv.h
If you want to install them somewhere else, then use -DCMAKE_INSTALL_PREFIX=/other/path
on the first cmake
command.
A CMake-based project can use the headers without installing, as follows:
add_subdirectory
directive to include this source tree.${SPIRV-Headers_SOURCE_DIR}/include}
in a target_include_directories
directive.#include
directives that explicitly mention the spirv
path component.#include "spirv/unified1/GLSL.std.450.h" #include "spirv/unified1/OpenCL.std.h" #include "spirv/unified1/spirv.hpp"
See also the example subdirectory. But since that example is inside this repostory, it doesn't use and add_subdirectory
directive.
This will generally be done by Khronos, for a change to the JSON grammar. However, the project for the tool to do this is included in this repository, and can be used to test a PR, or even to include the results in the PR. This is not required though.
The header-generation project is under the tools/buildHeaders
directory. Use CMake to build the project, in a build
subdirectory (under tools/buildHeaders
). There is then a bash script at bin/makeHeaders
that shows how to use the built header-generator binary to generate the headers from the JSON grammar. (Execute bin/makeHeaders
from the tools/buildHeaders
directory.)
Notes:
How are different versions published?
The multiple versions of the headers have been simplified into a single unified1
view. The JSON grammar has a “version” field saying what version things first showed up in.
How do you handle the evolution of extended instruction sets?
Extended instruction sets evolve asynchronously from the core spec. Right now there is only a single version of both the GLSL and OpenCL headers. So we don't yet have a problematic example to resolve.
Copyright (c) 2015-2018 The Khronos Group Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and/or associated documentation files (the "Materials"), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Materials, and to permit persons to whom the Materials are furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Materials. MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.