row_pitch mishandled in ATI Radeon HD 7970

In clCreateImage2D, all but one of the implementations I’ve tried allows passing a row_pitch that is greater than the number of pixels in a row, so long as row_pitch is a multiple of the pixel size.

With the ATI Radeon HD 7970 (just installed and updated), the excess row_pitch is not ignored, so that the resultant image is skewed.

On Mac, I’ve tested an ATI Radeon HD 5870 and an nVidia GeForce GT 650M, which behave properly. On Windows, I’ve tested an nVidia GeForce GTX 680, which worked fine, and the ATI, which didn’t.

This is unfortunate, as it requires copying the CPU-resident image to eliminate any row padding before calling clCreateImage2D.

I’m unclear about what I should do about this, either as a work-around or reporting it. I assume that it’s the OpenCL driver that’s responsible.

Any suggestions?

Thanks.

You should post this with a complete minimal example reproducing the bug on the AMD OpenCL forums.

I have posted test code and a short example excerpt here:
http://devgurus.amd.com/message/1285928#1285928