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 minimum image size for cl_ext_image_requirements_info #1790

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ static inline size_t get_format_size(cl_context context,
cl_image_desc image_desc = { 0 };
image_desc.image_type = imageType;

/* Size 1 only to query element size */
image_desc.image_width = 1;
/* We use a width of 4 to query element size, as this is
the smallest possible value that satisfies the requirements
of all image formats (including extensions). */
image_desc.image_width = 4;
if (CL_MEM_OBJECT_IMAGE1D_BUFFER != imageType
&& CL_MEM_OBJECT_IMAGE1D != imageType)
{
Expand Down
Loading