Граф коммитов

123 Коммитов

Автор SHA1 Сообщение Дата
Lei Zhang 4b2cbf2167
[spirv] Legalization: associated counters in implicit objects (#1002)
An implicit object is translated into the first argument to the
method call. If the implicit object is of struct type and its
fields have associated counters, we need to assign its associated
counters accordingly like other normal arguments.

For each such method, we generate associated counters for its
implicit object. At a call site, we assign the associated counters
from the real object to the ones associated with the method implict
object.

Also refreshed SPIRV-Tools
2018-01-15 17:10:28 -05:00
Lei Zhang 6b2ad7fafb
[spirv] Fix array of non-matrix with -Zpr (#984)
Previously we will return defaultRowMajor as long as the type
is an array. That will hit an assertion failure in translateType()
for arrays of non-matrices.

Also refreshed SPIRV-Tools
2018-01-10 10:27:12 -05:00
Lei Zhang faf46e28be
[spirv] Fix bugs and re-enable CCP optimization pass (#977) 2018-01-08 17:37:31 -05:00
Lei Zhang 02bc6fae08
[spirv] Legalization: validate with relaxed logical pointer (#975)
We still want to make sure that the generated raw SPIR-V does not
have other validation errors except for allocating variables
containing pointers and returning pointers.
2018-01-08 14:08:48 -05:00
Lei Zhang 2387f691e2
[spirv] Pull in bug fixes and disable CCP in optimization (#971) 2018-01-05 20:21:13 -05:00
Lei Zhang 7ff9ae75e8
[spirv] Refresh dependencies and fix ldexp() translation (#962)
We cannot use GLSL extended instruction Ldexp for ldexp() since
they have different type requirements on the exponent parameter.
2018-01-04 14:34:36 -05:00
Lei Zhang 4bee20cac9
[spirv] Legalization: use CCP and enable on HS/DS/GS (#948) 2017-12-21 16:20:52 -05:00
Lei Zhang dfa66b6b9a
[spirv] Refresh SPIRV-Tools and update legalization pass recipe (#946) 2017-12-21 10:44:56 -05:00
Lei Zhang 674aa26115
[spirv] Refresh external dependency SPIRV-Tools (#910) 2017-12-12 13:34:32 -05:00
Lei Zhang ea1bf8d24c
[spirv] Silence GoogleTest std::tr1 deprecation warnings (#894) 2017-12-07 11:01:49 -05:00
Lei Zhang fb377afe5a
[spirv] Add missing capability for storage image read/write (#870)
Refreshed SPIRV-Tools and re-enabled all validations for texure/
buffer methods.

Also added support for -Cc to color the disassembly.
2017-12-01 17:28:56 -05:00
Lei Zhang 05057495e8
[spirv] Adopt new changes in SPIRV-Tools (#846)
Uses the legalization pass recipe from SPIRV-Tools.

Also change -fcgl to disable both legalization and optimization.

Validation on some tests are turned off because of new image
instruction checking in SPIRV-Tools. Enabling them is a TODO.
2017-11-23 22:30:49 -05:00
Lei Zhang ac8618ab07
[spirv] Update SPIRV-Tools and mark resource write legalization (#839) 2017-11-22 13:59:27 -05:00
Lei Zhang 3caadf5001
[spirv] Update external dependencies (#779) 2017-11-09 10:26:33 -05:00
Lei Zhang 4046ce318a [spirv] Update dependencies and use two new opt passes (#735) 2017-10-25 16:43:54 -04:00
Lei Zhang 62629d982a [spirv] Call SPIR-V legalization passes from SPIRV-Tools (#655)
When seeing opaque types within structs in function parameter,
function return, and variable definition, invoke SPIRV-Tools
legalization passes.

Also refreshed external projects
2017-09-27 16:04:35 -04:00
Lei Zhang f96f92d711 [spirv] Update SPIR-V dependencies and disable debug iterators (#574) 2017-08-16 21:11:48 -07:00
Lei Zhang 265c8db219 [spirv] Use EXCLUDE_FROM_ALL to ignore unused external targets (#489)
With this change, targets in the subdirectory will not be included
in the ALL target of the parent directory by default, and will be
excluded from IDE project files.
2017-07-31 10:52:09 -07:00
Lei Zhang bd2371f900 [spirv] Use git submodules for SPIR-V dependency projects (#455) 2017-07-24 13:12:48 -07:00
Ehsan aa2751504e [spirv] Effcee test fixture and a sample test. (#452)
* Added effcee and its dependencies (re2) to the project.
* Introduced FileTest that uses effcee to perform checks.
* Added a sample test (check-entrypoint.hlsl)
* Refactored code so WholeFileTest and FileTest can reuse code.
2017-07-24 09:03:31 -07:00
Ehsan 3e84980892 [spirv] Adding test fixture for HLSL to SPIRV codegen flow (#383)
This change enables CodeGenSPIRV test flow.

New tests can be added by simply adding the test file to
`tools/clang/test/CodeGenSPIRV/` directory and running:

```cpp
TEST_F(WholeFileTest, NewTest) {
  EXPECT_TRUE(runWholeFileTest("new-test-name"));
}
```

The input file with the format described in `WholeFileCheck.h` is read in;
the HLSL portion is passed to the compiler with SPIR-V codegen enabled.
The resulting SPIR-V binary is disassembled and compared to the expected
result in the input file.
2017-07-06 17:00:59 -07:00
Lei Zhang 3c6537a7d5 [spirv] Add GoogleTest as an external dependency (#285)
GoogleTest will be used for unit testing and codegen testing for
SPIR-V.

* Added SPIRV_BUILD_TESTS option in CMake to control building
  of SPIR-V tests.
* Added "-spirvtest" into hctbuild to enable it.
* Added "spirv" and "spirv_only" targets for hcttest.

Running `hcttest spirv` will run ALL tests including SPIRV tests.
Running `hcttest spirv_only` will ONLY run SPIRV tests.

The default behavior of hctbuild and hcttest is not changed.
2017-05-22 12:02:23 -07:00
Lei Zhang 1e58245a73 [spirv] Add SPIRV-Headers and SPIRV-Tools as external dependencies (#280)
We need SPIRV-Headers for spirv.hpp11 and SPIRV-Tools for SPIR-V
diassembling.
2017-05-09 18:33:24 -07:00