Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 1D buffer image tests #2073

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ahesham-arm
Copy link
Contributor

Buffer size needs to be greater than or equal the image row pitch which was not the case.

Buffer size needs to be greater than or equal the image row pitch
which was not the case.
@@ -67,9 +67,7 @@ static int test_get_1Dimage_buffer_info_single(cl_context context,
if (gDebugTrace)
log_info(" - Creating 1D image %d ...\n", (int)imageInfo->width);

buffer = clCreateBuffer(
context, flags, imageInfo->width * get_pixel_size(imageInfo->format),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This seems to be the correct calculation but line 264 in this file modifies this value as such:

do
{
    extraWidth++;
    imageInfo.rowPitch += extraWidth;
} while ((imageInfo.rowPitch % pixelSize) != 0);

@JorWag
Copy link

JorWag commented Sep 18, 2024

Thanks, this addresses the issues we saw in ./test_kernel_image_methods.

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.

3 participants