-
ee95ab15
by Steven Perron
at 2019-01-07T20:51:06Z
Start SPIRV-Tools v2019.2
-
df5bd2d0
by David Neto
at 2019-01-09T00:00:18Z
Permit UConvert spec-constant op for SPV_AMD_gpu_shader_int16 (#2264)
See https://github.com/KhronosGroup/glslang/issues/848
-
6958d11b
by David Neto
at 2019-01-09T15:36:17Z
Validate decorations from SPV_KHR_no_integer_wrap (#2271)
Validates NoSignedWrap, NoUnsignedWrap.
We are permissive by allowing any extended instruction.
-
16a0da37
by Ryan Harrison
at 2019-01-14T18:52:28Z
Ensure that entry point names are unique for WebGPU (#2281)
Fixes #2275
-
68f2af9f
by Ryan Harrison
at 2019-01-14T18:52:50Z
Removing unused const version of id_decorations (#2283)
Fixes #2282
-
9d8534e3
by Ryan Harrison
at 2019-01-14T21:44:44Z
Enforce rules for OpTypeRuntimeArray on Vulkan (#2191)
Fixes #1936
-
cb27ffdc
by Ryan Harrison
at 2019-01-15T15:24:58Z
Ensure that required storage classes have initializer for WebGPU (#2285)
Fixes #2279
-
83bfdc97
by greg-lunarg
at 2019-01-16T15:01:40Z
Instrumentation: Add ArrayStride decoration to debug output buffer array (#2290)
-
3109ca16
by Ryan Harrison
at 2019-01-16T16:24:48Z
Add tests to validate allowed lengths of int and floats for WebGPU (#2289)
Fixes #2277
-
49b5b0ab
by Steven Perron
at 2019-01-16T20:52:23Z
Fix up bit shifts by 32. (#2292)
In C++, a bit shift of the same size as the type is undefined, but it is
defined in spir-v. When folding those cases, we have to be careful. We
cannot simply do the shift in C++.
Fixes https://crbug.com/917697.
-
70404a96
by David Neto
at 2019-01-16T21:53:10Z
Fix leaks in tests (#2295)
Generally, a test fixture in a method that can generate a binary
should release any previously cached binary. Similarly for diagnostics.
-
8d2d66f3
by greg-lunarg
at 2019-01-16T23:02:07Z
Fix vertex instrumentation to use VertexIndex and InstanceIndex (#2294)
...instead of VertexId and InstanceId
-
b6150e51
by Ryan Harrison
at 2019-01-17T15:39:12Z
Add WebGPU specific RTA validation rules (#2287)
Fixes #2066
-
7577415c
by Ryan Harrison
at 2019-01-17T15:39:35Z
Add in WebGPU specific memory scope validation (#2288)
Fixes #2278
-
dd4157dc
by Steven Perron
at 2019-01-17T20:56:36Z
Sink (#2284)
Add code sinking pass. It will move OpLoad and OpAccessChain instructions as close as possible to their uses.
Part of #1611.
-
99c2c21c
by Steven Perron
at 2019-01-17T21:02:43Z
Fix memory leak in unrolling. (#2301)
During unrolling a new loop is created, but its ownership is not clear
as it gets passed through the code. Changed something to unique_ptr to
make that clearer.
Fixes #2299.
Fixing other memory leaks at the same time.
Fixes #2296
Fixes #2297
-
213e15e1
by Steven Perron
at 2019-01-17T22:01:55Z
Fix overflow when negating INT_MIN. (#2293)
When doing (-INT_MIN) is considered overflow, so we cannot fold it by
actually performing the negation.
Fixes https://crbug.com/917991
-
81fb2649
by Steven Perron
at 2019-01-18T19:19:43Z
Handle access chain with no index in SROA. (#2304)
It is legal, but not generated by any SPIR-V producer: an OpAccessChain
with no indexes. This is essentially just a copy of the pointer.
I have decided to treat it like an OpCopyObject. In CheckUses, we
return that it is not okay.
When looking at this I realized that we had code in GetUsedComponents
that cannot be reached. If there is a use in an OpCopyObject the it
will not call GetUsedComponents. I removed that dead code.
Fixes https://crbug.com/918311.
-
d6c06763
by Steven Perron
at 2019-01-18T20:43:36Z
Handle extract with no index in VDCE. (#2305)
It is legal, but not generated by any SPIR-V producer: an OpCompositeExtract
with no indexes. This is essentially just a copy of the object, so we
treat them that way. We simply propagate the live variables of the
result to the operand.
Fixes https://crbug.com/919181.
-
d14db341
by greg-lunarg
at 2019-01-18T20:49:00Z
Invalidate ConstantManager if TypeManager is invalidated... (#2302)
...as the ConstantManager contains pointers into the TypeManager.
-
8df947d2
by Steven Perron
at 2019-01-21T17:09:56Z
Handle instructions not in blocks in code sinking. (#2308)
When looking at the uses of the result of an instruction, code sinking
assumes that all uses are in a basic block. However, this is not true
if there is a decoration or name for the result of that insturction.
This commit checks for this.
Fixes https://crbug.com/923243.
-
eab06d66
by Steven Perron
at 2019-01-21T17:10:25Z
Check forward reference in OpTypeArray. (#2307)
In a recent PR, we allowed a forward reference for the element type in
an array declaration. However, we do not have other check to make sure
the forward reference is a pointer type first reference in
OpTypeForawrdPointer. We add that check.
Fixes https://crbug.com/920074.
-
a64c651e
by greg-lunarg
at 2019-01-21T17:34:12Z
Fix Constants Analyses bug inserted by #2302 (#2306)
Need to also remove Constants from the valid_analyses set when
invalidated, otherwise Constants is not reinitialized before used.
-
3a3ad2ec
by Ryan Harrison
at 2019-01-22T20:18:14Z
Add utility to generate a logging string for a given environment (#2314)
Fixes #2313
-
4a405eda
by David Neto
at 2019-01-22T23:15:24Z
Fix layout checks for nested struct in relaxed layout; and descriptor arrays (#2312)
* Fixed layout checks for nested structures
Fixes #2303
* Incoming offsets accumulate through nested structures
* Check layouts through arrays
* Perform layout checks in the presence of descriptor arrays (and
runtime arrays)
* Fix formatting
-
3d710242
by Alastair Donaldson
at 2019-01-23T17:29:14Z
Added some documentation about the reducer. (#2318)
-
b1be6763
by Ryan Harrison
at 2019-01-23T18:07:03Z
Add helper for 'is Vulkan or WebGPU' (#2324)
Fixes #2323
-
86d0d9be
by Alastair Donaldson
at 2019-01-23T22:07:58Z
Refactored reducer so that the 'finding' functionality of a reduction pass are separated from the generic functionality for tracking progress of a pass. With this change, we now have a ReductionOpportunityFinder abstract class, with many subclasses for each type of reduction, and just one ReductionPass class, which has an associated finder. (#2321)
Sounds good.
-
20b2e2b9
by fjhenigman
at 2019-01-24T14:45:09Z
Add SpirvTools::IsValid(). (#2326)
* Add SpirvTools::IsValid().
Add a method to determine if a SpirvTools object was successfully
constructed and can be used. It might not be depending on the parameter
to the constructor.
This is something a fuzzer wants to know before trying to use an
SpirvTools object constructed with a fuzzed parameter.
-
1e3c589a
by Ryan Harrison
at 2019-01-24T17:08:25Z
Add WebGPU specific validation for Position BuiltIn decoration (#2309)
This CL adds in the specific checks required for WebGPU, enables
running the builtin checks for WebGPU, and refactors the existing
testing infrastructure to support testing the new checks.
This PR is part of resolving #2276
-
8915a7c8
by JasperNV
at 2019-01-24T17:11:49Z
spirv-val: Emit an error when an OpSwitch target is not an OpLabel (#2298)
Fixes #1628.
* spirv-val: Emit an error when an OpBranch target is not an OpLabel
-
e2279da7
by Steven Perron
at 2019-01-24T19:50:58Z
Remove the static maps from CheckDecorationsCompatibility (#2327)
* Remove the static maps from CheckDecorationsCompatibility
There are a few data structures in the function
`CheckDecorationsCompatibility` that are allocated using `new` and their
address is stored in a static pointer. This code pattern causes the
MSVC memory leak checker to say there is a memory leak. Some people
are interested in keeping that clean.
To work around it, I have replaced them with either a function or an
array of POD types. The array can be kept as a static directly because
it has a trivial destructor, and we don't have to worry about it being
destroyed too early.
Fixes https://github.com/KhronosGroup/SPIRV-Tools/issues/2317.
-
cf011f99
by alan-baker
at 2019-01-24T22:24:31Z
More layout check fixes (#2315)
* check array strides for multidimensional arrays
* check layouts of structs in arrays for multiple indices
* new tests
-
3345fe6a
by Alastair Donaldson
at 2019-01-25T10:57:13Z
Extracted block merging functionality into its own utility file (#2325)
* Extracted useful functionality from block merger and exposed it as stand-alone methods.
* Separated these methods into a utility file.
-
98c67d38
by Alastair Donaldson
at 2019-01-25T16:37:03Z
Fixed names in ifdefs and GetName functions that had been forgotten in a previous refactoring. Also shortened names of test files as those files test both the new 'finder' classes introduced in the refactoring, as well as the 'reduction pass' class; the shorter names capture both. (#2336)
-
9ab1c0dd
by Steven Perron
at 2019-01-28T16:50:50Z
Remove code sinking for -O. (#2340)
Community feedback says it is not generaly benificial, so we will remove
it from the standard optimization set.
-
7f3679a8
by David Neto
at 2019-01-28T20:44:13Z
Validate NonWritable decoration (#2263)
Also permit NonWritable on members of structs used for UBO and SSBO.
(That seems inadvertently removed in recent revisions of the spec.)
-
cf783462
by David Neto
at 2019-01-29T02:42:35Z
Add source/opt/block_merge_util.* to BUILD.gn (#2344)
-
5d6b4c4b
by Ryan Harrison
at 2019-01-29T15:27:11Z
Move CodeGenerator to be accessible by other validation tests (#2343)
Fixes #2342
-
7f1a020a
by Jeff Bolz
at 2019-01-29T18:29:58Z
Fix test_val_limits MSVC build (#2347)
-
464111ea
by Steven Perron
at 2019-01-29T23:56:52Z
Remove use of deprecated googletest macro (#2286)
* Remove use of deprecated googletest macro
INSTANTIATE_TEST_CASE_P has been deprecated. We need to use
INSTANTIATE_TEST_SUITE_P instead.
* Remove extra commas from test suites.
-
b947ecfe
by Ryan Harrison
at 2019-01-30T17:22:30Z
Add WebGPU specific validation for VertexIndex BuiltIn decoration (#2328)
Part of resolving #2276
-
734def14
by Ryan Harrison
at 2019-01-30T19:20:55Z
Add WebGPU specific validation for InstanceIndex BuiltIn decoration (#2329)
Part of resolving #2276
-
b6698e0d
by Ryan Harrison
at 2019-01-30T19:48:43Z
Add WebGPU specific validation for FrontFacing BuiltIn decoration (#2330)
Part of resolving #2276
-
0c14583f
by Ryan Harrison
at 2019-01-30T19:53:43Z
Add WebGPU specific validation for FragCoord BuiltIn decoration (#2331)
Part of resolving #2276
-
837153cc
by Ryan Harrison
at 2019-01-30T20:27:04Z
Add WebGPU specific validation for FragDepth BuiltIn decoration (#2332)
Part of resolving #2276
-
d17fcf8a
by Ryan Harrison
at 2019-01-30T20:45:31Z
Add WebGPU validation for LocalInvocationIndex BuiltIn decoration (#2335)
Part of resolving #2276
-
3d2afb78
by Ryan Harrison
at 2019-01-30T20:46:02Z
Add whitelist of allowed BuiltIn decorations for WebGPU (#2337)
Part of resolving #2276
-
e2f46226
by Ryan Harrison
at 2019-01-30T22:00:58Z
Add WebGPU specific validation for multiple BuiltIn decorations (#2333)
Covers NumWorkgroups, LocalInvocationId & GlobalInvocationId
Part of resolving #2276
-
2acbf488
by Ryan Harrison
at 2019-01-30T22:01:17Z
Add WebGPU specific validation for WorkgroupSize BuiltIn decoration (#2334)
Part of resolving #2276
-
3b6fee3d
by Alastair Donaldson
at 2019-01-31T14:36:05Z
Fixes #2338. Added functionality to remove OpPhi instructions (replacing their uses) when merging blocks (#2339)
* Fixes #2338. Added check for phi node before merging blocks.
* Added functionality to merge blocks A and B even when B starts with OpPhi instructions, by replacing uses of the OpPhi results with the definitions coming from A. Added some tests for this.
* Fixed assertion.
-
63e032f9
by alan-baker
at 2019-01-31T20:57:45Z
Remove unused lambda capture (#2350)
-
846d12af
by Ryan Harrison
at 2019-01-31T21:25:46Z
Add whitelist for decorations in WebGPU (#2346)
Fixes #2273
-
453b7c85
by Steven Perron
at 2019-01-31T21:44:15Z
Fix up some test (#2351)
I made a mistake merging a PR, and it contained tests that break with
the latest google test. I've fixed them up.
-
37861ac1
by Alastair Donaldson
at 2019-02-01T14:56:54Z
Merge blocks in reducer (#2353)
Fixes #2120
Enhanced the reducer so that it can merge blocks together, leveraging the functionality extracted from the block_merge pass in the optimizer.
-
e3c64a37
by Dan Ginsburg
at 2019-02-04T17:39:39Z
Do not build spirv-reduce on iOS/tvOS/watchOS - it requires std::system which is not available on those platforms (#2355)
-
adbbe202
by Alastair Donaldson
at 2019-02-04T17:41:38Z
Mention the reducer tool and location in the README. (#2341)
* Mention the reducer tool and location in the README.
* Remark on how to get info on specifying interestingness.
-
368567bc
by Ryan Harrison
at 2019-02-05T15:33:55Z
Convert deprecated GoogleTest fixture to the new version (#2357)
Fixes #2356
-
0f4bf072
by Ryan Harrison
at 2019-02-05T19:07:53Z
Add flatten-decorations flag to webgpu-mode flags (#2348)
Fixes #2272
-
117a1fd1
by alan-baker
at 2019-02-06T19:10:40Z
Validate variable pointer related function call rules (#2270)
Fixes #2105
* Check storage class validity
* Check memory object declaration validity
-
9b6ba4d1
by alan-baker
at 2019-02-06T20:20:19Z
Allow arrayed storage images for NonWritable decoration (#2358)
Fixes #2354
* Storage image pointer registration allows optional level of arraying
* Added a test
-
cf211461
by greg-lunarg
at 2019-02-07T19:00:36Z
Expand bindless bounds checking to runtime-sized descriptor arrays (#2316)
-
39bfb6b9
by dan sinclair
at 2019-02-07T19:49:15Z
Make spvParseTargetEnv public (#2362)
This CL moves the method to parse the SPIRV environment into the public headers. This will allow other applications to re-use the same parsing logic.
-
10a7def6
by dan sinclair
at 2019-02-07T20:32:41Z
Smoketest should use KhronosGroup glslang (#2363)
-
34c5ac61
by Alastair Donaldson
at 2019-02-08T16:20:29Z
Fixes #2358. Added to the reducer the ability to remove a function t… (#2361)
* Fixes #2358. Added to the reducer the ability to remove a function that is not directly called. Factored out some code from the optimizer to help with this.
-
a0ff7c51
by Ryan Harrison
at 2019-02-08T16:24:02Z
Add better error message to ValidateInstructions (#2365)
Fixes #2364
-
12b3d7e9
by Ryan Harrison
at 2019-02-08T19:26:17Z
Add strip-debug to webgpu-mode passes (#2368)
Fixes #2366
-
40a7940e
by Paul Thomson
at 2019-02-11T21:26:37Z
Fix merge blocks opportunity to check if still enabled (#2370)
Fix MergeBlocksReductionOpportunity so it checks whether it is still enabled
Fixes #2369. Added tests.
-
354205b3
by alan-baker
at 2019-02-12T14:24:01Z
Don't merge unreachable blocks (#2375)
Fixes #2374
* Block merging no longer merges unreachable blocks into their
successors
* added a test
-
0187c190
by Takuto Ikuta
at 2019-02-13T15:24:06Z
Fix BUILD.gn (#2381)
extensions_enum.inc is included from source/table.h.
So spvtools_core_enums_unified1 target should be in public_deps of
spvtools target.
This is for crbug.com/931596
-
0167a20b
by Ryan Harrison
at 2019-02-13T19:06:56Z
Move usage detection to after all instructions are registered (#2378)
This is required to properly handle uses of forward declared ids. Since forward
declared ids were not being properly covered by the validator this uncovered a
bunch of small issues that needed to be resolved to get tests passing again.
Fixes #2373
-
1b0047f2
by Steven Perron
at 2019-02-14T18:42:35Z
Add pass to remove dead members. (#2379)
Add a pass that looks for members of structs whose values do not affects
the output of the shader. Those members are then removed and just
treated like padding in the struct.
-
9540f2d9
by greg-lunarg
at 2019-02-15T14:49:18Z
Instrumentation: Fix instruction index when multiple functions (#2389)
-
78ac954c
by Steven Perron
at 2019-02-15T15:49:49Z
Mark type id of unknown instructions at fully used. (#2399)
-
6d20f625
by Ryan Harrison
at 2019-02-15T16:08:05Z
Refactor webgpu-mode pass ran tests to be parameterized (#2395)
Fixes #2394
-
4b42cd19
by Jamie Madill
at 2019-02-19T15:38:38Z
BUILD.gn: Only build tests in Chromium. (#2392)
The prior GoogleTest integration was incomplete and produced errors
when building with 'gn check' enabled. Fix this by scoping the test
integration to Chromium.
Fixes Issue #2382
-
528fea2b
by dan sinclair
at 2019-02-19T16:11:04Z
Fixup unused variables (#2402)
-
2f84b5de
by greg-lunarg
at 2019-02-19T16:43:30Z
Bindless: Fix computation of set and binding for runtime bounds check (#2384)
Also fix test to use non-zero set and binding which will make error
more obvious.
-
80496f42
by Steven Perron
at 2019-02-19T17:54:42Z
Update CHANGES
-
bf23ed88
by Sarah
at 2019-02-20T16:00:58Z
OpAtomicLoad, OpAtomicStore, OpAtomicExchange can operate on int or float value. Except for Vulkan environment that only operates on int value. (#2385)
To fix: #2128. Already implemented. This PR adds witness tests.
-
61dfd849
by Steven Perron
at 2019-02-20T16:04:41Z
Finalize SPIRV-Tools 2019.2