Commit Graph

16 Commits

Author SHA1 Message Date
Alastair Donaldson
b0504239ab Added an external dependency on protobufs, included when SPIRV_BUILD_FUZZER is defined, so that they can be used by the (upcoming) spirv-fuzz tool. Also updated the kokoro build scripts, for relevant targets, to clone an appropriate tag of the protobufs repo, and to pass -DSPIRV_BUILD_FUZZER to the configurations for which we intend to ultimately build spirv-fuzz. (#2616) 2019-05-22 13:24:11 -04:00
Paul Thomson
d90aae9a5a
reduce: miscellaneous fixes (#2494)
* Fix .gitignore 
* Add missing reduction pass: RemoveBlockReductionOpportunityFinder 
* Add DumpShader functions in test_reduce for debugging 
* Add DumpShader functions in spirv-reduce for debugging 
* Fix include style 
* Don't use "using namespace"
2019-04-08 19:37:17 +01:00
Alastair Donaldson
f3acb955c2 Initial commit for spirv-reduce. (#2056)
Creates a new tool that can be used to reduce failing testcases, similar to creduce.
2018-11-21 14:03:09 -05:00
Diego Novillo
87f363636e Ignore *.pyc files in git commands. 2018-08-20 10:44:11 -04:00
Corentin Wallez
2d9a325264 Refactor BUILD.gn so can easily be embedded in other projects
1.
BUILD.gn: Don't use the extra Chromium clang warnings

Also removes the unused .gn secondary_sources.

2.

Move fuzzers in test/ instead of testing/

This frees up testing/ to be the git subtree of Chromium's src/testing/
that contains test.gni, gtest, gmock and libfuzzer

3.

DEPS: get the whole testing/ subtree of Chromium

4.

BUILD.gn: Simplify the standalone gtest targets

These targets definitions are inspired from ANGLE's and add a variable
that is the path of the googletest directory so that it can be made
overridable in future commits.

6.

BUILD.gn: Add overridable variables for deps dirs

This avoids hardcoded paths to dependencies that make it hard to
integrate SPIRV-Tools in other GN projects.
2018-08-03 10:06:11 -04:00
Dan Sinclair
a114e1f30c Add support for Chromium GN build
Build test

Add Fuzzer group

Add libfuzzer
2018-07-24 11:31:14 -04:00
dan sinclair
185406439f Setup gclient and presubmit file.
This CL adds the necessary files to use gclient and the depot_tools with
the SPIRV-Tools directory. This allows doing things like `git cl format`
to format code pre-upload and `git cl presubmit -uf` to run presubmit
checks over the code.

The dependencies are all added to the DEPS file and will be
auto-downloaded. They are all pin'd to specific revisions so everyone
has the same checkout. Clang is included in the checkout so it will be
consistent over usages.

Use clang-format
2018-06-21 16:08:14 -04:00
Pierre Moreau
120ddffb41 Ignore clang-format-diff.py from copyrights check
Having that script locally, for example to run check_code_format.sh
before sending a pull request, would cause the copyright notices check
to fail.
2018-01-05 10:19:10 -05:00
Pierre Moreau
70f88f5295 Add external/SPIRV-Headers to .gitignore
b93c066b allowed for both SPIRV-Headers and spirv-headers as valid
paths, but only the latter is being ignored by Git.
2017-12-09 16:42:43 -05:00
David Neto
dbf9b3762c Git should ignore external repos
Ignore googletest, spirv-headers, effcee, and re2
2017-11-15 16:12:11 -05:00
Christopher Gautier
2d89b6a9c5 Do not gitignore source/opt/build_module.* 2016-10-14 12:45:27 +02:00
Lei Zhang
7cdf39c8f1 Ignore Vim swap files. 2016-06-21 17:27:27 -04:00
Lei Zhang
10dba91781 Use SPIR-V headers from the KhronosGroup/SPIRV-Headers repo. 2016-06-10 08:48:37 -04:00
Umar Arshad
f76e0f5231 Basic SSA Validation
Most uses of an ID must occur after the definition
of the ID.  Forward references are allowed for
things like OpName, OpDecorate, and various cases
of control-flow instructions such as OpBranch, OpPhi,
and OpFunctionCall.

TODO: Use CFG analysis for SSA checks.  In particular,
an ID defined inside a function body is only usable inside
that function body.  Also, use dominator info to catch
some failing cases.

Also:
* Validator test cases use (standard) assignment form.
* Update style to more closely follow the Google C++ style guide
* Remove color-diagnostics flag.
  This is enabled by default on terminals with color. Prints
  hidden ASCII for terminals that can't handle color(Emacs)
* Pass functors to SSAPass to check if the
  operand can be forward referenced based on its index value
* Return SPV_ERROR_INVALID_ID for ID related errors
  spvBinaryParse returned SPV_ERROR_INVALID_BINARY for all types of
  errors. Since spvBinaryParse does some ID validation, this was
  returning inappropriate error codes for some tests.
* Common fixture for validation tests.
  It only runs certian validation passes.
* Add a SPV_VALIDATE_SSA_BIT for testing purposes
* Fixtures now return error codes
* Add OpName support in diag message and unit tests
* Binary parsing can fail with invalid ID or invalid binary error code

Tests include:
* OpDecorate
* OpName
* OpMemberName
* OpBranchConditional
* OpSelectionMerge
* OpMemberDecorate
* OpGroupDecorate
* OpDeviceEnqueue
* Enable several tests failing in ID validation.
2015-12-09 16:15:00 -05:00
David Neto
5d65ea726c Git ignore compile_commands.json in root directory.
Useful for standalone development of SPIR-V Tools with
Ninja and YouCompleteMe.
2015-10-26 12:55:33 -04:00
Kenneth Benzie (Benie)
83e5a29b06 Code drop of the Codeplay spirv-tools source.
This commit contains the source for the SPIRV static library, spirv-as,
spirv-dis, and spirv-val tools.
2015-05-22 18:26:19 +01:00