[Mesa-dev] [PATCH 1/3] clover: Default to required minimum for CL_DEVICE_MAX_MEM_ALLOC_SIZE

Francisco Jerez currojerez at riseup.net
Fri Sep 21 06:21:15 PDT 2012


Tom Stellard <tom at stellard.net> writes:

> From: Tom Stellard <thomas.stellard at amd.com>
>
> ---
>  src/gallium/state_trackers/clover/api/device.cpp | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/state_trackers/clover/api/device.cpp b/src/gallium/state_trackers/clover/api/device.cpp
> index 1a9127b..636bdc0 100644
> --- a/src/gallium/state_trackers/clover/api/device.cpp
> +++ b/src/gallium/state_trackers/clover/api/device.cpp
> @@ -126,7 +126,8 @@ clGetDeviceInfo(cl_device_id dev, cl_device_info param,
>                                        dev->max_images_write());
>  
>     case CL_DEVICE_MAX_MEM_ALLOC_SIZE:
> -      return scalar_property<cl_ulong>(buf, size, size_ret, 0);
> +      return scalar_property<cl_ulong>(buf, size, size_ret,
> +             std::max(dev->max_mem_global() / 4, (cl_ulong)(128 * 1024 * 1024)));
>  
Can we fix this right with a new compute cap for the maximum allocation
size?

>     case CL_DEVICE_IMAGE2D_MAX_WIDTH:
>     case CL_DEVICE_IMAGE2D_MAX_HEIGHT:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 229 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120921/c47d5abb/attachment-0001.pgp>


More information about the mesa-dev mailing list