.profiling_timer_resolution = 80, /* ns */
.endian_little = CL_TRUE,
.available = CL_TRUE,
-.compiler_available = CL_FALSE, /* XXX */
+.compiler_available = CL_TRUE,
.execution_capabilities = CL_EXEC_KERNEL | CL_EXEC_NATIVE_KERNEL,
.queue_properties = CL_QUEUE_PROFILING_ENABLE,
.platform = NULL, /* == intel_platform (set when requested) */
if (atomic_dec(&k->ref_n) > 1) return;
/* Release one reference on all bos we own */
if (k->bo) cl_buffer_unreference(k->bo);
- if (k->const_bo) cl_buffer_unreference(k->const_bo);
/* This will be true for kernels created by clCreateKernel */
if (k->ref_its_program) cl_program_delete(k->program);
/* Release the curbe if allocated */
TRY_ALLOC_NO_ERR (to, CALLOC(struct _cl_kernel));
SET_ICD(to->dispatch)
to->bo = from->bo;
- to->const_bo = from->const_bo;
to->opaque = from->opaque;
to->ref_n = 1;
to->magic = CL_MAGIC_KERNEL_HEADER;
/* Retain the bos */
if (from->bo) cl_buffer_reference(from->bo);
- if (from->const_bo) cl_buffer_reference(from->const_bo);
/* We retain the program destruction since this kernel (user allocated)
* depends on the program for some of its pointers
uint64_t magic; /* To identify it as a kernel */
volatile int ref_n; /* We reference count this object */
cl_buffer bo; /* The code itself */
- cl_buffer const_bo; /* Buffer for all __constants values in the OCL program */
cl_program program; /* Owns this structure (and pointers) */
gbe_kernel opaque; /* (Opaque) compiler structure for the OCL kernel */
char *curbe; /* One curbe per kernel */
int i = 0;
int copyed = 0;
+ if (p->ref_n > 1)
+ return CL_INVALID_OPERATION;
+
if (options) {
if(p->build_opts == NULL || strcmp(options, p->build_opts) != 0) {
if(p->build_opts) {