Commit Graph

13 Commits

Author SHA1 Message Date
Sarah
8312c523ee Permit the debug instructions in WebGPU SPIR-V (#3063)
Add tests
2019-11-26 14:04:57 -05:00
alan-baker
10951a7c9a
Refactor the InstructionPass (#2924)
* move checks to more appropriate locations
  * remove some duplicated checks
* New function to check valid storage classes
* updated tests
2019-09-27 00:06:36 -04:00
alan-baker
5a48c0da15 SPIRV-Tools support for SPIR-V 1.5 (#2865)
* Ensure same enum values have consistent extension lists

* val: fix checking of capabilities

The operand for an OpCapability should only be
checked for the extension or core version.
The InstructionPass registers a capability, and all its implied
sub-capabilities before actually checking the operand to an
OpCapability.

* Add basic support for SPIR-V 1.5

- Adds SPV_ENV_UNIVERSAL_1_5
- Command line tools default to spv1.5 environment
- SPIR-V 1.5 incorporates several extensions.  Now the disassembler
  prefers outputing the non-EXT or non-KHR names.  This requires
  updates to many tests, to make strings match again.
- Command line tests: Expect SPIR-V 1.5 by default

* Test validation of SPIR-V 1.5 incorporated extensions

Starting with 1.5, incorporated features no longer require
the associated OpExtension instruction.
2019-09-13 14:59:02 -04:00
Ryan Harrison
21712068fe
Validate that SPIR-V binary is encoded as little endian for WebGPU (#2523)
Fixes #2522
2019-04-17 12:44:54 -04:00
Ryan Harrison
3ee605d7cc
Ensure that only whitelisted extensions are used in WebGPU (#2127)
Fixes #2058
2018-11-28 10:49:05 -05:00
Ryan Harrison
4759082bbc
Ensure that imported extended instructions for WebGPU are only "GLSL.std.450" (#2119)
Ensure that imported extended instructions for WebGPU are GLSL.std.450

Fixes #2059
2018-11-27 16:20:01 -05:00
Ryan Harrison
48d923907b
Restrict capabilities to WebGPU spec (#2113)
Restrict capabilities to WebGPU spec

This covers whitelisting Matrix, Shader, Sampled1D, Image1D,
DerivativeControl, and ImageQuery. These are the allowed capabilities
that don't require an extension. Whitelisting VulkanMemoryModelKHR
will be handled by whitelisting its extension in a seperate patch.

Fixes #2101
2018-11-27 09:39:37 -05:00
Ryan Harrison
981763ec74
Ensure correct Addressing and Memory model set for WebGPU (#2093)
Adding validation that the addressing declared by OpMemoryModel is
Logical and the memory model declared is VulkanKHR. Updating a bunch
of tests that were broken by this.

Fixes #2060
2018-11-21 16:41:59 -05:00
Ryan Harrison
11c7a9e067
Validate that debugging instructions are not present for WebGPU (#2089)
Validate that debugging instructions are not present for WebGPU

For WebGPU execution environments, check that all of the debug
instructions have already been stripped before validation.

Fixes #2063
2018-11-20 16:12:28 -05:00
dan sinclair
eda2cfbe12
Cleanup includes. (#1795)
This Cl cleans up the include paths to be relative to the top level
directory. Various include-what-you-use fixes have been added.
2018-08-03 15:06:09 -04:00
dan sinclair
a5a5ea0e2d
Remove using std::<foo> statements. (#1756)
Many of the files have using std::<foo> statements in them, but then the
use of <foo> will be inconsistently std::<foo> or <foo> scattered
through the file. This CL removes all of the using statements and
updates the code to have the required std:: prefix.
2018-08-01 14:58:12 -04:00
dan sinclair
2cce2c5b97
Move tests into namespaces (#1689)
This CL moves the test into namespaces based on their directories.
2018-07-11 09:24:49 -04:00
Corentin Wallez
ba602c9059 Add a WIP WebGPU environment. It disallows OpUndef
Add SPV_ENV_WEBGPU_0 for work-in-progress WebGPU.

val: Disallow OpUndef in WebGPU env

Silence unused variable warnings when !defined(SPIRV_EFFCE)

Limit visibility of validate_instruction.cpp's symbols
  Only InstructionPass needs to be visible so all other functions are put
  in an anonymous namespace inside the libspirv namespace.
2018-06-21 15:53:15 -04:00