-
22ce39c8
by Steven Perron
at 2019-08-08T14:57:18Z
Start SPIRV-Tools v2019.5
-
95386f9e
by greg-lunarg
at 2019-08-09T12:22:41Z
Instrument: Fix version 2 output record write for tess eval shaders. (#2782)
Fix output record write for tess eval shaders.
Also change command line for bindless instrumentation to use use
output record version 2.
-
f701237f
by Steven Perron
at 2019-08-12T12:52:39Z
Remove useless semi-colons (#2789)
Later versions of clang seem to pick up more useless semi-colons. I've removed them.
-
60043edf
by Steven Perron
at 2019-08-14T13:27:12Z
Replace OpKill With function call. (#2790)
We are no able to inline OpKill instructions into a continue construct.
See #2433. However, we have to be able to inline to correctly do
legalization. This commit creates a pass that will wrap OpKill
instructions into a function of its own. That way we are able to inline
the rest of the code.
The follow up to this will be to not inline any function that contains
an OpKill.
Fixes #2726
-
bbd80462
by alan-baker
at 2019-08-14T15:26:41Z
Fix validation of constant matrices (#2794)
Fixes #2793
* Don't special case matrix validation compared to other composites
* just check the constituents are constants or undefs
* later checking validates the column type
* new test
-
ff872dc6
by Jaebaek Seo
at 2019-08-14T22:09:20Z
Change the way to include header (#2795)
`#include <source/util/string_utils.h>` works only when we specify
`include_directories(${CMAKE_CURRENT_SOURCE_DIR}/)` in
cmake. It is hard to set the source directory as a include path
in some build systems e.g., bazel. Using the relative path easily
solves this issue. This commit uses
`#include "source/util/string_utils.h"` instead of
`#include <source/util/string_utils.h>`.
-
dac9210d
by Jaebaek Seo
at 2019-08-15T12:46:59Z
Use ascii code based characters (#2796)
My local python reports that CHANGES uses a non-ascii code
character and fail in running utils/update_build_version.py.
-
7b4e5bd5
by Toomas Remmelg
at 2019-08-15T13:38:37Z
Update remquo validation to match the OpenCL Extended Instruction Set Specification (#2791)
-
06407250
by greg-lunarg
at 2019-08-16T13:18:34Z
Instrument: Add support for Buffer Device Address extension (#2792)
-
9cd07272
by Steven Perron
at 2019-08-16T17:15:17Z
More handle overflow in sroa (#2800)
If we run out of ids when creating a new variable, sroa does not recognize
the error, and continues doing work. This leads to segmentation faults.
Fixes https://crbug/969655
-
bc62722b
by Steven Perron
at 2019-08-18T23:00:18Z
Handle overflow in wrap-opkill (#2801)
Fixes https://crbug/994203
-
0cbdc7a2
by David Neto
at 2019-08-20T12:53:27Z
Remove unimplemented method declaration (#2804)
-
c5d1dab9
by Steven Perron
at 2019-08-21T14:55:02Z
Add name for variables in desc sroa (#2805)
Fixes #2802.
-
aef8f92b
by Steven Perron
at 2019-08-21T17:12:42Z
Even more id overflow in sroa (#2806)
Now we need to handle id overflow when we overflow while replacing uses of the variable. While looking at this code, I noticed an error in the way we handle access chains that cannot be replaced because of overflow. Name it will make some change, and then give up by returning SuccessWithoutChange. But it was changed.
This is fixed up by returning Failure if we notice the error at the time of rewriting the users. This is for both id overflow or out-of-bounds accesses.
Code is added to "CheckUses" to remove variables that have out-of-bounds accesses from the candidate list, so we don't even try to rewrite its uses.
Fixes https://crbug.com/995032
-
b00ef0d2
by Steven Perron
at 2019-08-22T13:14:48Z
Handle Id overflow in private-to-local (#2807)
We need to handle id overflow in the private to local pass.
Fixes https://crbug.com/962295
-
8336d192
by Alastair Donaldson
at 2019-08-22T22:33:09Z
Extend reducer to remove relaxed precision decorations (#2797)
Adds a reduction pass that removes OpDecorate and OpMemberDecorate
instructions that annotate instructions and members with
RelaxedPrecision. As well as being useful in its own right, removing
such references allows other passes to remove further instructions.
-
1eb89172
by jonahryandavis
at 2019-08-23T17:14:34Z
Add missing files to BUILD.gn (#2809)
New files missing from BUILD.gn caused build failures in Chromium and
ANGLE:
remove_relaxed_precision_decoration_opportunity_finder.cpp
remove_relaxed_precision_decoration_opportunity_finder.h
-
15fc19d0
by Steven Perron
at 2019-08-26T22:54:11Z
Refactor instruction folders (#2815)
* Refactor instruction folders
We want to refactor the instruction folder to allow different sets of
rules to be added to the instruction folder. We might want different
sets of rules in different circumstances.
We also need a way to add rules for extended instructions. Changes are
made to the FoldingRules class and ConstFoldingRules class to enable
that.
We added tests to check that we can fold extended instructions using the
new framework.
At the same time, I noticed that there were two tests that did not tests
what they were suppose to. They could not be easily salvaged. #2813 was
opened to track adding the new tests.
-
73422a0a
by Steven Perron
at 2019-08-28T15:49:16Z
Check feature mgr in context consistency check (#2818)
We add a check that the feature manager is correcter after each pass.
This resulted in a couple failing tests cases. Those are fixed.
Part of #2814
-
5a581e73
by Ben Clayton
at 2019-08-29T14:04:55Z
spvtools::Optimizer - don't assume original_binary and optimized_binary are aliased (#2799)
If they are not aliased, the function will always print the message:
"Binary unexpectedly changed despite optimizer saying there was no change"
Which is (usually) totally bogus.
Fixes #2798
-
35d98be3
by Steven Perron
at 2019-08-29T16:48:17Z
Amd ext to khr (#2811)
Add the first steps to removing the AMD extension VK_AMD_shader_ballot.
Splitting up to make the PRs smaller.
Adding utilities to add capabilities and change the version of the
module.
Replaces the instructions:
OpGroupIAddNonUniformAMD = 5000
OpGroupFAddNonUniformAMD = 5001
OpGroupFMinNonUniformAMD = 5002
OpGroupUMinNonUniformAMD = 5003
OpGroupSMinNonUniformAMD = 5004
OpGroupFMaxNonUniformAMD = 5005
OpGroupUMaxNonUniformAMD = 5006
OpGroupSMaxNonUniformAMD = 5007
and extentend instructions
WriteInvocationAMD = 3
MbcntAMD = 4
Part of #2814
-
4ae9b716
by Corentin Wallez
at 2019-08-30T13:09:34Z
Fix gn check (#2821)
spriv-opt was missing a dependency on the AMD ballot extension that was
needed because it uses a header in the AMD ext to KHR ext pass.
-
ad71c057
by Steven Perron
at 2019-08-30T14:48:42Z
Replace SwizzleInvocationsMaskedAMD extended instruction. (#2822)
Part of #2814
-
d67130ca
by Steven Perron
at 2019-08-30T18:07:24Z
Replace SwizzleInvocationsAMD extended instruction. (#2823)
Part of #2814
-
65e362b7
by Ben Clayton
at 2019-08-30T20:27:22Z
AggressiveDCEPass: Set modified to true when appending to to_kill_ (#2825)
Also add an assertion that these `modified` is true if to_kill_ has a non-zero size to catch this sort of issue in the pass.
Fixes: #2824
-
2c5ed16b
by Alastair Donaldson
at 2019-09-02T21:31:27Z
Fix end comments in header files (#2829)
The end comments for the #ifndef ... #endif macros in various header
files containd a stray #define.
-
b54d9502
by Steven Perron
at 2019-09-03T13:17:18Z
Fold Fmix should accept vector operands. (#2826)
Fixes #2819
-
1c9ca422
by Jamie Madill
at 2019-09-03T16:57:32Z
GN: Make SPIRV-Tools target use public_deps. (#2828)
Should prevent invalid header usage warnings in dependent targets.
See http://anglebug.com/3876 for context.
-
d11725b1
by greg-lunarg
at 2019-09-03T17:22:13Z
Add --relax-float-ops and --convert-relaxed-to-half (#2808)
The first pass applies the RelaxedPrecision decoration to all executable
instructions with float32 based type results. The second pass converts
all executable instructions with RelaxedPrecision result to the equivalent
float16 type, inserting converts where necessary.
-
c77045b4
by greg-lunarg
at 2019-09-03T19:19:36Z
Instrument: Be sure Float16 capability on when generating float16 null (#2831)
-
9b3cc3e0
by Steven Perron
at 2019-09-03T19:51:46Z
Upadate CHANGES
-
635b583c
by Jamie Madill
at 2019-09-04T16:43:26Z
GN: Add Chromium GoogleTest deps. (#2832)
This fixes a GN header check in the Chromium integration.
-
1dfb5fc1
by rumblehhh
at 2019-09-04T16:45:26Z
Export SPIRV-Tools targets on installation (#2785)
This allows the targets to be used in other cmake projects. See the following for more details:
https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html#creating-packages
https://foonathan.net/blog/2016/07/07/cmake-dependency-handling.html
-
19b25661
by Ryan Harrison
at 2019-09-04T17:08:58Z
For WebGPU<->Vulkan optimization, set correct execution environment (#2834)
Fixes #2833
-
a41520ea
by Steven Perron
at 2019-09-05T13:29:04Z
Replace uses of SPV_AMD_shader_trinary_minmax extension (#2835)
Part of #2814
-
b218ad19
by Steven Perron
at 2019-09-05T17:30:03Z
Fold Min, Max, and Clamp instructions. (#2836)
Fixes #2830.
-
76261e2a
by Steven Perron
at 2019-09-06T21:11:37Z
Replace CubeFaceCoord and CubeFaceIndexAMD (#2840)
Part of #2814.
-
6797173c
by Steven Perron
at 2019-09-09T16:55:44Z
Don't register duplicate decoration in validator. (#2841)
As far as I know, it is legal to have multiple decoration adding the
same decoration to the same id. The validator registers all of these
decoration as if they were distinct decorations. This can cause poor
memory usage and performance in some cases.
This fix is to make sure that duplicates are not registers.
I keep the type of the decoration list as an std::vector because I
expect it to be small enough in most cases that the linear search will
still be faster that using some type of map.
No tests are added because we do not have a mechanism to test memory
usage in our unit tests.
Fixes #2837. The total memory usage drop to 14,236KB.
-
a464ac1a
by alan-baker
at 2019-09-09T18:53:30Z
Add generic builtin validation of target (#2843)
* Validate the target's opcode is acceptable
* Update tests
* New tests
* move early exit for builtins a bit later in the pass
-
7f7236f1
by Steven Perron
at 2019-09-09T19:12:26Z
Handle id overflow in the constant manager. (#2844)
Fixes crbug.com/997246
-
35c9518c
by Steven Perron
at 2019-09-10T13:38:23Z
Handle id overflow in the ssa rewriter. (#2845)
* Handle id overflow in the ssa rewriter.
Remove LocalSSAElim pass at the same time. It does the same thing as the SSARewrite pass. Then even share almost all of the same code.
Fixes crbug.com/997246
-
7ee8f443
by Alastair Donaldson
at 2019-09-10T13:48:27Z
Fix add-dead-break and add-dead-continue passes to respect dominance (#2838)
The implementation of these passes had overlooked the fact that adding
a new edge to a control flow graph can change dominance information.
Adding a dead break/continue risks causing uses to no longer be
dominated by their definitions. This change introduces various tests
to expose such scenarios, and augments the preconditions for these
transformations with checks to guard against the situation.
-
e2e95172
by Alastair Donaldson
at 2019-09-10T14:02:25Z
Rework management of probabilities in spirv-fuzz (#2839)
Before this change there was quite a lot of duplication in the code
being used to choose random percentages, and some of it was incorrect
so that a percentage chance of (100-N)% instead of N% was being used.
Also there was a lot of duplicate code to choose a random index into a
vector. This change eliminates that duplication (fixing up the
percentage problem), and gets rid of direct access to the random
number generator being used for fuzzing, so that all randomization
requests must go through the FuzzerContext class, discouraging future
ad-hoc uses of the random number generator.
-
c0e98070
by Ryan Harrison
at 2019-09-10T16:51:19Z
Handle creating a new constant failing gracefully (#2848)
Fixes #2847
-
9f188e33
by David Neto
at 2019-09-11T17:15:25Z
Assembler: Can't set an ID in instruction without result ID (#2852)
Fix tests that violated this rule.
Fixes #2257
-
4f9256db
by Steven Perron
at 2019-09-11T17:26:42Z
Handle id overflow in wrap op kill. (#2851)
Fixes https://crbug.com/997729
-
c7a39bc4
by Steven Perron
at 2019-09-11T17:26:55Z
Don't inline function containing OpKill (#2842)
If an OpKill instruction is inlined into a continue construct, then the
spir-v is no longer valid. To avoid this issue, we do inline into an
OpKill at all. This method was chosen because it is difficult to keep
track of whether or not you are in a continue construct while changing
the function that is being inlined into. This will work well with wrap
OpKill because every will still be inlined except for the OpKill
instruction itself.
Fixes #2554
Fixes #2433
This reverts commit aa9e8f538041db3055ea443080e0ccc315fa114f.
-
67b87f22
by Ryan Harrison
at 2019-09-11T21:18:05Z
Handle another case where creating a constant can fail (#2854)
Fixes #2847
-
ad7f2c5c
by Alastair Donaldson
at 2019-09-11T22:45:20Z
Add fuzzer pass to copy objects (#2853)
A new fuzzer pass that randomly introduces OpCopyObject instructions
that make copies of ids, and uses the fact manager to record the fact
that an id %id is synonymous with an id generated by an OpCopyObject
applied to %id. (A future pass will exploit such synonym facts.)
-
5a48c0da
by alan-baker
at 2019-09-13T18:59:02Z
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.
-
1e146e8a
by alan-baker
at 2019-09-13T20:48:42Z
Split capability tests (#2866)
-
93256193
by alan-baker
at 2019-09-16T14:46:31Z
Extra resource interface validation (#2864)
* Vulkan specific checks
* storage buffer variables must be structs or arrays of structs
* storage buffer struct must be Block decorated
* uniform struct must be Block or BufferBlock decorated
* new tests
-
99793fa6
by Raun Krisch
at 2019-09-16T23:13:30Z
Adding valilidation checks for OpEntryPoint duplicate names and execution mode (#2862)
-
36c1c0e2
by David Turner
at 2019-09-17T19:57:15Z
Fix Fuchsia build. (#2868)
Most auto-generated files included by the SPIRV-Tools sources
do not have a proper newline at the end of file, creating a
hundred of compiler warnings, and even some build failures
when BUILD.gn is used for the Fuchsia build.
This fixes the issue by disabling the warning entirely.
-
bbb29870
by alan-baker
at 2019-09-18T15:55:39Z
Relaxed bitcast with pointers (#2878)
* When input or result is a pointer type also allow 32-bit integer
vectors for the other type
* Relaxation only applies to SPIR-V 1.5 or in the presence of
SPV_KHR_physical_storage_buffer
* new tests
-
0a07cd1c
by Alastair Donaldson
at 2019-09-18T19:47:08Z
Add fuzzer pass to replace ids with synonyms (#2857)
If the fuzzer's fact manager knows that ids A and B are synonymous, it
can replace a use of A with a use of B, so long as various conditions
hold (e.g. the definition of B must dominate the use of A, and it is
not legal to replace a use of an OpConstant in a struct's access chain
with a synonym that is not an OpConstant).
This change adds a fuzzer pass to sprinke such synonym replacements
through the module.
-
ccd7bf16
by Alastair Donaldson
at 2019-09-18T19:47:58Z
Fix CMake issue related to spirv-fuzz (#2877)
spirv-fuzz generates protobuf sources in a 'protobuf' directory. When
building with Unix Makefiles, compilation would fail due to to this
directory not existing. This change causes the directory to be
created when the build is prepared.
-
e59b60de
by Alastair Donaldson
at 2019-09-18T19:50:08Z
Fix detection of blocks bypassed by new edge (#2874)
Fixes an issue where the blocks that would be bypassed by a new break
or continue control flow edge were not properly detected.
Fixes #2871.
-
c02a6191
by David Neto
at 2019-09-18T20:11:41Z
Update SPIRV-Headers in DEPS (#2880)
Include change that added SPV_KHR_physical_storage_buffer
-
acf20302
by David Neto
at 2019-09-18T21:42:48Z
Android.mk: Add dependency from optimizer file to amd-shader-ballot-insts.inc (#2883)
This is required to fix the NDK build.
-
605c2e3c
by dan sinclair
at 2019-09-18T22:11:10Z
Add WebGPU SPIR-V Assembler in _javascript_. (#2876)
This CL adds a simple _javascript_ library which will assemble SPIR-V
Assembly compatable with WebGPU.
-
47e354b0
by dan sinclair
at 2019-09-19T13:46:27Z
Move docs into docs/ folder (#2872)
-
d06fe084
by David Neto
at 2019-09-19T13:47:46Z
Fix comment typo found by protobufs linter (#2884)
-
248c80b0
by Steven Perron
at 2019-09-19T14:24:00Z
Handle OpConstantNull in copy-prop-arrays. (#2870)
Many of the places in copy propagate arrays assumes that integer constant will be defined by an OpConstant instruction. That is not always true. We fix these spots by allowing for an OpConstantNull.
-
08fcf8a4
by Ehsan
at 2019-09-19T14:26:24Z
Fix header include syntax. (#2882)
-
87f0fa43
by Steven Perron
at 2019-09-20T02:34:57Z
Use OpReturn* in wrap-opkill
The warp-opkill pass is generating incorrect code. It is placing an
OpUnreachable at the end of a basic block, when the block can be
reached. We can't reach the end of the block, but we can reach the end.
Instead we will add a return instruction.
Fixes #2875.
-
61edde52
by Steven Perron
at 2019-09-20T02:39:56Z
Revert "Use OpReturn* in wrap-opkill"
This reverts commit 87f0fa432f1eeca8bcbfc5ace8ed731239b0e68d.
-
4eee71e7
by Alastair Donaldson
at 2019-09-20T08:43:26Z
Disable long-running fuzzer tests by default (#2887)
spirv-fuzz has useful tests that run the fuzzer and shrinker, to give
the whole tool a good shake up, effectively "fuzzing the fuzzer". The
problems that this detects are sensitive to the source of randomness
that is used, which can change from test platform to test platform.
It is thus not a good idea to run these tests by default during
continuous integration - they may end up failing due to environtal
factors, making it look like an unrelated change has broken the fuzzer
when really the fuzzer has revealed an already-existing bug in itself.
This change makes the tests disabled by default; they can enabled
during dedicated testing of the fuzzer.
-
7275a716
by Alastair Donaldson
at 2019-09-20T09:54:09Z
Allow validation during spirv-fuzz replay (#2873)
To aid in debugging issues in spirv-fuzz, this change adds an option whereby the SPIR-V module is validated after each transformation is applied during replay. This can assist in finding a transformation that erroneously makes the module invalid, so that said transformation can be debugged.
-
46531272
by Alastair Donaldson
at 2019-09-20T14:23:25Z
Fix to CMakeLists for spirv-fuzz tests (#2888)
A previous change that disabled long-running tests by default failed
to enable short-running tests when long-running tests are enabled.
This change fixes that problem.
-
6b072126
by Steven Perron
at 2019-09-20T14:32:27Z
Use OpReturn* in wrap-opkill (#2886)
* Use OpReturn* in wrap-opkill
The warp-opkill pass is generating incorrect code. It is placing an
OpUnreachable at the end of a basic block, when the block can be
reached. We can't reach the end of the block, but we can reach the end.
Instead we will add a return instruction.
Fixes #2875.
-
8d0ca43d
by David Neto
at 2019-09-23T13:36:48Z
Add method comment for opt::Function::WhileEachInst (#2867)
Also, say that ForEachInst and ForEachParam process instructions/parameters
in order.
-
f62ee4a4
by David Neto
at 2019-09-23T14:46:49Z
Update DEPS: effcee, re2, googletest (#2881)
-
b83535da
by Alastair Donaldson
at 2019-09-23T15:28:25Z
Fix operand index in spirv-fuzz (#2895)
This change rectifies a problem where an absolute operand index was
being used when an index restricted to input operands was required.
Fixes #2893.
-
958f7e72
by Alastair Donaldson
at 2019-09-23T15:29:19Z
Employ the "swarm testing" idea in spirv-fuzz (#2890)
This change to spirv-fuzz uses ideas from "Swarm Testing" (Groce et al. 2012), so that a random subset of fuzzer passes are enabled. These passes are then applied repeatedly in a randomized fashion, with the aggression with which they are applied being randomly chosen per pass.
There is plenty of scope for refining the probabilities introduce in this change; this is just meant to be a reasonable first effort.
-
3a762d54
by dan sinclair
at 2019-09-23T16:56:29Z
Add missing GN dependency (#2899)
-
71e0ba60
by dan sinclair
at 2019-09-24T14:49:39Z
Add OpCopyMemory test to SVA. (#2885)
This CL adds a test for OpCopyMemory and adds the needed IdMemorySemantics and
IdScope in order to extract the parameters.
-
6f26d9ad
by Steven Perron
at 2019-09-24T18:04:54Z
Handle id overflow in convert local access chains (#2908)
Fixes https://crbug.com/1004453
-
a03cd1f3
by Ehsan
at 2019-09-24T19:56:59Z
Add Bazel build configuration. (#2891)
* Add Bazel build configuration.
* fix for windows.
* Update doc file.
* Add tests that were accidentally skipped by Bazel
* Update doc file.
-
55ea57a7
by Steven Perron
at 2019-09-24T20:19:31Z
Handle extract with no indexes (#2910)
* Handle extract with no indexes
It is possible that OpCompositeExtract instructions will not have any
indexes. This is not handled well by scalar replacement and instruction
folding.
Fixes https://crbug.com/1006435
* Fix typo.
-
527a6893
by alan-baker
at 2019-09-24T21:55:12Z
Remove validate_datarules.cpp (#2911)
* Checks moved into individual opcode validation
* removes duplicated checks
* Add check that forward pointer points to struct
-
290f6a82
by Alastair Donaldson
at 2019-09-25T11:16:25Z
spirv-fuzz: do not replace boolean constant argument to OpPhi instruction (#2903)
Before this change, spirv-fuzz would replace a constant boolean
argument to an OpPhi with the result of a binary operation, inserting
the instruction to compute the binary operation right before the
OpPhi, leading to an invalid module. This change conservatively
disallows replacing OpPhi arguments. Issue #2902 notes that there is
scope for being less conservative.
Fixes #2897.
-
7bc114ba
by Alastair Donaldson
at 2019-09-25T11:17:29Z
spirv-fuzz: do not replace a pointer argument to a function call with a synonym (#2901)
Before this change, spirv-fuzz would replace a pointer argument to a
function call with a synonym, which is problematic when the synonym is
not a memory object declaration, since function call arguments are
required to be memory object declarations. This change adds a check
to ensure that such a replacement is not made.
Fixes #2896.
-
c1e03834
by Alastair Donaldson
at 2019-09-25T15:51:41Z
spirv-fuzz: Fixes to preconditions for adding dead break/continue edges (#2904)
Issues #2898 and #2900 identify some cases where adding a dead
continue would lead to an invalid module, and these turned out to be
due to the lack of sensible dominance information when a continue
target is unreachable. This change requires that the header of a loop
dominates the loop's continue target if a dead continue is to be
added.
Furthermore, issue #2905 identified a shortcoming in the algorithm
being used to identify when it is OK, from a dominance point of view,
to add a new break/continue edge to a control flow graph. This change
replaces that algorithm with a simpler and more obviously correct
algorithm (that incidentally does not require the new edge to be a
break/continue edge in particular).
Fixes #2898.
Fixes #2900.
Fixes #2905.
-
70097c77
by Alastair Donaldson
at 2019-09-25T15:52:35Z
spirv-fuzz: do not replace struct indices with synonyms (#2915)
This change introduces a robust check for whether an index in an
access chain is indexing into a struct, in which case the index needs
to be an OpConstant and cannot be replaced with a synonym.
Fixes #2906.
-
2a11f365
by Steven Perron
at 2019-09-25T21:42:58Z
Handle id overflow in wrap-opkill (#2916)
New code in wrap-opkill does not handle id overflow correctly. We fix that up.
Fixes https://crbug.com/1007144
-
510ca9d6
by alan-baker
at 2019-09-25T22:11:22Z
Only allow previously declared forward refs in structs (#2920)
Fixes https://crbug.com/1008130
* Restore a missing check that the only valid forward references in
structs are previously declared forward pointers
-
27238bcc
by Alastair Donaldson
at 2019-09-26T09:56:43Z
spirv-fuzz: preserve some analyses when permuting blocks (#2918)
The performance of the fuzzer was unacceptable in the 'permute blocks'
transformation, due to dominator analysis being repeatedly invalidated
and recomputed. This change preserves the dominator analysis,
together with the CFG analysis, when a block is moved down.
-
84b19760
by Alastair Donaldson
at 2019-09-26T09:57:05Z
spirv-fuzz: do not allow a dead break to target an unreachable block (#2917)
Because dominance information becomes a bit unreliable when blocks are
unreachable, this change makes it so that the 'dead break'
transformation will not introduce a break to an unreachable block.
Fixes #2907.
-
10951a7c
by alan-baker
at 2019-09-27T04:06:36Z
Refactor the InstructionPass (#2924)
* move checks to more appropriate locations
* remove some duplicated checks
* New function to check valid storage classes
* updated tests
-
bc84daff
by Ehsan
at 2019-09-27T13:13:32Z
Add Kokoro bots for building with Bazel. (#2914)
Add Kokoro bots for building with Bazel.
-
ef4679a5
by Paul Thomson
at 2019-09-27T14:16:26Z
spirv-fuzz: allow interestingness script arguments (#2925)
-
4075b921
by Ryan Harrison
at 2019-09-27T18:23:06Z
Add removing references to debug instructions when removing them (#2923)
Fixes #2921
-
85c67b5e
by Steven Perron
at 2019-09-27T20:03:45Z
Record trailing line dbg instructions (#2926)
There is nothing in the spir-v spec that says the last
instructions in a module cannot be OpLine or OpNoLine.
However, the code that parses the module will simply drop
these instructions.
We add code that will preserve these instructions.
Strip-debug-info is updated to remove these instructions.
Fixes https://crbug.com/1000689.
-
9eb1c9a4
by Steven Perron
at 2019-10-01T14:27:09Z
Add continue construct analysis to struct cfg analysis (#2922)
* Add continue construct analysis to struct cfg analysis
Add the ability to identify which blocks are in the continue construct for a
loop, and to get functions that are called from those blocks, directly or
indirectly.
Part of https://github.com/KhronosGroup/SPIRV-Tools/issues/2912.
-
44b32176
by Paul Thomson
at 2019-10-01T15:38:08Z
fuzz: add shrinker-temp-file-prefix (#2928)
And relax naming requirements of input and output files.
-
9d7428b0
by alan-baker
at 2019-10-03T01:12:57Z
Validate physical storage buffer restrictions (#2930)
* Physical storage buffer cannot be used with OpConstantNull,
OpPtrEqual, OpPtrNotEqual or OpPtrDiff
* new tests
* see also #2929
-
bd839ca6
by Paul Thomson
at 2019-10-03T15:21:05Z
reduce/fuzz: improve command line args (#2932)
* reduce: add -o.
* reduce: add --temp-file-prefix.
* reduce: add interestingness test args.
* Detect bad args with one dash e.g. -a.
* reduce: fix validator args.
* Add = to args that require it.
* More consistent naming/style across fuzz/reduce.
* Change some 0 exit codes to 1.
-
bc37fd58
by Aaron Hagan
at 2019-10-03T17:35:35Z
Add SPV_KHR_shader_clock validation (#2879)
-
8fa0f1a6
by Alastair Donaldson
at 2019-10-03T18:10:50Z
spirv-fuzz: option to convert shader into a form that renders red (#2934)
Adds a spirv-fuzz option for converting a SPIR-V shader into a shader
that renders red, whilst containing the body of the original shader.
This is for aiding in compiler crash bug reporting.
-
ad3d23f4
by greg-lunarg
at 2019-10-04T16:26:38Z
Generate null pointer by converting uint64 zero to pointer. (#2935)
Fixes #2929.
-
c18c9ff6
by Steven Perron
at 2019-10-04T17:05:32Z
Handle OpKill better (#2933)
We want to handle OpKill better. The wrap opkill causes lots of extra
code to be generated, even when they are not needed to avoid the main
problem: OpKill cannot be found directly in a continue construct.
This change will be more selective on which functions the OpKill will be
wrapped and inlining will avoid inlining.
Fixes #2912
-
3c7ff8d4
by Jeremy Hayes
at 2019-10-07T13:52:48Z
Enable OpTypeCooperativeMatrix specialization (#2927)
-
26dba32c
by Alastair Donaldson
at 2019-10-08T10:25:34Z
spirv-fuzz: Add fuzzer pass to change selection controls (#2944)
A new pass that allows the fuzzer to change the 'selection control'
operand of OpSelectionControl instructions.
Fixes #2937.
-
81d227f3
by Alastair Donaldson
at 2019-10-08T10:26:08Z
spirv-fuzz: add disabled test to document known issue (#2942)
Issue #2919 identifies a problem in spirv-fuzz's ability to determine
when it is safe to add a new control flow edge without breaking
dominance rules. This change adds a (currently disabled) test to
expose the issue, and a comment to document that the current solution
is incomplete.
-
2f6a87f6
by Paul Thomson
at 2019-10-08T12:02:34Z
reduce: improve remove unref instr pass (#2945)
* Remove Impl struct in Reducer; we can re-add it later (in a cleaner fashion) if we need to.
* Add cleanup passes in Reducer; needed so that removal of constants can be disabled during the main passes, and then enabled during cleanup passes, otherwise some main passes can perform worse due to lack of available constants.
* Delete passes: remove op name, remove relaxed precision. And delete associated tests.
* Add more tests for remove unreferenced instructions.
* Always return and write the output file, even if there was a reduction failure.
* Only exit with 0 if the reduction completed or we hit the reduction step limit.
-
5910bb8e
by Alastair Donaldson
at 2019-10-08T13:04:10Z
spirv-fuzz: add transformation and pass to construct composites (#2941)
Adds a fuzzer pass and transformation to create a composite (array,
matrix, struct or vector) from available constituent components, and
inform the fact manager that each component of the new composite is
synonymous with the id that was used to construct it. This allows the
"replace id with synonym" pass to then replace uses of said ids with
uses of elements extracted from the composite.
Fixes #2858.
-
32f76efa
by Steven Perron
at 2019-10-08T14:16:18Z
Link cfg and dominator analysis in the context (#2946)
Fixes #2889
-
c3ca0474
by Steven Perron
at 2019-10-09T13:43:01Z
Update CHANGES
-
df15a4a3
by Corentin Wallez
at 2019-10-09T15:45:11Z
CMake: Add support for building with emscripten (#2948)
-
c1d42038
by alan-baker
at 2019-10-09T19:02:07Z
Disable scope validation for OpReadClockKHR (#2953)
See #2952
Disabled until specification is clarified
-
c705032b
by Ryan Harrison
at 2019-10-09T19:46:36Z
Remove non-existent files from BUILD.gn (#2955)
Fixes #2954
-
82f84c4b
by Ehsan
at 2019-10-09T20:14:42Z
Use a longer timeout for Bazel tests. (#2956)
-
1cea3b78
by Alastair Donaldson
at 2019-10-10T10:26:51Z
Fixed include paths and order according to Google style. (#2957)
-
253806ad
by Alastair Donaldson
at 2019-10-10T12:34:38Z
spirv-fuzz: Add fuzzer pass to change loop controls (#2949)
A new pass that allows the fuzzer to change the 'loop control' operand
(and associated literal operands) of OpLoopMerge instructions.
Fixes #2938.
Fixes #2943.
-
feb15492
by Paul Thomson
at 2019-10-10T16:12:42Z
reduce: add large tests and fix (#2947)
* Add larger reducer tests.
* Fix conditional_branch_to_simple_conditional_branch_opportunity pass.
-
91232f7f
by Alastair Donaldson
at 2019-10-11T06:10:47Z
spirv-fuzz: Add fuzzer pass to change function controls (#2951)
A new pass that allows the fuzzer to change the 'function control'
operand of OpFunction instructions.
Fixes #2939.
-
eba98c4e
by Alastair Donaldson
at 2019-10-11T08:15:47Z
spirv-fuzz: Add fuzzer pass to add NoContraction decorations (#2950)
A new pass that allows the fuzzer to add NoContraction decorations to
arithmetic instructions.
Fixes #2936.
-
3eda1b9f
by Alastair Donaldson
at 2019-10-11T09:13:06Z
spirv-fuzz: Rework id descriptors (#2959)
A refactoring that separates the identification of an instruction from
the identification of a use in an instruction, to enable the former to
be used independently of the latter.
-
2276e597
by alan-baker
at 2019-10-11T21:01:30Z
Validate that selections are structured (#2962)
* Validate that selections are structured
WIP
* new checks that switch and conditional branch are proceeded by a
selection merge where necessary
* Don't consider unreachable blocks
* Add some tests
* Changed how labels are marked as seen
* Moved check to more appropriate place
* Labels are now marked as seen when there are encountered in a
terminator instead of when the block is checked
* more tests
* more tests
* Method comment
* new test for a bad case
-
1b6fd37f
by Alastair Donaldson
at 2019-10-14T16:00:46Z
spirv-fuzz: Refactor 'split blocks' to identify instructions differently (#2961)
This change refactors the 'split blocks' transformation so that an
instruction is identified via a base, opcode, and number of those
opcodes to be skipped when searching from the base, as opposed to the
previous design which used a base and offset.
-
964dc52d
by David Neto
at 2019-10-15T17:29:10Z
Update SPIR-V binary header test for SPIR-V 1.5 (#2967)
-
00170cc5
by Alastair Donaldson
at 2019-10-15T19:00:17Z
spirv-fuzz: Refactor 'copy object' and 'construct composite' transformations (#2966)
Rework these transformations to identify instructions via (base,
opcode, skip-count) triples, rather than (base, offset) pairs.
-
8e897785
by Ryan Harrison
at 2019-10-16T19:25:03Z
Add fuzzer for spirv-as call path (#2976)
Fixes #2969
-
e99b9182
by Jakub Kuderski
at 2019-10-16T20:29:55Z
Support constant-folding UConvert and SConvert (#2960)
-
9c0ae6bb
by Aaron Barany
at 2019-10-17T15:36:55Z
Improved CMake install step. (#2963)
Added exports for libraries. External libraries that themselves use
libraries require all dependencies have exports, so not having exports can
cause major problems when used within other projects.
Install paths for exports are now placed in the proper directories expected
by Windows and *nix systems. Config files are generated as well, which
should work with CMake's find_package() function once installed.
-
024417d8
by Ryan Harrison
at 2019-10-17T16:30:15Z
Check binary->code existence before destroying (#2979)
Fixes #2975
-
2ca4fcfd
by Ryan Harrison
at 2019-10-17T16:30:47Z
Add fuzzer for spirv-dis call path (#2977)
Fixes #2970
-
e3da3143
by Jakub Kuderski
at 2019-10-17T17:53:34Z
Disallow use of OpCompositeExtract/OpCompositeInsert with no indices (#2980)
-
3cdd6444
by Ryan Harrison
at 2019-10-17T18:56:13Z
Check text->str before destroying (#2981)
Fixes #2978
-
2a3cbe7c
by alan-baker
at 2019-10-18T13:02:25Z
Check that derivatives operate on 32-bit values (#2983)
* Add a check that derivative functions only operate on scalar or vector
32-bit floating point values
* Added tests to disallow half derivatives
-
6a9be627
by Steven Perron
at 2019-10-18T13:53:29Z
Keep NOPs when comparing with original binary (#2931)
We have a check that ensures that the optimizer did not change the
binary when it says that it did not. However, when the binary is
converted back to a binary, we made a decision to remove OpNop
instructions. This means that any spv file that contains a NOP
originally will fail this check.
To get around this, we convert the module to a second binary that keeps
the OpNop instructions. That binary is compared against the original.
Fixes https://crbug.com/1010191
-
e8c3f9b0
by Chris Lamb
at 2019-10-18T21:08:16Z
Ensure timestamp does not vary with timezone. (#2982)
-
615918c9
by Steven Perron
at 2019-10-21T18:15:36Z
Update CHANGES
-
8357b878
by Alastair Donaldson
at 2019-10-22T13:23:13Z
spirv-fuzz: add missing functionality for matrix composites (#2974)
Support for matrix composites had been omitted in a previous PR; this
change adds the support that was missing.
Fixes #2971.
-
02910ffd
by greg-lunarg
at 2019-10-22T14:24:54Z
Instrument: Add missing def-use analysis. (#2985)
-
349b13da
by Timo Aaltonen
at 2019-11-19T21:44:05Z
Merge branch 'upstream-unstable' into debian-unstable
-
a0da019d
by Timo Aaltonen
at 2019-11-19T21:46:06Z
bump the version
-
a8bc575c
by Timo Aaltonen
at 2019-11-19T21:58:47Z
control: Bump spirv-headers build dependency.
-
10ead80d
by Timo Aaltonen
at 2019-11-19T21:59:03Z
release to sid