More aggressively prune unreachable code as follows.
When no control flow edges reach a merge block or continue target:
- delete their contents so that:
- a merge block becomes OpLabel, then OpUnreachable
- a continue target becomes OpLabel, then an OpBranch back to the
loop header
- any basic block which is dominated by such a merge block or continue
target is removed as well.
- decorations targeting the removed instructions are removed.
Enables the SPIR-V builder post-processing step the GLSLANG_WEB case.
Makes some white-space differences in most output, plus a few cases
where more could have been put out but was cut short by the previous
fix-sized buffer.
This PR adds the ability to pass structuredbuffer types by reference
as function parameters.
It also changes the representation of structuredbuffers from anonymous
blocks with named members, to named blocks with pseudonymous members.
That should not be an externally visible change.
This is a partial implemention of structurebuffers supporting:
* structured buffer types of:
* StructuredBuffer
* RWStructuredBuffer
* ByteAddressBuffer
* RWByteAddressBuffer
* Atomic operations on RWByteAddressBuffer
* Load/Load[234], Store/Store[234], GetDimensions methods (where allowed by type)
* globallycoherent flag
But NOT yet supporting:
* AppendStructuredBuffer / ConsumeStructuredBuffer types
* IncrementCounter/DecrementCounter methods
Please note: the stride returned by GetDimensions is as calculated by glslang for std430,
and may not match other environments in all cases.