This has already been reported earlier (https://community.amd.com/thread/169828) for Catalyst 14.12 and was marked as resolved as the sample code I posted no longer reproduces the problem in Catalyst 15.7. However, if I slightly modify the sample (specifically, make the source image width not multiple of 4), the code no longer works correctly. I'm attaching a new sample.
Interestingly, if the region width is not a multiple of 4, everything is working fine.
In other words:
As before, the error is reproducible on a HD 7970, but with a newer driver - Catalyst 15.7.
Thanks for reporting and providing the reproducible test-case. I'll check and get back to you.
Just to update you. It seems that clEnqueueWriteBufferRect/clEnqueueReadBufferRect is still broken for Cayman card (HD 6950) [OpenCL in 15.7 driver still doesn't work]. I've reported that issue and the above observation to the concerned team. They are working on it. If I get any further update, I'll share with you.
@dipak I know these threads are always giving you inflammatory responses but why is this still a thing?
My apologies for this delayed reply.
Nothing like that. Rather I would like to thank you for keeping your patience.
Actually, right now, I don't have any satisfactory answer of your question. I know that clEnqueueWriteBufferRect issue is an old one and resurfaced many times. Last time when a similar bug got fixed, I doubt, few test-cases were skipped at the validation process. As a result, it still persists.
I'll try to get more information about the current status of the issue and share with you.