About "error: structures may not contain pointers"
The code that generated the error: ` struct Params { __global const float* arr_in; __global float* arr_out; };
__kernel void foo(__constant struct Params* p) { int idx = (int)get_global_id(0); p->arr_out[idx] = 1025.0 - p->arr_in[idx]; } ` I know that in OpenCL 1.2, structures that are used as kernel paramters cannot contain pointer. However, I also notice that clspv has started to support C++ so I assume clspv doesn't stick to the OpenCL 1.2 restrictions?
Here if we consider the extensions "GL_EXT_buffer_reference" and "GL_EXT_buffer_reference2", IMO it makes sense for clspv to remove the restriction in question, because it is possible to interpret the pointer members of a parameter struct as buffer references, and user is expected to attach VkDeviceAddress values to these fields.
However, I don't know much about compilers. I guess the actual implementation might be tricky.
There are no near term plans to implement support for SPV_KHR_physical_storage_buffer.