runtime: fix potential curbe allocation issue.
authorZhigang Gong <zhigang.gong@intel.com>
Tue, 1 Jul 2014 04:50:36 +0000 (12:50 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Tue, 1 Jul 2014 07:26:01 +0000 (15:26 +0800)
commit43138b8dccdbafa9ee095ca5dcbf9fa5e85dfdb2
treec86fd4fd3359705f59d69875be61e201c9283fff
parenta1ebbf7d61fa357a645b28580aafa44a20d4197b
runtime: fix potential curbe allocation issue.

According to spec, different platforms have different curbe
allocation restrication. The previous code set the curbe
allocated size to 480 statically which is not correct.

This patch change to always set the curbe entry num to 64
which is the maximum work group size. And set proper curbe
allocation size according to the platform's hard limitation
and a relatively reasonable kernel argument usage limitation.

v3:
when we call load_vte_state, we already know the eaxctly constant urb
size used in the current kernel. We could choose a smallest valid curbe
size for this kernel. And if the size exceed the hardware limitation,
we report it as a warning here.

Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Reviewed-by: "Song, Ruiling" <ruiling.song@intel.com>
src/cl_gt_device.h
src/intel/intel_gpgpu.c