Commit Graph

13 Commits

Author SHA1 Message Date
Dejan Mircevski
a7c1265c38 Test SpecId validation. 2016-05-11 10:01:06 -04:00
Dejan Mircevski
4376856b1a Add tests for MaxByteOffset. 2016-05-10 22:46:27 -04:00
Dejan Mircevski
3732d6cc21 Add v1.1 capabilities validation.
Refactor the ValidateCapability test fixture.

Explain the meaning of test parameters.  Factor out methods for
convenience and readability.  DRY v1.0 and v1.1 tests.
2016-04-29 13:40:01 -04:00
Dejan Mircevski
d3da705a22 Fix Windows build.
Replace `#ifdef 0` with comment inside a macro call.
2016-04-21 17:12:47 -04:00
Dejan Mircevski
2ea54f5d1b Add tests for SubgroupDispatch.
Introduced in v1.1, SubgroupDispatch adds the following:
- two new execution modes
- one new capability
- two new opcodes

Extend ValidateBase methods to take a spv_target_env.  Replace the
context_ member with ScopedContext inside the said methods.  Give
ScopedContext wider visibility by moving it outside
TextToBinaryTestBase.
2016-04-21 15:46:08 -04:00
Andrew Woloszyn
4c657bfa8f Make everything compile cleanly with -Wpedantic.
This makes SPIRV_WARN_EVERYTHING compile cleanly.
2016-03-21 10:01:13 -04:00
Lei Zhang
b6ccd0d891 Remove spv_validate_options_t and change tests accrodingly.
Users always want to run all the checks. The spv_validate_options_t
mechanism, which provides little benefits to users, complicates the
internal implementation and also makes the tests exercise different
paths as users do.

Right now the tests are more like integration tests instead of
unit tests, which should be our next refactoring aim.
2016-02-23 16:19:33 -05:00
David Neto
53075ea82b Add MultiViewport capability, new in 1.0.3
Fix typos in previous tests with MultiViewport.
2016-02-17 15:29:05 -05:00
David Neto
dd8a661b70 Update capabilities for 1.0 Rev3 2016-02-16 16:44:45 -05:00
Dejan Mircevski
0c8bdfe163 Use AssemblyGrammar for capability validation.
Also:
- ForEach() for spv_capability_mask_t.
- Add capability min/max constants.
- Move max definition from validate_types.cpp to spirv_definition.h.
2016-02-02 11:40:05 -05:00
Dejan Mircevski
5f99fc33cd Forbid Generic variables. 2016-01-29 17:08:41 -05:00
Dejan Mircevski
8db38e547b Initialize vector<string>s on first use, not statically. 2016-01-28 13:18:00 -05:00
Umar Arshad
61a627586b Initial capability implementation and unit tests
* Register capabilility and checks
* Add validate storage class capabilities checks and tests
* Instruction pass refactor
  - More generic form of capability checking by checking operands
    instead of instructions
* Execution Model capabilities checks
* Decorate BuiltIn capability checks
* Addressing Model capability checks
* Memory Model capability checks
* Execution Mode capability checks
* Dim capability checks
* SamplerAddressingMode capability checks
2016-01-27 08:37:23 -05:00