clover: implement clSetKernelArgSVMPointer
authorKarol Herbst <kherbst@redhat.com>
Mon, 12 Mar 2018 10:04:53 +0000 (11:04 +0100)
committerMarge Bot <eric+marge@anholt.net>
Wed, 15 Apr 2020 11:08:13 +0000 (11:08 +0000)
commitd6754eb92072332fc6e7d22dd98628d22ce76531
treeb3eb2d24d2ac0d5933fcbaf028c2c5a8a9e1712e
parent035e882819bcb853fff7a59c638a0ecbf89cb762
clover: implement clSetKernelArgSVMPointer

it is pretty much identical to a clSetKernelArg for a scalar field, except
it is only valid for global and constant memory pointers.

Also the type equals void* on the Host, so we can just check the size of it.

v2: prefer using target_size to extend the pointer value
v3: handle more corner cases in combiation to clSetKernelArg

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2076>
src/gallium/state_trackers/clover/api/kernel.cpp
src/gallium/state_trackers/clover/core/kernel.cpp
src/gallium/state_trackers/clover/core/kernel.hpp