mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 04:30:10 +01:00
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:
parent
3aead7198b
commit
1ff4db1935
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue