Commits on Source (81)
-
Steven Perron authored
-
David Neto authored
Validates NoSignedWrap, NoUnsignedWrap. We are permissive by allowing any extended instruction.
-
Ryan Harrison authored
Fixes #2275
-
Ryan Harrison authored
Fixes #2282
-
Ryan Harrison authored
Fixes #1936
-
Ryan Harrison authored
Fixes #2279
-
greg-lunarg authored
-
Ryan Harrison authored
Fixes #2277
-
Steven Perron authored
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.
-
David Neto authored
Generally, a test fixture in a method that can generate a binary should release any previously cached binary. Similarly for diagnostics.
-
greg-lunarg authored
...instead of VertexId and InstanceId
-
Ryan Harrison authored
Fixes #2066
-
Ryan Harrison authored
Fixes #2278
-
Steven Perron authored
Add code sinking pass. It will move OpLoad and OpAccessChain instructions as close as possible to their uses. Part of #1611.
-
Steven Perron authored
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
-
Steven Perron authored
When doing (-INT_MIN) is considered overflow, so we cannot fold it by actually performing the negation. Fixes https://crbug.com/917991
-
Steven Perron authored
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.
-
Steven Perron authored
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.
-
greg-lunarg authored
...as the ConstantManager contains pointers into the TypeManager.
-
Steven Perron authored
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.
-
Steven Perron authored
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.
-
greg-lunarg authored
Need to also remove Constants from the valid_analyses set when invalidated, otherwise Constants is not reinitialized before used.
-
Ryan Harrison authored
Fixes #2313
-
David Neto authored
* 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
-
Alastair Donaldson authored
-
Ryan Harrison authored
Fixes #2323
-
Alastair Donaldson authored
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.
-
fjhenigman authored
* 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.
-
Ryan Harrison authored
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
-
JasperNV authored
Fixes #1628. * spirv-val: Emit an error when an OpBranch target is not an OpLabel
-
Steven Perron authored
* 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.
-
alan-baker authored
* check array strides for multidimensional arrays * check layouts of structs in arrays for multiple indices * new tests
-
Alastair Donaldson authored
* Extracted useful functionality from block merger and exposed it as stand-alone methods. * Separated these methods into a utility file.
-
Alastair Donaldson authored
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)
-
Steven Perron authored
Community feedback says it is not generaly benificial, so we will remove it from the standard optimization set.
-
David Neto authored
Also permit NonWritable on members of structs used for UBO and SSBO. (That seems inadvertently removed in recent revisions of the spec.)
-
David Neto authored
-
Ryan Harrison authored
Fixes #2342
-
Jeff Bolz authored
-
Steven Perron authored
* 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.
-
Ryan Harrison authored
Part of resolving #2276
-
Ryan Harrison authored
Part of resolving #2276
-
Ryan Harrison authored
Part of resolving #2276
-
Ryan Harrison authored
Part of resolving #2276
-
Ryan Harrison authored
Part of resolving #2276
-
Ryan Harrison authored
Part of resolving #2276
-
Ryan Harrison authored
Part of resolving #2276
-
Ryan Harrison authored
Covers NumWorkgroups, LocalInvocationId & GlobalInvocationId Part of resolving #2276
-
Ryan Harrison authored
Part of resolving #2276
-
Alastair Donaldson authored
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.
-
alan-baker authored
-
Ryan Harrison authored
Fixes #2273
-
Steven Perron authored
I made a mistake merging a PR, and it contained tests that break with the latest google test. I've fixed them up.
-
Alastair Donaldson authored
Fixes #2120 Enhanced the reducer so that it can merge blocks together, leveraging the functionality extracted from the block_merge pass in the optimizer.
-
Dan Ginsburg authored
Do not build spirv-reduce on iOS/tvOS/watchOS - it requires std::system which is not available on those platforms (#2355)
-
Alastair Donaldson authored
* Mention the reducer tool and location in the README. * Remark on how to get info on specifying interestingness.
-
Ryan Harrison authored
Fixes #2356
-
Ryan Harrison authored
Fixes #2272
-
alan-baker authored
Fixes #2105 * Check storage class validity * Check memory object declaration validity
-
alan-baker authored
Fixes #2354 * Storage image pointer registration allows optional level of arraying * Added a test
-
greg-lunarg authored
-
dan sinclair authored
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.
-
dan sinclair authored
-
Alastair Donaldson authored
* 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.
-
Ryan Harrison authored
Fixes #2364
-
Ryan Harrison authored
Fixes #2366
-
Paul Thomson authored
Fix MergeBlocksReductionOpportunity so it checks whether it is still enabled Fixes #2369. Added tests.
-
alan-baker authored
Fixes #2374 * Block merging no longer merges unreachable blocks into their successors * added a test
-
Takuto Ikuta authored
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
-
Ryan Harrison authored
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
-
Steven Perron authored
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.
-
greg-lunarg authored
-
Steven Perron authored
-
Ryan Harrison authored
Fixes #2394
-
Jamie Madill authored
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
-
dan sinclair authored
-
greg-lunarg authored
Also fix test to use non-zero set and binding which will make error more obvious.
-
Steven Perron authored
-
Sarah authored
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.
-
Steven Perron authored
source/opt/block_merge_util.cpp
0 → 100644
source/opt/block_merge_util.h
0 → 100644
source/opt/code_sink.cpp
0 → 100644
source/opt/code_sink.h
0 → 100644
source/opt/eliminate_dead_functions_util.cpp
0 → 100644
source/opt/eliminate_dead_functions_util.h
0 → 100644