summaryrefslogtreecommitdiff
path: root/src/cl_command_queue.c
diff options
context:
space:
mode:
authorRuiling Song <ruiling.song@intel.com>2016-01-19 11:29:06 +0800
committerYang Rong <rong.r.yang@intel.com>2016-11-08 20:38:21 +0800
commit295b1cb6d1ac616dd4d9b4b2ef14934b86e3ffbf (patch)
tree362d23da596fa3f4b222fdadead7431136b4516a /src/cl_command_queue.c
parent07f879d60a62eb56f99d6e20f4bf363caf64a1ae (diff)
downloadbeignet-295b1cb6d1ac616dd4d9b4b2ef14934b86e3ffbf.tar.gz
GBE: Implement new constant solution for ocl2
Different from ocl 1.2, which gather all constant into one surface. ocl2 only gather program global/constant into one surface. But keep other constant passed through kernel argument in separate buffer. Signed-off-by: Ruiling Song <ruiling.song@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
Diffstat (limited to 'src/cl_command_queue.c')
-rw-r--r--src/cl_command_queue.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cl_command_queue.c b/src/cl_command_queue.c
index 7e7a8542..00442bf0 100644
--- a/src/cl_command_queue.c
+++ b/src/cl_command_queue.c
@@ -150,11 +150,12 @@ cl_command_queue_bind_surface(cl_command_queue queue, cl_kernel k, cl_gpgpu gpgp
{
/* Bind all user buffers (given by clSetKernelArg) */
uint32_t i;
+ uint32_t ocl_version = interp_kernel_get_ocl_version(k->opaque);
enum gbe_arg_type arg_type; /* kind of argument */
for (i = 0; i < k->arg_n; ++i) {
int32_t offset; // location of the address in the curbe
arg_type = interp_kernel_get_arg_type(k->opaque, i);
- if (arg_type != GBE_ARG_GLOBAL_PTR || !k->args[i].mem)
+ if (!(arg_type == GBE_ARG_GLOBAL_PTR || (arg_type == GBE_ARG_CONSTANT_PTR && ocl_version >= 200)) || !k->args[i].mem)
continue;
offset = interp_kernel_get_curbe_offset(k->opaque, GBE_CURBE_KERNEL_ARGUMENT, i);
if (offset < 0)