diff options
| author | Robin Voetter <robin@voetter.nl> | 2024-06-02 15:57:18 +0200 |
|---|---|---|
| committer | Robin Voetter <robin@voetter.nl> | 2024-06-10 20:32:43 +0200 |
| commit | 4bd9d9b7e0d769dd8d7701b73e54ae249ac7f1da (patch) | |
| tree | ff9124805c74888ba8d08df4ae406caba37ff4ba /test/compile_errors.zig | |
| parent | b9d738a5cff0ab896c25f1c8abe15757bcd6a0ba (diff) | |
| download | zig-4bd9d9b7e0d769dd8d7701b73e54ae249ac7f1da.tar.gz zig-4bd9d9b7e0d769dd8d7701b73e54ae249ac7f1da.zip | |
spirv: change direct vector child repr to direct
Previously the child type of a vector was always in indirect representation.
Concretely, this meant that vectors of bools are represented by vectors
of u8.
This was undesirable because it introduced a difference between vectorizable
operations with a scalar bool and a vector of bool. This commit changes the
representation to be the same for vectors and scalars everywhere.
Some issues arised with constructing vectors: it seems the previous temporary-
and-pointer approach does not work properly with vectors of bool. To work around
this, simply use OpCompositeConstruct. This is the proper instruction for this,
but it was previously not used because of a now-solved limitation in the
SPIRV-LLVM-Translator. It was not yet applied to Zig because the Intel OpenCL
CPU runtime does not have a recent enough version of the translator yet, but
to solve that we just switch to testing with POCL instead.
Diffstat (limited to 'test/compile_errors.zig')
0 files changed, 0 insertions, 0 deletions
