Skip to content

Add AHB buffer map/unmap test#2607

Open
ahesham-arm wants to merge 1 commit intoKhronosGroup:mainfrom
ahesham-arm:ahb_buffer
Open

Add AHB buffer map/unmap test#2607
ahesham-arm wants to merge 1 commit intoKhronosGroup:mainfrom
ahesham-arm:ahb_buffer

Conversation

@ahesham-arm
Copy link
Collaborator

Add tests for clEnqueueMapBuffer and clEnqueueUnmapMemObject with a buffer created using a AHardwareBuffer

Add tests for clEnqueueMapBuffer and clEnqueueUnmapMemObject with a buffer
created using a AHardwareBuffer

Signed-off-by: Alex Davicenko <alex.davicenko@arm.com>
void *mapped_ptr =
clEnqueueMapBuffer(queue, buffer, CL_BLOCKING, CL_MAP_READ, 0,
buffer_size, 0, nullptr, nullptr, &err);
test_error(err, "clEnqueueMapBuffer failed");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just noticed that clEnqueueAcquireExternalMemObjectsKHR and clEnqueueReleaseExternalMemObjectsKHR are missing in this test and in lifetime_buffer, lifetime_image and sub_buffer.
They need to be called to comply with the spec:

Applications must acquire the memory objects that are created using external handles before they can be used by any OpenCL commands queued to a command-queue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants