When reading from an image3d_t (base type being short) with any sampler (any combination of allowed values), accessing the position using the overloaded read_imagei(image3d_t, sampler_t, float4), odd things start to happen. See attached image. It doesn't matter if you floor/ceil the position first. If you cast the position to an int4 and use read_imagei(image3d_t, sampler_t, int4) instead, all works fine. Also, the issue doesn't seem to be the read itself, but the read in combination with a follow-up read in an env-map. This problem does not occur on GPUs made by competitors.
Explanation of the image:
This is a basic volume renderer (using ray-marching), which draws a background if nothing is hit, and draws a background (with 1/2 * intensity) if a voxel with a specific value is hit.
If drawing a constant color when hitting a voxel of interest, no issues can be observed.
*EDIT: I have attached a minimal example containing a basic application which produces this issue and writes an image to a out.ppm file. The folder also contains my clinfo. Thanks
CPU: Dual Xeon E5 2630 v3
RAM: 32GB DDR4
GPU: AMD Vega 56
OS: Ubuntu 20.04
OpenCL user space driver: amdgpu-pro-20.30-1109583-ubuntu-20.04