Commit Graph

59 Commits

Author SHA1 Message Date
Andrzej Ratajewski
a8af2ce341
Add SPV_INTEL_cache_controls extension support (#376)
Specification: https://github.com/KhronosGroup/SPIRV-Registry/blob/main/extensions/INTEL/SPV_INTEL_cache_controls.asciidoc
2023-09-13 08:43:27 -07:00
David Neto
d790ced752
Validate enums have sensible versions and are visible (#369)
* Validate enums have a sensible versions and are visible

Add version field for each eumerant.

For capabilities and instructions introduced by an extension (its
first version is "None"):
- the capability should be guarded by an extension
- the instruction should be guarded by a capability.

Other enums are presumed guarded transitiviely by use as an operand
to an instruction or another operand.

Fixes: #278, #368

* Fix capability logic, and check more cases

For capabilities, only check for lack of an extension.
If capability X lists capabilities Y and Z, those are not guards *for*
X, but rather when X is enabled it also implicitly enables Y and Z.

Also, an instruction that is *not* in a core SPIR-V version
must not be directly enabled by *both* and extension and a capability.
There are 78 existing cases that break this rule, so grandparent them
in with an allow-list.

* Add "version": "None" to enums added for a recent extension

Add it for the HostAccessQualifier enums from
SPV_INTEL_global_variable_host_access
2023-08-23 08:42:14 -07:00
Viktoria Maximova
b8b9eb8640
Headers support for two Intel extensions (#356)
* Add SPV_INTEL_global_variable_fpga_decorations

Spec: https://github.com/KhronosGroup/SPIRV-Registry/blob/main/extensions/INTEL/SPV_INTEL_global_variable_fpga_decorations.asciidoc

* Add SPV_INTEL_global_variable_host_access

Spec: https://github.com/KhronosGroup/SPIRV-Registry/blob/main/extensions/INTEL/SPV_INTEL_global_variable_host_access.asciidoc

* Update headers generator

* update headers after generating script
2023-08-16 09:21:06 -07:00
asudarsa
51b1064617
Recommit PR #348 - Add fp-max-error support (#363)
Signed-off-by: Arvind Sudarsanam <arvind.sudarsanam@intel.com>
2023-07-21 17:01:47 +02:00
Kevin Petit
0e7d41e275 Report failures in makeHeaders
Exit the script when one of the called command fails.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2023-07-19 21:17:07 +01:00
Kevin Petit
9b527c0fb6 Add definitions for SPV_KHR_cooperative_matrix
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2023-06-21 18:04:36 +01:00
Kevin Petit
d8c780f48c Make the generated operators for masks constexpr
Generate the overloaded C++11 operators as constexpr instead of inline.
constexpr implies inline but makes it possible to use the operators in
constexpr functions.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2023-05-17 16:51:22 +01:00
John Kessenich
aa331ab0ff
Merge pull request #299 from qingyuanzNV/add_nonsemantic_debugbreak
Add NonSemantic.DebugBreak
2023-01-19 00:26:16 +07:00
David Neto
66ebc28510 Add operator^ 2022-12-15 11:12:14 -05:00
David Neto
355f451879 C++ headers: Define & and ~ bitwise operators for mask enums
Fixes: #303
2022-12-14 17:10:43 -05:00
Qingyuan Zheng
ff67f521e3 NonSemantic.DebugBreak 2022-10-16 22:17:32 -07:00
Robert Campbell
d6b5958869 Implemented Beef language header generation 2022-05-20 12:13:56 -04:00
Prokop Randáček
6e7a6754b1
Include bool type for C 2022-01-04 11:33:05 +00:00
John Kessenich
dcd4752edb Update headers with SPIR-V version 1.6, revision 1. 2021-12-16 00:26:22 +07:00
Kevin Petit
292387ae14 Add CI using Github actions and update README
- Run on Linux, macOS and Windows
- Check that the headers install works
- Check the example can be built
- Check the header generation tool can be built
- Generate headers and check they match the committed files
- Mention the requirement to install the header generation tool in README

Change-Id: I8385b3931064ad677d7aa49b2514cea9b4602168
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2021-06-23 18:21:33 +01:00
David Neto
e51883eceb Support SPV_KHR_integer_dot_product
Signed-off-by: David Neto <dneto@google.com>
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
Change-Id: Icd243bb9c2a6f8a40713db215a6ca5946ea7abb3
2021-06-16 18:41:41 +01:00
Raun Krisch
7bfb1b5329
Merge pull request #177 from MrSidims/private/MrSidims/AP
Upstream ac_fixed and hls_float Intel extensions
2021-06-09 09:31:41 -07:00
David Neto
c1e11359e3 buildHeaders: Add override decoration
Fixes warnings in AppleClang
2021-06-08 12:23:20 -04:00
David Neto
5f7de8b4cf Update to CMake 3.0
This matches the CMakeLists.txt file in the project root.
2021-06-08 12:00:20 -04:00
Dmitry Sidorov
a3ffef8e2e Upstream AP Intel extensions
SPV_INTEL_arbitrary_precision_floating_point and
SPV_INTEL_arbitrary_precision_fixed_point extensions are
being upstreamed.

Specs:
2f6e965e68/sycl/doc/extensions/SPIRV/SPV_INTEL_arbitrary_precision_fixed_point.asciidoc
bd86b218f7/sycl/doc/extensions/SPIRV/SPV_INTEL_arbitrary_precision_floating_point.asciidoc

Signed-off-by: Dmitry Sidorov <dmitry.sidorov@intel.com>
2021-03-31 17:19:27 +03:00
David Neto
e50154dbd6 Header generator: Check enumerant ordering
In the grammar, enforce ordering rules:
- Instructions must appear in order of their opcode
- Non-instructions: each successive enumerant within a single kind must
  appear in order

- Reorder enumerants Subgroup*MaskKHR enums to satisfy the rule.
2021-01-27 15:46:02 -05:00
David Neto
80438cd0df Push FPDenormMode, FPOperationMode to the end
This is a cosmetic change for the benefit of generating the SPIR-V spec.
It reorders the "FP Denorm Mode" and "FP Operation Mode" so they are
the last sections in chapter 3 before the instruction listing.
They become 3.37 and 3.38. The idea is to preserve the section numbering
for earlier sections. For example, keep 3.31 as the Capability section.
2021-01-20 17:33:13 -05:00
Dmitry Sidorov
ea791133ee Upstream SPV_INTEL_float_controls2 extension
Spec:
39fa9b0cbf/sycl/doc/extensions/SPIRV/SPV_INTEL_float_controls2.asciidoc

Signed-off-by: Dmitry Sidorov <dmitry.sidorov@intel.com>
2021-01-20 13:14:31 +03:00
John Kessenich
7845730cab Bump revision to 4, for SPIR-V 1.5. 2020-10-23 09:21:38 -06:00
Tobski
be32cb6c8f
Added SPV_KHR_fragment_shading_rate (#172) 2020-10-19 14:55:32 -06:00
alan-baker
96013f32b4
Publish the headers for the clspv embedded reflection non-semantic extended instruction set (#164)
* Clspv non-semantic reflection instruction set
* Version 1
2020-07-29 14:23:29 -04:00
John Kessenich
c0df742ec0 Update headers to SPIR-V 1.5 Revision 3 2020-04-24 08:50:04 -06:00
John Kessenich
f8bf11a025
Merge pull request #149 from dgkoch/prov_ray_tracing
Add SPV_KHR_ray_{tracing,query} to headers
2020-03-17 07:49:00 -06:00
Daniel Koch
fdbc0d1c43 Add shadercalls scope
and update copyright notices
2020-03-17 07:41:42 -04:00
Torosdagli
9a186c772c Added ray flags, primitive culling flags, queries 2020-03-17 07:41:09 -04:00
John Kessenich
9e8e6aff3b Non-functional: Update header build to match Khronos spec. builder. 2020-03-17 00:44:51 -06:00
Jeff Bolz
e814bf0067 Add NonSemantic.DebugPrintf JSON/header 2020-03-04 12:45:35 -06:00
Jeff Bolz
89bef40961 Fix max enum value 2020-03-04 12:45:28 -06:00
David Neto
0a7fc45259
Add grammars, C header, and header generator for vendor and KHR extended instruction sets (#143)
* Add JSON grammars for extened instruction sets

Add AMD extended instruction sets
Add DebugInfo
Add OpenCL.DebugInfo.100

* Add script to generate C headers from extinst grammar

This is cloned then adapted from the same-named script in SPIRV-Tools
(contributed under same authorship but different copyright).

Invoke the script as part of the overall header generation script.

* Add generated C header for extended instruction sets

Add for DebugInfo and OpenCLDebugInfo
Add for AMD vendor extended instruction sets

* Update the README for extinst header generation

* Fix header include guard to match directory structure

* Ensure generated header ends in newline

* Fix typo in file reference

* Fix name of AMD_shader_explicit_vertex_parameter.h

* Avoid duplicate generation

* Split Revision and Version enum values by newlines

Per code review request

* Convert C header generator driver to Python3

* Fix README for Python3 for extinst header generation

* Use 4-space in generated headers, consistently
2020-02-26 11:58:17 -07:00
Nicolai Hähnle
809512f368 buildHeaders: update version to SPIR-V 1.5
This seems to have gotten dropped in the latest update.
2019-10-14 21:54:45 +02:00
John Kessenich
cca9cc7f39 Grammar: Add instruction-printing classes.
Each instruction belongs to exactly one instruction class.
@exclude will put in the headers, but not in the specification.
Reserved is for instructions that are both to be reserved in the
specification and not yet put into another printing class.
(It is okay to establish a printing class for a reserved instruction.)
2019-06-12 00:17:15 -06:00
Jeff Bolz
9f50e659a8 Update HasResultAndType code generation to skip duplicate enum values. There weren't any until SPIR-V 1.4 release, now there are two. 2019-05-16 16:15:54 -05:00
Alan Kemp
823750b567 Compare enum names rather than values to determine last element 2019-05-12 00:44:05 +01:00
John Kessenich
c4f8f65792 Move to version 1.4 of SPIR-V. 2019-05-06 23:34:36 -06:00
Jeff Bolz
9f77618576 Add a function that returns whether an opcode has a result and/or result type. Currently only implemented in C-based printers. 2019-04-03 14:57:59 -05:00
John Kessenich
3beb2a0373 Add ability to skip ranges of instructions; no impact to public headers 2019-03-12 06:22:47 -06:00
John Kessenich
2d08d12d8c Sync to rev. 7 of headers from Khronos. 2019-03-12 06:11:47 -06:00
John Kessenich
dc3db3a5ae Fix #96: Don't include a comment after #endif for the C header. 2019-03-04 23:41:55 -05:00
John Kessenich
46a3ae6dff Update copyright years. 2019-01-03 08:20:02 +07:00
John Kessenich
b683d7c1e5 Include the new spv.d file when fixing line endings on Windows. 2019-01-03 08:18:00 +07:00
Remi Thebault
3b98c494f3 whitespace 2019-01-02 17:13:59 +01:00
Remi Thebault
9591b0c419 adding support for D language 2019-01-02 17:13:13 +01:00
Rémi Verschelde
f83382248f Remove Unix executable permission from text files 2018-12-10 11:20:45 +01:00
John Kessenich
17da9f8231 Reserve tokens for float controls and no integer wrapping:
- SPV_KHR_float_controls
- SPV_KHR_no_integer_wrap_decoration
2018-11-30 07:32:53 -07:00
Thog
23b1368344
Use lower-case instead of camel-case 2018-10-11 19:22:40 +02:00