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

Added wrapper constructors for clCreateImageWithProperties #278

Merged

Conversation

shajder
Copy link
Contributor

@shajder shajder commented Oct 30, 2023

Added new constructors for Image1D, Image1DArray, Image1DBuffer, Image2D, Image2DArray, Image3D to wrap clCreateImageWithProperties features.

I have tested/discussed most of new constructors in real environment, here is modified juliavk sample (samples/vulkan/00_juliavk) adapted from @bashbaug repository to test new constructors.

Copy link
Contributor

@bashbaug bashbaug left a comment

Choose a reason for hiding this comment

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

LGTM, this seems like a useful addition.

     *  \param properties Optional list of properties for the image object and
     *                    their corresponding values. The non-empty list must
     *                    end with 0.

Is it desirable to detect cases when the list of properties does NOT end with zero and return some kind of error?

@shajder
Copy link
Contributor Author

shajder commented Aug 1, 2024

LGTM, this seems like a useful addition.

     *  \param properties Optional list of properties for the image object and
     *                    their corresponding values. The non-empty list must
     *                    end with 0.

Is it desirable to detect cases when the list of properties does NOT end with zero and return some kind of error?

Sounds good for me but ... in such case we should probably do the same in other locations eg. Buffer class, right ?

@bashbaug
Copy link
Contributor

bashbaug commented Aug 1, 2024

Sounds good for me but ... in such case we should probably do the same in other locations eg. Buffer class, right ?

Ah, good point. Let's save this for a later PR, then.

Last question for this PR: would it be possible to add some tests for this new functionality, similar to testBufferWithProperties?

@shajder
Copy link
Contributor Author

shajder commented Aug 1, 2024

would it be possible to add some tests for this new functionality, similar to testBufferWithProperties?

sure thing, are you thinking about this PR or separate ?

@bashbaug
Copy link
Contributor

bashbaug commented Aug 1, 2024

sure thing, are you thinking about this PR or separate ?

In this PR would be ideal, then it doesn't add to the backlog of unit test PRs we still need to review and merge.

Is this doable? If not, we'll merge now, and add it to the list (risk seems small).

@shajder
Copy link
Contributor Author

shajder commented Aug 1, 2024

Is this doable?

I will complement shortly and let you know

@shajder
Copy link
Contributor Author

shajder commented Aug 2, 2024

would it be possible to add some tests for this new functionality

@bashbaug I just added tests for Image2D and Image3D. What is missing is the rest of Image constructors, not only new but any tests for Image1D, Image1DArray, Image2DArray, worth creating an issue ?

@bashbaug
Copy link
Contributor

bashbaug commented Aug 2, 2024

Thanks, tests LGTM. The CI failures are unrelated to your change, so I'll just merge this.

@bashbaug bashbaug merged commit 3807f5c into KhronosGroup:main Aug 2, 2024
52 of 54 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.

2 participants