mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-21 07:50:35 +01:00
clover: validate image_row_pitch and image_slice_pitch in clEnqueueMapImage
v2 (Karol Herbst): remove filling values as it was incorrect. 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
1ff4db1935
commit
9583ce04db
1 changed files with 6 additions and 0 deletions
|
|
@ -838,6 +838,12 @@ clEnqueueMapImage(cl_command_queue d_q, cl_mem d_mem, cl_bool blocking,
|
|||
validate_object(q, img, origin, region);
|
||||
validate_map_flags(img, flags);
|
||||
|
||||
if (!row_pitch)
|
||||
throw error(CL_INVALID_VALUE);
|
||||
|
||||
if (img.slice_pitch() && !slice_pitch)
|
||||
throw error(CL_INVALID_VALUE);
|
||||
|
||||
void *map = img.resource_in(q).add_map(q, flags, blocking, origin, region);
|
||||
|
||||
auto hev = create<hard_event>(q, CL_COMMAND_MAP_IMAGE, deps);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue