Module: Mesa Branch: master Commit: 1ff4db1935111593540dd0e1341cb89aa7a67b36 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1ff4db1935111593540dd0e1341cb89aa7a67b36
Author: Aaron Watry <[email protected]> Date: Tue Nov 5 22:26:58 2019 -0600 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 <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Karol Herbst <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7069> --- src/gallium/frontends/clover/api/memory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/frontends/clover/api/memory.cpp b/src/gallium/frontends/clover/api/memory.cpp index ccf5edf620e..cf29657f675 100644 --- a/src/gallium/frontends/clover/api/memory.cpp +++ b/src/gallium/frontends/clover/api/memory.cpp @@ -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) _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
