Skip to content

Linker: Better type comparison for OpTypeArray and OpTypeForwardPointer#2580

Merged
s-perron merged 2 commits intoKhronosGroup:masterfrom
pierremoreau:fix_#2442
May 29, 2019
Merged

Linker: Better type comparison for OpTypeArray and OpTypeForwardPointer#2580
s-perron merged 2 commits intoKhronosGroup:masterfrom
pierremoreau:fix_#2442

Conversation

@pierremoreau
Copy link
Copy Markdown
Contributor

This is an attempt to fix #2442 by re-implementing type comparisons for OpTypeArray. This new comparison checks that the values of the constants are the same, or if those are specialised constants, that they refer to the same SpecId.

@pierremoreau
Copy link
Copy Markdown
Contributor Author

I’m opening this as a WIP and only implemented it for OpTypeArray, as I am not sure this is the solution we want to go for. It would probably be best to have this as part of the regular type comparison done by the Type::IsSameImpl() functions, however I don’t know how this should be done. We could store the extra information when creating the types, but was the DefUseManager and DecorationManager created and up-to-date?

blue42u added a commit to blue42u/SPIRV-Tools that referenced this pull request May 21, 2019
This adds a number of tests that check that all types will match to identically
written clones during linking, including nearly every Type and some
combinations (e.g. Functions of Arrays of Floats). Intent is for use with
KhronosGroup#2580, however that PR focuses
on issues with TypeArray whereas these tests are (more) comprehensive and test
more subtle (and possibly incorrect) cases.

A number of these tests fail, most are fixed by the aforementioned PR. Some
additional tests involving TypeForwardPointer are currently disabled as they
cause assertion failures.
blue42u added a commit to blue42u/SPIRV-Tools that referenced this pull request May 21, 2019
This adds a number of tests that check that all types will match to
identically written clones during linking, including nearly every Type
and some combinations (e.g. Functions of Arrays of Floats). Intent is
for use with KhronosGroup#2580,
however that PR focuses on issues with TypeArray whereas these tests are
(more) comprehensive and test more subtle (and possibly incorrect)
cases.

A number of these tests fail, most are fixed by the aforementioned PR.
Some additional tests involving TypeForwardPointer are currently
disabled as they cause assertion failures.
blue42u added a commit to blue42u/SPIRV-Tools that referenced this pull request May 21, 2019
This adds a number of tests that check that all types will match to
identically written clones during linking, including nearly every Type
and some combinations (e.g. Functions of Arrays of Floats). Intent is
for use with KhronosGroup#2580,
however that PR focuses on issues with TypeArray whereas these tests are
(more) comprehensive and test more subtle (and possibly incorrect)
cases.

A number of these tests fail, most are fixed by the aforementioned PR.
Some additional tests involving TypeForwardPointer are currently
disabled as they cause assertion failures.
blue42u added a commit to blue42u/SPIRV-Tools that referenced this pull request May 21, 2019
This adds a number of tests that check that all types will match to
identically written clones during linking, including nearly every Type
and some combinations (e.g. Functions of Arrays of Floats). Intent is
for use with KhronosGroup#2580,
however that PR focuses on issues with TypeArray whereas these tests are
(more) comprehensive and test more subtle (and possibly incorrect)
cases.

A number of these tests fail, many are fixed by the aforementioned PR.
Some additional tests involving TypeForwardPointer are currently
disabled as they cause assertion failures.
blue42u added a commit to blue42u/SPIRV-Tools that referenced this pull request May 22, 2019
This adds a number of tests that check that all types will match to
identically written clones during linking, including nearly every Type
and some combinations (e.g. Functions of Arrays of Floats). Intent is
for use with KhronosGroup#2580,
however that PR focuses on issues with TypeArray whereas these tests are
(more) comprehensive and test more subtle (and possibly incorrect)
cases.

A number of these tests fail, many are fixed by the aforementioned PR.
Some additional tests involving TypeForwardPointer are currently
disabled as they cause assertion failures.
@pierremoreau
Copy link
Copy Markdown
Contributor Author

I completely re-wrote the implementation to have all the verification done inside the type system, instead of having a separate function.
Sorry @s-perron, for not pushing it a bit earlier and avoiding for you to review an old version.

s-perron pushed a commit that referenced this pull request May 24, 2019
This adds a number of tests that check that all types will match to
identically written clones during linking, including nearly every Type
and some combinations (e.g. Functions of Arrays of Floats). Intent is
for use with #2580,
however that PR focuses on issues with TypeArray whereas these tests are
(more) comprehensive and test more subtle (and possibly incorrect)
cases.

A number of these tests fail, many are fixed by the aforementioned PR.
Some additional tests involving TypeForwardPointer are currently
disabled as they cause assertion failures.
Copy link
Copy Markdown
Collaborator

@s-perron s-perron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, I like this change. I just have question about the design. I have not though it through, so my ideas could be infeasible. Let me know if that is the case.

@pierremoreau pierremoreau changed the title [WIP] linker: Better type comparison for OpTypeArray Linker: Better type comparison for OpTypeArray and OpTypeForwardPointer May 24, 2019
@pierremoreau
Copy link
Copy Markdown
Contributor Author

pierremoreau commented May 25, 2019

@blue42u I am not really familiar with re2 & co. Do you have any idea why this fails?

Found the issue:

; CHECK: [[type:%\w+]] = OpTypeArray [[a:%\w+]] [[const:%\w+]]

should be generated, instead of

; CHECK: [[type:%\w+]] = OpTypeArray [[a:%\w+]] %const
[ RUN      ] TypeMatch.ArrayOfTypeFloat
/test/link/linker_fixture.h:173: Failure
Expected equality of these values:
  effcee::Result::Status::Ok
    Which is: 4-byte object <00-00 00-00>
  match_res.status()
    Which is: 4-byte object <01-00 00-00>
<stdin>:16:10: error: expected string not found in input
; CHECK: [[type:%\w+]] = OpTypeArray [[a:%\w+]] %const
         ^
<stdin>:11:24: note: scanning from here
%float = OpTypeFloat 32
                       ^

Expanded from:
OpCapability Linkage
OpCapability NamedBarrier
OpCapability PipeStorage
OpCapability Pipes
OpCapability DeviceEnqueue
OpCapability Kernel
OpCapability Shader
OpCapability Addresses
OpDecorate %var LinkageAttributes "foo" {Import,Export}
; CHECK: [[baseint:%\w+]] = OpTypeInt 32 1
%baseint = OpTypeInt 32 1
; CHECK: [[const:%\w+]] = OpConstant [[baseint]] 3
%const = OpConstant %baseint 3
; CHECK: [[a:%\w+]] = OpTypeFloat 32
%a = OpTypeFloat 32
; CHECK: [[type:%\w+]] = OpTypeArray [[a:%\w+]] %const
%type = OpTypeArray %a %const
; CHECK: OpVariable [[type]] Uniform
%var = OpVariable %type Uniform
Checking result:
OpCapability NamedBarrier
OpCapability PipeStorage
OpCapability Pipes
OpCapability DeviceEnqueue
OpCapability Kernel
OpCapability Shader
OpCapability Addresses
OpModuleProcessed "Linked by SPIR-V Tools Linker"
%int = OpTypeInt 32 1
%int_3 = OpConstant %int 3
%float = OpTypeFloat 32
%_arr_float_int_3 = OpTypeArray %float %int_3
%int_3_0 = OpConstant %int 3
%6 = OpVariable %_arr_float_int_3 Uniform

[  FAILED  ] TypeMatch.ArrayOfTypeFloat (15 ms)

The %_arr_float_int_3 = OpTypeArray %float %int_3 should pass the regex test IMHO.

@pierremoreau
Copy link
Copy Markdown
Contributor Author

All the tests are passing now, except for TypeMatch.ForwardPointerOfArray, which fails with

