clover/nir: Calculate sizes of images and samplers properly

Clover uses very specific sizes and alignments for images and samplers
to pass various bits of data.  We need to add a new size/align helper
for inputs which matches the standard CL size/align for most types but
also has the right size/align for images and samplers.

v2 (Karol): use sizeof(cl_mem) instead of 8 to fix 32 bit runtimes.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7069>
1 file changed