Several fixes for clover
- OpenCL 1.1 is being advertised even for devices that do not satisfy OpenCL 1.1’s increased requirements for local memory or parameter size.
- Pointers to local memory were not aligned to the pointee type.
- For the SPIR-V backend,
- The alignment of 3-component vectors was previously fixed but not its size.
- The standard SPIR-V restrictions on the number of parameter to a kernel do not seem to apply to OpenCL, and causes validation to fail for OpenCL CTS’s api.min_max_parameter_size test if a device exposes more than the minimum of 1024 bytes.
- Lastly, not a fix but a quality of life improvement when updating clover’s dispatch table against the official one.
Note: I have not tested the change to src/gallium/frontends/clover/llvm/codegen/common.cpp, so if someone with such a setup could test it that would be great (ideally against OpenCL CTS’s basic.kernel_memory_alignment_local test).
Cc: @currojerez, @karolherbst, @edb