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 get_image_width() kernel method for 1D texel buffers #724

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

dneto0
Copy link
Contributor

@dneto0 dneto0 commented Oct 8, 2024

Return the image_width specified by the cl_image_desc.

The underlying buffer might be bigger than strictly necessary, because the rowPitch might have padding larger than a single pixel.

Therefore, when creating the underlying buffer view, use a view size of element_size() * width() instead of WHOLE_SIZE.

Fixed: #723

Return the image_width specified by the cl_image_desc.

The underlying buffer might be bigger than strictly necessary, because
the rowPitch might have padding larger than a single pixel.

Therefore, when creating the underlying buffer view, use a view
size of element_size() * width() instead of WHOLE_SIZE.

Fixed: kpet#723
@dneto0
Copy link
Contributor Author

dneto0 commented Oct 8, 2024

@rjodinchr @kpet PTAL

Copy link
Owner

@kpet kpet left a comment

Choose a reason for hiding this comment

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

Thanks!

@kpet kpet merged commit a300662 into kpet:main Oct 9, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

get_image_width on 1Dbuffer is returning the wrong value
3 participants