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

3509 Коммитов

Автор SHA1 Сообщение Дата
David Neto 5bec0884cf
Remove testing support for VS2015 (#5027)
Fixes: #5026
2022-12-19 16:39:58 -05:00
David Neto 2937538210
Fix undef behaviour in hex float parsing (#5025)
When the parser saw more significant hex digits than fit in
the target type, it would compute a nonsensical shift amount, resulting
in undefined behaviour.

Now, drop the excess bits, effectively truncating the significand.

Also guard against overflow of the exponent in the extraordinary (and untested)
case where we see more than, for example, 2**(32-4+1) significant hex digits
for a 32-bit float, or 2**(16-4+1) significant hex digits for a 16-bit
float.

Also guard against overflow of the indexing counting the number of
significant bits.  When that would occur silently drop any further
significant bits.  (Untested)

Avoid hex floats in C++ code. It's a C++17 feature.

Fixes: #4724
2022-12-19 15:46:57 -05:00
Jeremy Gebben 025ea891fa
Optimize allocation of spvtools::opt::Instruction::operands_ (#5024)
Reserve space for the entire operand list rather than adding them
one a time.
2022-12-19 13:08:01 -05:00
David Neto 1c287b03d3
First attempt to set up CI-windows-msvc-2017-release-bazel build (#5023)
Part 1 of replacing the msvc-2015-release-bazel build.
See issue #5022
2022-12-19 12:42:04 -05:00
Greg Fischer f64a4b64b7
[spirv-opt] Clone names for new struct in EliminateIODeadComponents (#5016) 2022-12-19 10:20:44 -07:00
David Neto cc81529f4b
Test operator overloads for SPIR-V C++ mask enums (#5021)
Updates SPIRV-Headers in DEPS
2022-12-16 11:17:39 -05:00
alan-baker 5a78d798f7
Fix layout validation (#5015)
* Fix layout validation

Fixes #5010

* Unless scalar block layout is enabled, no member can reside at an
  offset between the end of the previous member that is a struct or
  array and the next multiple of that alignment

* Remove a dead if that was introduced

Co-authored-by: David Neto <dneto@google.com>
2022-12-15 21:38:09 -05:00
Samuel Bronson 451ba8ec3d
README.md: The validator now handles larger limits (#5003)
* README.md: The validator now handles larger limits

* Oops ...

* Fix typo

Co-authored-by: David Neto <dneto@google.com>
2022-12-15 21:35:08 -05:00
Pankaj Mistry 6b2318aec8
Fix for bug https://github.com/KhronosGroup/SPIRV-Tools/issues/5017 (#5019)
open_quote value becomes npos when it fails to find '\'' and then is used to
compute the string length for writing to result. This causes crash in win32 builds of the test.
2022-12-15 21:13:12 -05:00
David Neto 5d6adbdee0
Require C++11 *or later* (#5020)
Allow externally setting CMAKE_CXX_STANDARD to 14, for example,
which is needed to build protobufs
2022-12-15 21:12:53 -05:00
Cassandra Beckley 43c99b5ee0
Roll external/spirv-headers/ 47f2465ee..1d31a1004 (13 commits) (#5012)
47f2465ee3...1d31a10040

$ git log 47f2465ee..1d31a1004 --date=short --no-merges --format='%ad %ae %s'
2022-12-01 admin Update spir-v.xml
2022-12-01 admin Update spir-v.xml
2022-11-25 stephen.clarke Update spir-v.xml
2022-11-17 admin Register Taichi as SPIR-V generator
2022-11-16 dmitry.sidorov Remove unnecessary extensions addition
2022-11-14 alele Remove extension
2022-11-07 alele Fix typo.
2022-11-07 alele Review feedback 1.
2022-10-05 alele Add headers for SPV_NV_shader_invocation_reorder.
2022-10-17 dmitry.sidorov Add SPV_INTEL_runtime_aligned
2022-10-17 dmitry.sidorov Add SPV_INTEL_fpga_dsp_control
2022-10-17 dmitry.sidorov Add SPV_INTEL_fpga_invocation_pipelining_attributes
2022-10-17 dmitry.sidorov Update SPV_INTEL_fpga_loop_controls to rev I

Created with:
  roll-dep external/spirv-headers
2022-12-12 11:10:52 -05:00
alan-baker 235182cfee
Fix use of invalid analysis (#5013)
Fixes https://crbug.com/1395415

* Block merging needed to invalid structured cfg analysis
2022-12-12 10:49:59 -05:00
alan-baker 9c6a925c87
Fix infinite loop in validator (#5006)
Fixes https://crbug.com/oss-fuzz/53510

* Fix infinite loop that could occur in structured cfg validation due to
  an invalid cfg
2022-12-06 11:22:33 -05:00
Spencer Fricke 7b8f00f00a
spirv-opt: Fix OpCompositeInsert with Null Constant (#5008)
* spirv-opt: Unify GetConstId function names

* spirv-opt: Fix OpCompositeInsert with Null Constant

* spirv-opt: Improve GetNullCompositeConstant description
2022-12-06 09:00:10 -05:00
Cassandra Beckley 40f5bf59c6
Revert "spirv-val: Multiple interface var with same SC (#4969)" (#5009)
This reverts commit 996d4c021f. This
commit is likely good, but it causes a failure in DXC tests. Will
un-revert once we fix the issue in DXC.
2022-12-05 12:31:01 -08:00
Brian Osman d9446130d5
Update BUILD.gn with recently added file (#5004) 2022-11-28 13:24:44 -05:00
Greg Fischer 00018e58af
Change EliminateDeadInputComponentsPass to EliminateDeadIOComponentsPass (#4997)
To reflect processing of both Input and Output variables.

Also renamed files as needed.
2022-11-25 16:48:13 -07:00
Biswapriyo Nath 9a6f4121f4
Fix missing declaration of std::numeric_limits (#5002)
This fixes the errors:
validate_ray_tracing_reorder.cpp:25:49: error: 'numeric_limits' is not a member of 'std'
2022-11-25 10:54:38 -05:00
alelenv f33d152400
Add validation support for SPV_NV_shader_invocation_reorder. (#4979)
Co-authored-by: Pankaj Mistry <pmistry@nvidia.com>
2022-11-24 09:50:45 -05:00
Spencer Fricke 597631b693
spirv-opt: Handle null CompositeInsert (#4998)
Fixes #4996
2022-11-24 08:38:12 -05:00
Greg Fischer 81ec2aaa0e
Add option to ADCE to remove output variables from interface. (#4994)
This can cause interface incompatibility and should only be done
if ADCE has been applied to the following shader in the pipeline.
For this reason this capability is not available through the CLI
but rather only non-default through the API. This functionality is
intended as part of a larger cross-shader dead code elimination
sequence.
2022-11-23 10:48:58 -07:00
Greg Fischer 46ca66e699
Add support for tesc, tese and geom to EliminateDead*Components (#4990) 2022-11-18 15:08:18 -07:00
Nathan Gauër 1a7f71afb4
clean: constexpr-ify and unify anon namespace use (#4991)
Constexpr guaranteed no runtime init in addition to const semantics.
Moving all opt/ to constexpr.
Moving all compile-unit statics to anonymous namespaces to uniformize
the method used (anonymous namespace vs static has the same behavior
here AFAIK).

Signed-off-by: Nathan Gauër <brioche@google.com>
2022-11-17 19:02:50 +01:00
Greg Fischer 8ea3ae6be2
Split EliminateDeadInputComponents into safe and unsafe versions. (#4984)
Safe version will only optimize vertex shaders. All other shaders will
succeed without change.

Change --eliminate-dead-input-components to use new safe version.

Unsafe version (allowing non-vertex shaders) currently only available
through API. Should only be used in combination with other optimizations
to keep interfaces consistent. See optimizer.hpp for more details.
2022-11-14 11:44:26 -07:00
Shahbaz Youssefi a8647f59c0
Use Python3 for presubmit (#4986) 2022-11-11 09:18:00 -05:00
Jeremy Gebben 68e8327f29
Instrument: Change output buffer offset definitions (#4961)
Add a flags field at the first offset within this buffer.
Define flags to allow buffer OOB checking to be enabled or
disabled at run time. This is to support VK_EXT_pipeline_robustnes.
2022-11-10 12:35:18 -05:00
Spencer Fricke 996d4c021f
spirv-val: Multiple interface var with same SC (#4969)
* spirv-val: Multiple interface var with same SC

* spirv-val: Use C style headers
2022-11-10 12:32:58 -05:00
alan-baker aae7d41325
Fix macos kokoro builds (#4985) 2022-11-09 17:37:23 -05:00
Greg Fischer 525bc38062
Add pass to eliminate dead output components (#4982)
This pass eliminates components of output variables that are not stored
to. Currently this just eliminates trailing components of arrays and
structs, all of which are dead.

WARNING: This pass is not designed to be a standalone pass as it can
cause interface incompatibiliies with the following shader in the
pipeline. See the comment in optimizer.hpp for best usage. This pass is
currently available only through the API; it is not available in the CLI.

This commit also fixes a bug in CreateDecoration() which is part of the
system of generating SPIR-V from the Type manager.
2022-11-08 10:45:32 -07:00
Spencer Fricke 54d4e77fa5
spirv-opt: Add const folding for CompositeInsert (#4943)
* spirv-opt: Add const folding pass for CompositeInsert

* spirv-opt: Fix anas stack-use-after-scope
2022-11-08 10:50:42 -05:00
Spencer Fricke a5e766b2b4
spirv-val: Add VUID label for 07703 (#4980) 2022-11-06 19:05:25 -05:00
alan-baker d35a78db57
Switch SPIRV-Tools to use spirv.hpp11 internally (#4981)
Fixes #4960

* Switches to using enum classes with an underlying type to avoid
  undefined behaviour
2022-11-04 17:27:10 -04:00
Greg Fischer c8e1588cfa
Add passes to eliminate dead output stores (#4970)
This adds two passes to accomplish this: one pass to analyze a shader
to determine the input slots that are live. The second pass is run on
the preceding shader to eliminate any stores to output slots that are
not consumed by the following shader.

These passes support vert, tesc, tese, geom, and frag shaders.

These passes are currently only available through the API.

These passes together with dead code elimination, and elimination of
dead input and output components and variables (WIP), will allow users
to do dead code elimination across shader boundaries.
2022-11-02 11:23:25 -06:00
alan-baker a52de681dd
Prevent eliminating case constructs in block merging (#4976)
Fixes #4918

* Prevent block merging from producing an invalid case construct by
  merging a switch target/default with another construct's merge or
  continue block
* This is to satisfy the structural dominance requirement between the
  switch header and the case constructs
2022-10-28 14:13:20 -04:00
alan-baker 4563d90934
Only validate full layout in Vulkan environments (#4972)
Fixes #4671
Fixes https://crbug.com/oss-fuzz/43265

* Only validate full layout in a vulkan environment
  * Universal validation still checks that the right decorations are
    present, but the values are only considered for vulkan
* One exception is that invalid overlaps are only checked for vulkan
  * This is a pragmatic choice as SPIR-V doesn't define the size of
    types so the amount of universal checking would be quite limited
* Removed redundant check for GLSLShared and GLSLPacked decorations
  * Should never have been validated as part of universal validation

* make conditionals independent
2022-10-28 11:52:28 -04:00
Spencer Fricke 9f3a4afae4
spirv-val: Label new Vulkan OpPtrAccessChain VUs (#4975) 2022-10-27 10:10:27 -04:00
Nathan Gauër b49a2caa7c
Revert "test" (#4974)
This reverts commit da215f10c9.
2022-10-27 14:17:31 +02:00
Nathan Gauër da215f10c9 test 2022-10-26 16:42:29 +00:00
alan-baker 7326b967a5
Prevent null pointer from being dereferenced (#4971)
Fixes https://crbug.com/oss-fuzz/48553

* Assign a reflexive dominator if no other dominator can be found using
  forward traversals
  * This prevents a null dereference of a pointer in the sorting of the
    output
2022-10-24 15:16:33 -04:00
Spencer Fricke 0ebf830572
spirv-val: Add OpPtrAccessChain Base checks (#4965) 2022-10-24 12:45:08 -04:00
Spencer Fricke eb113f0fdf
spirv-val: Improve PR 4831 error message (#4968) 2022-10-20 10:51:43 -04:00
Spencer Fricke ecd5b9c167
spirv-val: Add remaining Component decoration validation (#4966) 2022-10-17 16:54:39 -04:00
Diego Novillo b53d3a6be3 Start SPIRV-Tools v2022.5 2022-10-12 12:17:13 -04:00
Diego Novillo eb0a36633d Finalize SPIRV-Tools v2022.4 2022-10-12 12:15:28 -04:00
Diego Novillo 4a6290b56e Update CHANGES 2022-10-12 09:41:52 -04:00
Diego Novillo a9291988df Roll external/spirv-headers/ 4bd8fc0c8..85a1ed200 (4 commits)
4bd8fc0c8c...85a1ed200d

$ git log 4bd8fc0c8..85a1ed200 --date=short --no-merges --format='%ad %ae %s'
2022-10-05 dkoch Fix extension for RayTracingOpacityMicromapEXT
2022-10-04 kpet Add support for texel buffers to clspv non-semantic instruction set
2022-10-04 hugo registered ID for Shady
2022-08-23 ewerness VK_EXT_opacity_micromap

Created with:
  roll-dep external/spirv-headers
2022-10-12 09:29:45 -04:00
Diego Novillo a25a9d0b5e Roll external/re2/ 5723bb895..d2836d1b1 (11 commits)
5723bb8950...d2836d1b1c

$ git log 5723bb895..d2836d1b1 --date=short --no-merges --format='%ad %ae %s'
2022-10-10 jimquinn custom comparator for prefilter exact strings
2022-10-06 jimquinn reduce string copies in prefilter
2022-09-14 junyer Update Unicode data to 15.0.0.
2022-08-26 junyer Add Clang 15 to the build matrix.
2022-08-24 junyer Document why `RE2` objects are neither copyable nor movable.
2022-08-08 junyer Address some more `-Wunreachable-code` warnings.
2022-08-05 junyer Attempt to address some `-Wunreachable-code` warnings.
2022-08-04 junyer Remove the use of `six` from `unicode.py`.
2022-08-03 junyer Remove guards for SWIG.
2022-06-03 hannahshisfb fix 64 to 32 bit clang conversion warning
2022-05-31 junyer Optimise the layout of the `RE2` class.

Created with:
  roll-dep external/re2
2022-10-12 09:29:43 -04:00
Diego Novillo 59043d1776 Roll external/googletest/ 548b13dc3..d9bb8412d (78 commits)
548b13dc3c...d9bb8412d6

$ git log 548b13dc3..d9bb8412d --date=short --no-merges --format='%ad %ae %s'
2022-10-07 ferenc.gm Suggests a release with fixed CMakeLists.txt
2022-10-07 absl-team Update the POSIX Extended section of the Regular Expression Wikipedia page
2022-10-06 absl-team [fuchsia] Use __builtin_trap to trigger gunit_break_on_failure on non-x86 arch
2022-10-05 absl-team Makes Clang compilations via Ninja on Windows define _DLL only for shared CRT builds, as one would already expect from MSVC builds. (Previously, static Clang/Ninja builds on Windows also implicitly defined _DLL, which was problematic.)
2022-09-30 absl-team Uses a simpler mechanism to disable the copying of GoogleTest test suites, to move code out of the TEST_P macro.
2022-09-28 absl-team Rollback: Moves boilerplate disabling copy constructor/assignment from GoogleTest's TEST_P macro into a header file to avoid triggering warnings in user code.
2022-09-28 absl-team Rollback: Uses a simpler mechanism to disable the copying of GoogleTest test suites.
2022-09-28 absl-team Uses a simpler mechanism to disable the copying of GoogleTest test suites.
2022-09-28 absl-team Moves boilerplate disabling copy constructor/assignment from GoogleTest's TEST_P macro into a header file to avoid triggering warnings in user code.
2022-09-27 absl-team Add GoogleTest workaround for MSVC crash with Address Sanitizer (ASAN) on version 17.3.3
2022-09-27 cclauss Branding: macOS
2022-09-27 cclauss Upgrade GitHub Actions Checkout
2022-09-20 maratek Port GoogleTest to QuRT (Hexagon RTOS)
2022-09-18 426690+softwaregravy Update link to Bazel installation guide
2022-09-13 dmauro Fix MSVC C++14 flag for GitHub workflow
2022-09-13 dmauro Rollback 4fa8cfe3f4dee8975ee02d98633a5245ab67c6d7
2022-09-09 absl-team Use UnorderedElementsAre in example about using matchers with maps
2022-09-08 absl-team Remove obsolete MSVC warning pragmas for Invalid<T>()
2022-09-01 absl-team Fixed header guards to match style guide conventions.
2022-08-26 absl-team Consider all TERM values ending in "-256color" to be color supporting. In particular this handles TERM=hterm-256color correctly.
2022-08-22 hardikv Add support of 19-member structs to gmock UnpackStructImpl.
2022-08-19 keithbsmiley bazel: move -std=c++14 to .bazelrc
2022-08-16 dmauro Update README.md to point to the Foundational C++ Support Policy
2022-08-12 dmauro Add --features=external_include_paths to Bazel CI to ignore warnings from dependencies
2022-08-08 dinor gtest_unittest: Call FAIL() in lambda, fix incorrect fatality expectation
2022-08-04 dinor Explicitly instantiate matchee std::string in MatchesRegex
2022-07-31 bmburstein Custom type with Combine(). Fix for #3781
2022-07-28 absl-team Add support of 18-member structs to gmock UnpackStructImpl.
2022-07-25 dinor Add IsEmpty overload for C-style strings
2022-07-21 thegeorg Continuation for #3183
2022-07-20 matdibu gtest-death-test: add 'noreturn'
2022-06-28 dev Set cmake policy CMP0069
2022-07-14 polushin export ThreadLocalValueHolderBase which is required by exported APIs.
2022-07-11 polushin cmake: make PDB output directory match that of a static library.
2022-07-11 polushin cmake: find python in order specified by PATH environment variable.
2022-07-11 dmauro Add envvar BAZEL_CXXOPTS=-std=c++14 to the GitHub Actions CI
2022-07-08 dmauro CMake: raise the default C++ standard to cxx_std_14
2022-07-07 ckennelly Enable heterogeneous lookup for RegisteredTestsMap.
2022-07-01 nikiforov.al cleanup from unique_ptr branch
2022-07-01 dmauro Remove the Bazel provided default cxxopt -std=c++0x and replace it with -std=c++14 when testing with GCC 5.
2022-07-01 57719497+yutotnh fix: some typos in source
2022-07-01 57719497+yutotnh fix: typo in test name
2022-07-01 57719497+yutotnh fix: some typos in comment
2022-06-30 dmauro Remove support for C++11
2022-06-30 dmauro Update version number in CMakeLists.txt Note that this is 1.12.1 as there will be a patch release to fix this
2022-06-29 absl-team Add support of 17-member structs to gmock UnpackStructImpl.
2022-06-27 absl-team Mark internal-only function as having internal linkage.
2022-06-27 93249401+assafpr Update gtest.cc
2022-06-27 93249401+assafpr Update gmock-matchers.h
2022-06-27 93249401+assafpr Update gmock-actions.h
2022-06-27 93249401+assafpr Update gmock-spec-builders_test.cc
2022-06-27 93249401+assafpr Update gtest-death-test.cc
2022-06-27 93249401+assafpr Update gmock-spec-builders.cc
2022-06-27 93249401+assafpr Update advanced.md
2022-06-26 asmodai27 Avoid implicit conversion from int to char
2022-06-26 asmodai27 Avoid implicit conversion from int to char
2022-06-25 julian.arkenau docs: update googletest README for release 1.12.0
2022-06-23 dmauro Update README.md for release 1.12.0
2022-06-22 dmauro Update versions of WORKSPACE dependencies
2022-06-22 93249401+assafpr documentation, change mater branch to main
2022-06-22 93249401+assafpr Update faq.md
2022-06-22 93249401+assafpr Update CONTRIBUTING.md
2022-06-22 93249401+assafpr documentation, change mater branch to main
2022-06-22 93249401+assafpr documentation, change mater branch to main
2022-06-22 93249401+assafpr Update gmock_output_test_golden.txt
2022-06-22 93249401+assafpr change link from master to main in documentation
2022-06-21 dmauro Update GCC floor container used by CI to fix the Bazel cache error
2022-06-16 dmauro Disable warning C4251 around refactored code
2022-06-13 absl-team gmock_cook_book.md: Delete superfluous statement from 2014.
2022-06-11 gpetit Move declaration of kStdOutFileNo and kStdErrFileno
2022-06-09 absl-team Update googletest docs to indicate that RE2 is now used for regexp implementation when building with Bazel and using Abseil.
2022-06-09 absl-team Remove undefined internal function. Fixes #3856
2022-06-01 dmauro Work around a maybe-uninitialized warning under GCC 12
2022-05-31 gpetit Fix for undefined symbol: testing::internal::Random::kMaxRange
2022-05-30 gpetit Simplify ColoredPrintf to rely on ShouldUseColor
2022-05-30 gpetit Fix "unused variable" warning
2022-05-18 akohlmey set -utf-8 flag only for real MSVC compilers. E.g. not Intel's icx.exe
2022-03-26 perez.cs Fix quickstart-cmake documentation

Created with:
  roll-dep external/googletest
2022-10-12 09:29:41 -04:00
Diego Novillo 95ae2da35b Roll external/effcee/ ddf5e2bb9..35912e1b7 (1 commit)
ddf5e2bb92...35912e1b77

$ git log ddf5e2bb9..35912e1b7 --date=short --no-merges --format='%ad %ae %s'
2022-07-06 dneto Update Bazel build rules

Created with:
  roll-dep external/effcee
2022-10-12 09:29:39 -04:00
Kévin Petit a3350c0ff0
Update SPIRV-Headers revision (#4962)
Following #4958

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
Change-Id: I0aed90dbd5705881a5f68d439f9d191d5d01c993

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2022-10-11 13:48:07 -04:00