cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

boxerab
Challenger

Strange clEnqueueMapImage/clEnqueueUnmapMemObject behaviour

Windows 10

Latest Crimson Driver

RX 470

I created a 1024x1024 image and mapped it with the CL_MAP_WRITE flag,

but I only mapped a 64x64 region in the image.

Using the returned pointer, I filled the entire 1024x1024 image , and called clEnqueueUnmapMemObject.

I expected only the 64x64 region to be copied from host to device, but in fact the entire 1024x1024 region gets copied.

Is this expected behaviour ? This doesn't seem very efficient to me: if I only map a 64x64 region, then only this region

should get copied to the card.

Thanks,

Aaron

0 Likes
1 Solution

Hi Aaron,

The difference in behaviour looks an expected one. As I've come to know, though both types use pinned host memory, current implementation of CL_MEM_USE_HOST_PTR is little bit different than CL_MEM_ALLOC_HOST_PTR because of some alignments requirements. This may change in future.

Regards,

View solution in original post

0 Likes
10 Replies