Skip to content

core(ocl): Don't query image formats when none exist#16723

Merged
opencv-pushbot merged 1 commit intoopencv:3.4from
jansol:master
Mar 5, 2020
Merged

core(ocl): Don't query image formats when none exist#16723
opencv-pushbot merged 1 commit intoopencv:3.4from
jansol:master

Conversation

@jansol
Copy link
Copy Markdown

@jansol jansol commented Mar 3, 2020

Fix for an issue encountered while testing opencv master with a WIP backend of pocl:

clGetSupportedImageFormats returns CL_INVALID_VALUE if called with
num_entries set to 0 and a non-NULL image_formats pointer. The old code will do this if no formats for a given type are available.

Pull Request Readiness Checklist

  • I agree to contribute to the project under OpenCV (BSD) License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
  • The PR is proposed to proper branch

@alalek
Copy link
Copy Markdown
Member

alalek commented Mar 3, 2020

Thank you for contribution!

This patch should go into 3.4 branch first. We will merge changes from 3.4 into master regularly (weekly/bi-weekly).

So, please:

  • change "base" branch of this PR: master => 3.4 (use "Edit" button near PR title)
  • rebase your commits from master onto 3.4 branch. For example:
    git rebase -i --onto upstream/3.4 upstream/master
    (check list of your commits, save and quit (Esc + "wq" + Enter)
    where upstream is configured by following this GitHub guide and fetched (git fetch upstream).
  • push rebased commits into source branch of your fork (with --force option)

Note: no needs to re-open PR, apply changes "inplace".

clGetSupportedImageFormats returns CL_INVALID_VALUE if called with
num_entries 0 and a non-NULL image_formats pointer so let's not do that.
@jansol jansol changed the base branch from master to 3.4 March 4, 2020 12:16
Copy link
Copy Markdown
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

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

Looks good to me! Thank you for contribution 👍

@opencv-pushbot opencv-pushbot merged commit a694e50 into opencv:3.4 Mar 5, 2020
@alalek alalek mentioned this pull request Mar 6, 2020
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