test_link: source/opt/type_manager.cpp:171: void spvtools::opt::analysis::TypeManager::AnalyzeTypes(const spvtools::opt::Module &): Assertion `(ti == tj || !ti->IsSame(tj)) && "Type pool contains two types that are the same."' failed.

@blue42u
Copy link
Copy Markdown
Contributor

blue42u commented May 25, 2019

Ah, apologies, that's a remnant from an old test. It should really be

; CHECK: [[type:%\w+]] = OpTypeArray [[a:%\w+]] [[const]]

to match with the const defined by the OpConstant check line ([[const:%\w+]] will match any ID). Also, thanks for fixing the ForwardPointer tests, I must have entirely misread that part of the spec when writing them.

I'll give a more thorough look next week when I have more time to spare, the error appears to be fairly subtle at a glance (maybe something if/when the result of ForwardPointer::IsSameImpl changes?)

@pierremoreau
Copy link
Copy Markdown
Contributor Author

If I understand correctly, it could even be

; CHECK: [[type:%\w+]] = OpTypeArray [[a]] [[const]]

so that a only accepts an already defined type rather than ID.

@blue42u
Copy link
Copy Markdown
Contributor

blue42u commented May 25, 2019

That is correct, it looks like there was a typo in my original tests (should have been "[[" #T "]]" in MatchPart2). Maybe something like the following would suffice, although its a bit messy:

-#define PartVector(D, N, T) D(N) " = OpTypeVector " D(T) " 3"
-#define PartMatrix(D, N, T) D(N) " = OpTypeMatrix " D(T) " 4"
-#define PartImage(D, N, T) D(N) " = OpTypeImage " D(T) " 2D 0 0 0 0 Rgba32f"
-#define PartSampledImage(D, N, T) D(N) " = OpTypeSampledImage " D(T)
-#define PartArray(D, N, T) D(N) " = OpTypeArray " D(T) " " D(const)
-#define PartRuntimeArray(D, N, T) D(N) " = OpTypeRuntimeArray " D(T)
-#define PartStruct(D, N, T) D(N) " = OpTypeStruct " D(T) " " D(T)
-#define PartPointer(D, N, T) D(N) " = OpTypePointer Workgroup " D(T)
-#define PartFunction(D, N, T) D(N) " = OpTypeFunction " D(T) " " D(T)
-
-#define CheckDeco(S) "[[" #S ":%\\w+]]"
-#define InstDeco(S) "%" #S
+#define PartVector(D, U, N, T) D(N) " = OpTypeVector " U(T) " 3"
+#define PartMatrix(D, U, N, T) D(N) " = OpTypeMatrix " U(T) " 4"
+#define PartImage(D, U, N, T) D(N) " = OpTypeImage " U(T) " 2D 0 0 0 0 Rgba32f"
+#define PartSampledImage(D, U, N, T) D(N) " = OpTypeSampledImage " U(T)
+#define PartArray(D, U, N, T) D(N) " = OpTypeArray " U(T) " " U(const)
+#define PartRuntimeArray(D, U, N, T) D(N) " = OpTypeRuntimeArray " U(T)
+#define PartStruct(D, U, N, T) D(N) " = OpTypeStruct " U(T) " " U(T)
+#define PartPointer(D, U, N, T) D(N) " = OpTypePointer Workgroup " U(T)
+#define PartFunction(D, U, N, T) D(N) " = OpTypeFunction " U(T) " " U(T)
+
+#define CheckDef(S) "[[" #S ":%\\w+]]"
+#define CheckUse(S) "[[" #S "]]"
+#define Inst(S) "%" #S
 
 #define MatchPart1(F, N) \
-  "; CHECK: " Part##F(CheckDeco, N) "\n" Part##F(InstDeco, N) "\n"
+  "; CHECK: " Part##F(CheckDef, N) "\n" Part##F(Inst, N) "\n"
 #define MatchPart2(F, N, T)                                                 \
-  "; CHECK: " Part##F(CheckDeco, N, T) "\n" Part##F(InstDeco, N, T) "\n"
+  "; CHECK: " Part##F(CheckDef, CheckUse, N, T) "\n" Part##F(Inst, Inst, N, \
+                                                             T) "\n"

@pierremoreau
Copy link
Copy Markdown
Contributor Author

We went with the same solution. 😄

Regarding the remaining error, it seems to come from the hashing of Pointer: when adding a Type to the type_pool_, they are automatically tested for uniqueness using a provided hash (computed via the GetExtraHashWords() method) since an std::unordered_set is used. But the check later on (that fails) uses SameImpl() for the comparison.

So we have two types for which SameImpl() returns true, but their hashes are actually different; I’ll continue debugging it.

@pierremoreau
Copy link
Copy Markdown
Contributor Author

I needed to update Array::GetExtraHashWords() to fix the last test; this has now been fixed and all tests are enabled and passing.

@s-perron
Copy link
Copy Markdown
Collaborator

Please fix the failures in the bots. Looks like "shadow variables":

/usr/bin/c++   -DSPIRV_CHECK_CONTEXT -DSPIRV_COLOR_TERMINAL -DSPIRV_LINUX -DSPIRV_TIMER_ENABLED -I../ -I../include -I../external/spirv-headers/include -I. -g -fPIC   -Wall -Wextra -Wnon-virtual-dtor -Wno-missing-field-initializers -Werror -std=c++11 -fno-exceptions -fno-rtti -Wno-long-long -Wshadow -Wundef -Wconversion -Wno-sign-conversion -std=gnu++11 -MD -MT source/opt/CMakeFiles/SPIRV-Tools-opt.dir/types.cpp.o -MF source/opt/CMakeFiles/SPIRV-Tools-opt.dir/types.cpp.o.d -o source/opt/CMakeFiles/SPIRV-Tools-opt.dir/types.cpp.o -c /tmpfs/src/github/SPIRV-Tools/source/opt/types.cpp
461
/tmpfs/src/github/SPIRV-Tools/source/opt/types.cpp: In constructor ‘spvtools::opt::analysis::Array::Array(spvtools::opt::analysis::Type*, uint32_t, const spvtools::opt::analysis::Type*, spvtools::opt::Operand::OperandData)’:
462
/tmpfs/src/github/SPIRV-Tools/source/opt/types.cpp:398:56: error: declaration of ‘length_constant_type’ shadows a member of 'this' [-Werror=shadow]
463
              Operand::OperandData length_constant_words)

@pierremoreau
Copy link
Copy Markdown
Contributor Author

@s-perron The variable shadowing should be fixed, so the kokoro run could be restarted.

@pierremoreau
Copy link
Copy Markdown
Contributor Author

pierremoreau commented May 29, 2019

@s-perron Are you able to restart the AppVeyor test? It did pass but GitHub isn’t picking up the results. I fixed the kokoro failure for android and gcc, so hopefully all of them should now be passing.

Edit: I rebased the series and added the “Fixes” that to the first commit message, so I ended up triggering the AppVeyor rebuild, so you can ignore that part of my message.

When linking, we end up with duplicate types for imported and exported
types, that needs to be removed. The current code would reject valid
import/export pairs of symbols due to IDs mismatch, even if the types or
constants behind those ID were the same.

Fixes KhronosGroup#2442
Copy link
Copy Markdown
Contributor

@blue42u blue42u left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good on my end, thank you very much for fixing this.

@pierremoreau
Copy link
Copy Markdown
Contributor Author

Everything looks good on my end, thank you very much for fixing this.

Thank you for reporting the issue, submitting the tests and trying out the fix.

Copy link
Copy Markdown
Collaborator

@s-perron s-perron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Let me know if there is anything else you want to change.

@pierremoreau
Copy link
Copy Markdown
Contributor Author

I’m fine with the current version, though I am sure that some parts could be improved.

@s-perron s-perron merged commit e7866de into KhronosGroup:master May 29, 2019
@pierremoreau pierremoreau deleted the fix_#2442 branch May 30, 2019 06:59
mehulagg pushed a commit to mehulagg/superproject that referenced this pull request Dec 21, 2019
* Update external/shaderc/glslang from branch 'master-ndk'
  to 0549373350b7bcfadaa73c04f51ef30d1d9cbb18
  - Merge remote-tracking branch 'aosp/upstream-master' into update-shaderc
    
    Includes:
    d3692c70 Merge pull request #1791 from dj2/unused
    3555043c Remove unused parameter
    2f4a8dfd Merge pull request #1788 from jeffbolznv/ifdef_fix
    71e5b132 Add missing NV_EXTENSIONS ifdef
    9fe95274 Merge pull request #1786 from jeffbolznv/fsi
    c6f0ce8d Support GL_ARB_fragment_shader_interlock
    a549bb81 Merge pull request #1769 from tanderson-google/RemoveInvalidGnSource
    27a3e4c3 Merge pull request #1782 from dgkoch/fix_1735
    593a4e0a Fix subgroup support for ray tracing
    c3e60ad9 Add AST tests for ray tracing shaders
    3418cb4c Add AST tests for mesh and task shaders
    51760c88 Add more subgroup testing
    6d882846 Merge pull request #1781 from jeffbolznv/issue_1766
    8adc2f56 Allow runtime-sized arrays of acceleration structures
    625eb25d Merge pull request #1776 from dgkoch/dgkoch_20190525_fixes
    40b1a9e1 Fix include guard for GL_EXT_multiview
    9bb17cd0 Return consistent names from CapabilityString
    66e46037 Merge pull request #1772 from mattparks/patch-2
    cda52d53 Fixed .dll install on MSVC.
    e10c87a3 Remove non-source sources from binary targets
    27ec9195 Merge pull request #1768 from ShabbyX/enable-opt
    741fc4ab Build.gn: allow optimization in glslang lib and standalone
    5bd047ba Merge pull request #1767 from dneto0/update-spirv-headers
    8b920c79 Update SPIRV-Tools, SPIRV-Headers
    6e384fef Build: Fix 3 warnings.
    b03da6ed Merge pull request #1761 from KhronosGroup/SPIR-V_1.4
    08e01e79 Bump version and revision.
    b64952ed SPV 1.4: Move to 1.4 validation, removing all 1.4 validation failures.
    f43c739a SPV 1.4: Emit SignExtend and ZeroExtend for integer image reads/writes.
    61a5ce19 SPV 1.4: Lookup tables: Use variable initializer and NonWritable...
    fbb6bdf0 SPV 1.4: Add support for OpCopyLogical, careful of Boolean differences.
    1f4d0468 SPV 1.4: Implement the 5 new loop controls.
    0c1e71a1 SPV 1.4: Use OpSelect for trivial typed non-scalar/vector expressions.
    cfea59d3 SPV 1.4: Add testing infrastructure for SPV 1.4 tests.
    7c7731ec SPV 1.4: Generate all globals on OpEntryPoint interface list.
    2dd4ab3a SPV: Move to the SPIR-V 1.4 header.
    04aa79d0 Merge pull request #1765 from KhronosGroup/update-knowngood-tools-SPIR-V_1.4
    6fef1ca6 Latest known-good SPIRV-Tools: WARNING: Needs python 3.x.
    c11e3156 Bump revision.
    c2c5a3d9 Merge pull request #1762 from jeffbolznv/issue1760
    88220d50 For nonuniformEXT constructor, make a copy of the node to decorate
    e291f7a0 Merge pull request #1739 from jeffbolznv/buffer_reference2
    f88e5824 Merge pull request #1755 from amdrexu/bugfix
    c0640dab Merge pull request #1758 from jeffbolznv/convertonly
    5cb2fa2a Fix #1759: Check for specialization constants when literals required.
    758c9336 Add support for GL_EXT_buffer_reference2
    faac86e5 If a shader's only use of float16 is for FConvert, add the Float16 capability.
    d932cc42 Fix issues of explicit conversions.
    86c72c94 Bump revision.
    f6873f7e GLSL: Add error check for an argument dropping the 'restrict' qualifier
    08d61df0 Fix #1720: Give an error for parameter mismatched image format.
    0e5d1bb6 clang-format correction and typo (clang format likely not complete)
    805b09f9 Merge pull request #1753 from pixeljetstream/ckubischnv_dumpbuiltins
    83318018 improve formating
    aa4e5277 revert typeName from getCompleteString() (breaks tests), add to function dump instead
    4b1dfc56 improve formating
    8a0e12a1 TType::getCompleteString insert optional structure name
    b84a5204 minor improvements to formating
    412ff6ea minor naming cleanup
    55ba3eaf introduce new --dump-builtin-symbols command line
    0527c9db Merge pull request #1752 from dgkoch/dkoch_build_fix18
    0aea3106 Add cstdlib include
    e06c7e9a Merge pull request #1750 from greg-lunarg/kg103
    2d0095f2 Update spirv-tools known-good
    3416d48b Update to latest SPIR-V header and bump revision.
    1240db67 Merge pull request #1749 from dgkoch/dgkoch_common_mscver
    8b2f96d3 Check if _MSC_VER is defined before using.
    ef807f4b Merge pull request #1746 from karl-lunarg/gtest-install
    1d1fd885 build: Don't ship GTEST headers in install target
    e0d59bbe Merge pull request #1742 from greg-lunarg/kg102
    9d92945d Update spirv-tools known-good
    137e071c Merge pull request #1740 from ewerness-nv/callableincoming
    5125eb58 Merge pull request #1741 from dgkoch/shader_subgroup
    83170e3f Enable GL_KHR_shader_subgroup properly
    659060b9 Callables shouldn't have incoming ray flags
    5efb004d Merge pull request #1711 from demett-brcm/avoid-undefined-behaviour
    e442a038 GLSL: Fix tessellation control shader bounding box support. (#1730)
    bd0f5ad2 Merge pull request #1733 from null77/fix-msvc-warn
    49dff5bf Merge pull request #1731 from godlikepanos/master
    099a80dd Suppress MSVC warning about unused variable.
    35aeb042 Avoid running the validator as part of the optimization pass.
    b184e41a Build: Update to the most recent SPIR-V headers, for Rev. 7 of SPV 1.3
    80c36be4 Merge pull request #1728 from alelenv/shaderrecord_fix
    f925eefb Merge pull request #1724 from zoddicus/roll_spirv
    938ab9a6 Update SPIRV-Tools and Headers
    437a552f Merge pull request #1723 from null77/gn-val-executable
    e880e96f GN: Make glslang_validator an executable.
    40c16ec0 Merge pull request #1717 from jeffbolznv/getBufferReferenceAlignment
    839a9481 Merge pull request #1716 from jeffbolznv/buffer_reference_fold2
    7895e473 Move getBufferReferenceAlignment to be a method of TType
    3fd12326 Improved fix for buffer reference constants
    79d25ea0 Merge pull request #1714 from jeffbolznv/volatil
    cc4a756d Build: Update to latest SPIR-V header.
    38cbad15 Fix interactions between 'volatile' and the Vulkan memory model
    9390154c Merge pull request #1699 from jeffbolznv/buffer_reference_fold
    afa5671f Error out writes to shaderRecordNV buffer blocks.
    be63facd Handle buffer references vs 'const'
    d90d5481 Merge pull request #1713 from jeffbolznv/fix_nv_extension_disabled
    1994fe45 Fix NV_EXTENSIONS-disabled build
    82281797 Merge pull request #1701 from jeffbolznv/cooperative_matrix
    4605e2ed Implement GL_NV_cooperative_matrix
    0b018419 Avoid undefined behaviour
    ec484527 Merge pull request #1709 from KhronosGroup/fix-pp
    a84079dc PP: Fix #1605: Paste tokens for ## through number->letter transitions.
    a51d3d9f Merge pull request #1706 from nico/master
    b0f4b427 Merge pull request #1705 from baldurk/fix-indexindirect-reflection
    76577b1a Fix -Wextra-semi warnings in headers used in Chromium
    141bc5a5 Fix type recursion with EOpIndexIndirect dereferences
    5432f0dd Merge pull request #1702 from greg-lunarg/kg101
    17a8d9ad Merge pull request #1703 from dj2/mem_leak
    ade579fb Merge pull request #1704 from dj2/leak
    0560138e Fixup leak of TString
    756bfd0a Allocate empty function name in the string pool.
    f8939eff Update SPIRV-Tools known good
    
    Testing: checkbuild.py on Linux; unit tests on Windows
    Change-Id: I0f1f339c9a2be4f5c61babfff47f4f0e53a33f7c
    
  - Merge pull request #1791 from dj2/unused
    
    Remove unused parameter
  - Remove unused parameter
    
  - Merge pull request #1788 from jeffbolznv/ifdef_fix
    
    Add missing NV_EXTENSIONS ifdef
  - Add missing NV_EXTENSIONS ifdef
    
  - Merge pull request #1786 from jeffbolznv/fsi
    
    Support GL_ARB_fragment_shader_interlock
  - Support GL_ARB_fragment_shader_interlock
    
  - Merge pull request #1769 from tanderson-google/RemoveInvalidGnSource
    
    Remove glslang.y from gn sources
  - Merge pull request #1782 from dgkoch/fix_1735
    
    Fix subgroup support for ray tracing
  - Fix subgroup support for ray tracing
    
    Closes #1735
    
    GlslangToSpv.cpp
    - minor formatting cleanup
    
    BaseTypes.h
    - minor formatting cleanup
    - add subgroup builtins to GetBuiltInVariableString
      (was resulting in "unknown built-in variable" messages in test output)
    
    Initialize.cpp
    - better naming and re-use of strings for subgroup builtin variable declarations
    - define subgroup builtin variables in ray-tracing shaders
    
    intermOut.cpp
    - add handling of the EOpSubgroupParition* variables
      (was resulting in "ERROR: Bad aggregation op" messages in test output)
    
    Update test results.
    
  - Add AST tests for ray tracing shaders
    
    with subgroup touch tests (error and non-error cases)
    Currently the subgroup built-ins are NOT giving the correct output.
    This is fixed in the next commit.
    
  - Add AST tests for mesh and task shaders
    
    with subgroup touch testing (error and non-error cases)
    
    Add missing symbolTable.relateToOperator("subgroupMemoryBarrierShared") call for
    Mesh/Task shaders so they don't assert in ParseHelper.cpp
    
  - Add more subgroup testing
    
    Touch test all subgroup builtins in vert, tesc, tese, geom, frag, compute shaders
    before and after enabling extensions to make sure the correct errors are generated
    and then not generated (after enablement).
    
  - Merge pull request #1781 from jeffbolznv/issue_1766
    
    Allow runtime-sized arrays of acceleration structures
  - Allow runtime-sized arrays of acceleration structures
    
  - Merge pull request #1776 from dgkoch/dgkoch_20190525_fixes
    
    Misc fixes from dgkoch
  - Fix include guard for GL_EXT_multiview
    
  - Return consistent names from CapabilityString
    
    Don't prefix with "Capability" since the majority of them don't.
    Also add missing CapabilityImageFootprintNV
    
  - Merge pull request #1772 from mattparks/patch-2
    
    Fixed .dll install on MSVC.
  - Fixed .dll install on MSVC.
    
  - Remove non-source sources from binary targets
    
    No behavior changes.  Please see [1] for why this is necessary.
    
    [1] https://bugs.chromium.org/p/chromium/issues/detail?id=964411
    
  - Merge pull request #1768 from ShabbyX/enable-opt
    
    Build.gn: allow optimization in glslang lib and standalone
  - Build.gn: allow optimization in glslang lib and standalone
    
  - Merge pull request #1767 from dneto0/update-spirv-headers
    
    Update SPIRV-Tools, SPIRV-Headers
  - Update SPIRV-Tools, SPIRV-Headers
    
    Headers update fixes validation of spv.shaderBallotAMD.
    
  - Build: Fix 3 warnings.
    
  - Merge pull request #1761 from KhronosGroup/SPIR-V_1.4
    
    SPV 1.4: Add code generation for SPIR-V 1.4 features
  - Bump version and revision.
    
  - SPV 1.4: Move to 1.4 validation, removing all 1.4 validation failures.
    
  - SPV 1.4: Emit SignExtend and ZeroExtend for integer image reads/writes.
    
  - SPV 1.4: Lookup tables: Use variable initializer and NonWritable...
    
    ...when doing a variable lookup on an array of constants.
    
  - SPV 1.4: Add support for OpCopyLogical, careful of Boolean differences.
    
  - SPV 1.4: Implement the 5 new loop controls.
    
  - SPV 1.4: Use OpSelect for trivial typed non-scalar/vector expressions.
    
  - SPV 1.4: Add testing infrastructure for SPV 1.4 tests.
    
    This includes the test for the first feature of OpEntryPoint.
    
  - SPV 1.4: Generate all globals on OpEntryPoint interface list.
    
  - SPV: Move to the SPIR-V 1.4 header.
    
  - Merge pull request #1765 from KhronosGroup/update-knowngood-tools-SPIR-V_1.4
    
    Latest known-good SPIRV-Tools: WARNING: Needs python 3.x.
  - Latest known-good SPIRV-Tools: WARNING: Needs python 3.x.
    
    You may need to install python 3.x and also
    [windows users] may need to get it in your path in front of python 2.7.x.
    
    If you don't need the external projects (i.e., SPIRV-Tools) and don't want
    to upgrade to python 3, don't create the External subdirectory and CMake
    won't require python 3.  (CMake has a bug that makes it find the wrong one
    on a first pass if the top level does not require the version needed by
    lower levels.)
    
  - Bump revision.
    
  - Merge pull request #1762 from jeffbolznv/issue1760
    
    For nonuniformEXT constructor, make a copy of the node to decorate
  - For nonuniformEXT constructor, make a copy of the node to decorate
    
  - Merge pull request #1739 from jeffbolznv/buffer_reference2
    
    Add support for GL_EXT_buffer_reference2
  - Merge pull request #1755 from amdrexu/bugfix
    
    Fix issues of explicit conversions.
  - Merge pull request #1758 from jeffbolznv/convertonly
    
    If a shader's only use of float16 is for FConvert, add the Float16 capability
  - Fix #1759: Check for specialization constants when literals required.
    
  - Add support for GL_EXT_buffer_reference2
    
  - If a shader's only use of float16 is for FConvert, add the Float16 capability.
    
    When visiting instructions, check that there are no 16-bit storage capabilities
    and add the Float16 capability. Same for int8/int16.
    
  - Fix issues of explicit conversions.
    
    For certain int8/int16/float16 conversions,they are conditionally allowed
    when extensions defining explicit arithmetic types are enabled.
    
  - Bump revision.
    
  - GLSL: Add error check for an argument dropping the 'restrict' qualifier
    
  - Fix #1720: Give an error for parameter mismatched image format.
    
  - clang-format correction and typo (clang format likely not complete)
    
    This was added some time ago, but I suspect largely unused.
    Christoph pointed out of few contradictions to actual convention,
    so that's fixed. But, I suspect it is largely incomplete.
    
  - Merge pull request #1753 from pixeljetstream/ckubischnv_dumpbuiltins
    
    introduce ability to dump builtin symbol table
  - improve formating
    
  - revert typeName from getCompleteString() (breaks tests), add to function dump instead
    
  - improve formating
    
  - TType::getCompleteString insert optional structure name
    
  - minor improvements to formating
    
  - minor naming cleanup
    
  - introduce new --dump-builtin-symbols command line
    
    add corresponding EShMsgBuiltinSymbolTable
    TSymbol::dump functions have option to do "complete" print
    bugfix in TType::getCompleteString, structure can be null for block
    
  - Merge pull request #1752 from dgkoch/dkoch_build_fix18
    
    Add cstdlib include
  - Add cstdlib include
    
    On some platforms some of the includers of this header don't have
    'atoi' defined after the change in #1749
    
  - Merge pull request #1750 from greg-lunarg/kg103
    
    Update spirv-tools known-good
  - Update spirv-tools known-good
    
  - Update to latest SPIR-V header and bump revision.
    
  - Merge pull request #1749 from dgkoch/dgkoch_common_mscver
    
    Check if _MSC_VER is defined before using.
  - Check if _MSC_VER is defined before using.
    
    Fixes compilation errors on some platforms.
    
  - Merge pull request #1746 from karl-lunarg/gtest-install
    
    build: Don't ship GTEST headers in install target
  - build: Don't ship GTEST headers in install target
    
    A project that uses googletest(GTEST) shouldn't include googletest
    headers with its artifacts in its install target.  These headers
    simply are not needed by the consumers of the install target and
    can cause conflicts with other projects that use googletest
    themselves and this project's install target.  And they are just not
    part of the expected glslang build artifacts.
    
    It is likely that the addition of the googletest headers to the install
    target was a simple oversight that happens as a result of adding
    googletest as a CMake subdirectory.
    
    For more information on how this causes conflicts with other projects,
    please see: https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/821.
    
  - Merge pull request #1742 from greg-lunarg/kg102
    
    Update spirv-tools known-good
  - Update spirv-tools known-good
    
  - Merge pull request #1740 from ewerness-nv/callableincoming
    
    Callables shouldn't have incoming ray flags
  - Merge pull request #1741 from dgkoch/shader_subgroup
    
    Enable GL_KHR_shader_subgroup properly
  - Enable GL_KHR_shader_subgroup properly
    
    (and GL_NV_shader_subgroup_partitioned) based on GL/ES version
    instead of predicating it on vulkan SPV generation
    
    Also add AST testing.
    The glsl.450.subgroup* files are largely the same as the spv.subgroup*
    The glsl.es320.subgroup* files are the same as the 450 versions, but modified to be ES compatible.
    
  - Callables shouldn't have incoming ray flags
    
  - Merge pull request #1711 from demett-brcm/avoid-undefined-behaviour
    
    Avoid undefined behaviour
  - GLSL: Fix tessellation control shader bounding box support. (#1730)
    
    Prior to this change, OES_primitive_bounding_box and EXT_primitive_bounding_box were both recognised as extensions, but only the name gl_BoundingBoxOES could be used. However the EXT version uses the name gl_BoundingBoxEXT instead. In addition, since GLES 3.2, the extension has been included in the core standard and the name gl_BoundingBox may be used instead. This change aims to make both extensions and the 3.2 core version all work.
    
  - Merge pull request #1733 from null77/fix-msvc-warn
    
    Suppress MSVC warning about unused variable.
  - Merge pull request #1731 from godlikepanos/master
    
    Avoid running the validator as part of the optimization pass.
  - Suppress MSVC warning about unused variable.
    
    One variable was only used in an 'assert' call. MSVC flagged this
    as unused in Release. Suppress the warning and also add a static
    cast to void so the variable becomes referenced.
    
  - Avoid running the validator as part of the optimization pass.
    
    The spvtools::Optimizer::Run method glslang is using constructs a default set
    of spvtools::OptimizerOptions. This default set of options instructs the
    validator to run. That is not quite correct since glslang will invoke the
    validator _explicitly_ after the optimization pass.
    
    Change-Id: I30f458304c6e7f81e89fc4ebd25eabbbd8348063
    
  - Build: Update to the most recent SPIR-V headers, for Rev. 7 of SPV 1.3
    
  - Merge pull request #1728 from alelenv/shaderrecord_fix
    
    Error out writes to shaderRecordNV buffer blocks.
  - Merge pull request #1724 from zoddicus/roll_spirv
    
    Update SPIRV-Tools and Headers
  - Update SPIRV-Tools and Headers
    
    Also mark spv.subgroupPartitioned as passing validation.
    
  - Merge pull request #1723 from null77/gn-val-executable
    
    GN: Make glslang_validator an executable.
  - GN: Make glslang_validator an executable.
    
    The target was accidentally listed as a source_set.
    
  - Merge pull request #1717 from jeffbolznv/getBufferReferenceAlignment
    
    Move getBufferReferenceAlignment to be a method of TType
  - Merge pull request #1716 from jeffbolznv/buffer_reference_fold2
    
    Improved fix for buffer reference constants
  - Move getBufferReferenceAlignment to be a method of TType
    
    This is a better place for it logically, since it is not specific to
    glsl->spirv translation. And in a future change I want to use it outside
    of glslangtospv.
    
  - Improved fix for buffer reference constants
    
    This is an alternate fix for the issue described in commit be63facd, whose
    solution didn't work if there were non-trivial operations involved in computing
    a constant initializer which caused the 'constant unfolding' code to kick in
    (addConstantReferenceConversion). Instead, this change does the 'unfolding'
    later in createSpvConstantFromConstUnionArray. If a reference-type constant has
    survived that long, then folding is already done, this must be a 'real' (inside
    a function) use of the constant, and it should be safe to unfold and apply the
    bitcast.
    
  - Merge pull request #1714 from jeffbolznv/volatil
    
    Fix interactions between 'volatile' and the Vulkan memory model
  - Build: Update to latest SPIR-V header.
    
  - Fix interactions between 'volatile' and the Vulkan memory model
    
    Last year we changed 'volatile' to also act as 'coherent', but when I
    resolved the memory model changes against that change I missed handling
    volatile in a couple places that we check for coherent. There was also
    a place in post-processing that acted as if the volatile memory access
    flag has a literal number associated with it, when it doesn't.
    
  - Merge pull request #1699 from jeffbolznv/buffer_reference_fold
    
    Handle buffer references vs 'const'
  - Error out writes to shaderRecordNV buffer blocks.
    
  - Handle buffer references vs 'const'
    
    Allow constructors to and from references to be constant folded. Section 4.3.3
    says constructors whose arguments are all constant expressions must fold.
    
    Disallow 'const' on buffer reference types. It is not a 'non-void transparent
    basic data type' (it is not considered 'basic').
    
    Handle buffer reference constants (which can be assigned to a non-const reference,
    or can be further folded to another type of constant) by converting to
    'constructor(uint64_t constant)' in addConversion.
    
    Disallow == and != operators on reference types.
    
  - Merge pull request #1713 from jeffbolznv/fix_nv_extension_disabled
    
    Fix NV_EXTENSIONS-disabled build
  - Fix NV_EXTENSIONS-disabled build
    
  - Merge pull request #1701 from jeffbolznv/cooperative_matrix
    
    Implement GL_NV_cooperative_matrix
  - Implement GL_NV_cooperative_matrix
    
  - Avoid undefined behaviour
    
  - Merge pull request #1709 from KhronosGroup/fix-pp
    
    PP: Fix #1605: Paste tokens for ## through number->letter transitions.
  - PP: Fix #1605: Paste tokens for ## through number->letter transitions.
    
  - Merge pull request #1706 from nico/master
    
    Fix -Wextra-semi warnings in headers used in Chromium
  - Merge pull request #1705 from baldurk/fix-indexindirect-reflection
    
    Fix type recursion with EOpIndexIndirect dereferences
  - Fix -Wextra-semi warnings in headers used in Chromium
    
  - Fix type recursion with EOpIndexIndirect dereferences
    
    * This primarily affects arrays-of-arrays but it can also affect arrays-of-
      structs if there are no further dereferences.
    
  - Merge pull request #1702 from greg-lunarg/kg101
    
    Update SPIRV-Tools known good
  - Merge pull request #1703 from dj2/mem_leak
    
    Allocate empty function name in the string pool.
  - Merge pull request #1704 from dj2/leak
    
    Fixup leak of TString
  - Fixup leak of TString
    
    In decomposeIntrinsic a new TString was being allocated and passed into
    a TVariable. That string was leaking. This CL converts the new TString
    to call NewPoolTString to allocate from the TString pool.
    
  - Allocate empty function name in the string pool.
    
    Inside the grammar for function_identifier if the .function is null an
    empty function name is allocated. This is allocated on the stack and
    passed into TFunction as a pointer. TFunction just stores that pointer.
    
    Later, when we access the name we will receive an invalid usage of a
    stack allocated variable. This CL switches to using NewPoolTStringn for
    the empty function name.
    
  - Update SPIRV-Tools known good
    

* Update external/shaderc/shaderc from branch 'master-ndk'
  to afff7dc7bc4169501c18e5f2ff366d71cb279b6c
  - Merge remote-tracking branch 'aosp/upstream-master' into update-shaderc
    
    Includes
    7425820 Start v2019.1-dev
    34c412f Finish v2019.0
    7e46a09 Update CHANGES
    63ab5ac Re-write environment control flags to be consistent (#637)
    538a9d2 Add ability to transform spvc input from WebGPU SPIR-V (#631)
    0b84e66 Ran 2to3 on git-sync-deps (#636)
    27bffdf Roll spirv-tools dependency (#634)
    c7b4974 Remove dead file (#632)
    5ba891a Convert spirv-cross tests to using a known failures list (#626)
    05c766a Add flag to allow filtering tests cases being run (#625)
    9f04be0 Run pyformat on utils and test scripts (#624)
    326165c Run spirv-cross tests in parallel (#622)
    08549a9 Convert to requiring Python 3 (#621)
    1475418 Change 'target' env to 'source' env in spvc API (#610)
    dce7a4b Roll glslang, spirv-tools, spirv-headers, spirv-cross (#614)
    5cf297d Spvc tests: Assemble explicitly for Vulkan1.1 env (#615)
    1defed7 Fix spvc test logging (#616)
    3ac606a Update CHANGES, switch to 2019.0-dev (#613)
    55b9f5d 1.4: GOOGLE suffix drops from certain instructions
    f51af41 Fix typos in the artifacts links. (#606)
    afc69d3 Disable running re2 tests (#603)
    6805e55 Fix Windows build uploads. (#597)
    60caf55 Package and upload builds. (#595)
    59a49bc Shaderc requires Python3 (#594)
    5af3dbf Roll spirv-cross. (#592)
    ff9ae40 Satisfy gn check. (#591)
    60658b0 Fix gn build. (#590)
    439a848 Export config files for pkg-config. (#581)
    2caa40b spvc: Add MSL and HLSL tests. (#585)
    1d9383f Roll DEPS. (#586)
    7bb8a43 spvc testing: add logging. (#583)
    067a749 spvc: Add some flags. (#579)
    f7fa8ce Enable spvc test. (#578)
    4b8446f Upate python scripts work with python3. (#569)
    eb0e335 Add presubmit_clang_asan bot. (#575)
    665bbc1 Add spvc command line tool and tests. (#571)
    337d42d Remove extra .clang-format files. (#573)
    cfb65d4 Fix spvc_c_smoke_test some more. (#574)
    712cebf Fix spvc_c_smoke_test. (#572)
    6bba7fe Avoid leading dot slash in cmake target. (#570)
    94f21e8 Roll GLSLang. (#564)
    
    Testing: checkbuild.py on Linux; unit tests on Windows
    Change-Id: Ie1b63aacac7194fe8330068e6a01c5bdf44cd321
    
  - Start v2019.1-dev
    
  - Finish v2019.0
    
  - Update CHANGES
    
  - Re-write environment control flags to be consistent (#637)
    
    Fixes #633
  - Add ability to transform spvc input from WebGPU SPIR-V (#631)
    
    Fixes #582
    
    
  - Ran 2to3 on git-sync-deps (#636)
    
    Getting uniformity across different projects that use Python3 and
    git-sync-deps.
    
    Fixes #635
  - Roll spirv-tools dependency (#634)
    
    This pulls in changes to WebGPU<->Vulkan transformations.
  - Remove dead file (#632)
    
    
  - Convert spirv-cross tests to using a known failures list (#626)
    
    Convert spirv-cross tests to using a known failures list
    
    This changes the number of tests being reported as being run to be lower, since
    there was spurious counting going on.
    
    Fixes #619
  - Add flag to allow filtering tests cases being run (#625)
    
    Fixes #617
  - Run pyformat on utils and test scripts (#624)
    
    Fixes #623
  - Run spirv-cross tests in parallel (#622)
    
    These tests should be hermetic from each other and there is 1.5k of them, so
    lets speed things up
    
    Fixes #611
  - Convert to requiring Python 3 (#621)
    
    This also includes a little code cleanup, so I see less complaints about style
    violations.
    
    Fixes #620
  - Change 'target' env to 'source' env in spvc API (#610)
    
    Clarify that the environment being referenced is the one associated
    with the provided SPIR-V, and not the produced artifact.
    
    Fixes #609
  - Roll glslang, spirv-tools, spirv-headers, spirv-cross (#614)
    
    Increase number of passing spvc tests from 1225 to 1246
  - Spvc tests: Assemble explicitly for Vulkan1.1 env (#615)
    
    By default, SPIRV-Tools will assemble for the latest supported
    version of SPIR-V.  With SPIR-V 1.4 arriving, that will generally
    make modules which are not consumable by Vuklan 1.1.  So update
    the Spvc tests to explicitly assemble for Vulkan 1.1.
  - Fix spvc test logging (#616)
    
    Use explicit list comprehension to map the command elements to strings.
    Otherwise I get a "map object is not indexible" error when evaluating
    cmd[0] two lines later.
  - Update CHANGES, switch to 2019.0-dev (#613)
    
    
  - 1.4: GOOGLE suffix drops from certain instructions
    
  - Fix typos in the artifacts links. (#606)
    
    
  - Disable running re2 tests (#603)
    
    Fixes #602
  - Fix Windows build uploads. (#597)
    
    The Windows package was not being put in the same place as the others
    and was not being found by the uploader.  This makes the build scripts
    more consistent with each other and lets the Windows upload work.
  - Package and upload builds. (#595)
    
    Add a step at the end of each build to install then package the
    installation directory.
    Name the package in the config of each build we want to upload.
    Add a page that points to all the latest builds which can be downloaded.
  - Shaderc requires Python3 (#594)
    
    Tests for glslc and SPIRV-Tools require either Python3 or Python2
    with the "future" package.  But since we can't rely on developers
    having the "future" package, migrate fully to Python3 now.
  - Roll spirv-cross. (#592)
    
    
  - Satisfy gn check. (#591)
    
    Fix issues found by gn check and gn format.
    Remove files that don't exist and add files libshaderc_spvc depends on.
  - Fix gn build. (#590)
    
    Add missing files and tell libshaderc_spvc to include from libshaderc.
  - Export config files for pkg-config. (#581)
    
    Create the following pkg-config files:
    - shaderc.pc which links the shared library,
    - shaderc_static.pc which links the static libraries,
    - shaderc_combined.pc which links the combined library.
    
    Extracts the current version from the file CHANGES
    
    The -dev suffix maps to a minor version number of .0
    No -dev suffix maps to a minor version number of .1
    
    Uses a first class target spirv-tools-pkg-config
    
    Cloned from SPIRV-Tools.
  - spvc: Add MSL and HLSL tests. (#585)
    
    Add the MSL and HLSL SPIRV-Cross tests to spvc testing.
  - Roll DEPS. (#586)
    
    Pick up a fix to SPIRV-Tools that will let us add more spvc tests without
    blowing up in debug builds.
    The SPIRV-Tools roll itself broke some SPIRV-Cross tests, so we also
    have to roll in a new SPIRV-Cross that works with the new SPIRV-Tools.
    Update glslang and SPIRV-Headers to stay in sync with the new SPIRV-Cross.
  - spvc testing: add logging. (#583)
    
    Add some flags to the spvc test script to aid development:
      --log for logging all commands executed,
      --dry-run to not execute commands,
      --give-up to exit after first failure.
    
    One use of the log is to compare behavior to the SPIRV-Cross test,
    so we log what SPIRV-Cross would do, even commands we don't need to do.
  - spvc: Add some flags. (#579)
    
    Implement the following spvc flags and update the test:
      --entry
      --version
      --remove-unused-variables
      --vulkan-semantics
      --separate-shader-objects
      --flatten-ubo
    The old --version flag is now -v.
  - Enable spvc test. (#578)
    
    Enable spvc test.
    
    Update DEPS to work with spirv-cross tests.
    Fix spvc return status.
    
    Simplified the test script:
    - no caching of compiled shaders
    - all testing steps in one place
    - removed unsupported spvc flags
    Also clean up temporary files so they can't mess with subsequent testing.
    
    Add comments.  Introduce all globals in global scope.
    Rearrange code slightly.
    
  - Upate python scripts work with python3. (#569)
    
    Make changes to the shaderc python scripts so they work with python2 and python3: fixes #474.
    
    The Windows bots will use python3 so it is tests, while other bots will continue to use python2.
    
    Changes were made to spirv-tools and spirv-cross to work with python3.  The DEPS file was updated to include these changes.
    
    When using python2, the future package is now required, and that is reflected in the README.
    
    There are some problems with spriv-cross.  The lastest version deleted the andriod.mk file, so we cannot build spvc in the NDK build anymore, so that was turned off.  Spirv-cross is using `nl_langinfo`, but this is in the andriod NDK starting with API version 26 (Android 8 I believe).  Since we do not have precedent for picking a specific version of android to build for, I disabled the build of spvc for the android bots.  This can be enabled again if we decide that the rest of shaderc does not need to be built for older versions.
    
    Also, we do not plan on shipping spirv-cross in the android ndk, so that played a role in the decision.
    
    Finally, the spvc tests were disabled.  They are based on the tests in spirv-cross, which are specific to the version of spirv-tools and glslang.  Many of them broke when updating spirv-cross.  They are disabled for now and @fjhenigman will look into fixing them.
  - Add presubmit_clang_asan bot. (#575)
    
    Run ASAN test on every uploaded change.
  - Add spvc command line tool and tests. (#571)
    
    Initial version of command line tool 'spvc' which is a wrapper around
    spirv-cross.  Testing is the same as for spirv-cross, but not all
    pass yet.
  - Remove extra .clang-format files. (#573)
    
    There were identical copies of .clang-format in various directories.
    One top level file is sufficient.
  - Fix spvc_c_smoke_test some more. (#574)
    
    Free more memory we forgot to free.
  - Fix spvc_c_smoke_test. (#572)
    
    * Fix spvc_c_smoke_test.
    
    Free some memory we forgot to free.
  - Avoid leading dot slash in cmake target. (#570)
    
    Including shaderc in project that declares multiple build configurations
    and then using generator that doesn't support multi-configuration would
    result in a target path with a leading dot slash.  Ninja doesn't work
    in that case.
    
    Prepend CMAKE_CURRENT_BINARY_DIR in order to get an absolute path and
    make ninja happy.  This works in all cases so we remove code specific
    to multi-configuration.
    
    Fixes #568.
  - Roll GLSLang. (#564)
    
    * Roll GLSLang.
    
    This CL rolls the GLSLang DEPS file forward to pickup the memory leak
    fixes.
    
    * spriv-tools too
    

* Update external/shaderc/spirv-headers from branch 'master-ndk'
  to 5c041daac25c12254c948246ebf34cdfe40ac288
  - Merge remote-tracking branch 'aosp/upstream-master' into update-shaderc
    
    Includes
    8b911bd Merge pull request #114 from jeffbolznv/fsi
    326779e Add SPV_EXT_fragment_shader_interlock
    9280c0b Merge pull request #115 from dgkoch/SPV_NV_sm_shader_builts
    630d062 Add support for SPV_NV_sm_shader_builtins
    903d447 OpenCL ext. inst. header: Support C in addition to C++.
    7ac42f8 Merge pull request #112 from mkinsner/master
    d6936f9 Proposed LoopControl bitfield allocation mechanism in spir-v.xml
    7f4277e Merge pull request #111 from Naghasan/codeplay-range
    1edd6c4 Reserve token range for Codeplay
    9674a1a Merge pull request #102 from ianromanick/INTEL_shader_integer_functions2
    a08d4f0 Merge pull request #107 from jeffbolznv/duplicate_enum_switch
    9f50e65 Update HasResultAndType code generation to skip duplicate enum values. There weren't any until SPIR-V 1.4 release, now there are two.
    4b0985f Merge pull request #106 from alankemp/fix_json_writer
    823750b Compare enum names rather than values to determine last element
    30ebd2f Merge pull request #103 from amdrexu/bugfix
    30c51d3 Enable Groups capability by the extension SPV_AMD_shader_ballot
    4079861 Add INTEL_shader_integer_functions2
    c4f8f65 Move to version 1.4 of SPIR-V.
    a5d33a2 Rationalize opcode ordering and a few spaces.
    7af56c1 Merge pull request #101 from dneto0/clspv-generator
    92d1024 Reserve generator 21 for Clspv
    2434b89 Merge pull request #100 from jeffbolznv/hasresult
    9f77618 Add a function that returns whether an opcode has a result and/or result type. Currently only implemented in C-based printers.
    111a25e Merge pull request #99 from Naghasan/contact-update
    0e0d176 Update Codeplay's contact details
    3beb2a0 Add ability to skip ranges of instructions; no impact to public headers
    2d08d12 Sync to rev. 7 of headers from Khronos.
    f25b91a Merge pull request #98 from jeffbolznv/partitioned
    d20b78c Add GroupNonUniformPartitionedNV capability to all the GroupNonUniform instructions
    a946e73 Header build for previous grammar update.
    8f1cce9 Merge pull request #92 from PawelJurek/SPV_INTEL_device_side_avc_motion_estimation
    03a0815 Make all "IdScope" be either Execution or Memory.
    dc3db3a Fix #96: Don't include a comment after #endif for the C header.
    d3752ea Merge pull request #95 from mkinsner/fpga_enum_block
    2b3bbbc Reserve double SPIR-V enum block for upcoming Intel FPGA extension
    e74c389 Merge pull request #94 from jeffbolznv/cooperative_matrix
    56decd4 Add SPV_NV_cooperative_matrix
    d0cc5ac Grammar for SPV_INTEL_device_side_avc_motion_estimation extension.
    
    Testing: checkbuild.py on Linux; unit tests on Windows
    Change-Id: I09ecbec1a608c98703b1816c9b51f91b76790235
    
  - Merge pull request #114 from jeffbolznv/fsi
    
    Add SPV_EXT_fragment_shader_interlock
  - Add SPV_EXT_fragment_shader_interlock
    
  - Merge pull request #115 from dgkoch/SPV_NV_sm_shader_builts
    
    Add support for SPV_NV_sm_shader_builtins
  - Add support for SPV_NV_sm_shader_builtins
    
  - OpenCL ext. inst. header: Support C in addition to C++.
    
    Via #ifdef cplusplus.
    
  - Merge pull request #112 from mkinsner/master
    
    Proposed LoopControl bitfield allocation mechanism in spir-v.xml
  - Proposed LoopControl bitfield allocation mechanism in spir-v.xml
    
  - Merge pull request #111 from Naghasan/codeplay-range
    
    Reserve token range for Codeplay
  - Reserve token range for Codeplay
    
  - Merge pull request #102 from ianromanick/INTEL_shader_integer_functions2
    
    Add INTEL_shader_integer_functions2
  - Merge pull request #107 from jeffbolznv/duplicate_enum_switch
    
    Update HasResultAndType code generation to skip duplicate enum values
  - Update HasResultAndType code generation to skip duplicate enum values. There weren't any until SPIR-V 1.4 release, now there are two.
    
  - Merge pull request #106 from alankemp/fix_json_writer
    
    Compare enum names rather than values to determine last element
  - Compare enum names rather than values to determine last element
    
  - Merge pull request #103 from amdrexu/bugfix
    
    Enable Groups capability by the extension SPV_AMD_shader_ballot
  - Enable Groups capability by the extension SPV_AMD_shader_ballot
    
  - Add INTEL_shader_integer_functions2
    
  - Move to version 1.4 of SPIR-V.
    
  - Rationalize opcode ordering and a few spaces.
    
  - Merge pull request #101 from dneto0/clspv-generator
    
    Reserve generator 21 for Clspv
  - Reserve generator 21 for Clspv
    
  - Merge pull request #100 from jeffbolznv/hasresult
    
    Add a function that returns whether an opcode has a result and/or result type
  - Add a function that returns whether an opcode has a result and/or result type. Currently only implemented in C-based printers.
    
  - Merge pull request #99 from Naghasan/contact-update
    
    Update Codeplay's contact details
  - Update Codeplay's contact details
    
  - Add ability to skip ranges of instructions; no impact to public headers
    
  - Sync to rev. 7 of headers from Khronos.
    
  - Merge pull request #98 from jeffbolznv/partitioned
    
    Add GroupNonUniformPartitionedNV capability to all the GroupNonUniform instructions
  - Add GroupNonUniformPartitionedNV capability to all the GroupNonUniform instructions
    
  - Header build for previous grammar update.
    
  - Merge pull request #92 from PawelJurek/SPV_INTEL_device_side_avc_motion_estimation
    
    Grammar for SPV_INTEL_device_side_avc_motion_estimation extension.
  - Make all "IdScope" be either Execution or Memory.
    
    These two categories are officially discussed in the SPIR-V
    and Vulkan specifications. It was sometimes not clear what
    an "IdScope" of 'Scope' was.
    
  - Fix #96: Don't include a comment after #endif for the C header.
    
  - Merge pull request #95 from mkinsner/fpga_enum_block
    
    Reserve double SPIR-V enum block for upcoming Intel FPGA extension
  - Reserve double SPIR-V enum block for upcoming Intel FPGA extension
    
  - Merge pull request #94 from jeffbolznv/cooperative_matrix
    
    Add SPV_NV_cooperative_matrix
  - Add SPV_NV_cooperative_matrix
    
  - Grammar for SPV_INTEL_device_side_avc_motion_estimation extension.
    

* Update external/shaderc/spirv-tools from branch 'master-ndk'
  to 284f54391597c91fa0641cef62fa1efc2c75d27e
  - Merge remote-tracking branch 'aosp/upstream-master' into update-shaderc
    
    Includes
    08cc49ec Fix bug in 'split blocks', and add tests for fuzzer. (#2658)
    d01a3c3b Optimizer: Handle array type with OpSpecConstantOp length (#2652)
    4a00a80c Add fuzzer pass to add dead breaks. (#2654)
    620197bd Add fuzzer pass that adds useful constructs to a module (#2647)
    2c0111e6 Add validation for SPV_EXT_fragment_shader_interlock (#2650)
    699e167d Remove asserts from GetUnderlyingType (#2646)
    7919b877 Close opened file handles. (#2644)
    f99d7ad5 Validate OpenCL rules for ImageRead and OpImageSampleExplicitLod (#2643)
    209ff0ce Add spirv-fuzz pass to permute blocks. (#2642)
    e7866de4 Linker: Better type comparison for OpTypeArray and OpTypeForwardPointer (#2580)
    0125b28e Add compact ids to WebGPU <-> Vulkan transformations (#2639)
    3d62cb81 Instrument: Add version 2 of record formats (#2630)
    1b71e453 Add "split block" transformation. (#2633)
    f0518123 Add WebGPU specific fuzzer for validation (#2628)
    5a06fa46 Add fuzzer for Vulkan->WebGPU spirv-opt passes (#2626)
    78b2b186  Add fuzzer for WebGPU->Vulkan spirv-opt passes (#2625)
    6c7db9c6 Handle nested breaks from switches. (#2624)
    37ae8671 Add spirv-fuzz tool. (#2631)
    fe9f8701 Add library for spirv-fuzz (#2618)
    42abaa09 Remove MarkV and Stats code. (#2576)
    3b5ab540 linker: Add tests for various type comparisons (#2613)
    4c73ebc4 Enable the base branch to be overridden in the code format check script (#2607)
    b8fe7211 Allow arrays of out per-primitive builtins for mesh shaders (#2617)
    07a10197 Validate OpenCL environment rules for OpImageWrite (#2619)
    b0504239 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)
    4557d085 Add in individual flags for Vulkan <-> WebGPU passes (#2615)
    13f61bf8 Update vloadn and vstoren validation to match the OpenCL Extended Instruction Set Specification (#2599)
    d9c00e1d Add folding rules for OpQuantizeToF16 (#2614)
    713da30b Disallow merge targeting block with OpLoopMerge (#2610)
    60aaafbc Allows breaks selection breaks to switches (#2605)
    0982f021 Using the instruction folder to fold OpSpecConstantOp (#2598)
    9f035269 Validate OpenCL environment rules for OpTypeImage (#2606)
    47741f05 Validate OpenCL memory and addressing model environment rules (#2589)
    ff4feb44 Validate construct exits (#2459)
    9dfd4b83 Bindless Validation: Instrument descriptor-based loads and stores (#2583)
    7e7745fc Validate loop merge (#2579)
    fc7b5d8c Mem model spv 1.4 (#2565)
    84aa4946 Start SPIRV-Tools v2019.4
    ce19e217 Finalize SPIRV-Tools v2019.3
    84503583 Handle id overflow in sroa better. (#2582)
    f815e6fe Update CHANGES
    e935dac9 Make pointers to isomorphic type interchangeable with option. (#2570)
    2947e88f Update instrumentation passes to handle 1.4 interfaces (#2573)
    06ce59b0 Instrument: Fix load type of pre-existing builtin (#2575)
    87c4ef8a Do not fold floating point if float controls used (#2569)
    45fb6966 Use last version (#2578)
    f6d9a178 Add pass to fix some invalid unreachable blocks for WebGPU (#2563)
    89fe836f Fix clang-tidy warning about definition/declaration mismatch. (#2571)
    f2803c4a VK_KHR_uniform_buffer_standard_layout validation (#2562)
    cc3e93c4 Add tests for folding 1.4 selects (#2568)
    ea5e1b62 Update priv-to-local for SPIR-V 1.4 (#2567)
    d0a1f5a0 spvtest::Validate::CompileFailure: Don't leak the diagnostic (#2564)
    b74d92a8 ADCE support for SPIR-V 1.4 entry points (#2561)
    2b65a71d Fix use of 'is' operator for comparison (#2547)
    63f57d95 Support SPIR-V 1.4 (#2550)
    106c98d0 Validate sign of int types. (#2549)
    eef11cdb Update README with links to build artifacts. (#2548)
    5fc5303e [spirv] Package and upload builds. (#2544)
    6d04da22 Fix up type mismatches. (#2545)
    c8b09744 Add validation specific to OpExecutionModeId (#2536)
    a5da68d4 Remove stale comment (#2542)
    32af4261 Change implementation of post order CFG traversal (#2543)
    64faf6d9 Fix undefined bit shift in sroa. (#2532)
    dca3ea5e fix example.cpp (#2540)
    2de3e3c0 Add spirv-lesspipe.sh into SPIRV_SKIP_EXECUTABLES umbrella (https://github.com/KhronosGroup/SPIRV-Tools/issues/2497) (#2504)
    fb08224f Fix spirv-headers link in the README. (#2516)
    b68af7ca Add support for Private & Output to initializer decompose flag (#2537)
    736376db Remove Acquire, Release, and Relaxed from allowed Mem Sem bits for WebGPU (#2526)
    07c4dd4b Reduce runtime of array layout checks (#2534)
    7aad9653 Remove legacy utility functions (#2530)
    d754b705 Shorten names of cmake targets (#2531)
    ac878fcb Remove unreachable block validation (#2525)
    21712068 Validate that SPIR-V binary is encoded as little endian for WebGPU (#2523)
    3aad3e92 Change validation of memory semantics for OpAtomics* in WebGPU (#2519)
    048dcd38 Implement WebGPU->Vulkan initializer conversion for 'Function' variables (#2513)
    3335c611 reduce: Add two branch reduction passes (#2507)
    102e430a Add pass to legalize OpVectorShuffle for WebGPU (#2509)
    07ac7dee SPIRV-Tools requires python3 (#2510)
    98b3f26c Gate formatless checks on Vulkan env (#2486)
    2b46521c Add -fsantize to link flags. (#2506)
    82ebbbba README: fix formatting of requiring Python 'future' (#2500)
    9047de51 Accept OpBitCast in fix storage class. (#2505)
    d90aae9a reduce: miscellaneous fixes (#2494)
    7ce37d66 Fix use of Logf to avoid format security warning (#2498)
    0cb2d407 Add WebGPU->Vulkan and Vulkan->WebGPU flags in spirv-opt (#2496)
    9766b22b spirv-opt: Behave a bit better in the face of unknown instructions (#2487)
    3a0bc9e7 Add fix storage class code. (#2434)
    e8c2d95e Fix webgpu header file name in BUILD.gn (#2493)
    26c1b887 Update CHANGES
    236bdc00 Change prioritization of unreachable merge and continue (#2460)
    12e4a7b6 Handle variable pointer in some optimizations (#2490)
    01964e32 Add pass to generate needed initializers for WebGPU (#2481)
    4bd106b0 Handle dead infinite loops in DCE (#2471)
    8129cf2f Remove merge assert in block calculation (#2489)
    e2ddb937 reduce: add remove_selection_reduction_opportunity (#2485)
    c9874e50 Fix merge return in the face of breaks (#2466)
    0300a464 Maintain inst to block mapping in merge return (#2469)
    320a7de5 Validate that OpUnreacahble is not statically reachable (#2473)
    fcb84531 reduce: fix loop to selection pass for loops with combined header/continue block (#2480)
    2ff54e34 Handle function decls in Structured CFG analysis (#2474)
    42e6f1aa Add option to validate after each pass (#2462)
    fb075364 reduce: fix loop to selection dominance query (#2477)
    7d1b176c Improve reducer algorithm and other changes (#2472)
    ffbecae5 Check OpSampledImage is only passed into valid instructions (#2467)
    2d52cbee Add some val options to reduce (#2401)
    1f60f989 reduce: remove unreferenced blocks pass (#2398)
    08b54d9e Convert sampled consumers to being Instructions instead of IDs (#2464)
    e1a76269 Bindless Validation: Descriptor Initialization Check (#2419)
    9244e6ff Reverting commit da5a780ff9fff7e226ca84728075adabc4d1608c
    da5a780f Variable pointers cannot be an operand to OpArrayLength
    2ac348b5 Repair test for unused storage buffer with descriptor (#2436)
    e5455221 Add --strip-atomic-counter-memory (#2413)
    bdcb1551 Relax function call parameter check (#2448)
    5186ffed Remove duplicates from list of interface IDs in OpEntryPoint instruction (#2449)
    6df8a917 Add validation of storage classes for WebGPU (#2446)
    a5c06c90 Validator: no Storage comparison for pointer param (#2428)
    9d29c37a Removing decorations when doing constant propagation. (#2444)
    b75f4362 Add validation for ExecutionMode in WebGPU (#2443)
    b1ff15f2 Add missing DepthGreater case to Fragment only check (#2440)
    b12e7338 Implement WebGPU specific CFG validation (#2386)
    a2ef7be2 Add Linux ASAN bot configs. (#2427)
    07f80c4d Fix python scripts to work with python3 (#2426)
    86f6ac08 Add a test for two back-edges in a continue (#2418)
    5fb83a97 Allow NonWritable to target struct members. (#2420)
    32b0f673 Use correct option in spvTextToBinary. (#2416)
    d800bbba Handle back edges better in dead branch elim. (#2417)
    002ef361 Add validation for SPV_NV_cooperative_matrix (#2404)
    fc3897b5 Validate: (data) Block can't appear within a Block (#2410)
    37b584a7 Fixed undefined reference to 'clock_gettime' by linking rt library (#2409)
    a006cbc1 Non memory object as parameters. (#2415)
    4c43afca It is invalid to apply both Restrict and Aliased to the same <id> (#2408)
    fde69dcd Fix OpDot folding of half float vectors. (#2411)
    8eddde2e Don't change type of input and output var in dead member elim (#2412)
    
    Testing: checkbuild.py on Linux; unit tests on Windows
    Change-Id: I139ea5087d6ded8d4db7b9cc422dd50f0a4aa465
    
  - Fix bug in 'split blocks', and add tests for fuzzer. (#2658)
    
    There turned out to be a bug in the 'split blocks' transformation due
    to blocks being split while they were being iterated over.  This
    change fixes that issue, and adds tests that were able to expose the
    issue by running the fuzzer on some example shaders.
    
  - Optimizer: Handle array type with OpSpecConstantOp length (#2652)
    
    When it's an OpConstant or OpSpecConstant, then the literal
    values are compared.  If the OpSpecConstant also has a SpecId
    decoration, then that's also compared.
    
    Otherwise, it's an OpSpecConstantOp and we only compare the
    ID of the OpSpecConstantOp instruction itself.
    
    Fixes #2649
  - Add fuzzer pass to add dead breaks. (#2654)
    
    This pass randomly add breaks to the merge blocks of selection and
    loop constructs, such that the breaking edges will not be dynamically
    reachable.
    
  - Add fuzzer pass that adds useful constructs to a module (#2647)
    
    This new pass adds some basic ingredients to a module on which future
    passes are likely to depend, such as boolean constants and some
    specfic integer and floating-point values.  This is not a fuzzer pass
    in the true sense in that it does not employ randomization, but it
    makes sense to define it as a fuzzer pass since it is the first of a
    number of transformations passes that the fuzzer will run on a module.
    
  - Add validation for SPV_EXT_fragment_shader_interlock (#2650)
    
    
  - Remove asserts from GetUnderlyingType (#2646)
    
    Fixes #2463
  - Close opened file handles. (#2644)
    
    The close for the file handles was missing in the error cases.
    
    Fixes #2641
  - Validate OpenCL rules for ImageRead and OpImageSampleExplicitLod (#2643)
    
    Fixes #2594.
    
    Signed-off-by: Kevin Petit <kevin.petit@arm.com>
  - Add spirv-fuzz pass to permute blocks. (#2642)
    
    The blocks within each function in the module will be permuted in a
    randomized manner that respects dominance.
    
  - Linker: Better type comparison for OpTypeArray and OpTypeForwardPointer (#2580)
    
    * Types: Avoid comparing IDs for in Type::IsSameImpl
    
    When linking, we end up with duplicate types for imported and exported
    types, that needs to be removed. The current code would reject valid
    import/export pairs of symbols due to IDs mismatch, even if the types or
    constants behind those ID were the same.
    
    Enabled remaining type_match_test
    
    Fixes #2442
    
    
    
  - Add compact ids to WebGPU <-> Vulkan transformations (#2639)
    
    Fixes #2634
  - Instrument: Add version 2 of record formats (#2630)
    
    New version has additional word in stage-specific section. Also
    some changes in content for tesselation and compute shaders. Either
    version can be invoked at pass creation. This is done to ease integration
    and updating of validation layers. Version 1 is deprecated and eventually
    will go away.
    
    Also sneaking in fix to version 1 compute shaders.
  - Add "split block" transformation. (#2633)
    
    With this pass, the fuzzer can split blocks in the input module.  This
    is mainly useful in order to give other (future) transformations more
    opportunities to apply.
  - Add WebGPU specific fuzzer for validation (#2628)
    
    Fixes #2627
  - Add fuzzer for Vulkan->WebGPU spirv-opt passes (#2626)
    
    Fixes #2622
  -  Add fuzzer for WebGPU->Vulkan spirv-opt passes (#2625)
    
    Fixes #2623
    
  - Handle nested breaks from switches. (#2624)
    
    * Handle nested breaks from switches.
    
    There was a recent decision made to allow branches to the merge node of
    a switch even if the switch is not the first enclosing construct.  They
    can be generated by glslang from break statements in switches.
    
    Dead branch elimination seems to be the only optimization that will
    break because of this change, so I will update that optimizations.
    
    The change made are:
    
    - Track switches in structured cfg analysis.
    - In Dead branch elimination:
      - Look for nested breaks that will require a switch instruction.
      - Rewrite, but don't delete, switchs that are required even if it
        could be replaced by an unconditional branch.
      - When looking for the first break, consider the merge of a switch
        as well.
    
    See #2612.
    
    * Fix variable names and comments.
    
    * Add tests for the struct cfg analysis and switches.
    
    * Fix typos in comments.
    
  - Add spirv-fuzz tool. (#2631)
    
    The current tool can parse basic command-line argument, but generates
    a binary identical to the input binary, since no transformations are
    yet implemented.
  - Add library for spirv-fuzz (#2618)
    
    Adds a library for spirv-fuzz, consisting of a Fuzzer class that will
    transform a module with respect to (a) facts about the module provided
    via a FactManager class, and (b) a source of random numbers and
    parameters to control the transformation process provided via a
    FuzzerContext class.  Transformations will be applied via classes that
    implement a FuzzerPass interface, and both facts and transformations
    will be represented via protobuf messages.  Currently there are no
    concrete facts, transformations nor fuzzer passes; these will follow.
    
  - Remove MarkV and Stats code. (#2576)
    
    * Remove MarkV and Stats code.
    
    This Cl removes the MarkV and Stats code from SPIRV-Tools. This code was
    unused and currently un-maintained.
    
  - linker: Add tests for various type comparisons (#2613)
    
    This adds a number of tests that check that all types will match to
    identically written clones during linking, including nearly every Type
    and some combinations (e.g. Functions of Arrays of Floats). Intent is
    for use with https://github.com/KhronosGroup/SPIRV-Tools/pull/2580,
    however that PR focuses on issues with TypeArray whereas these tests are
    (more) comprehensive and test more subtle (and possibly incorrect)
    cases.
    
    A number of these tests fail, many are fixed by the aforementioned PR.
    Some additional tests involving TypeForwardPointer are currently
    disabled as they cause assertion failures.
  - Enable the base branch to be overridden in the code format check script (#2607)
    
    Default to master.
    
    Signed-off-by: Kevin Petit <kevin.petit@arm.com>
  - Allow arrays of out per-primitive builtins for mesh shaders (#2617)
    
    - PrimitiveID, Layer, ViewportIndex
    * Add validation tests for mesh builtins
    
  - Validate OpenCL environment rules for OpImageWrite (#2619)
    
    Fixes #2593.
    
    Signed-off-by: Kevin Petit <kevin.petit@arm.com>
  - 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)
    
    
  - Add in individual flags for Vulkan <-> WebGPU passes (#2615)
    
    Adds flags and/or documentation for individual transformation passes
    that had been missed in previous patches.
    
    Fixes #2574
  - Update vloadn and vstoren validation to match the OpenCL Extended Instruction Set Specification (#2599)
    
    
  - Add folding rules for OpQuantizeToF16 (#2614)
    
    Adding the folding rules for OpQuantizeToF16, and fixed some matching
    tests to check identify new lines.
  - Disallow merge targeting block with OpLoopMerge (#2610)
    
    Fixes #2588
    
    * Add a check that the merge block of OpLoopMerge may not be the block
    that contains the OpLoopMerge
      * add a test
  - Allows breaks selection breaks to switches (#2605)
    
    Fixes #2604
    
    * Allow selection constructs to branch to the nearest selection merge
    whose header is terminated by an OpSwitch
      * Cleanup break and continue checks generally
      * add tests
  - Using the instruction folder to fold OpSpecConstantOp (#2598)
    
    In order to try to reduce code duplication and to be able
    to fold more cases, we want to use the instruction folder
    when folding an OpSpecConstantOp with constant operands.
    
    A couple other changes are need to make this work.  First
    GetDefiningInstruction| in the constant manager is able
    to handle |type_id| being logically equivalent to another
    type, so we updated the interface, and removed the assert.
    
    Some tests were also updated because we not generate
    better code because constants are not duplicated as much
    as before.
    
    No need for new tests.  The functionality of the instruction folder is
    already tested.  There are tests check that the instruction folder is
    being used correctly for OpCompositeExtract and OpVectorShuffle in the
    existing test cases.
    
    Fixes #2585.
  - Validate OpenCL environment rules for OpTypeImage (#2606)
    
    It is currently not possible to use an Image Format that is
    not Unknown without requiring a capability forbidden by the
    OpenCL environment. As such the validation of Image Format
    currently leans on capability validation entirely.
    
    Fixes #2592.
    
    Signed-off-by: Kevin Petit <kevin.petit@arm.com>
    
  - Validate OpenCL memory and addressing model environment rules (#2589)
    
    Signed-off-by: Kevin Petit <kevin.petit@arm.com>
    
  - Validate construct exits (#2459)
    
    Validate structured exits from constructs
    
    * Add checks that exits from a construct are valid
    * Add Construct::IsStructuredExit()
     * uses specific rules for each type of construct
    * Added a test and check for #2213
    * Adding tests for bad loop and continue exits
    * Fix identification of continue block that prevented some selections
    from having any blocks
  - Bindless Validation: Instrument descriptor-based loads and stores (#2583)
    
    Essentially, support UBOs and SSBOs, scalar and array (sized and unsized).
  - Validate loop merge (#2579)
    
    Fixes #2559
    
    * Validate OpLoopMerge including loop controls
      * add tests
      * fix some bad tests
  - Mem model spv 1.4 (#2565)
    
    * Update memory model support for SPIR-V 1.4
    
    Fixes #2552
    
    * Upgrade memory model now supports two memory access operands for
    OpCopyMemory*
      * in all cases the pass will first generate two operands by either
      adding them or copying
      * updates accounts for multiple operands
      * tests
    
  - Start SPIRV-Tools v2019.4
    
  - Finalize SPIRV-Tools v2019.3
    
  - Handle id overflow in sroa better. (#2582)
    
    There is a case where sroa is not handling id overflow gracefully.  It
    is handled and an error message is output when the ids overflow.
    
    Fixes https://crbug.com/961030.
  - Update CHANGES
    
  - Make pointers to isomorphic type interchangeable with option. (#2570)
    
    * Make pointers to logically matching types interchangeable with option.
    
    DXC will be generating code where the function parameters will be a more
    generic type that the actual parameter.  They should be logically
    matching and the decorations of the actual parameter must be a superset
    of the decorations of the formal parameter.
    
    We want to accept this code with an options so that spirv-opt can then
    inline and fix the type mismatch.  We will accept this under a new
    options `--before-hlsl-legalization`.
    
    The new option will also imply `relax-logical-pointer` so that HLSL
    frontends will need to use just the one more generic option.
    
    Moved the |LogicallyMatches| to the validation state to make it
    available in more places.  Also added a parameter to have it check the
    decorations.  I did not do a separate function for the decorations
    because checking the decorations involves making sure the types
    logically match anyway.
    
    Fixes #2535 
  - Update instrumentation passes to handle 1.4 interfaces (#2573)
    
    
    Fixes #2556
    
    Added variables get added to entry point interfaces
    Add to input buffer too
  - Instrument: Fix load type of pre-existing builtin (#2575)
    
    Builtins may be declared int, so load with its pointee type and cast
    to uint if needed.
  - Do not fold floating point if float controls used (#2569)
    
    Fixes #2558
    
    * Mark floating point instructions as non-foldable if any
    SPV_KHR_float_controls capabilities are present
      * tests
  - Use last version (#2578)
    
    * Use grammar last version
    
    Fixes #2560
    
    * Parse last version and use it in checks
    
    * Update grammar header generation
    
    * Fix NonWritable tests
    
    * Fix check and add specific tests
    
  - Add pass to fix some invalid unreachable blocks for WebGPU (#2563)
    
    Attempts to split up unreachable blocks that are used both as a
    merge-block and a continue-target.
    
    Fixes #2429
  - Fix clang-tidy warning about definition/declaration mismatch. (#2571)
    
    Fix clang-tidy warning about definition/declaration mismatch.
    
  - VK_KHR_uniform_buffer_standard_layout validation (#2562)
    
    Add a command-line option to enable validating SPIR-V for
    implementations that support VK_KHR_uniform_buffer_standard_layout.
    
    
    
  - Add tests for folding 1.4 selects (#2568)
    
    Fixes #2554
    
    * Folding rules already handle 1.4 selects so I simply added some tests
    
  - Update priv-to-local for SPIR-V 1.4 (#2567)
    
    Fixes #2555
    
    * Fix a bug in validation where interfaces were considered non-unique
    between different entry points targeting the same function
      * added a test
    * Update private to local pass to remove localized private variables
    from entry point interfaces
      * added tests
  - spvtest::Validate::CompileFailure: Don't leak the diagnostic (#2564)
    
    
  - ADCE support for SPIR-V 1.4 entry points (#2561)
    
    Fixes #2551
    
    * Add support for 1.4 entry point interface lists
      * only input and output variables are automatically live
      * can clean up interfaces after DCE
      * added tests
    * allow opt tests to specify a target environment
    
    
  - Fix use of 'is' operator for comparison (#2547)
    
    The 'is' operator is not meant to be used for comparisons. It…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Linker does not deduplicate equivalent array types

5 participants