aboutsummaryrefslogtreecommitdiff
path: root/test/behavior/array.zig
diff options
context:
space:
mode:
authorRobin Voetter <robin@voetter.nl>2024-06-02 15:57:18 +0200
committerRobin Voetter <robin@voetter.nl>2024-06-10 20:32:43 +0200
commit4bd9d9b7e0d769dd8d7701b73e54ae249ac7f1da (patch)
treeff9124805c74888ba8d08df4ae406caba37ff4ba /test/behavior/array.zig
parentb9d738a5cff0ab896c25f1c8abe15757bcd6a0ba (diff)
downloadzig-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/behavior/array.zig')
0 files changed, 0 insertions, 0 deletions