clover: Fix incorrect error check in clGetSupportedImageFormats

From CL1.2 Section 5.3.2:
  returns CL_INVALID_VALUE ... if num_entries is 0 and image_formats is not NULL.

We were checking the num_image_formats param, not num_entries.

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7069>
This commit is contained in:
Aaron Watry 2019-11-05 22:26:58 -06:00 committed by Karol Herbst
parent 3aead7198b
commit 1ff4db1935

View file

@ -260,7 +260,7 @@ clGetSupportedImageFormats(cl_context d_ctx, cl_mem_flags flags,
validate_flags(NULL, flags, false);
if (r_buf && !r_count)
if (r_buf && !count)
throw error(CL_INVALID_VALUE);
if (r_buf)